blob: 27ee956ddac838e18f19fa717b7610658b507532 [file] [log] [blame]
2006-10-30 Jack Morgenstein <>
* src/cmd.c (ibv_cmd_query_qp): Unmarshall sq_draining instead of
* include/infiniband/kern-abi.h: Change en_sqd_async_notify member
of struct ibv_query_qp_resp to sq_draining.
2006-10-30 Roland Dreier <>
* src/init.c (find_drivers): Make find_drivers() take a const
directory name, and tweak how we strip trailing /s so that we
don't have to modify the directory name passed in. Constify
default_path too.
2006-10-25 Roland Dreier <>
* src/init.c (init_drivers): Remove assignment to dev->driver now
that it is gone for good.
* include/infiniband/verbs.h: Remove .driver member of struct
ibv_device, since it is never really used.
2006-10-17 Roland Dreier <>
* include/infiniband/arch.h: Update i386 and x86_64 memory barrier
macros to be more than compiler barriers, to guard against
out-of-order speculative reads.
* include/infiniband/arch.h: Add rmb() and wmb() macros in
addition to the full mb(), so that low-level drivers can ask for
weaker ordering if that's all that is needed.
2006-10-03 Roland Dreier <>
* src/cmd.c (ibv_cmd_get_context_v2, ibv_cmd_get_context)
(ibv_cmd_query_device, ibv_cmd_query_port, ibv_cmd_alloc_pd)
(ibv_cmd_reg_mr, ibv_cmd_create_cq_v2, ibv_cmd_create_cq)
(ibv_cmd_poll_cq, ibv_cmd_resize_cq, ibv_cmd_destroy_cq)
(ibv_cmd_create_srq, ibv_cmd_create_qp, ibv_cmd_post_send)
(ibv_cmd_post_recv, ibv_cmd_post_srq_recv, ibv_cmd_create_ah)
(ibv_cmd_destroy_qp): Annotate so that Valgrind knows responses
are defined after write() succeeds. The kernel writes into the
response structure directly, so without these, Valgrind thinks
that response structures are undefined memory. This is based on
patches and suggestions by Rainer Keller <>, Jeff
Squyres <> and Siqing Fan.
* src/ibverbs.h: Add wrapper for VALGRIND_MAKE_MEM_DEFINED so that
it can be used in .c files without worrying about whether Valgrind
is installed or enabled.
* Add support for Valgrind annotation (enabled with
--with-valgrind option to configure).
* src/cmd.c (ibv_cmd_query_port, ibv_cmd_create_cq,
ibv_cmd_modify_qp): Set reserved fields to 0 to avoid future
problems and also to make Valgrind a little quieter.
* src/init.c (init_drivers): Set node_type and transport_type
values of device being created.
* include/infiniband/verbs.h: Add ibv_node_type enum value
IBV_NODE_RNIC, and add enum ibv_transport_type. Add node_type and
transport_type fields to struct ibv_device.
2006-09-12 Roland Dreier <>
* include/infiniband/verbs.h: Swap wr_id and next members of
struct ibv_send_wr and struct ibv_recv_wr. This allows wr_id to
be naturally aligned without padding on 32-bit platforms.
2006-08-23 Roland Dreier <>
* include/infiniband/driver.h: Add a definition of the macro
IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS so that low-level driver plugins
can detect the changed signature of ibv_cmd_resize_cq().
2006-08-23 Ralph Campbell <>
* src/cmd.c (ibv_cmd_resize_cq): Add resp and resp_size parameters
so that the low-level driver in the kernel can return
device-specific information from the resize CQ operation.
2006-07-26 Roland Dreier <>
* src/verbs.c (ibv_reg_mr, ibv_dereg_mr): Add calls to
ibv_dontfork_range() and ibv_dofork_range() for memory regions
registered by library consumers.
* include/infiniband/verbs.h: Add declaration of ibv_fork_init().
* include/infiniband/driver.h: Add declarations of
ibv_dontfork_range() and ibv_dofork_range().
* src/memory.c: Rewrite to use a red-black tree instead of a
linked list. Change from doing mlock()/munlock() to
madvise(..., MADV_DONTFORK) and madvise(..., MADV_DOFORK), and
change the name of the entry points to ibv_dontfork_range() and
ibv_dofork_range(). Add ibv_fork_init() for applications to
request fork-safe behavior.
* src/ibverbs.h: Kill off unused declarations.
* src/init.c (ibverbs_init): Get rid of call to ibv_init_mem_map().
* include/infiniband/verbs.h: Add addr and length field to struct
ibv_mr so that memory regions can be madvised(). This changes the
ABI, since the layout of struct ibv_mr is changed.
2006-07-04 Roland Dreier <>
* include/infiniband/arch.h: Fix typo in sparc mb()
implementation: the asm should just be empty -- the "sync"
instruction was mistakenly cut and pasted from the ppc version.
2006-06-07 Sean Hefty <>
* src/verbs.c include/infiniband/verbs.h: Add new routines:
ibv_init_ah_from_wc() and ibv_create_ah_from_wc() to simplify UD QP
* src/marshall.c include/infiniband/marshall.h: Expose
ibv_copy_ah_attr_from_kern to retrieve ibv_ah_attr from kernel for
a UD QP.
2006-06-01 Roland Dreier <>
* src/device.c (ibv_get_device_list): Actually return a
NULL-terminated array as the documentation promises.
2006-05-31 Roland Dreier <>
* src/init.c (find_drivers): Fix memory leak: the result of
asprintf() needs to be freed when we're done with it.
* examples/asyncwatch.c (event_name_str): Print human-readable
2006-05-31 Leonid Arsh <>
* include/infiniband/verbs.h: Add IBV_EVENT_CLIENT_REREGISTER.
2006-05-22 Roland Dreier <>
* examples/devinfo.c (print_hca_cap): Read board_id attribute from
sysfs using ibv_read_sysfs_file() instead of libsysfs.
* src/cmd.c, src/marshall.c, src/sysfs.c: Include <string.h>,
since it is no longer implicitly included via <sysfs/libsysfs.h>.
* include/infiniband/driver.h, include/infiniband/verbs.h,
src/device.c, src/init.c, src/verbs.c: Remove dependency on
libsysfs by implementing what is required directly on top of
filesystem operations.
* include/infiniband/driver.h, src/init.c: Change name of driver
entry point to ibv_driver_init(), and update prototype to remove
libsysfs dependency.
* src/marshall.c, include/infiniband/marshall.h,
include/infiniband/sa.h: Remove deprecated ib_xxx symbols.
* Bump SONAME to 2, since libibverbs 1.1 will be
ABI-incompatible with libibverbs 1.0.
* Create libibverbs 1.1 branch and bump version number to 1.1-pre1.
2006-05-22 Michael S. Tsirkin <>
* include/infiniband/verbs.h: Remove trailing commas from
enumerators to quiet warnings from obsolete compilers.
2006-05-02 Roland Dreier <>
* Release version 1.0.3.
2006-05-01 Roland Dreier <>
* include/infiniband/arch.h: Only SPARC V9 ISA supports membar.
So just use generic memory barrier for older sparc archs.
2006-04-11 Roland Dreier <>
* src/sysfs.c (ibv_read_sysfs_file): Fix memory leak if open fails.
* src/device.c (ibv_get_device_guid), src/verbs.c (ibv_query_gid,
ibv_query_pkey), src/init.c (init_drivers, check_abi_version): Use
libibverbs functions instead of libsysfs functions to get to sysfs.
* src/sysfs.c (ibv_get_sysfs_path, ibv_read_sysfs_file): Add some
simple functions for accessing sysfs without using libsysfs.
* include/infiniband/sa-kern-abi.h: Deprecate struct
ib_kern_path_rec name; struct ibv_kern_path_rec is now preferred.
* include/infiniband/sa.h: Deprecate struct ib_sa_XXX names;
struct ibv_sa_XXX is now preferred.
* src/marshall.c, include/infiniband/marshall.h: Deprecate
ib_copy_XXX() names; ibv_copy_XXX() is preferred. Add stub
wrappers with the old names so old binaries still work.
2006-04-11 Hoang-Nam Nguyen <>
* src/verbs.c (ibv_rate_to_mult, mult_to_ibv_rate): Add new
functions to convert between IB rate enums and multiples of the
base 2.5 Gb/sec rate.
2006-04-11 Roland Dreier <>
* include/infiniband/verbs.h: Add __attribute_const macro to
portably mark functions as __attribute__((const))
2006-03-28 Roland Dreier <>
* src/init.c (load_driver): Print warning if dlopen() of a driver
plugin fails.
2006-03-22 Dotan Barak <>
* examples/asyncwatch.c: Print asynchronous event name as well as
raw integer value.
2006-03-22 Roland Dreier <>
* include/infiniband/verbs.h (ibv_req_notify_cq): Document
parameters better.
2006-03-16 Roland Dreier <>
* src/cmd.c, src/device.c, src/memory.c, src/verbs.c: Add include
of <stdlib.h> to get a declaration of free() and avoid compile
2006-03-14 Roland Dreier <>
* Release version 1.0.2.
* (EXTRA_DIST): Remove debian/ directory from
tarballs, since Debian policy is that upstream tarballs should not
include it.
2006-03-13 Roland Dreier <>
* Release version 1.0.1.
* src/init.c (check_abi_version), src/verbs.c (ibv_query_gid,
ibv_query_pkey): 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).
* Release version 1.0.
2006-03-06 Roland Dreier <>
* include/infiniband/verbs.h: Add enum ibv_rate to define encoding
of static_rate field (based on a patch from Jack Morgenstein
2006-03-06 Ralph Campbell <>
* src/init.c (find_drivers): Fix minor memory leak: call
globfree() to free memory allocated by glob().
2006-02-23 Dotan Barak <>
* src/cmd.c (ibv_cmd_create_srq): Add support for kernel ABI
version 6 (take SRQ capacity from kernel response to create SRQ).
2006-02-16 Roland Dreier <>
* Release version 1.0-rc7.
* src/cmd.c (ibv_cmd_create_qp): Add support for kernel ABI
version 5 (properly aligned struct ibv_create_qp_resp).
2006-02-15 Roland Dreier <>
* src/cmd.c (ibv_cmd_create_qp): Allow userspace device-specific
driver to pass in a response buffer, so that the low-level driver
in the kernel can pass back device-specific information. This
changes the userspace driver API, since the signature of
ibv_cmd_create_qp() is changed.
2006-02-14 Roland Dreier <>
* Release version 1.0-rc6.
2006-02-13 Dotan Barak <>
* examples/devinfo.c (print_hca_cap): Print board_id from sysfs,
if present.
2006-02-13 Roland Dreier <>
* examples/asyncwatch.c, examples/device_list.c,
examples/devinfo.c: Remove cpu_to_be64()/be64_to_cpu() and use
htonll()/ntohll() from <infiniband/arch.h>.
2006-02-13 Dotan Barak <>
* src/cmd.c (ibv_cmd_query_qp, ibv_cmd_query_srq),
include/infiniband/driver.h: Add driver interface for calling
query QP and query SRQ kernel commands.
* include/infiniband/kern-abi.h: Add kernel ABI for query QP and
query SRQ.
* src/verbs.c (ibv_query_qp, ibv_query_srq),
include/infiniband/verbs.h: Add query QP and query SRQ library
APIs. This changes the provider ABI, since new fields are added
to struct ibv_context_ops; source compatibility with provider
libraries is preserved, but binaries will have to be recompiled.
Neither source nor binary compatibility with consumers of
libibverbs is affected.
2006-02-01 Roland Dreier <>
* examples/rc_pingpong.c, examples/uc_pingpong.c,
examples/ud_pingpong.c, examples/srq_pingpong.c: Fix bug in
searching for device by name when there's more than one device.
2006-01-31 Roland Dreier <>
* include/infiniband/verbs.h, include/infiniband/driver.h: Remove
useless "extern" from function declarations.
2006-01-26 Roland Dreier <>
* include/infiniband/driver.h, src/cmd.c (ibv_cmd_resize_cq): Add
driver interface for calling resize CQ kernel command.
* include/infiniband/kern-abi.h: Add resize CQ kernel ABI.
* include/infiniband/verbs.h, src/verbs.c (ibv_resize_cq): Add
resize CQ library API. This changes the provider ABI, since a new
field is added to struct ibv_context_ops; source compatibility
with provider libraries is preserved, but binaries will have to be
recompiled. Neither source nor binary compatibility with
consumers of libibverbs is affected.
2006-01-25 Roland Dreier <>
* examples/pingpong.c, examples/pingpong.h,
examples/rc_pingpong.c, examples/uc_pingpong.c,
examples/srq_pingpong.c: Move pp_get_local_lid() to pingpong.c to
reduce code duplication.
2006-01-22 Roland Dreier <>
* Release version 1.0-rc5.
2006-01-22 Dotan Barak <>
* examples/devinfo.c (main): Make ibv_devinfo list all IB devices
by default, rather than the first device only.
2006-01-20 Roland Dreier <>
* examples/rc_pingpong.c, examples/uc_pingpong.c,
examples/srq_pingpong.c: Add "-m/--mtu=" option to set path MTU.
(Based on a patch from Ralph Campbell <>)
* examples/pingpong.c, examples/pingpong.h: Create generic
pingpong files so that we can start factoring out common code from
the pingpong examples. Start with functions to convert MTU to an
IBV enum value.
2006-01-17 Ralph Campbell <>
* examples/rc_pingpong.c (main), examples/srq_pingpong.c (main),
examples/uc_pingpong.c (main), examples/ud_pingpong.c (main): Fix
race when using CQ events by arming CQ before allowing remote side
to start sending.
2006-01-06 Roland Dreier <>
* examples/srq_pingpong.c (main): Fix SRQ example to avoid
problems with many QPs and events. Based on a patch from Dotan
Barak (who also found the problem).
2006-01-06 Ralph Campbell <>
* examples/rc_pingpong.c (main), examples/srq_pingpong.c (main),
examples/uc_pingpong.c (main), examples/ud_pingpong.c (main): Fix
test of return value of ibv_poll_cq().
2006-01-04 Dotan Barak <>
* include/infiniband/verbs.h: Fix mask names in description of
2006-01-04 Michael S. Tsirkin <>
* src/init.c (ibverbs_init): Fix ibverbs_init for multiple adapters.
Noted by Christoph Raisch.
2005-12-15 Roland Dreier <>
* include/infiniband/verbs.h: Document that devices must be opened
before calling ibv_free_device_list().
* src/verbs.c (ibv_create_srq): Not all provider libraries will
support SRQs, so check if the create_srq method is defined before
calling it. (Based on a patch from Shirley Ma <>)
2005-11-11 Roland Dreier <>
* examples/asyncwatch.c, examples/rc_pingpong.c,
examples/srq_pingpong.c, examples/uc_pingpong.c,
examples/ud_pingpong.c, examples/device_list.c,
examples/devinfo.c: Update examples to match new API.
* include/infiniband/verbs.h, src/device.c, src/init.c,
src/ibverbs.h: Change from dlist-based ibv_get_devices() API to
simpler ibv_get_device_list() and ibv_free_device_list() API.
2005-11-10 Sean Hefty <>
* include/infiniband/sa-kern-abi.h: New include file to contain
definitions of SA structures passed between userspace and kernel.
* include/infiniband/sa.h: New include file for definitions of
SA structures used by multiple libraries.
* include/infiniband/marshall.h src/marshall.c: New files to define
routines used to exchange data with kernel modules.
* include/infiniband/kern-abi.h: Added data structures used to exchange
QP attribute with kernel modules.
2005-11-09 Michael S. Tsirkin <>
* src/device.c (ibv_get_devices): Make function reentrant by using
a mutex to make sure we initialize the device list at most once.
2005-11-08 Roland Dreier <>
* src/cmd.c (ibv_cmd_create_qp): Add handling for new create QP
interface, which has the kernel return QP capabilities.
* src/cmd.c (ibv_cmd_modify_srq): Split off handling of modify SRQ
for ABI versions 3 and older, which passed max_sge as part of command.
2005-10-30 Roland Dreier <>
* examples/srq_pingpong.c (pp_init_ctx): Create CQ with rx_depth +
num_qp entries, instead of just rx_depth + 1 entries, because
there can be one send completion pending for each QP.
2005-10-25 Roland Dreier <>
* Release version 1.0-rc4.
* examples/uc_pingpong.c (pp_connect_ctx): Fix QP attribute masks
used to modify QP to RTR and RTS -- we should not be setting
RDMA/atomic attributes for UC QPs. Now that the mthca kernel
driver bug is fixed, the error is exposed here.
* examples/rc_pingpong.c, examples/srq_pingpong.c,
examples/uc_pingpong.c, examples/ud_pingpong.c: Keep track of
whether send and/or receive is pending. 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.
2005-10-23 Roland Dreier <>
* src/cmd.c (ibv_cmd_get_context_v2): Correct silly mistake in
computation of size of buffer for old ABI command: we need to use
sizeof *cmd instead of sizeof cmd, since cmd is a pointer.
2005-10-21 Roland Dreier <>
* src/cmd.c (ibv_cmd_post_send, ibv_cmd_post_recv,
ibv_cmd_post_srq_recv): 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.
2005-10-19 Roland Dreier <>
* src/cmd.c (ibv_cmd_req_notify_cq): Correct how we pass
solicited_only flag into the kernel.
2005-10-13 Roland Dreier <>
* include/infiniband/driver.h, src/cmd.c, src/ Add
command functions for calling new kernel commands.
* include/infiniband/verbs.h: Add qp_type to struct ibv_qp so that
we know when we're posting a send on a UD QP, and add kernel
handle member to struct ibv_ah so we can handle drivers that do
create AH and destroy AH operations in the kernel.
* include/infiniband/kern-abi.h: Add new command structures for
poll CQ, request notification for CQ, post send, post receive,
post SRQ receive, create AH and destroy AH commands. These will
be used by the PathScale userspace driver.
2005-10-12 Roland Dreier <>
* examples/srq_pingpong.c (main): Zero out unused entries in
my_dest array to avoid string overflows when we send to the other
2005-10-09 Roland Dreier <>
* examples/devinfo.c (print_hca_cap): Only print max_mr_size and
page_size_cap if verbose is set.
2005-10-05 Roland Dreier <>
* src/cmd.c (ibv_cmd_modify_srq): Add function for marshalling
modify SRQ command.
2005-09-29 Roland Dreier <>
* examples/devinfo.c (print_hca_cap): Get rid of formatting of
firmware version in what should be device-independent code.
* include/infiniband/driver.h, include/infiniband/verbs.h,
src/cmd.c (ibv_cmd_query_device): Change firmware version in
struct ibv_device_attr to be a string formatted by device-specific
2005-09-25 Roland Dreier <>
* examples/rc_pingpong.c, examples/srq_pingpong.c,
examples/uc_pingpong.c, examples/ud_pingpong.c: Update to match
new completion channel and CQ creation API.
* include/infiniband/driver.h, include/infiniband/verbs.h,
src/device.c, src/ibverbs.h, src/verbs.c, src/cmd.c: Add notion of
"completion channel" that allows consumers to dynamically create
and destroy file descriptors for retrieving completion events.
Completion channels are handled natively with kernel ABI version 3
and simulated with backwards compatibility implementations for ABI
versions 1 and 2.
* include/infiniband/kern-abi.h: Update to match kernel ABI
version 3.
2005-09-07 Roland Dreier <>
* src/device.c (ibv_get_device_guid): Use htonll() instead of
relying on pointer aliasing (which seems to break for some gcc
* include/infiniband/arch.h: Add htonll() and ntohll() functions.
2005-09-06 Roland Dreier <>
* include/infiniband/kern-abi.h, include/infiniband/verbs.h,
src/cmd.c, src/device.c, src/verbs.c, examples/asyncwatch.c:
Update to handle new kernel ABI for avoiding stale completion
events. This is completely analogous to the previous asynchronous
event change.
2005-08-31 Roland Dreier <>
* include/infiniband/kern-abi.h, include/infiniband/verbs.h,
src/cmd.c, src/device.c, src/ibverbs.h, src/init.c, src/verbs.c,
examples/asyncwatch.c: 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
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().
2005-08-30 Roland Dreier <>
* man/ibv_asyncwatch.1, man/ibv_devices.1, man/ibv_devinfo.1,
man/ibv_rc_pingpong.1, man/ibv_srq_pingpong.1,
man/ibv_uc_pingpong.1, man/ibv_ud_pingpong.1: Add man pages for
example programs.
* examples/devinfo.c: Merge with Dotan Barak's vstat tool.