]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agosdp: Add support for ZCopy combined mode - RDMA Read
Amir Vadai [Sun, 12 Jul 2009 12:32:36 +0000 (15:32 +0300)]
sdp: Add support for ZCopy combined mode - RDMA Read

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: removed unnecessary statistics that caused compilation errors on powerpc
Amir Vadai [Wed, 22 Jul 2009 07:36:01 +0000 (10:36 +0300)]
sdp: removed unnecessary statistics that caused compilation errors on powerpc

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix some warning and bugs in porting to ofed 1.5
Amir Vadai [Wed, 15 Jul 2009 09:08:06 +0000 (12:08 +0300)]
sdp: fix some warning and bugs in porting to ofed 1.5

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix bad credits advertised when connection initiated
Amir Vadai [Wed, 1 Jul 2009 16:38:06 +0000 (19:38 +0300)]
sdp: fix bad credits advertised when connection initiated

This enables removing the ugly post credits after connection
establishment

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Fix memory leak in bzcopy
Amir Vadai [Wed, 1 Jul 2009 16:33:07 +0000 (19:33 +0300)]
sdp: Fix memory leak in bzcopy

Thanks to Lars Ellenberg for finding the leak

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix wrong credit advertised in Hello MID
Amir Vadai [Wed, 1 Jul 2009 14:00:29 +0000 (17:00 +0300)]
sdp: fix wrong credit advertised in Hello MID

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix compilation error on 2.6.30
Amir Vadai [Sun, 28 Jun 2009 20:33:46 +0000 (23:33 +0300)]
sdp: fix compilation error on 2.6.30

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fixed coding style
Amir Vadai [Sun, 21 Jun 2009 14:13:35 +0000 (17:13 +0300)]
sdp: fixed coding style

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: IB_CQ_VECTOR_LEAST_ATTACHED is not supported yet in 1.5 tree
Amir Vadai [Tue, 16 Jun 2009 08:04:50 +0000 (11:04 +0300)]
sdp: IB_CQ_VECTOR_LEAST_ATTACHED is not supported yet in 1.5 tree

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fixed div by zero in sdpstats
Amir Vadai [Tue, 9 Jun 2009 06:25:12 +0000 (09:25 +0300)]
sdp: fixed div by zero in sdpstats

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make interrupt moderation adaptive
Amir Vadai [Mon, 8 Jun 2009 14:02:20 +0000 (17:02 +0300)]
sdp: make interrupt moderation adaptive

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: arm nagle timer on not sent packet instead of on sent packet
Amir Vadai [Thu, 4 Jun 2009 14:46:19 +0000 (17:46 +0300)]
sdp: arm nagle timer on not sent packet instead of on sent packet

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: two bug fixes
Amir Vadai [Thu, 4 Jun 2009 14:42:13 +0000 (17:42 +0300)]
sdp: two bug fixes

fix bad HELLO/HELLO_ACK buffer size matching
let recvmsg do posts on data packets too

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: make bzcopy poll timeout in jiffies instead of iterations count
Amir Vadai [Thu, 4 Jun 2009 10:52:34 +0000 (13:52 +0300)]
sdp: make bzcopy poll timeout in jiffies instead of iterations count

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix bad handling for not aligned buffers in bzcopy + removed poll at end of...
Amir Vadai [Thu, 4 Jun 2009 09:28:33 +0000 (12:28 +0300)]
sdp: fix bad handling for not aligned buffers in bzcopy + removed poll at end of send

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix RX to work well on sink side + cosmetics changes
Amir Vadai [Wed, 3 Jun 2009 06:34:49 +0000 (09:34 +0300)]
sdp: fix RX to work well on sink side + cosmetics changes

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: TX from 1 context only. RX with minimal context switches
Amir Vadai [Tue, 26 May 2009 16:16:56 +0000 (19:16 +0300)]
sdp: TX from 1 context only. RX with minimal context switches

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: don't arm nagle timer for every sent packet
Amir Vadai [Sun, 24 May 2009 07:26:08 +0000 (10:26 +0300)]
sdp: don't arm nagle timer for every sent packet

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: remove leftover from debugging
Amir Vadai [Mon, 18 May 2009 12:29:54 +0000 (15:29 +0300)]
sdp: remove leftover from debugging

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Do not nagle BZCopy packets
Amir Vadai [Mon, 18 May 2009 11:45:18 +0000 (14:45 +0300)]
sdp: Do not nagle BZCopy packets

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: don't do nagle on first packet
Amir Vadai [Thu, 14 May 2009 14:10:33 +0000 (17:10 +0300)]
sdp: don't do nagle on first packet

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fix backports
Amir Vadai [Thu, 14 May 2009 11:54:07 +0000 (14:54 +0300)]
sdp: fix backports

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: process RX CQ from interrupt
Amir Vadai [Wed, 13 May 2009 11:37:13 +0000 (14:37 +0300)]
sdp: process RX CQ from interrupt

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: created sdp_rx and sdp_tx
Amir Vadai [Sun, 26 Apr 2009 12:31:27 +0000 (15:31 +0300)]
sdp: created sdp_rx and sdp_tx

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: /proc/net/sdpprf - performance utilities
Amir Vadai [Sun, 26 Apr 2009 07:55:26 +0000 (10:55 +0300)]
sdp: /proc/net/sdpprf - performance utilities

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: no tx interrupts
Amir Vadai [Tue, 21 Apr 2009 14:18:37 +0000 (17:18 +0300)]
sdp: no tx interrupts

poll tx cq with timer instead of interrupts

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: move tx_ring into dedicated structre + many cosmetic fixes
Amir Vadai [Tue, 21 Apr 2009 13:56:37 +0000 (16:56 +0300)]
sdp: move tx_ring into dedicated structre + many cosmetic fixes

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fixed compilation error when statistics turned off
Amir Vadai [Tue, 21 Apr 2009 13:23:25 +0000 (16:23 +0300)]
sdp: fixed compilation error when statistics turned off

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: cosmetics changes
Amir Vadai [Tue, 21 Apr 2009 13:07:23 +0000 (16:07 +0300)]
sdp: cosmetics changes

* renamed ssk->bufs into ssk->tx_credits
* renamed SDP_MIN_BUFS into SDP_MIN_TX_CREDITS
* get bz struct from skb in a macro

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Interrupts performance fixes
Amir Vadai [Tue, 21 Apr 2009 12:38:27 +0000 (15:38 +0300)]
sdp: Interrupts performance fixes

* use rcvbuf_initial - fix server to use rcvbuf_initial_size as initial
* hw interrupt moderation
* fix interrupts statistics
* fix max frags bug

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: added /proc/net/sdpstats + packets dump
Amir Vadai [Sun, 5 Apr 2009 15:22:45 +0000 (18:22 +0300)]
sdp: added /proc/net/sdpstats + packets dump

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG1311 Netpipe fails with a IB_WC_LOC_LEN_ERR.
Amir Vadai [Tue, 28 Apr 2009 06:40:10 +0000 (09:40 +0300)]
sdp: BUG1311 Netpipe fails with a IB_WC_LOC_LEN_ERR.

This problem is seen when the receive buffer or the receive buffer fragments
are smaller than the senders buffer. If the sender is using 64KB pages
and supports a sk fragment of 64KB it may send fragments that are a full 64KB
in length causing the receiver to generate an IB_WC_LOC_LEN_ERR. This patch
makes two changes:

If the kernel does not support a full 64KB fragment it will reject resize
requests over 32K. (On older kernels a fragment size is defined as a U16)

If a kernel supports a 64KB fragment then it allows a full 64KB receive
fragment to be used.

Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: change orphan_count and sockets_allocated from atomic_t to percpu_counter
Nicolas Morey-Chaisemartin [Wed, 29 Apr 2009 14:23:04 +0000 (16:23 +0200)]
sdp: change orphan_count and sockets_allocated from atomic_t to percpu_counter

Fixed SDP to work on 2.6.29+
As percpu_counter are huge they can be allocated on the stack without causing sdp module to crash.
Both variable are now dynamically allocated at module init.

Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin@ext.bull.net>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG1472 - clean socket timeouts and refcount when device is removed
Amir Vadai [Tue, 17 Mar 2009 15:38:48 +0000 (17:38 +0200)]
sdp: BUG1472 - clean socket timeouts and refcount when device is removed

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fixed typo Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
Amir Vadai [Tue, 10 Mar 2009 07:15:57 +0000 (09:15 +0200)]
sdp: fixed typo Signed-off-by: Amir Vadai <amirv@mellanox.co.il>

9 years agosdp: BUG1502 - scheduling while atomic
Amir Vadai [Tue, 17 Feb 2009 09:04:09 +0000 (11:04 +0200)]
sdp: BUG1502 - scheduling while atomic

Don't destory qp from interrupt context - do it in work queue

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: small typo fixed
Amir Vadai [Thu, 29 Jan 2009 06:40:09 +0000 (08:40 +0200)]
sdp: small typo fixed

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1309 - SDP close is slow + fix recv buffer initial size setting
Amir Vadai [Thu, 8 Jan 2009 11:00:16 +0000 (13:00 +0200)]
SDP: BUG1309 - SDP close is slow + fix recv buffer initial size setting

sdp_post_recv is called when the QP is closed. therefore it tries to post
recv buffers without success till the socket is destructed.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1087 - fixed recovery from failing rdma_create_qp()
Amir Vadai [Mon, 8 Dec 2008 15:09:01 +0000 (17:09 +0200)]
SDP: BUG1087 - fixed recovery from failing rdma_create_qp()

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: Fix to limit max buffer size in sdp_resize_buffers on IA64
Amir Vadai [Tue, 2 Dec 2008 13:01:26 +0000 (15:01 +0200)]
SDP: Fix to limit max buffer size in sdp_resize_buffers on IA64

Fix for bug 1311
https://bugs.openfabrics.org/show_bug.cgi?id=1311

Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin@ext.bull.net>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG1429 - Sdp doesnt close resources
Amir Vadai [Tue, 2 Dec 2008 11:34:09 +0000 (13:34 +0200)]
sdp: BUG1429 - Sdp doesnt close resources

When called from sdp_dreq_timeout() - not holding ref count for
timewait exit - when IB is already teared down.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG1047 - crash in sdp_destroy_qp() when no memory
Amir Vadai [Mon, 1 Dec 2008 12:49:07 +0000 (14:49 +0200)]
sdp: BUG1047 - crash in sdp_destroy_qp() when no memory

fix initialization of sdp socket special attributes after sk_clone()

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1391 - bugs in the zero-copy send code
Amir Vadai [Mon, 17 Nov 2008 08:11:27 +0000 (10:11 +0200)]
SDP: BUG1391 - bugs in the zero-copy send code

* fix sdp_bz_setup() code to handle the case of kernel data segment correctly (kernel sockets)
* make sdp_bz_setup() pass ENOMEM, EFAULT or other errors to sendmsg().
* Fix: the deallocation of bz descriptor in sendmsg() is not handled properly -- it is allocated many times, but freed once
* Fix: sdp_bzcopy_get() code does not raise reference count for all  pages in the bz descriptor (only the "partial" pages will get the count raised).
  However, the send completion code will call put_page() on all entries, leading to a crash for page-aligned transfers.

Signed-off-by: Constantine Gavrilov <constantine.gavrilov@gmail.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1348 - a socket is left after netper on the server side
Amir Vadai [Thu, 20 Nov 2008 13:02:46 +0000 (15:02 +0200)]
SDP: BUG1348 - a socket is left after netper on the server side

Removed unneccessary sock_hold from sdp_shutdown. This ref count
will be taken by close(). no need to take it twice.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1348 - sockets are left in CLOSE state with ref count > 0
Amir Vadai [Thu, 20 Nov 2008 10:56:39 +0000 (12:56 +0200)]
SDP: BUG1348 - sockets are left in CLOSE state with ref count > 0

Removed unnecessary sock_hold() when a CM_REJECT arrives before TCP_ESTABLISHED state.
This happend in the server side when after getting CM_REQ and answering with CM_REP a CM_REJ
arrived.
The sock_hold that was removed assumed that there will be a timewait state - but according to
the spec, the state changes back to LISTEN without TIMEWAIT.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1402 - kernel panic when sdp_fin arrive in the middle of closing a socket
Amir Vadai [Thu, 20 Nov 2008 09:34:38 +0000 (11:34 +0200)]
SDP: BUG1402 - kernel panic when sdp_fin arrive in the middle of closing a socket

This could happen theoretically so there is no need for the BUG()

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: BUG1343 - Polygraph test crashes machine
Amir Vadai [Tue, 18 Nov 2008 13:41:15 +0000 (15:41 +0200)]
SDP: BUG1343 - Polygraph test crashes machine

No socket reference was taken before starting DREQ timeout.
cancel delayed work only remove the work if it is in the timer stage
before entered to the workqueue.
Because of that, sdp_dreq_timeout_work could be in the work queue
after the socket was destructed. and when the socket was reused
and the inlined work structre was resetted things went wrong.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: timeout when waiting for sdp_fin
Amir Vadai [Mon, 27 Oct 2008 16:11:51 +0000 (18:11 +0200)]
sdp: timeout when waiting for sdp_fin

fixes BUG1305:
https://bugs.openfabrics.org/show_bug.cgi?id=1305

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: fixed sparse warning Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
Amir Vadai [Mon, 27 Oct 2008 14:45:29 +0000 (16:45 +0200)]
sdp: fixed sparse warning Signed-off-by: Amir Vadai <amirv@mellanox.co.il>

9 years agosdp: do nothing when getting FIN after IB teardown started
Amir Vadai [Sun, 26 Oct 2008 13:07:38 +0000 (15:07 +0200)]
sdp: do nothing when getting FIN after IB teardown started

Fixes bug at:
https://bugs.openfabrics.org/show_bug.cgi?id=1302

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: Limit skb frag size to 64K-1
Amir Vadai [Sun, 26 Oct 2008 09:43:43 +0000 (11:43 +0200)]
sdp: Limit skb frag size to 64K-1

When 64K pages are in use, the skb_frag size can become larger
than the skb_frag can address. An skb_frag's max size is 64K-1.
This patch defines SDP_MAX_PAYLOAD as 64K - SDP_HEADER_SIZE.
The patch changes sdp_post_recv() and sdp_sendmsg() to use the smaller of
PAGE_SIZE or SDP_MAX_PAYLOAD as it segment size.

This fix the bug here:
https://bugs.openfabrics.org/show_bug.cgi?id=1300

Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: more verbose debugging messages for sock_put and sock_head
Amir Vadai [Sun, 19 Oct 2008 14:59:23 +0000 (16:59 +0200)]
sdp: more verbose debugging messages for sock_put and sock_head

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosdp: BUG1282 - ref count not taken during sdp_shutdown
Amir Vadai [Sun, 19 Oct 2008 15:01:33 +0000 (17:01 +0200)]
sdp: BUG1282 - ref count not taken during sdp_shutdown

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: print socket tcp-state in /proc/net/sdp
Amir Vadai [Tue, 7 Oct 2008 11:29:05 +0000 (13:29 +0200)]
SDP: print socket tcp-state in /proc/net/sdp

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: fix initial recv buffer size
Amir Vadai [Tue, 15 Jul 2008 18:17:00 +0000 (21:17 +0300)]
SDP: fix initial recv buffer size

Set initial recv buffer according to incoming hha header.

Fixed bugzilla 1086: SDP Linux and SDP windows don't work togeather

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agosupport for 2.6.27 + backports
Amir Vadai [Sun, 3 Aug 2008 08:20:06 +0000 (11:20 +0300)]
support for 2.6.27 + backports

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: RDMA_CM_EVENT_TIMWAIT_EXIT renamed into RDMA_CM_EVENT_TIMEWAIT_EXIT.
Vladimir Sokolovsky [Wed, 30 Jul 2008 13:03:45 +0000 (16:03 +0300)]
SDP: RDMA_CM_EVENT_TIMWAIT_EXIT renamed into RDMA_CM_EVENT_TIMEWAIT_EXIT.

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
9 years agoSDP: Don't allow destruct socket when having sdp_destroy_work in workqueue
Amir Vadai [Wed, 23 Jul 2008 11:30:31 +0000 (14:30 +0300)]
SDP: Don't allow destruct socket when having sdp_destroy_work in workqueue

in error flow, sdp_destroy_work is placed in workqueue and sometimes the
user application call close() that destruct the socket before sdp_destroy_work
is called.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: do gracefull close instead of always doing abortive close.
Amir Vadai [Thu, 10 Jul 2008 08:53:53 +0000 (01:53 -0700)]
SDP: do gracefull close instead of always doing abortive close.

Main changes:
1.  when a close/shutdown syscall is called, instead of sending a DREQ, put
    last socket ref count and go to TCP_CLOSE state do:
    - take a socket reference count
    - set state to TCP_TIME_WAIT
    - start infiniband tear down
    - wait till got RDMA_CM_EVENT_TIMEWAIT_EXIT
    - set socket state to TCP_CLOSE
    - put last socket ref count - this will call sdp_destruct()

2. No need for sdp_time_wait

3. Abortive close will immedietly start infiniband teardown - will finilize the
   socket closing when CM finish.

4. Fixed references accounting + state exchanges

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: Split sdp_handle_wc() to smaller functions
Amir Vadai [Thu, 10 Jul 2008 08:47:49 +0000 (01:47 -0700)]
SDP: Split sdp_handle_wc() to smaller functions

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP: Use sdp_set_state()
Amir Vadai [Thu, 10 Jul 2008 08:46:19 +0000 (01:46 -0700)]
SDP: Use sdp_set_state()

use sdp_set_state() instead of modifying sk_state directly

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoCommited old fixes from kernel_patches/fixes/cma_established1.patch into git
Amir Vadai [Thu, 22 May 2008 13:10:49 +0000 (16:10 +0300)]
Commited old fixes from kernel_patches/fixes/cma_established1.patch into git

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoModifies SDP to support the updated 2.6.26-rc2 kernel APIs.
Amir Vadai [Thu, 22 May 2008 11:35:03 +0000 (14:35 +0300)]
Modifies SDP to support the updated 2.6.26-rc2 kernel APIs.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
9 years agoSDP - Fix compile problem on 2.6.24 ia64
Jim Mott [Mon, 11 Feb 2008 20:30:45 +0000 (12:30 -0800)]
SDP - Fix compile problem on 2.6.24 ia64

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP: Enable bzcopy by default
Jim Mott [Tue, 5 Feb 2008 16:10:06 +0000 (18:10 +0200)]
SDP: Enable bzcopy by default

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Bug837: executing netperf with TCP_CORK enabled never ends
Jim Mott [Fri, 4 Jan 2008 20:36:50 +0000 (12:36 -0800)]
SDP - Bug837: executing netperf with TCP_CORK enabled never ends

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Bug829: poll() always returns POLLOUT on non-blocking socket
Jim Mott [Fri, 4 Jan 2008 20:32:48 +0000 (12:32 -0800)]
SDP - Bug829: poll() always returns POLLOUT on non-blocking socket

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Bug294: SDP connect() only allows AF_INET (2), not AF_INET_SDP (27)
Jim Mott [Fri, 4 Jan 2008 20:26:25 +0000 (12:26 -0800)]
SDP - Bug294: SDP connect() only allows AF_INET (2), not AF_INET_SDP (27)

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP: various bzcopy fixes V2
Jim Mott [Wed, 5 Dec 2007 09:02:11 +0000 (11:02 +0200)]
SDP: various bzcopy fixes V2

The Mellanox regression tests posted a number of failures when
multiple threads were accessing the same sockets concurrently.  In
addition to test failures, there were log messages of the form:
  sdp_sock(54386:19002): Could not reap -5 in-flight sends

This fix handles all these failures and errors.

The V2 is a fix to handle 2.6.22+ kernels where sk_buffs have
changed.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoApplied 'kernel_patches/fixes/sdp_skbuff_offset.patch'.
Vladimir Sokolovsky [Tue, 4 Dec 2007 13:51:32 +0000 (15:51 +0200)]
Applied 'kernel_patches/fixes/sdp_skbuff_offset.patch'.

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
9 years agoApplied 'kernel_patches/fixes/sdp_post_credits.patch'
Vladimir Sokolovsky [Tue, 4 Dec 2007 13:49:25 +0000 (15:49 +0200)]
Applied 'kernel_patches/fixes/sdp_post_credits.patch'

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
9 years agoSDP: Applied 'kernel_patches/fixes/sdp_cq_param.patch'
Vladimir Sokolovsky [Tue, 4 Dec 2007 13:48:11 +0000 (15:48 +0200)]
SDP: Applied 'kernel_patches/fixes/sdp_cq_param.patch'

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
9 years agoSDP: Disable Zcopy.
Jim Mott [Wed, 21 Nov 2007 13:00:46 +0000 (15:00 +0200)]
SDP: Disable Zcopy.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoModifies SDP to support the updated 2.6.24-rc2 kernel APIs.
Jim Mott [Tue, 20 Nov 2007 21:57:07 +0000 (13:57 -0800)]
Modifies SDP to support the updated 2.6.24-rc2 kernel APIs.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP: A better fix of a potential memory leak in the new bzcopy code.
Dotan Barak [Wed, 21 Nov 2007 07:08:25 +0000 (09:08 +0200)]
SDP: A better fix of a potential memory leak in the new bzcopy code.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
9 years agosdp: Fix data corretness regression test failure.
Jim Mott [Sun, 11 Nov 2007 17:20:02 +0000 (19:20 +0200)]
sdp: Fix data corretness regression test failure.

Mellanox regression testing for data correctness started failing
after the recent addition of bzcopy. This was because sdp_sendmsg
returned before all in-flight RC transfers completed.
This allowed user space to modify buffers that had not been sent.

A big oops.

This fixes that bug.  Small frame bandwidth is even worse
now, but small frame latency is lower which is good.  The
default transfer size that triggers bzcopy has been
increased to the bandwidth crossover point found in
MLX4-MLX4 tests.  More work will be required to find the
best value for the release.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Fix reference count locking bug
Jim Mott [Tue, 6 Nov 2007 22:28:05 +0000 (14:28 -0800)]
SDP - Fix reference count locking bug

Add code to fix a problem found by the Mellanox regression group.  When
mlx4_ib driver is unloaded while SDP connections are active, the system
would hang.

The original fix for this problem called an rdma_cm service that can block
with 2 spin locks held.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Make bzcopy defualt for 2K and larger transfer size
Jim Mott [Sat, 3 Nov 2007 02:50:31 +0000 (19:50 -0700)]
SDP - Make bzcopy defualt for 2K and larger transfer size

In order to be sure we test the new bzcopy code it will be enabled by
default.  The 2K threshold is what my testing shows to be the lowest
value that always wins.  We may have to adjust this upward if other
hardware has worse performance.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Fix reference count bug that prevents mlx4_ib and ib_sdp unload
Jim Mott [Sat, 3 Nov 2007 02:45:42 +0000 (19:45 -0700)]
SDP - Fix reference count bug that prevents mlx4_ib and ib_sdp unload

Add code to handle mlx4 device remove call.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Add note on where linux bits in sdp_main come from.
Michael S. Tsirkin [Tue, 23 Oct 2007 17:59:49 +0000 (10:59 -0700)]
SDP - Add note on where linux bits in sdp_main come from.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
9 years agoSDP - Zero copy bcopy support
Jim Mott [Tue, 23 Oct 2007 17:59:13 +0000 (10:59 -0700)]
SDP - Zero copy bcopy support

This patch adds zero copy send support to SDP.  Below 2K transfer size,
it is better to bcopy.  With larger transfers, this is a net win on
bandwidth.  Latency testing is yet to be done.

                     BCOPY        BZCOPY
   1K  TCP_STREAM  3555 Mb/sec  2250 Mb/sec
   2K  TCP_STREAM  3650 Mb/sec  3785 Mb/sec
   4K  TCP_STREAM  3560 Mb/sec  6220 Mb/sec
   8K  TCP_STREAM  3555 Mb/sec  6190 Mb/sec
  16K  TCP_STREAM  5100 Mb/sec  6155 Mb/sec
   1M  TCP_STREAM  4630 Mb/sec  6210 Mb/sec

Performance work still remains.  Open issues include correct setsockopt
defines (use previous SDP values?), code cleanup, performance tuning,
rigorous regression testing, and multi-OS build+test.  Simple testing to
date includes netperf and iperf, ^C recovery, unload/load, and checking
for gross memory leaks on Rhat4u4.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP - Method used to allocate socket buffers may cause node to hang
Jim Mott [Tue, 23 Oct 2007 17:58:27 +0000 (10:58 -0700)]
SDP - Method used to allocate socket buffers may cause node to hang

The problem we are seeing is that if a node is under load, and
a memory allocation fails (say in sock_sendmsg()), the kernel will
use the allocation policy to decide how to proceed with the allocation.
If GFP_KERNEL is specified, then the kernel may attempt to free pages
through the iSCSI block device that is making the socket call, which
would result in a deadlock.  Use of GFP_NOIO should prevent the kernel
from using the IO backend to free memory resources.

Each kernel level socket has an allocation flag to specify the
memory allocation policy for socket buffers, the default is GFP_ATOMIC
(or GFP_KERNEL for SDP).  If the caller creates a socket with the
policy set to GFP_NOFS or GFP_NOIO this should be the allocation
policy used by the SDP layer.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP bug647 - Validate ChRcvBuf range and add comments
Jim Mott [Tue, 23 Oct 2007 17:57:33 +0000 (10:57 -0700)]
SDP bug647 - Validate ChRcvBuf range and add comments

Clean up the buffer resize code to comply with CA4-83:
  Upon receipt of ChRcvBuf message, the remote peer shall not
change the buffer size in the direction opposite of that
requested.

Also add some comments and pretty up the code.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP bug646 - Do not send DisConn if there is only 1 credit
Jim Mott [Tue, 23 Oct 2007 17:51:30 +0000 (10:51 -0700)]
SDP bug646 - Do not send DisConn if there is only 1 credit

Compliance with CA4-82:
  If one credit is available, an implementation shall only send SDP
messages that provide additional credits and also do not contain ULP
payload.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP bug644 - DisConn, ChRcvBuf, and ChRcvBufAck sent solicited
Jim Mott [Tue, 23 Oct 2007 17:50:39 +0000 (10:50 -0700)]
SDP bug644 - DisConn, ChRcvBuf, and ChRcvBufAck sent solicited

This patch brings the implementation into compliance with A4.11.2 which
says that these messages are not to be sent as solicited.

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoSDP: Add keepalive support
Jim Mott [Thu, 11 Oct 2007 16:33:09 +0000 (09:33 -0700)]
SDP: Add keepalive support

Signed-off-by: Jim Mott <jim@mellanox.com>
9 years agoFix SDP build issue in 2.6.22-rc7 kernel. There are skbuff.h changes.
Jim Mott [Mon, 16 Jul 2007 12:27:12 +0000 (05:27 -0700)]
Fix SDP build issue in 2.6.22-rc7 kernel. There are skbuff.h changes.

9 years agoIB/sdp: move the socket to accept queue
Ami Perlmutter [Tue, 29 May 2007 14:32:31 +0000 (17:32 +0300)]
IB/sdp: move the socket to accept queue

Move socket to accept queue if RTU is dropped and DREQ is recieved
(bugzilla 645)

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: resize data should be added to skb via skb_put (bugzilla 620)
Ami Perlmutter [Tue, 15 May 2007 11:55:31 +0000 (14:55 +0300)]
IB/sdp: resize data should be added to skb via skb_put (bugzilla 620)

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: fix problem with sles9 backport (bugzilla 621)
Ami Perlmutter [Tue, 15 May 2007 06:08:13 +0000 (09:08 +0300)]
IB/sdp: fix problem with sles9 backport (bugzilla 621)

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: slow start recv buffer sizes, and try to resize if out of credits (bugzilla...
Ami Perlmutter [Thu, 10 May 2007 12:23:13 +0000 (15:23 +0300)]
IB/sdp: slow start recv buffer sizes, and try to resize if out of credits (bugzilla 556)

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: print queued rx and tx status to proc_fs implement SIOCOUTQ ioctl
Ami Perlmutter [Wed, 9 May 2007 09:16:08 +0000 (12:16 +0300)]
IB/sdp: print queued rx and tx status to proc_fs implement SIOCOUTQ ioctl

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: Cleanup compilation warnings.
Michael S. Tsirkin [Sun, 6 May 2007 08:18:56 +0000 (11:18 +0300)]
IB/sdp: Cleanup compilation warnings.

workqueue function gets passed work_struct sizeof should be printed with %zd

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
9 years agoIB/sdp: Fix to be compliant with CA4-119 (bugzilla 596)
Ami Perlmutter [Wed, 2 May 2007 12:26:17 +0000 (15:26 +0300)]
IB/sdp: Fix to be compliant with CA4-119 (bugzilla 596)

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: adjust module parameter to improve 8K message BW
Ami Perlmutter [Thu, 26 Apr 2007 07:13:23 +0000 (10:13 +0300)]
IB/sdp: adjust module parameter to improve 8K message BW

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: prevent removal of ib device before cleanup
Ami Perlmutter [Wed, 25 Apr 2007 14:19:07 +0000 (17:19 +0300)]
IB/sdp: prevent removal of ib device before cleanup

Should cleanup  all related resources (bugzzila num. 579)

Signed-off-by: Ami Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: fix dma mapping direction (bugzzila num. 556)
Ami Perlmutter [Sun, 22 Apr 2007 10:31:47 +0000 (13:31 +0300)]
IB/sdp: fix dma mapping direction (bugzzila num. 556)

Signed-off-by: Amiram Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp - use the ib_dma interface
Ami Perlmutter [Thu, 29 Mar 2007 08:28:01 +0000 (10:28 +0200)]
IB/sdp - use the ib_dma interface

The SDP module should be using the ib_dma_* interface, not the dma_*
interface directly.  This fixes a crash on InfiniPath hardware.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
9 years agoIB/sdp: cm disconnect should wake up any sleeping processes (bugzzila num. 492)
Ami Perlmutter [Sun, 25 Mar 2007 14:48:04 +0000 (16:48 +0200)]
IB/sdp: cm disconnect should wake up any sleeping processes (bugzzila num. 492)

Signed-off-by: Amiram Perlmutter <amip@dev.mellanox.co.il>
9 years agoIB/sdp: add uid and inode to proc_fs info
Amiram Perlmutter [Wed, 14 Mar 2007 12:34:08 +0000 (14:34 +0200)]
IB/sdp: add uid and inode to proc_fs info

Signed-off-by: Amiram Perlmutter <amip@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>