Dotan Barak [Mon, 23 Jan 2006 05:07:09 +0000 (05:07 +0000)]
List all devices in ibv_devinfo
Make ibv_devinfo list all IB devices by default, rather than the first
device only.
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Ralph Campbell [Tue, 17 Jan 2006 17:20:37 +0000 (17:20 +0000)]
Arm CQ early enough in pingpong examples
The example pingpong programs have a race when using events where the
client sends the first packet but the server hasn't yet armed the CQ
by calling ibv_req_notify_cq() thus waiting forever in
ibv_get_cq_event(). The fix is to move the call to
ibv_req_notify_cq() before signaling the client to "start".
Signed-off-by: Ralph Campbell <ralphc@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Shirley Ma [Thu, 15 Dec 2005 21:25:33 +0000 (21:25 +0000)]
Handle devices that don't support SRQ
create_srq is not a mandatory device function, therefore in
userspace/libibverbs/src/verbs.c ibv_create_srq should check
create_srq() first before calling it, otherwise the caller will cause
the segmentation fault on device which doesn't support SRQs.
Signed-off-by: Shirley Ma <xma@us.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Update libibverbs and libmthca to handle new kernel ABI 4, which has
the kernel compute exact capabilities for QPs.
Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Roland Dreier [Tue, 25 Oct 2005 23:00:45 +0000 (23:00 +0000)]
Fix QP attr masks in ibv_uc_pingpong
Fix QP attribute masks used in ibv_uc_pingpong -- now that mthca
correctly fails if we try to set RDMA/atomic capabilities for UC QPs,
the examples need to be fixed as well.
Roland Dreier [Tue, 25 Oct 2005 22:40:13 +0000 (22:40 +0000)]
Handle out-of-order completions in pingpong examples
Keep track of whether send and/or receive is pending in libibverbs
pingpong examples. This avoids failures when the remote side receives
data and posts a send very quickly, and the local side completes the
receive before the previous send. With the old code, this could
result in posting a send before the previous send completed, and
therefore overrun the send queue.
Roland Dreier [Sun, 23 Oct 2005 22:32:47 +0000 (22:32 +0000)]
Fix buffer size computation in ibv_cmd_get_context_v2()
Correct silly mistake in ibv_cmd_get_context_v2() computation of size
of buffer for old ABI command: we need to use sizeof *cmd instead of
sizeof cmd, since cmd is a pointer.
Roland Dreier [Fri, 21 Oct 2005 21:29:07 +0000 (21:29 +0000)]
Check write() return value against size we tried to write
In libibverbs post send, post recv and post SRQ recv marshalling code,
correct value that we check write() return value against so that we
check against the size we actually try to write, instead of just
sizeof cmd.
Roland Dreier [Fri, 9 Sep 2005 20:04:21 +0000 (20:04 +0000)]
Make command structure sizes the same on 32-bit and 64-bit
Add 4-byte reserved members to the new destroy CQ, destroy QP and
destroy SRQ command structures so that they become a multiple of 8
bytes in size. This fixes the structures so they have the same size
on both 32-bit and 64-bit architectures (which is required so that
32-bit userspace on a 64-bit kernel works correctly).
Roland Dreier [Wed, 7 Sep 2005 20:01:31 +0000 (20:01 +0000)]
Include htonll() and nothll() in <infiniband/arch.h>
Move htonll() and ntohll() from libmthca into libibverb's
<infiniband/arch.h>, and use them in ibv_get_device_guid() to
avoid pointer aliasing (which some versions of gcc miscompile).
Roland Dreier [Wed, 31 Aug 2005 18:39:26 +0000 (18:39 +0000)]
Update for new kernel ABI (stale event handling)
Update to handle new kernel ABI for avoiding stale asynchronous
events. When a CQ, QP or SRQ is destroyed, the kernel reports the
number of events it has given to userspace, and we wait until we've
handled the same number of events.
This does introduce a library API change: consumers are now required
to call ibv_put_async_event() to release every asynchronous event that
they retrieve via ibv_get_async_event().
Roland Dreier [Tue, 28 Jun 2005 16:11:49 +0000 (16:11 +0000)]
Free context before closing associated file descriptors
Free context before closing associated file descriptors. This can
avoid some problems acquiring mmap_sem when there is still memory to
be released by the kernel.
Fix uninitialized AH attributes in pingpong examples
Some address handle attributes (notably static rate flow control) were
uninitialized. Fix this by initializing all fields to 0 using
designated initializers.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <roland@topspin.com>
Roland Dreier [Wed, 20 Apr 2005 14:01:00 +0000 (14:01 +0000)]
Add command codes for all verbs
Add command codes for all verbs to userspace include files. Define
parameter structures for query GID, query P_Key, attach multicast and
detach multicast commands.