Commit Graph

305 Commits

Author SHA1 Message Date
Bart Van Assche
ba111e1804 Converted the two remaining scst_cmd_get_resp_data_len() calls.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-29 19:04:31 +00:00
Bart Van Assche
6213d95400 ib_srpt: fix SCSI residual handling.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-29 17:47:14 +00:00
Bart Van Assche
986844622a Fixed a performance regression caused by r2109.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2248 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 19:07:17 +00:00
Bart Van Assche
4a9ed0a7e1 Replaced cpu_to_be...() by __constant_cpu_to_be...() where appropriate.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-24 07:10:42 +00:00
Bart Van Assche
9f20d45776 Version number update.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2140 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-17 06:02:51 +00:00
Bart Van Assche
f5736f2b6a ib_srpt performance optimization.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2109 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-12 18:57:04 +00:00
Bart Van Assche
72fb7b3644 Shortened a kernel module parameter description.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-12 10:03:06 +00:00
Bart Van Assche
9878d2533f Reverted r2099.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2102 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-12 07:31:33 +00:00
Bart Van Assche
1c90d919d5 Removed unused code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2099 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-11 18:20:59 +00:00
Bart Van Assche
6aa2ebca55 Send back the proper error code when an SRP task management command fails.
Replaced a numeric constant by a symbolic one.
Renamed a function.
Updated several comments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2097 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-11 17:51:40 +00:00
Bart Van Assche
a40fdacb5f Pre-2.6.31 kernel compiler warning fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2092 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-11 08:21:35 +00:00
Bart Van Assche
ec2712759f Un-break nightly build.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2072 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 13:57:30 +00:00
Bart Van Assche
5edde5ec25 Eliminated the include/scst include path from the upstream ib_srpt Makefile.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 09:46:18 +00:00
Bart Van Assche
a86577a276 Only include the procfs header files when necessary.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2070 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 09:23:36 +00:00
Bart Van Assche
d84ec4d8ce Removed a superfluous include path.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-09 09:18:00 +00:00
Vladislav Bolkhovitin
c66ae1850e - get_transport_version() function changed to get target on entry
- transport versions propageted to user space handlers



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-06 21:45:48 +00:00
Vladislav Bolkhovitin
961d59ff40 - Version descriptors added
- Multi-transport support added to scst_local
 - Sysfs attributes "version" and "trace_level" added to scst_local



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-06 21:21:49 +00:00
Bart Van Assche
edac418f66 SRP_CRED_REQ autodetection is now disabled by default.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-31 06:30:59 +00:00
Bart Van Assche
725e090a94 Print an informational message instead of an error message for MRA (Message
Receipt Acknowledgement) messages.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2016 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-28 07:12:26 +00:00
Bart Van Assche
0e56ff520e Updated HA section.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1972 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-22 19:02:26 +00:00
Bart Van Assche
84649a0e60 Reverted r1442.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1971 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-21 15:58:47 +00:00
Bart Van Assche
314c1a5750 Documentation update.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-21 08:45:49 +00:00
Bart Van Assche
6c3b1e55be Corrected an error message.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-21 08:27:28 +00:00
Bart Van Assche
894190c09e Removed superfluous __attribute__((packed)).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-15 10:02:10 +00:00
Bart Van Assche
ed195d5e4f Added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-06 17:28:04 +00:00
Bart Van Assche
23a55be361 Fixed a compiler warning that was only reported on RHEL 5.x.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1905 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-02 17:01:06 +00:00
Bart Van Assche
e30376945f Changes:
- Made sure that in mode thread=1 not only send completions but also receive completions are processed in thread context.
- Merged IB send and receive completion queues again such that both types of completions are processed in a fairly.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-02 16:50:14 +00:00
Bart Van Assche
a851118fe6 Avoid that /sys/module/ib_srpt/parameters/srpt_service_guid contains a double newline.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1902 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-01 19:12:34 +00:00
Bart Van Assche
02d6dc9860 Functional changes:
- Changed default value for the kernel module parameter thread from 0 to 1 because mode 0 can trigger soft lockup complaints under sufficient load.
- Changed default value for the kernel module parameter srpt_autodetect_cred_req from false to true.
Non-functional changes:
- Removed several superfluous casts in ib_srpt.c.
Performance-related changes:
- Rearranged if/then/else statements such that the most frequently executed code occurs first.
- When SCST_MAX_TGT_DEV_COMMANDS > 128, the SRP receive queue size is now SCST_MAX_TGT_DEV_COMMANDS instead of 128.
Bug fixes:
- Fixed performance bug in modes thread=0 and 2.
- Fixed a bug in IB send queue overflow handling.
- Fixed race related to IB completion thread creation (mode thread=1).
- Made sure that the following warning is no longer triggered during module removal:
WARNING: at fs/proc/generic.c:825 remove_proc_entry+0x261/0x2f0()
Call Trace:
 [<ffffffff8104d74b>] warn_slowpath_common+0x7b/0xc0
 [<ffffffff8104d7f1>] warn_slowpath_fmt+0x41/0x50
 [<ffffffff8116e8a1>] remove_proc_entry+0x261/0x2f0
 [<ffffffff810832c8>] ? debug_check_no_locks_freed+0xc8/0x150
 [<ffffffff81082ecb>] ? mark_held_locks+0x6b/0xa0
 [<ffffffff8110f95f>] ? kfree+0xcf/0x180
 [<ffffffff810831a5>] ? trace_hardirqs_on_caller+0x145/0x190
 [<ffffffff810831fd>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffffa05835c2>] srpt_unregister_procfs_entry+0x22/0x40 [ib_srpt]
 [<ffffffffa0583aba>] srpt_release+0x8a/0x1a0 [ib_srpt]
 [<ffffffffa04cbcc0>] scst_unregister_target+0x70/0x3f0 [scst]
 [<ffffffff811bf6d7>] ? kobject_put+0x27/0x60
 [<ffffffff8126ff67>] ? put_device+0x17/0x20
 [<ffffffffa058587e>] srpt_remove_one+0xee/0x1a0 [ib_srpt]
 [<ffffffffa03ddfc5>] ib_unregister_client+0x65/0x120 [ib_core]
 [<ffffffffa0588f43>] srpt_cleanup_module+0x5f/0xc3 [ib_srpt]
 [<ffffffff8108e8dd>] sys_delete_module+0x1bd/0x280
 [<ffffffff8135e5ad>] ? retint_swapgs+0xe/0x13
 [<ffffffff810831a5>] ? trace_hardirqs_on_caller+0x145/0x190
 [<ffffffff810030db>] system_call_fastpath+0x16/0x1b
---[ end trace 3fc26663490f6a89 ]---

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1901 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-01 14:40:54 +00:00
Bart Van Assche
1590390350 Reordered two fields in struct srpt_rdma_ch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-08-01 12:47:00 +00:00
Bart Van Assche
d402b1e851 Command abortion bug fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1899 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 15:28:56 +00:00
Bart Van Assche
b9c3b09613 Checkpatch fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1898 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 15:03:04 +00:00
Bart Van Assche
7ef2bc926e Made ib_srpt_compl kernel thread logging more detailed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 14:53:22 +00:00
Bart Van Assche
02cfb12400 Fixed a bug in the algorithm that decides when to send SRP_CRED_REQ.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1896 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 14:45:41 +00:00
Bart Van Assche
ffe7409533 Changed behavior of mode thread=1: IB completions are now entirely processed on thread context and there is now one thread per session instead of one thread for all sessions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1895 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 14:32:44 +00:00
Bart Van Assche
49cbea848a Dynamically decrease the initiator's SRP queue depth if it supports SRP_CRED_REQ and scst_get_max_lun_commands(NULL, 0) (48 with unmodified scst_priv.h) is less than SRPT_RQ_SIZE (128 with unmodified ib_srpt.h).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1894 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-30 11:26:40 +00:00
Bart Van Assche
9ce80877d2 Added support for SRP_CRED_REQ and auto-detection of initiator SRP_CRED_REQ support (disabled by default).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1891 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-29 14:21:16 +00:00
Bart Van Assche
f299b1d2b3 Micro-optimization: replaced a spinlock by an atomic variable.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-28 10:15:33 +00:00
Bart Van Assche
803a312144 Replaced busy-waiting for more credits by wait_for_completion().
Moved processing delay loop out of interrupt context.
Preparations for SRP_CRED_REQ support and run-time receive queue selection.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1880 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 16:23:45 +00:00
Bart Van Assche
8873db3eb6 Split a line.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-27 16:07:30 +00:00
Bart Van Assche
747511e3b8 IB verbs compliance fix: drain the completion queues before destroying them.
Moved some thread=1 related functions in ib_srpt.c such that these are grouped in the source file.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 13:13:45 +00:00
Bart Van Assche
0925119ad8 Made sure that invocation of srpt_pending_cmd_timeout() after
srpt_handle_rdma_comp() finished and before srpt_xmit_response() started works
properly.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1875 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 09:34:20 +00:00
Bart Van Assche
1c64261bec Increased default send queue size from 2048 to 4096 and made the send queue
size configurable via the kernel module parameter srpt_sq_size.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1874 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-25 09:15:10 +00:00
Bart Van Assche
95bba60a0a Fixed a bug in the command abortion logic that could result rmmod ib_srpt to hang.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1873 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 16:47:29 +00:00
Bart Van Assche
ef509acbd8 Refined the timeout error message.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 11:46:29 +00:00
Bart Van Assche
dc80bce266 Fixed a race between initiator and target in the algorithm for computing the REQUEST LIMIT DELTA value sent in responses towards the initiator that could cause the initiators req_lim value temporarily to exceed 128 (SRPT_RQ_SIZE). While harmless, this caused messages like "ib_srpt: ***ERROR***: req_lim = -1 < 0" to appear in the target kernel log.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1871 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-24 08:35:28 +00:00
Bart Van Assche
a9d5ab6737 Added --group_reporting.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 13:41:59 +00:00
Bart Van Assche
06b4f6d8aa Increased SRP initiator lockup safety margin, fixed a sparse warning and added more comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 13:41:55 +00:00
Bart Van Assche
7322ff6c24 Added an additional test.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1868 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 12:25:54 +00:00
Bart Van Assche
c7472c2aa6 Made sure that ib_srp initiator cannot lock up even when its I/O depth > 1.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1867 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-07-23 12:23:39 +00:00