Commit Graph
78 Commits
Author SHA1 Message Date
Yan Burman 025574018e isert: Support building against MOFED without patching the kernel build system
Additionally, print OFED flavor name while building and embed the
OFED flavor name in the module description.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-03 11:25:37 +00:00
Yan Burman ed3a17ca7a isert: Fix crash on listener close while in login/logout loop
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6088 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-16 08:59:32 +00:00
Yan Burman ea5e08e74b isert: Fix crash on service stop when under heavy login/logout load
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-11 13:05:34 +00:00
Yan Burman 90faade1cc isert: Fix case where we got disconnect before login character device was opened
We may receive disconnect before iscsi-scstd had the chance to open
the character device. This would result in resource leak, since the device will not be freed.
Fix this by only increasing reference once the device is actually opened.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-11 13:05:20 +00:00
Yan Burman 2b9e1f9be8 isert: Fix listener release handling
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-01 11:01:21 +00:00
Yan Burman fab0ea06e2 isert: Properly propagate portal creation error to iscsi-scstd
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6004 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:16:26 +00:00
Yan Burman 0ce1128b19 isert: Fix discovery and login with actual 8192 bytes of data
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:16:15 +00:00
Yan Burman 4a8b416ff8 isert: Make sure we have a valid conn pointer
Fix a race where disconnect was called while iscsi-scstd was doing ioctls

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:16:05 +00:00
Yan Burman 06e42a7273 isert: Avoid starving connections in high connect load
Stack was used instead of queue for incoming connection management.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:55 +00:00
Yan Burman 978ee4effa isert: Micro-optimization of poll_cq WC loop
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:46 +00:00
Yan Burman ba2083708a isert: Make the login character device more posix compliant
This fixes a case where iscsi-scstd will go into busy-waiting loop
on some occasions because it would not detect disconnect correctly

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:35 +00:00
Yan Burman c9e71e4d7c isert: Do not crash if we receive no data inside PDU
Text continuation request PDUs will have zero data.
Avoid crashing in those cases.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:22 +00:00
Yan Burman e03adc83ed isert: Increase module reference as soon as possible
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5997 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:13 +00:00
Yan Burman 950f800ac4 isert: Decrease connection timeout from 120 to 60 seconds
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:14:53 +00:00
Yan Burman f90984d6da isert: Fix connection resource leak
Fix resource leak is iscsi-scstd read the new connection file,
but did not open it before it was killed

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5994 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:14:43 +00:00
Yan Burman e6e1752b8f isert: Do not crash kernel if userspace has a bug
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5901 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-30 08:17:29 +00:00
Yan Burman 5c1d9a4501 isert: Stop timer as soon as we so that in busy system we don't rely on userspace
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-30 08:17:24 +00:00
Yan Burman 03548dbc24 isert: Do not fail with cards that support small number of WR per QP
This fixes an issue with ConnectIB

Reported-by: Eric Millbrandt <eric.millbrandt@cacheio.com>
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5899 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-30 08:17:18 +00:00
Yan Burman a105745c4c isert: Make sure we don't call dma_unmap on memory we already unmapped
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-30 08:17:09 +00:00
Yan Burman bd70a2eb27 isert: Fix race between disconnect handler and read by iscsi-scstd
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5896 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-30 08:17:02 +00:00
Yan Burman 1238c3e88c isert: Add missing copyright notice
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-17 08:46:33 +00:00
Yan Burman a37e20d3c3 isert: Remove extra paranoid check
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:25:14 +00:00
Yan Burman 6b3d77bc37 isert: Fix page leak if alloc_page fails
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5871 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:25:01 +00:00
Yan Burman 28781d1545 isert: Fix potential overrun detected by coverity
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:24:50 +00:00
Yan Burman 091bc739a7 isert: Silence coverity false positive
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:24:38 +00:00
Yan Burman 9236ef4ef8 isert: Do not leak workqueues if ib_create_cq failed
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5868 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:24:27 +00:00
Yan Burman 270559b509 isert: Fix use-after-free when killing iscsi-scstd
Our portal may be destroyed while there are connections alive.
This means we are doing list_del() from list_head that no longer exists

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5866 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:24:04 +00:00
Yan Burman 88339b14dd isert: Remove unused field
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5865 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:23:54 +00:00
Yan Burman 06fc2591ae isert: Fix crash on device removal when iscsi-scstd is started with explicit address
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5864 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:23:43 +00:00
Yan Burman 6a258d3629 isert: Make sure we decrement CQ QP counters if QP creation fails
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5863 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:23:31 +00:00
Yan Burman f784590bb8 isert: Fix closing devices when connection allocation fails
We need to dereference isert_device structures whether
we created them or not if connection creation fails

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5862 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:23:20 +00:00
Yan Burman 348224a808 isert: Warn user of potential compilation issue
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:23:09 +00:00
Yan Burman 679f7487db isert: Add support for rdma_cm private data as required by Annex A12 of the IB spec
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:22:58 +00:00
Yan Burman 2cfd09c8de isert: Fix resource leak upon unreachable event
Unreachable event caused by crash of initiator while in
connection establishment flow, would cause leak of connections.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-16 13:22:42 +00:00
Yan Burman 6b38638e71 isert: Remove unneeded if in the fast path
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5842 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:33:30 +00:00
Yan Burman dc27d29167 isert: Fix small memory leak on module unload
We were leaking portal structure upon module unload

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5841 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:33:20 +00:00
Yan Burman e15fe7a755 isert: Raise the number of concurrent login requests we can handle to 127
Also update documentation to reflect current limitations

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5840 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:33:07 +00:00
Yan Burman c8c0246d54 isert: Micro-optimization: Use unlikely() macro in appropriate places
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5839 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:32:52 +00:00
Yan Burman 2277551e22 isert: Make sure we do dma_unmap on RDMA memory upon flushes
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5838 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:32:41 +00:00
Yan Burman 4a8e4c0af9 isert: Use req_cmnd_release_force for PDU errors
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:32:31 +00:00
Yan Burman 1b147726a6 isert: Fix a minor style issue
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5836 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-13 12:32:19 +00:00
Yan Burman 7bc8357709 isert: Fix checkpatch whitespace errors
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5797 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-11 10:06:03 +00:00
Yan Burman 08c58c92ea isert: Improve IO processing latency while closing connections
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 08:53:11 +00:00
Yan Burman d9872582b4 isert: Rename static version of isert_conn_free() to make its name unique
We had two functions called isert_conn_free() a static one and a global one.
Rename the static one so that it will be less confusing while reading the code.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 08:53:05 +00:00
Yan Burman c682d02ebf isert: Fix possible deadlock when calling cancel_work_sync() on the workqueue we are running from
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5789 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 08:53:00 +00:00
Yan Burman 914b9d4f4f isert: Remove a leftover comment from the old days
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5788 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 08:52:54 +00:00
Yan Burman 760b4a55b7 isert: Fix deadlock that can be caused by calling flush_workqueue() from within that same workqueue
We no longer need to do flush of the workqueue, since we cleanup when all flushes are done now

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-10 08:52:44 +00:00
Yan Burman 00ad4d0209 isert: Cleanup iscsi connection as soon as possible to allow lower session reinstate times
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5781 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-07 13:39:18 +00:00
Yan Burman c4fd1dc2ed isert: Make sure we wait for all flushes to finish
We wait untill all flushes finish by posting a special send WR with zero sized sge,
and wait for it to flush.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5780 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-07 13:39:12 +00:00
Yan Burman 262e8b4db0 isert: Remove an unused variable
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5743 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-01 12:34:33 +00:00