Commit Graph

959 Commits

Author SHA1 Message Date
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
93c2711530 iscsi-scst, srpt: Modify the message that reports which kernel headers are used
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 03:31:02 +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
856bd8c1a1 configure tests: Rename Makefiles into Kbuild
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9078 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 02:52:51 +00:00
Bart Van Assche
2029062924 iscsi-scst, ib_srpt: Add a MODULE_LICENSE() to the configure tests
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9077 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 00:53:52 +00:00
Bart Van Assche
4f36320d77 ib_srpt, iscsi-scst: Add the configure tests necessary for building against kernel v5.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:42:04 +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
502355bc8d srpt/Makefile: Revert a change that has been checked in accidentally
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 02:58:08 +00:00
Bart Van Assche
0a0a1bebe1 Ignore */conftest/*/build-output*.txt files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 02:55:33 +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
cf909e3e16 Makefiles: If both KDIR and KVER have been set, preserve KDIR
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 00:00:49 +00:00
Bart Van Assche
47403656ee Make 'make clean' remove all build files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:08:55 +00:00
Bart Van Assche
212fd12cba iscsi-scst, srpt: Improve run_conftest
Add -Wno-deprecated-declarations to the compiler flags for RHEL and CentOS.
Save the output of the build process such that it can be inspected easily.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:06:21 +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
f7fe23928f Change $(MODULE_SYMVERS) into Module.symvers
Or in other words, drop support for kernel versions before 2.6.18.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:11:16 +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
d12b0a0d91 Fix spelling in documentation and source code
See also https://github.com/bvanassche/scst/pull/20.

[ bvanassche: left out qla2x00t-32gbit changes and changed patch description ]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8920 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-15 18:53:48 +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
3f97a8d3cb iscsi-scst, srpt: Fix the build against MOFED 5
Reported-by: Grant Albitz <Cryptz@Cryptz.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8866 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-05-06 03:26:38 +00:00
Bart Van Assche
422d670126 srpt, isert-scst: Fix the build against MOFED
This patch is a fix for commit a169500590 ("Makefiles:
Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers"; r8686).

Reported-by: Grant Albitz <GAlbitz@All-Bits.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8758 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-28 04:28:19 +00:00
Bart Van Assche
a169500590 Makefiles: Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers
Copying Module.symvers is the oldest supported method for building external
kernel modules that depend on another external kernel module. Since support
for that method will be removed from Linux kernel v5.5, use
KBUILD_EXTRA_SYMBOLS instead to specify the external symbols SCST kernel
modules depend on. Support for KBUILD_EXTRA_SYMBOLS was introduced in
upstream kernel v2.6.26 so this patch drops support for kernels before
v2.6.26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8686 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-16 23:29:42 +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
50af8e3c4d ib_srpt/Makefile: Improve MOFED support on Debian
Instead of only checking the mlnx-ofed-kernel-dkms, also check the
mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: Combined two patches into this single change ]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:57:05 +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
9add460430 Suppress module signing error messages
Suppress the following error messages:

- SSL error:02001002:system library:fopen:No such file or directory: crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory

 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-29 22:33:03 +00:00
Bart Van Assche
84725029ce scst: Add support for signing SCST kernel modules
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-29 04:42:40 +00:00
Bart Van Assche
f6371c5d5e Makefiles: Run depmod also on Ubuntu systems after module installation
Fixes: e902f79ecf ("kernel module installation: Skip "depmod" when building an RPM"; r5612)



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-15 00:29:55 +00:00
Bart Van Assche
4af058edd4 srpt: Fix the build against Oracle Linux + MOFED
Disable DTrace when building against MOFED to avoid hitting compatibility
issue between DTrace and MOFED.

Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-31 01:23:20 +00:00
Bart Van Assche
8e862c6d9b iscsi-scst, srpt: Restore MOFED_MAJOR and MOFED_MINOR definitions
This patch reverts commit bcdb25e550 (r7363).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-30 13:41:27 +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