746 Commits

Author SHA1 Message Date
Bart Van Assche
9c5406664a Bump the version number to 3.6.0
These changes have been generated by running the following command:

$ scripts/update-version 3 6 0
2021-12-29 19:19:14 -08:00
Bart Van Assche
c0151f6cda Bump the version number to 3.6.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-02 23:16:59 +00:00
Bart Van Assche
d3c92ea7aa Bump the version number to 3.5.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 03:38:21 +00:00
Bart Van Assche
e1f9a517c8 Port Kconfig files to kernel v5.9
Change '---help---' into 'help'. See also Linux kernel commit f70f74d15ca8
("kconfig: remove '---help---' support") # v5.9.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-20 02:07:40 +00:00
Bart Van Assche
143e9c9684 ib_srpt: Use a workqueue for processing RDMA completions
Use a workqueue for processing RDMA completions instead of creating one
kernel thread per RDMA channel. This change improves performance if the
number of RDMA channels is large by reducing the number of context
switches between kernel threads while processing RDMA completions. An
additional change is that srpt_set_ch_state() no longer wakes up the
RDMA completion context but that srpt_cm_rtu_recv() wakes up the RDMA
completion context instead.
    
See also https://github.com/bvanassche/scst/issues/33 .


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-03 04:56:01 +00:00
Bart Van Assche
98285d10fd Various fixes for issues detected by checkpatch
- Return EOPNOTSUPP instead of ENOTSUPP to user space.
- Do not terminate macro definitions with a trailing semicolon.
- Do not initialize static variables to zero.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9176 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-02 02:06:04 +00:00
Bart Van Assche
186798cec4 Use the fallthrough macro instead of a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 14:28:36 +00:00
Bart Van Assche
bd3355500a iscsi-scst, srpt: Rename the PRE_CFLAGS variable into CONFTEST_FLAGS
The latter name reflects better the role of this variable. Remove the
CPPFLAGS assignment from srpt/src/Kbuild because it is not useful.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9082 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 03:34:35 +00:00
Bart Van Assche
7cfc811542 Rename srpt/src/Makefile into srpt/src/Kbuild
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 02:58:29 +00:00
Bart Van Assche
8a22ef6289 ib_srpt, iscsi-scst: Port to Linux kernel v5.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:09:23 +00:00
Bart Van Assche
65d05a86d5 ib_srpt: Fix ARM compilation
The first argument of do_div() must have type uint64_t on the ARM architecture.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 01:26:37 +00:00
Bart Van Assche
7569ddaf2e Makefiles: Remove -Wextra
Since not all kernel header files are compatible with -Wextra, remove -Wextra.
To enable -Wextra, build SCST with W=1.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9054 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 01:18:24 +00:00
Bart Van Assche
c51cf132e1 iscsi-scst: Add network namespace support
This patch makes it possible to run the SCST iSCSI target software inside
a Docker container that uses another network namespace than the default.
    
See also https://github.com/bvanassche/scst/issues/24 .


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-06 16:27:41 +00:00
Bart Van Assche
9be61ba538 Move KBUILD_EXTRA_SYMBOLS definitions into the kernel Makefiles
$(KBUILD_EXTRA_SYMBOLS) is not only used at compile time but also at link
time. Move the $(KBUILD_EXTRA_SYMBOLS) definitions such that it is
available both at compile time and at link time.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:15:47 +00:00
Bart Van Assche
80ac4d2810 Use $(src) instead of $(KBUILD_EXTMOD)
While $(src) is always defined, $(KBUILD_EXTMOD) is only defined when
building code as an external module.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:12:09 +00:00
Bart Van Assche
ac0de9d485 ib_srpt: Limit the number of scatter/gather elements in RDMA READs to max_sge_rd
Additionally, declare the max_sge_delta parameter obsolete.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8983 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-25 18:19:45 +00:00
Bart Van Assche
52497bb8b6 ib_srpt: Introduce a new local variable in srpt_map_sg_to_ib_sge()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8982 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-25 18:18:02 +00:00
Bart Van Assche
51dc30f27b ib_srpt: Fix the build for kernel versions before v5.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-24 15:57:29 +00:00
Bart Van Assche
67fad5fb7b ib_srpt: Backport the max_sge_delta calculation to kernel versions < v4.17
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8978 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-23 23:48:31 +00:00
Bart Van Assche
a8d1d39613 ib_srpt: Reduce the value of max_sge_delta
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8949 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-22 17:11:27 +00:00
Bart Van Assche
66b2a1ff73 ib_srpt: Report retries with debug level instead of error level
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-19 22:21:04 +00:00
Bart Van Assche
5ff1a5efb2 scst: Add more wait list state checks
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-19 22:18:13 +00:00
Bart Van Assche
27ab15f573 ib_srpt: Use kvmalloc() instead of vmalloc()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8941 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-19 22:14:31 +00:00
Bart Van Assche
de74677c56 ib_srpt: Remove two superfluous assignments
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8940 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-19 22:13:11 +00:00
Bart Van Assche
b2536f47cf ib_srpt: Reduce QP max_recv_sge to 1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-19 22:05:51 +00:00
Bart Van Assche
543989b3a2 ib_srpt: Prevent that large RDMA transfers trigger QP termination
Running fio at the initiator side with buffer size 1 MiB and when using
direct I/O triggers the following error with a ConnectX-3 and Linux kernel
v4.19 or later or CentOS 7.7 or later at the target side:

ib_srpt: RDMA t 4 for idx 20 failed with status 5. If this has not been triggered by a cable pull, please check the involved IB HCA's and cables.

This was observed with firmware version 2.42.5000 but this is probably
independent of the firmware version. Fix this by reducing the send SGE QP
limit. This patch increases ch->max_recv_sge for older kernel versions.

Reported-by: Chesnokov Gleb <Chesnokov.G@raidix.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8938 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-19 19:21:26 +00:00
Bart Van Assche
21edb121be ib_srpt: Fix handling of iWARP logins
The path_rec pointer is set for IB and RoCE logins but not for iWARP
logins. Hence check the path_rec pointer before dereferencing it.

See also upstream commit cbca2442a096 ("RDMA/srpt: Fix handling of iWARP
logins") # v5.5.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8934 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-17 21:02:43 +00:00
Bart Van Assche
d045ff5e26 srpt: Make zero-copy mode compatible with the scst_user device handler
The scst_user device handler allocates its own data buffers. If ib_srpt
uses zero-copy mode, copy data as required between the device handler and
zero-copy buffer.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8914 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-14 16:40:05 +00:00
Bart Van Assche
ecaab978f0 scst, scstadmin, ...: Bump the version number to 3.5.0-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8683 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-06 05:28:56 +00:00
Bart Van Assche
fa156aa40d scripts/update-version: Fix the code for updating the scstadmin version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8681 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 05:00:49 +00:00
Bart Van Assche
4c409a4b75 ib_srpt: Tweak the version number formatting
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8678 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 04:54:29 +00:00
Bart Van Assche
ce557f2f1c scst, fcst, iscsi-scst, srpt, ...: Bump version number to 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8674 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-03 04:22:16 +00:00
Bart Van Assche
f22d4bb63b scst, fcst, iscsi-scst, qla2x00t, srpt: Add module namespace support
This patch adds support for kernel module namespaces. This patch is essential
when using SCST in combination with kernel version v5.4 or later.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8673 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-30 00:54:20 +00:00
Bart Van Assche
ac145e1cb6 ib_srpt: Detect ib_sg_dma_len() presence at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v5.1 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 21:28:37 +00:00
Bart Van Assche
30c6cdfbe7 ib_srpt: Detect SRP_DATA_DESC_IMM constant support at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v4.21 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8653 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 20:40:51 +00:00
Bart Van Assche
22f1132073 Makefiles: Rework build mode switching
Move the build_mode file from the top level into the scst directory. Write
build mode defines into scst/include/build_mode.h and include that file
directly or indirectly in all source files that depend on these #defines.
This approach has the advantage that "make clean" does no longer has to
be run when switching between build modes because the kernel build system
recognizes build_mode.h as a dependency and triggers a rebuild of all
source files that directly or indirectly include the build_mode.h header
file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 18:19:38 +00:00
Bart Van Assche
33f2f4a064 Makefiles: Only read the build_mode file if building inside the SCST tree
This patch avoids that the build_mode file is read when applying the
generate-kernel-patch output to the kernel tree and when building the
kernel tree.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-23 17:11:26 +00:00
Bart Van Assche
dc7e039124 Makefiles: Remove most instances of $(SCST_INC_DIR)
Move the $(SCST_INC_DIR) definitions from the out-of-tree sections into
the in-kernel sections. Since SCST is now distributed as a single tar
archive, only support in-tree builds with $(SCST_INC_DIR) and $(SCST_DIR).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 22:10:21 +00:00
Bart Van Assche
70d3c72779 Makefiles: Use ccflags-y instead of EXTRA_CFLAGS
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8076 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:56:17 +00:00
Bart Van Assche
ef99fe40be fcst, srpt: Move the build_mode file to the top level
Additionally, rename BUILDMODE into BUILD_MODE and FCST/SRPTFLAGS into
BUILD_MODE_CFLAGS_.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:46:24 +00:00
Bart Van Assche
43a252aef2 scst, ib_srpt: Add support for kernel version v5.1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-21 02:54:31 +00:00
Bart Van Assche
08e532715d Remove procfs support
Since all RHEL/CentOS 5 users have upgraded to a newer version, procfs
support is no longer necessary. Hence remove procfs support. This patch
has been generated as follows:

git grep -lw CONFIG_SCST_PROC iscsi-scst qla2x00t scst scst_local srpt |\
  while read f; do
    echo ${f}
    unifdef -U CONFIG_SCST_PROC ${f} >${f}.out
    mv ${f}.out ${f}
  done

followed by two small manual edits in scst/include/scst.h and also in
qla2x00t/qla2x00-target/qla2x00t.c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-02 20:04:25 +00:00
Bart Van Assche
ae0037f88c ib_srpt: Fix the build against kernel version v2.6.30
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:14:12 +00:00
Bart Van Assche
434207ab53 ib_srpt: Restore immediate data support
This implementation conforms to the SRP2 standard and hence is compatible
with the immediate data implementation in the Linux kernel v4.21 SRP initiator.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 19:10:24 +00:00
Bart Van Assche
e170b8dabc ib_srpt: Port to Linux kernel v4.21
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 19:06:37 +00:00
Bart Van Assche
0a2b30f4c9 ib_srpt: Remove support for immediate data
Remove the non-standard support for immediate data from the ib_srpt driver.
This will make porting this driver to kernel v4.21 easier.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 19:05:41 +00:00
Bart Van Assche
d3e2f5ab99 Makefiles: Stop using $(SUBDIRS)
This patch avoids that the following warning is reported when building
against kernel v4.21:

================= WARNING ================
'SUBDIRS' will be removed after Linux 5.3
Please use 'M=' or 'KBUILD_EXTMOD' instead
==========================================


A quote from an upstream kernel patch:

commit 07e5823127155b3a29003aca926f87c9843f6810
Author: Andrew Morton <akpm@osdl.org>
Date:   Mon Apr 12 01:05:40 2004 -0700

    [PATCH] kbuild: external module support
    
    From: Sam Ravnborg <sam@ravnborg.org>
    
    Based on initial patch from Andreas Gruenbacher there is now better support
    for building external modules with kbuild.
    
    The preferred syntax is now:
    make -C $KERNELSRC M=$PWD
    
    but the old syntax:
    make -C $KERNELSRC SUBDIRS=$PWD modules
    will remain supported.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 19:03:14 +00:00
Bart Van Assche
20a98b73ad ib_srpt: Fix an out-of-bounds read that is triggered on kernel v4.4 and later
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7847 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 18:54:34 +00:00
Bart Van Assche
3dcace8794 Remove trailing whitespace from multiple files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 18:26:51 +00:00
Bart Van Assche
a5d5ee1868 ib_srpt: Minimize diffs with the upstream driver
Except for adding a few pr_info() statements, this patch does not change any
functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7840 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-16 01:09:10 +00:00