]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agosdp: Kconfig and Makefile changes
Ajaykumar Hotchandani [Thu, 22 Jan 2015 03:18:44 +0000 (19:18 -0800)]
sdp: Kconfig and Makefile changes

Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
9 years agosdp: port the code to uek2
Dotan Barak [Tue, 3 Jul 2012 10:09:47 +0000 (13:09 +0300)]
sdp: port the code to uek2

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
9 years agosdp: added debug print for the event: RDMA_CM_EVENT_ALT_PATH_LOADED
Dotan Barak [Sun, 14 Oct 2012 09:24:48 +0000 (11:24 +0200)]
sdp: added debug print for the event: RDMA_CM_EVENT_ALT_PATH_LOADED

Signed-off-by: Bang Nguyen <bang.nguyen@oracle.com>
9 years agosdp: prepare support to kernel 2.6.39-200.1.1.el5uek: add macro to get sk_sleep
Dotan Barak [Tue, 3 Jul 2012 07:35:01 +0000 (10:35 +0300)]
sdp: prepare support to kernel 2.6.39-200.1.1.el5uek: add macro to get sk_sleep

This will ease up the porting to the new kernel.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
9 years agosdp: add support to kernel 2.6.39-200.1.1.el5uek
Dotan Barak [Tue, 3 Jul 2012 06:45:10 +0000 (09:45 +0300)]
sdp: add support to kernel 2.6.39-200.1.1.el5uek

Rename the MACROs inet_daddr and inet_rcv_saddr, since they exists in this
kernel.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
9 years agosdp: add [rt]x_bytes counters to sdpstats
Amir Vadai [Tue, 3 Apr 2012 10:52:45 +0000 (13:52 +0300)]
sdp: add [rt]x_bytes counters to sdpstats

Those counter shows how many bytes actually rx/tx using SDP sockets.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
9 years agosdp: Fix Bug 114242 - Multi connection net_perf causes server to hang
Moran Perets [Mon, 26 Sep 2011 08:16:49 +0000 (11:16 +0300)]
sdp: Fix Bug 114242 - Multi connection net_perf causes server to hang

    Fix the soft lockup bug by changing the allocation flag in
    sdp_bcopy.c from 0 to gfp.

    Reviewed by: Amir Vadai

Signed-off-by: Moran Perets <moranp@mellanox.co.il>
9 years agoFMR: remove FMR failure messages
Eli Cohen [Mon, 23 May 2011 09:15:30 +0000 (12:15 +0300)]
FMR: remove FMR failure messages

remove the messages per Oracle's request. FMR is not yet supported in VMs.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
9 years agosdp: make sdp memory leak print a debug
Amir Vadai [Wed, 4 May 2011 06:30:24 +0000 (09:30 +0300)]
sdp: make sdp memory leak print a debug

Since this is probably an accounting error and not a real memory leak - should
be a debug only for now.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: changed memory accounting warning into debug
Amir Vadai [Thu, 21 Apr 2011 10:55:55 +0000 (13:55 +0300)]
sdp: changed memory accounting warning into debug

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix issues in sdpprf
Amir Vadai [Thu, 14 Apr 2011 11:27:43 +0000 (14:27 +0300)]
sdp: Fix issues in sdpprf

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Remove protection before sleep on RX
Amir Vadai [Tue, 12 Apr 2011 14:40:07 +0000 (17:40 +0300)]
sdp: Remove protection before sleep on RX

No need for this protection, it was needed because of a bug previously fixed.
Credit update could be sent even when credit reaches 2.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Enable automatic path migration support also in the passive side of the connection.
Moni Shoua [Tue, 5 Apr 2011 10:44:59 +0000 (13:44 +0300)]
sdp: Enable automatic path migration support also in the passive side of the connection.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fixed some coverity issues
Amir Vadai [Tue, 5 Apr 2011 07:58:56 +0000 (10:58 +0300)]
sdp: Fixed some coverity issues

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoFlatten the entire tree fixes
Eli Cohen [Sun, 3 Apr 2011 07:07:44 +0000 (10:07 +0300)]
Flatten the entire tree fixes

As from now we are going to avoid using patches to commit changes to the
driver. Instead, we will push directly to the source files. Backports are still
maintained but only for 2.6.18-EL5.5; backaports of 2.6.32 are completely
removed.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
9 years agosdp: Fixed compilation error on 2.6.18 RH5.5
Amir Vadai [Thu, 24 Mar 2011 08:46:06 +0000 (10:46 +0200)]
sdp: Fixed compilation error on 2.6.18 RH5.5

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix memory leak. sockets_allocated wasn't freed
Amir Vadai [Tue, 22 Mar 2011 14:20:34 +0000 (16:20 +0200)]
sdp: fix memory leak. sockets_allocated wasn't freed

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Removed spaces and tabs at end of lines
Amir Vadai [Sun, 20 Mar 2011 16:37:16 +0000 (18:37 +0200)]
sdp: Removed spaces and tabs at end of lines

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix sdpprf
Amir Vadai [Sun, 20 Mar 2011 16:32:23 +0000 (18:32 +0200)]
sdp: fix sdpprf

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fixed bcopy statistics
Amir Vadai [Sun, 20 Mar 2011 15:25:02 +0000 (17:25 +0200)]
sdp: Fixed bcopy statistics

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Bad behaviour when setting low rcvbuf size
Amir Vadai [Sun, 20 Mar 2011 13:34:33 +0000 (15:34 +0200)]
sdp: Bad behaviour when setting low rcvbuf size

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fixed a typo
Amir Vadai [Wed, 9 Mar 2011 08:35:15 +0000 (10:35 +0200)]
sdp: Fixed a typo

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Limit total memory consumed by rcvbuf
Amir Vadai [Tue, 8 Mar 2011 08:25:35 +0000 (10:25 +0200)]
sdp: Limit total memory consumed by rcvbuf

rcvbuf is already limited by the payload in the queue. But also need to limit
total memory consumption of it, since small packets received might have a very
large overhead to the payload.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix "sdpprf empty after a long run"
Amir Vadai [Tue, 8 Mar 2011 08:23:24 +0000 (10:23 +0200)]
sdp: fix "sdpprf empty after a long run"

sdpprf_log_count gets to a negative value after a long run.
This is only a quick fix - still might loose logs sometimes.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make SDP_RX_SIZE a module parameter
Amir Vadai [Mon, 7 Mar 2011 11:11:59 +0000 (13:11 +0200)]
sdp: make SDP_RX_SIZE a module parameter

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Rollback credit limit during ZCopy transaction.
Amir Vadai [Sun, 6 Mar 2011 12:38:08 +0000 (14:38 +0200)]
sdp: Rollback credit limit during ZCopy transaction.

This limit was added at commit 2574b53 ("Abort rx SrcAvail when out of
credits")

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: get per socket memory statistics at socket's sysfs file
Amir Vadai [Sun, 6 Mar 2011 13:09:24 +0000 (15:09 +0200)]
sdp: get per socket memory statistics at socket's sysfs file

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix a hole in rx memory limit
Amir Vadai [Sun, 6 Mar 2011 12:33:00 +0000 (14:33 +0200)]
sdp: fix a hole in rx memory limit

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make sure memory is reclaimed
Amir Vadai [Sun, 6 Mar 2011 12:31:27 +0000 (14:31 +0200)]
sdp: make sure memory is reclaimed

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: send packets without payload when credits=1
Amir Vadai [Sun, 6 Mar 2011 12:27:57 +0000 (14:27 +0200)]
sdp: send packets without payload when credits=1

This according to the SPEC, and prevent a deadlock in ZCopy. SrcAvailCancel
wasn't acked when credits got low.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: removed some prints to sdpprf
Amir Vadai [Sun, 6 Mar 2011 12:21:14 +0000 (14:21 +0200)]
sdp: removed some prints to sdpprf

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: remove unused rcvbuf_scale module parameter
Amir Vadai [Sun, 6 Mar 2011 12:19:26 +0000 (14:19 +0200)]
sdp: remove unused rcvbuf_scale module parameter

Was used when in slow start mechanism.
Not needed till having slow start again.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix memory socket accounting
Amir Vadai [Mon, 28 Feb 2011 09:57:18 +0000 (11:57 +0200)]
sdp: fix memory socket accounting

skb->truesize - total bytes allocated by skb, including fragments

Specific socket accounting:
* sk->sk_wmem_queued - send bytes currently in TX queue
* RX queue accounting is done by using seq
* sk->sk_rmem_alloc - bytes consumed by RX

Protocol accounting:
* sk->sk_forward_alloc - bytes that are available to be consumed
* prot->memory_allocated - bytes consumed by TX/RX

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix sdp_sendmsg counters in sdpstats
Amir Vadai [Mon, 28 Feb 2011 09:33:58 +0000 (11:33 +0200)]
sdp: fix sdp_sendmsg counters in sdpstats

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make retry count a module parameter
Amir Vadai [Sun, 13 Feb 2011 10:08:24 +0000 (12:08 +0200)]
sdp: make retry count a module parameter

Setting a lower value means faster path migration in APM

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG2217 - fix sdpstats negative values
Amir Vadai [Wed, 9 Feb 2011 11:06:23 +0000 (13:06 +0200)]
sdp: BUG2217 - fix sdpstats negative values

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: do not abort connection on RDMA_CM_EVENT_ADDR_CHANGE
Amir Vadai [Sun, 30 Jan 2011 17:01:15 +0000 (19:01 +0200)]
sdp: do not abort connection on RDMA_CM_EVENT_ADDR_CHANGE

This could happen when having a bonding device.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agordma_cm, sdp: bug fixes and some changes to APM logic
Amir Vadai [Thu, 27 Jan 2011 08:42:56 +0000 (10:42 +0200)]
rdma_cm, sdp: bug fixes and some changes to APM logic

- We no longer rely on the private data buffer of the LAP/APR messages for passive side LID improvement.
    Instead, we use the protocol defined LID improvement APR error code.
    - Two paths are allocated on id creation to simplify code.
    - Various small bug fixes.
    - Added a missing ref_count get
    - Some code cleanup.
    - Important: rdma_enable_apm may be called only upon receiving RDMA_CM_ROUTE_RESOLVED event.
      This was done to break symmetry on failover and possibly on other occasions.

Signed-off-by: Nir Muchtar <nirm@voltaire.com>
Signed-off-by: Moni Shoua <monis@voltaire.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: removed debug print
Amir Vadai [Tue, 25 Jan 2011 08:44:15 +0000 (10:44 +0200)]
sdp: removed debug print

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: use APM support in rdma_cm
Amir Vadai [Sun, 23 Jan 2011 09:26:40 +0000 (11:26 +0200)]
sdp: use APM support in rdma_cm

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: do not reenter sdp_abort_rx_srcavail
Amir Vadai [Tue, 18 Jan 2011 17:03:32 +0000 (19:03 +0200)]
sdp: do not reenter sdp_abort_rx_srcavail

SrcAvailCancel could be handled from within sdp_abort_rx_srcavail. This
shouldn't happen. To prevent it, ssk->rx_sa is set to NULL at the begining.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Abort rx SrcAvail when out of credits
Amir Vadai [Sun, 16 Jan 2011 16:32:38 +0000 (18:32 +0200)]
sdp: Abort rx SrcAvail when out of credits

SrcAvail sink side could run out of credits when having bcopy sends to the
other direction. Because of that no RdmaRdCompl could be sent nor SendSM.  This
could hang the sender side forever (No SendSM on SrcAvailCancel).

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fixed BUG2207 - EINVAL when connect after IPv6 bind
Amir Vadai [Tue, 11 Jan 2011 13:16:51 +0000 (15:16 +0200)]
sdp: Fixed BUG2207 - EINVAL when connect after IPv6 bind

Connect to IPv4 over IPv6 address need rdma id to be created with IPv4 address.
If bound before with IPv6 adderss, need to destroy and recreate the id.
Also, when connecting after bind, keep the same source port number.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: check address family before connecting
Amir Vadai [Thu, 6 Jan 2011 13:49:55 +0000 (15:49 +0200)]
sdp: check address family before connecting

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Do not ignore scope_id in IPv6
Amir Vadai [Thu, 6 Jan 2011 12:38:34 +0000 (14:38 +0200)]
sdp: Do not ignore scope_id in IPv6

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make backport sk_inet()->xxx simpler
Amir Vadai [Wed, 5 Jan 2011 11:26:32 +0000 (13:26 +0200)]
sdp: make backport sk_inet()->xxx simpler

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix get getsockname/getpeername in IPv6
Amir Vadai [Wed, 5 Jan 2011 09:33:21 +0000 (11:33 +0200)]
sdp: Fix get getsockname/getpeername in IPv6

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Allow bind to address with family AF_INETx_SDP
Amir Vadai [Sun, 2 Jan 2011 11:31:12 +0000 (13:31 +0200)]
sdp: Allow bind to address with family AF_INETx_SDP

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Use %pI4 + %pI6 in new kernels
Amir Vadai [Thu, 30 Dec 2010 12:38:48 +0000 (14:38 +0200)]
sdp: Use %pI4 + %pI6 in new kernels

A patch in this subject was in the wrong backport. Moving it to a dedicated patch.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix connect to IPv4 over IPv6
Amir Vadai [Wed, 29 Dec 2010 15:23:07 +0000 (17:23 +0200)]
sdp: fix connect to IPv4 over IPv6

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix some issues in ipv6 support
Amir Vadai [Wed, 29 Dec 2010 10:40:52 +0000 (12:40 +0200)]
sdp: Fix some issues in ipv6 support

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: ipv6 support
Amir Vadai [Mon, 27 Dec 2010 09:58:26 +0000 (11:58 +0200)]
sdp: ipv6 support

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: move histogram allocation from stack to heap
Amir Vadai [Tue, 21 Dec 2010 11:38:37 +0000 (13:38 +0200)]
sdp: move histogram allocation from stack to heap

- Cause a kernel crash when accessing /proc/net/sdpstats on RH6

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: print error value when ib_umem_get fails
Amir Vadai [Tue, 21 Dec 2010 12:27:06 +0000 (14:27 +0200)]
sdp: print error value when ib_umem_get fails

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: remove 'reading beyond SKB' warning
Amir Vadai [Tue, 14 Dec 2010 12:41:12 +0000 (14:41 +0200)]
sdp: remove 'reading beyond SKB' warning

This is a good sanity check, but could print a warning when a
partially used SrcAvail skb is cancelled.
This should be fixed in a way that will leave the sanity check,
but need to make minimal changes before the GA.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: RdmaRdCompl not sent sometimes
Amir Vadai [Tue, 14 Dec 2010 06:48:42 +0000 (08:48 +0200)]
sdp: RdmaRdCompl not sent sometimes

When SrcAvailCancel is handled after RDMA finshed and before sending
RdmaRdCompl, RdmaRdCompl won't be sent, and a data corruption will occur.
Made sure that all sdp_abort_rx_srcavail will send RdmaRdCompl if needed.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make sdp_prf index atomic
Amir Vadai [Tue, 14 Dec 2010 07:55:54 +0000 (09:55 +0200)]
sdp: make sdp_prf index atomic

Will make sdpprf more reliable - records won't override other records.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: handle failed RDMA read
Amir Vadai [Tue, 7 Dec 2010 07:32:50 +0000 (09:32 +0200)]
sdp: handle failed RDMA read

When RDMA read is failed, do not report those bytes as read, and
return error code to user.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix compilation error when SDP_DEBUG_DATA is off
Amir Vadai [Tue, 30 Nov 2010 06:48:33 +0000 (08:48 +0200)]
sdp: Fix compilation error when SDP_DEBUG_DATA is off

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Enable set zcopy threshold to 0 using setsockopt
Amir Vadai [Wed, 17 Nov 2010 09:03:03 +0000 (11:03 +0200)]
sdp: Enable set zcopy threshold to 0 using setsockopt

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG2161 - hanging sockets are left
Amir Vadai [Tue, 16 Nov 2010 11:32:14 +0000 (13:32 +0200)]
sdp: BUG2161 - hanging sockets are left

When getting DREQ at TCP_CLOSE_WAIT state, CMA ref count is taken
and not returned. This happens because CMA timer is not started.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Take into account HW inline capabilities
Amir Vadai [Sun, 14 Nov 2010 12:57:15 +0000 (14:57 +0200)]
sdp: Take into account HW inline capabilities

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Send small sends using inline
Amir Vadai [Mon, 8 Nov 2010 11:49:12 +0000 (13:49 +0200)]
sdp: Send small sends using inline

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: access socket history from debugfs
Amir Vadai [Wed, 3 Nov 2010 13:47:01 +0000 (15:47 +0200)]
sdp: access socket history from debugfs

Also moved sdpprf to /sys/kernel/debug/sdp - seems to be a better place
than /proc/net

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: use a macro to convert ssk into sk
Amir Vadai [Tue, 2 Nov 2010 10:43:21 +0000 (12:43 +0200)]
sdp: use a macro to convert ssk into sk

Instead of accessing &ssk->isk.sk cast the sdp socket into
sock. Do it from a macro sk_ssk(ssk)

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Initialize remote credits when sending Hello
Amir Vadai [Wed, 27 Oct 2010 13:56:23 +0000 (15:56 +0200)]
sdp: Initialize remote credits when sending Hello

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG2158 - do not send SrcAvail too small
Amir Vadai [Wed, 27 Oct 2010 12:24:07 +0000 (14:24 +0200)]
sdp: BUG2158 - do not send SrcAvail too small

- Shouldn't send SrcAvail with no RDMA payload - could happen when RLIMIT is
  too small.

- Do not crash when getting 2 SrcAvail.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: add a sanity check for sg_len
Eldad Zinger [Mon, 25 Oct 2010 13:02:43 +0000 (15:02 +0200)]
sdp: add a sanity check for sg_len

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix socket_allocated counter
Eldad Zinger [Sun, 24 Oct 2010 15:15:06 +0000 (17:15 +0200)]
sdp: fix socket_allocated counter

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: no point of waiting for data if remote host can't send
Eldad Zinger [Sun, 24 Oct 2010 09:24:27 +0000 (11:24 +0200)]
sdp: no point of waiting for data if remote host can't send

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix support for a case of no locking capabilities
Eldad Zinger [Sun, 24 Oct 2010 09:19:24 +0000 (11:19 +0200)]
sdp: fix support for a case of no locking capabilities

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: if can not allocate memory - no point of waiting
Eldad Zinger [Sun, 24 Oct 2010 09:16:56 +0000 (11:16 +0200)]
sdp: if can not allocate memory - no point of waiting

We don't wake up sleeper when we free memory, so mem sleeper will sleep forever.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: cosmetics
Eldad Zinger [Sun, 24 Oct 2010 08:50:08 +0000 (10:50 +0200)]
sdp: cosmetics

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix for CMA reference count
Eldad Zinger [Wed, 20 Oct 2010 15:14:35 +0000 (17:14 +0200)]
sdp: fix for CMA reference count

When sdp_destroy_work() is invoked (due to the cma handler),
but "ssk->cma_timewait_timeout == 0", a socket reference was putted even though
it was never taken. This can happen in 2 scenarios:
1. sdp_destroy_work() locked the socket before sdp_close()
2. sdp_destroy_work() locked the socket after sdp_cma_timewait_timeout_work()

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: add ability to set a maximum memory usage for the entire module
Eldad Zinger [Wed, 20 Oct 2010 15:08:53 +0000 (17:08 +0200)]
sdp: add ability to set a maximum memory usage for the entire module

use top_mem_usage module parameter for this.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: Accept AF_INET_SDP in address supplied to connect()
Amir Vadai [Sun, 24 Oct 2010 15:03:49 +0000 (17:03 +0200)]
sdp: Accept AF_INET_SDP in address supplied to connect()

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix RDMA read completion with error
Amir Vadai [Mon, 18 Oct 2010 08:48:16 +0000 (10:48 +0200)]
sdp: fix RDMA read completion with error

- set socket to error state for all wr_id's
- no need in sdp_handle_send_comp()

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: sdp_post_rdma_read() should clean up its mess
Amir Vadai [Mon, 18 Oct 2010 12:20:12 +0000 (14:20 +0200)]
sdp: sdp_post_rdma_read() should clean up its mess

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix compilation error when compiling without debug flags
Eldad Zinger [Tue, 19 Oct 2010 14:49:53 +0000 (16:49 +0200)]
sdp: fix compilation error when compiling without debug flags

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: treat unfinished RDMA operation as a fatal error
Eldad Zinger [Tue, 19 Oct 2010 15:26:34 +0000 (17:26 +0200)]
sdp: treat unfinished RDMA operation as a fatal error

mark socket with EIO error code.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: fix for race condition with SrcAvailCancel handling
Eldad Zinger [Tue, 19 Oct 2010 14:52:09 +0000 (16:52 +0200)]
sdp: fix for race condition with SrcAvailCancel handling

Tx complition resets "rdma_inflight->busy" and wakes up the recvmsg().
But rx_workqueue might get the lock of the socket before recvmsg(), so
SrcAvailCancel might be polled from the rx_cq, and since "busy = 0",
rx_sa wil be freed (w/o freeing umem&fmr).

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
9 years agosdp: call ib_umem_get with the right access
Amir Vadai [Sun, 17 Oct 2010 17:48:38 +0000 (19:48 +0200)]
sdp: call ib_umem_get with the right access

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
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>