Jack Morgenstein [Tue, 31 Oct 2006 05:30:54 +0000 (05:30 +0000)]
Return sq_draining properly from query_qp
Return the sq_draining value back to user space for query_qp instead
of the en_sqd_async notify value. This last is valid only for
modify_qp. For query_qp (according to the IB Spec V1.2), the draining
status should returned.
Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Roland Dreier [Mon, 30 Oct 2006 23:06:59 +0000 (23:06 +0000)]
Make device finding work again
Fix operator precedence issues in how libibverbs-1.0 adds devices to
its list. Also change so that devices are reported in the same order
as they were in older versions.
Roland Dreier [Wed, 4 Oct 2006 23:57:10 +0000 (23:57 +0000)]
Add Valgrind annotations
Add basic Valgrind annotations to libibverbs and libmthca (disabled by
default, can be enabled by configuring with --with-valgrind). These
reduce false positive warnings from the Valgrind memcheck module.
Based on work and suggestions from Rainer Keller <keller@hlrs.de> and
Jeff Squyres <jsquyres@cisco.com>.
While comma at end of enumerator list is legal since 1999, some tools
(notably gcc versions pre-4.0) seem to default to 1989 mode when
running with -pedantic flag, and warn about this usage.
Since most of our enums in header files do not have comma at end, its
probably easier to fix the remaining two cases than educate all users
of libibverbs on virtues of C99.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Roland Dreier [Tue, 11 Apr 2006 23:27:38 +0000 (23:27 +0000)]
Reduce dependency on libsysfs
Reduce libibverbs dependency on libsysfs by using local functions for
internal sysfs access. libsysfs is still required because of the ABI,
which passes a struct sysfs_class_device * to low-level driver init
functions.
Roland Dreier [Tue, 14 Mar 2006 00:24:55 +0000 (00:24 +0000)]
Use sysfs_open_attribute() and sysfs_read_attribute()
Use sysfs_open_attribute() and sysfs_read_attribute() instead of the
deprecated function sysfs_read_attribute_value(), which is no longer
present in libsysfs2 (which is already in Debian and Ubuntu).
Roland Dreier [Wed, 15 Feb 2006 22:48:01 +0000 (22:48 +0000)]
Add response handling to ibv_cmd_create_qp()
Add resp and resp_size parameters to libibverbs's ibv_cmd_create_qp()
function so that kernel low-level drivers can return private data to
userspace device drivers.
Dotan Barak [Tue, 14 Feb 2006 05:43:28 +0000 (05:43 +0000)]
Report board_id from ibv_devinfo, if present
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>
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.