]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agosdp: Improve the look of packet dump
Amir Vadai [Sun, 17 Oct 2010 17:45:43 +0000 (19:45 +0200)]
sdp: Improve the look of packet dump

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: cosmetics, debug messages, error codes
Eldad Zinger [Sun, 17 Oct 2010 17:44:06 +0000 (19:44 +0200)]
sdp: cosmetics, debug messages, error codes

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: SrcAvailCancel should not be processed during RDMA read
Eldad Zinger [Sun, 17 Oct 2010 17:26:01 +0000 (19:26 +0200)]
sdp: SrcAvailCancel should not be processed during RDMA read

fmr should be freed only after tx completion, regardless if SrcAvailCancel arrived.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG2082 - fix orphan counter reading
Eldad Zinger [Sun, 17 Oct 2010 10:57:38 +0000 (12:57 +0200)]
sdp: BUG2082 - fix orphan counter reading

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: when aborting SrcAvail, should check if it wasn't aborted already
Eldad Zinger [Tue, 12 Oct 2010 14:06:37 +0000 (16:06 +0200)]
sdp: when aborting SrcAvail, should check if it wasn't aborted already

Check is relevant only after sleeping.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: ZCopy doesn't support multithreading - warning & kernel panic protection
Eldad Zinger [Tue, 12 Oct 2010 08:22:05 +0000 (10:22 +0200)]
sdp: ZCopy doesn't support multithreading - warning & kernel panic protection

Correspond to BUG 2147.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: Enable RoCE by default
Amir Vadai [Sun, 10 Oct 2010 09:10:38 +0000 (11:10 +0200)]
sdp: Enable RoCE by default

Could led to long delays when trying to establish connection to ethernet
peer, and libsdp is set to 'both'. Should be fixed by letting user set
both/sdp/tcp per interface and not only by subnet/port/process in libsdp.conf.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: SrcAvailCancel should be processed even if SrcAvail was partly processed
Eldad Zinger [Mon, 11 Oct 2010 15:50:59 +0000 (17:50 +0200)]
sdp: SrcAvailCancel should be processed even if SrcAvail was partly processed

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG2144 - first free rx_sa before sending SendSM
Eldad Zinger [Sun, 10 Oct 2010 09:50:12 +0000 (11:50 +0200)]
sdp: BUG2144 - first free rx_sa before sending SendSM

otherwise a new rx_sa might be alloced before the old one is removed.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix code readability
Eldad Zinger [Sun, 10 Oct 2010 09:47:06 +0000 (11:47 +0200)]
sdp: fix code readability

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG2141 - fix refcnt bug
Eldad Zinger [Wed, 6 Oct 2010 09:52:10 +0000 (11:52 +0200)]
sdp: BUG2141 - fix refcnt bug

This bug is reproducable when sdpnetstat(1) is run while a socket is being
destructed. sdp_proc utilities might try to hold a refcnt for a socket that its
destruction already began. This is possible because sdp_proc utilities uses
sock_list to scan for sockets, but a socket is removed from that list only
after all its resourcs are freed.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: refcnt debug tool
Eldad Zinger [Wed, 6 Oct 2010 07:47:27 +0000 (09:47 +0200)]
sdp: refcnt debug tool

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: cosmetics & add/remove warning messages
Eldad Zinger [Tue, 5 Oct 2010 11:53:34 +0000 (13:53 +0200)]
sdp: cosmetics & add/remove warning messages

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: extend socket locking scope in dreq timeout function
Eldad Zinger [Sun, 3 Oct 2010 09:58:06 +0000 (11:58 +0200)]
sdp: extend socket locking scope in dreq timeout function

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: sdp_poll() should not excessively poll rx_cq
Eldad Zinger [Tue, 28 Sep 2010 11:39:02 +0000 (13:39 +0200)]
sdp: sdp_poll() should not excessively poll rx_cq

sdp_poll() might be called before send(), and if there is no data in rx_cq,
polling rx_cq will waste 700 usec (recv_poll).

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: postpone rx timer when arming rx_cq
Eldad Zinger [Tue, 28 Sep 2010 11:32:38 +0000 (13:32 +0200)]
sdp: postpone rx timer when arming rx_cq

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix for timestamping values in debug messages
Eldad Zinger [Tue, 28 Sep 2010 11:28:50 +0000 (13:28 +0200)]
sdp: fix for timestamping values in debug messages

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: better sequence-number handling and cosmetic updates
Eldad Zinger [Tue, 28 Sep 2010 10:21:58 +0000 (12:21 +0200)]
sdp: better sequence-number handling and cosmetic updates

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: add some checking & protection for enum values in debug utilities
Eldad Zinger [Mon, 27 Sep 2010 08:45:29 +0000 (10:45 +0200)]
sdp: add some checking & protection for enum values in debug utilities

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG2138 - 32bit hosts can't devide 64bit variables
Eldad Zinger [Tue, 21 Sep 2010 17:21:50 +0000 (19:21 +0200)]
sdp: BUG2138 - 32bit hosts can't devide 64bit variables

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: remove recursion in tx_ring processing
Eldad Zinger [Mon, 20 Sep 2010 08:50:57 +0000 (10:50 +0200)]
sdp: remove recursion in tx_ring processing

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix keepalive timer setup for server-sockets
Eldad Zinger [Mon, 13 Sep 2010 13:20:28 +0000 (15:20 +0200)]
sdp: fix keepalive timer setup for server-sockets

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix logarithmic histogram index
Eldad Zinger [Mon, 13 Sep 2010 13:13:38 +0000 (15:13 +0200)]
sdp: fix logarithmic histogram index

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix compilation on ia64 and ppc
Eldad Zinger [Tue, 14 Sep 2010 15:32:20 +0000 (17:32 +0200)]
sdp: fix compilation on ia64 and ppc

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: Some improvements to multistream BW
Amir Vadai [Sun, 12 Sep 2010 16:24:35 +0000 (18:24 +0200)]
sdp: Some improvements to multistream BW

- Removed almost all locks in data path - using lock_sock only
- CPU Affinity for SKB handling
- Don't do any RX proccessing from IRQ/timer
- recv_poll value in usec instead of msec

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: add support for no recv polling at all
Eldad Zinger [Thu, 26 Aug 2010 07:52:21 +0000 (10:52 +0300)]
sdp: add support for no recv polling at all

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG1923 - fix support for MSG_OOB
Eldad Zinger [Sun, 22 Aug 2010 05:21:09 +0000 (08:21 +0300)]
sdp: BUG1923 - fix support for MSG_OOB

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: remove unused variables
Eldad Zinger [Thu, 19 Aug 2010 13:25:00 +0000 (16:25 +0300)]
sdp: remove unused variables

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fixed for error code in sendmsg-BZCopy
Eldad Zinger [Sun, 15 Aug 2010 08:21:59 +0000 (11:21 +0300)]
sdp: fixed for error code in sendmsg-BZCopy

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fixed skbs-control-queue memory leak
Eldad Zinger [Sun, 15 Aug 2010 08:11:03 +0000 (11:11 +0300)]
sdp: fixed skbs-control-queue memory leak

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fixed device removal issues
Eldad Zinger [Sun, 15 Aug 2010 07:48:05 +0000 (10:48 +0300)]
sdp: fixed device removal issues

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: added the ability to use sdpprf for any debug message
Eldad Zinger [Sun, 15 Aug 2010 07:40:02 +0000 (10:40 +0300)]
sdp: added the ability to use sdpprf for any debug message

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fixed a deadlock when tx_timer calls sdp_reset that tries to del the timer
Eldad Zinger [Sun, 15 Aug 2010 07:17:42 +0000 (10:17 +0300)]
sdp: fixed a deadlock when tx_timer calls sdp_reset that tries to del the timer

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fixed SrcAvail memory leak
Eldad Zinger [Sun, 15 Aug 2010 07:05:40 +0000 (10:05 +0300)]
sdp: fixed SrcAvail memory leak

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: removed unnecessary variable 'vm_wait'
Eldad Zinger [Mon, 9 Aug 2010 14:11:35 +0000 (17:11 +0300)]
sdp: removed unnecessary variable 'vm_wait'

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: stability improvements for ZCopy
Eldad Zinger [Mon, 9 Aug 2010 14:05:44 +0000 (17:05 +0300)]
sdp: stability improvements for ZCopy

- beter handling of ZCopy errors and SrcAvailCancel requests
- fixed SrcAvailCancel sequence number handling

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: properly kill nagle_timer on socket reset
Eldad Zinger [Thu, 5 Aug 2010 07:16:58 +0000 (10:16 +0300)]
sdp: properly kill nagle_timer on socket reset

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG2092 - ib_device field in sdp_sock is reset not in user-context
Eldad Zinger [Thu, 5 Aug 2010 06:31:27 +0000 (09:31 +0300)]
sdp: BUG2092 - ib_device field in sdp_sock is reset not in user-context

ib_device field of sdp_sock is NULL after either cases:
- cma handler resetting the socket
- device removal
Both cases are not in user-context.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix for stopping tx timer/tasklet when socket state is TCP_CLOSE
Eldad Zinger [Thu, 5 Aug 2010 05:39:58 +0000 (08:39 +0300)]
sdp: fix for stopping tx timer/tasklet when socket state is TCP_CLOSE

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG1403 - last sk_refcnt is called while cma handler is invoked
Eldad Zinger [Tue, 3 Aug 2010 16:14:59 +0000 (19:14 +0300)]
sdp: BUG1403 - last sk_refcnt is called while cma handler is invoked

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: bug fix for a case of no memory to allocate for rx_sa
Eldad Zinger [Sun, 1 Aug 2010 11:19:26 +0000 (14:19 +0300)]
sdp: bug fix for a case of no memory to allocate for rx_sa

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: rx_irq should use tasklet instead of timer due to latency issue
Eldad Zinger [Mon, 2 Aug 2010 12:05:12 +0000 (15:05 +0300)]
sdp: rx_irq should use tasklet instead of timer due to latency issue

mod_timer(..., 0) measured to add 4ms delay.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: better handling of page-allocation-failure
Eldad Zinger [Sun, 1 Aug 2010 16:16:20 +0000 (19:16 +0300)]
sdp: better handling of page-allocation-failure

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: reduce size of sdp_buf to what is really being used
Eldad Zinger [Sun, 1 Aug 2010 15:46:49 +0000 (18:46 +0300)]
sdp: reduce size of sdp_buf to what is really being used

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: remove the relation between qp_active and sdp_free_fmr()
Eldad Zinger [Sun, 1 Aug 2010 15:08:11 +0000 (18:08 +0300)]
sdp: remove the relation between qp_active and sdp_free_fmr()

This will fix the warning message from ib_destroy_fmr_pool().

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: small fix to support device removal during traffic
Eldad Zinger [Sun, 1 Aug 2010 15:00:11 +0000 (18:00 +0300)]
sdp: small fix to support device removal during traffic

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: bug fix for a case of no memory to allocate for tx_sa
Eldad Zinger [Sun, 1 Aug 2010 11:30:54 +0000 (14:30 +0300)]
sdp: bug fix for a case of no memory to allocate for tx_sa

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix behavior when a skb allocation fails
Eldad Zinger [Mon, 26 Jul 2010 07:24:05 +0000 (10:24 +0300)]
sdp: fix behavior when a skb allocation fails

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: some small non-behavioral changes in sdp_dreq_wait_timeout_work()
Eldad Zinger [Thu, 22 Jul 2010 09:08:52 +0000 (12:08 +0300)]
sdp: some small non-behavioral changes in sdp_dreq_wait_timeout_work()

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: rewrite orphan count logic
Eldad Zinger [Thu, 22 Jul 2010 05:03:49 +0000 (08:03 +0300)]
sdp: rewrite orphan count logic

orphan count is increased on every call to sdp_common_release and decreased on
every call to sdp_destruct (just before the socket is freed).

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: change socket reference semantics: keepalive != alive
Eldad Zinger [Wed, 21 Jul 2010 14:40:45 +0000 (17:40 +0300)]
sdp: change socket reference semantics: keepalive != alive

keepalive timer manages a socket reference count regardless to the initial
socket reference (SOCK_REF_ALIVE).

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: remove unnecessary argument from sdp_connected_handler.
Eldad Zinger [Wed, 21 Jul 2010 14:05:33 +0000 (17:05 +0300)]
sdp: remove unnecessary argument from sdp_connected_handler.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: removed extra debug message and comment.
Eldad Zinger [Tue, 20 Jul 2010 11:43:26 +0000 (14:43 +0300)]
sdp: removed extra debug message and comment.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix for socket refcnt when error is marked while in TCP_TIME_WAIT state
Eldad Zinger [Tue, 20 Jul 2010 11:32:44 +0000 (14:32 +0300)]
sdp: fix for socket refcnt when error is marked while in TCP_TIME_WAIT state

When socket is in TCP_TIME_WAIT state, the next sdp_destroy_work() call will
put the cma_refcnt, so we should not change the socket state even if there is
an error.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: enable support for ib devices that do not support fmr
Eldad Zinger [Tue, 20 Jul 2010 09:45:02 +0000 (12:45 +0300)]
sdp: enable support for ib devices that do not support fmr

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: before activating rx_ring timer, need to check that qp is still active.
Eldad Zinger [Wed, 14 Jul 2010 08:20:19 +0000 (11:20 +0300)]
sdp: before activating rx_ring timer, need to check that qp is still active.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix compilation warnings
Eldad Zinger [Wed, 14 Jul 2010 07:14:14 +0000 (10:14 +0300)]
sdp: fix compilation warnings

use %z for size_t in printk's

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: define SDP_MAX_PAYLOAD as ulong instead of int, to comply with PAGE_SIZE
Eldad Zinger [Wed, 14 Jul 2010 04:50:43 +0000 (07:50 +0300)]
sdp: define SDP_MAX_PAYLOAD as ulong instead of int, to comply with PAGE_SIZE

SDP_MAX_PAYLOAD is compared a lot to PAGE_SIZE by min(), and on some kernels a
compilation warning of "comparison of distinct pointer types lacks a cast"
appears.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: some small non-functional changes.
Eldad Zinger [Mon, 12 Jul 2010 13:18:07 +0000 (16:18 +0300)]
sdp: some small non-functional changes.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: enable rx_cq arming when no one polls.
Eldad Zinger [Mon, 12 Jul 2010 12:59:57 +0000 (15:59 +0300)]
sdp: enable rx_cq arming when no one polls.

No need to explicitly arm the cq, posts_handler_put will arm it.

9 years agosdp: before arming cq, need to check if cq was not destroyed already.
Eldad Zinger [Sun, 11 Jul 2010 09:14:20 +0000 (12:14 +0300)]
sdp: before arming cq, need to check if cq was not destroyed already.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: When purging tx_ring, rdma_inflight accountings should be disregarded, so the...
Eldad Zinger [Thu, 8 Jul 2010 13:37:24 +0000 (16:37 +0300)]
sdp: When purging tx_ring, rdma_inflight accountings should be disregarded, so the number of skbs to free is just (posted=head-tail).

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: tx_ring timer should not be scheduled if the qp is not active anymore.
Eldad Zinger [Thu, 8 Jul 2010 13:27:20 +0000 (16:27 +0300)]
sdp: tx_ring timer should not be scheduled if the qp is not active anymore.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: if can't recv or send, and the qp is not active, return -EPIPE instead of 0
Eldad Zinger [Wed, 7 Jul 2010 15:48:27 +0000 (18:48 +0300)]
sdp: if can't recv or send, and the qp is not active, return -EPIPE instead of 0

This fixes an endles loop problem where userspace programs are looping on recv
or send until all required bytes processed or until an error returned.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: rx completions workqueue should be flushed after qp destruction and before the...
Eldad Zinger [Wed, 7 Jul 2010 13:03:11 +0000 (16:03 +0300)]
sdp: rx completions workqueue should be flushed after qp destruction and before the socket is freed.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: rx/tx tasklets should be properly killed when destroying qp.
Eldad Zinger [Mon, 5 Jul 2010 11:46:04 +0000 (14:46 +0300)]
sdp: rx/tx tasklets should be properly killed when destroying qp.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: some annoying whitespaces removed.
Eldad Zinger [Mon, 5 Jul 2010 08:38:11 +0000 (11:38 +0300)]
sdp: some annoying whitespaces removed.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: remove white spaces in the end of some lines.
Eldad Zinger [Sun, 4 Jul 2010 14:15:43 +0000 (17:15 +0300)]
sdp: remove white spaces in the end of some lines.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: device_removal_lock should not be a spinlock because module removal takes a...
Eldad Zinger [Sun, 4 Jul 2010 13:30:43 +0000 (16:30 +0300)]
sdp: device_removal_lock should not be a spinlock because module removal takes a long time.

In order to prevent a situation that many CPUs are stack with read-spinlock
waiting for remove-device write-lock to be freed, I replaced the rw-spinlock
with rw-semaphore. That way the blocked processes goes to sleep and are not
blocking other processes.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: error value for sdp_set_error() should be negative.
Eldad Zinger [Wed, 30 Jun 2010 14:38:33 +0000 (17:38 +0300)]
sdp: error value for sdp_set_error() should be negative.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: Fix for deadlock between sdp_connect and sdp_destroy_work.
Eldad Zinger [Thu, 24 Jun 2010 15:27:46 +0000 (18:27 +0300)]
sdp: Fix for deadlock between sdp_connect and sdp_destroy_work.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: cleanup ssk->rx_sa when aborting incoming SrcAvail
Amir Vadai [Wed, 23 Jun 2010 10:43:55 +0000 (13:43 +0300)]
sdp: cleanup ssk->rx_sa when aborting incoming SrcAvail

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix compilation warnings in RH
Amir Vadai [Wed, 23 Jun 2010 10:42:39 +0000 (13:42 +0300)]
sdp: fix compilation warnings in RH

use %z for size_t in printf's

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: sdp_destroy_qp should be protected in destroy work
Amir Vadai [Wed, 23 Jun 2010 08:07:36 +0000 (11:07 +0300)]
sdp: sdp_destroy_qp should be protected in destroy work

sdp_destroy_work didn't take a lock before destorying QP

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: don't double free fmr
Amir Vadai [Tue, 22 Jun 2010 11:29:31 +0000 (14:29 +0300)]
sdp: don't double free fmr

There are flows that try to free ssk->fmr twice.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Limit FMR resources
Amir Vadai [Tue, 22 Jun 2010 07:45:58 +0000 (10:45 +0300)]
sdp: Limit FMR resources

- Make FMR pool size a module parameter and set default value to a
  smaller value (20 FMR's)
- Fallback to SendSM silently when  can't allocate FMR

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix for hangs/crashes in rare cases
Amir Vadai [Tue, 22 Jun 2010 07:40:54 +0000 (10:40 +0300)]
sdp: Fix for hangs/crashes in rare cases

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix for warning message when receiving with MSG_PEEK flag, and free skb that...
Eldad Zinger [Thu, 17 Jun 2010 06:57:57 +0000 (09:57 +0300)]
sdp: Fix for warning message when receiving with MSG_PEEK flag, and free skb that is not needed any more after all data was read from it.

'rx_sa->used', unlike 'offset', was not updated when MSG_PEEK flag was up and
that lead to the behavior that bytes considered to be available to copy while
the sequence offset showed that the bytes already consumed.
The solution is to discard any use of 'rx_sa->used' and use 'offset' instead.

An skb of SDP_MID_SRCAVAIL is not needed anymore when all its inline data was
consumed and the RDMA operation was canceled (due to MSG_PEEK flag).
This fix eliminates the warning message: "Trying to read beyond SKB".

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: On MSG_PEEK, no rdma_rd_complete should be sent.
Eldad Zinger [Thu, 17 Jun 2010 07:44:42 +0000 (10:44 +0300)]
sdp: On MSG_PEEK, no rdma_rd_complete should be sent.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: update for sdp_cma_handler() events debug messages.
Eldad Zinger [Mon, 14 Jun 2010 12:49:19 +0000 (15:49 +0300)]
sdp: update for sdp_cma_handler() events debug messages.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix for handling multi iov's in ZCOPY.
Eldad Zinger [Tue, 15 Jun 2010 05:08:22 +0000 (08:08 +0300)]
sdp: fix for handling multi iov's in ZCOPY.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: Fix iperf multistream hanging
Amir Vadai [Wed, 16 Jun 2010 08:54:11 +0000 (11:54 +0300)]
sdp: Fix iperf multistream hanging

When trying to send and no credits available. Sometime coulnd't get
credit update, because interrupts are turned off by default.
Added poll RX CQ to fix in this case.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix wrong use of ssk->sdp_disconnect
Amir Vadai [Wed, 16 Jun 2010 08:46:56 +0000 (11:46 +0300)]
sdp: Fix wrong use of ssk->sdp_disconnect

Due to miss-use of sdp_disconnect rx cq is not armed after disconnect is
sent

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: protect sdp_auto_moderation from device removal
Amir Vadai [Tue, 15 Jun 2010 13:00:15 +0000 (16:00 +0300)]
sdp: protect sdp_auto_moderation from device removal

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: sdp_recvmsg() shouldn't handle SDP_MID_DISCONN when MSG_PEEK flag is up.
Eldad Zinger [Mon, 14 Jun 2010 10:03:16 +0000 (13:03 +0300)]
sdp: sdp_recvmsg() shouldn't handle SDP_MID_DISCONN when MSG_PEEK flag is up.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: added lock_sock() to sdp_poll()
Eldad Zinger [Mon, 14 Jun 2010 09:01:31 +0000 (12:01 +0300)]
sdp: added lock_sock() to sdp_poll()

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: Cleanedup some commented lines
Amir Vadai [Sun, 13 Jun 2010 13:10:29 +0000 (16:10 +0300)]
sdp: Cleanedup some commented lines

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix bad handling of small rcvbuf size in zcopy
Amir Vadai [Thu, 10 Jun 2010 08:32:50 +0000 (11:32 +0300)]
sdp: Fix bad handling of small rcvbuf size in zcopy

- Do not send RdmaRdComp when no buffers
- Same for SendSm
- post at least 3 buffers in RX to have the minimal number of credits
- make purge_tx_ring ignore WR used by RDMA
- fixed a typo, to reschedule tx_cq_poll timer according to tx queue and
  not to rx queue (!)
- Allow credit updates when less than half RX Q is filled

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix issues in orphan count
Amir Vadai [Mon, 14 Jun 2010 10:08:36 +0000 (13:08 +0300)]
sdp: fix issues in orphan count

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: protect rx_ring access with a lock
Amir Vadai [Sun, 13 Jun 2010 12:51:01 +0000 (15:51 +0300)]
sdp: protect rx_ring access with a lock

because sdp_poll_rx_cq() is accessed both from interrupt and from user
context, need to protect it with a lock.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: cleanup skb allocations
Amir Vadai [Wed, 9 Jun 2010 09:40:23 +0000 (12:40 +0300)]
sdp: cleanup skb allocations

- Bad sizing of inline data on send sockets had implications on the
  performance.
- All sent data is placed on the skb itself (unless accumulated by nagle)
- Do not count sdp header twice when allocating skb
  added some likely/unlikely

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Reuse buffers in rx ring
Amir Vadai [Mon, 7 Jun 2010 15:17:59 +0000 (18:17 +0300)]
sdp: Reuse buffers in rx ring

To improve latency in small packets - reuse already pinned and allocated
pages that wasn't used.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: cpu affinity in sdpstats
Amir Vadai [Sun, 6 Jun 2010 09:23:55 +0000 (12:23 +0300)]
sdp: cpu affinity in sdpstats

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: use polling in rx
Amir Vadai [Tue, 1 Jun 2010 14:04:59 +0000 (17:04 +0300)]
sdp: use polling in rx

poll on RX whenever possible, use interrupts only before sleeping,
during graceful close or in zcopy.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix for a bug of lost refcnt in TCP_TIME_WAIT state.
Eldad Zinger [Sun, 6 Jun 2010 10:48:32 +0000 (13:48 +0300)]
sdp: fix for a bug of lost refcnt in TCP_TIME_WAIT state.

OFED addons break semantics of cancel_delayed_work_sync(), like in SLES 10.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: BUG2038 - transmission goal size won't exceed SDP_MAX_PAYLOAD
Eldad Zinger [Sun, 6 Jun 2010 09:07:59 +0000 (12:07 +0300)]
sdp: BUG2038 - transmission goal size won't exceed SDP_MAX_PAYLOAD

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: SDP_WARN_ON defined to be used instead of WARN_ON, for better compatibility
Eldad Zinger [Tue, 1 Jun 2010 08:42:35 +0000 (11:42 +0300)]
sdp: SDP_WARN_ON defined to be used instead of WARN_ON, for better compatibility

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: new debug function added, minor debug message change.
Eldad Zinger [Sun, 23 May 2010 08:40:02 +0000 (11:40 +0300)]
sdp: new debug function added, minor debug message change.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: device removal rewritten for a stability improvement.
Eldad Zinger [Sun, 30 May 2010 11:03:43 +0000 (14:03 +0300)]
sdp: device removal rewritten for a stability improvement.

main changes:
1. device_removal_lock is better used.
2. sdp_dev is marked NULL in order to prevent new sockets born to the removed
   device.
3. new timeout functionality used when a reference count was taken for the CMA
   to return, but the CMA won't be invoked because rdma_id was destroyed.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: unnecessary local variable removed, 'const' declarations added
Eldad Zinger [Tue, 18 May 2010 10:35:56 +0000 (13:35 +0300)]
sdp: unnecessary local variable removed, 'const' declarations added

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>