]> git.openfabrics.org - ~shefty/libibverbs.git/commit
Allow 3rd party extensions to verb routines
authorSean Hefty <sean.hefty@intel.com>
Thu, 22 Dec 2011 08:07:51 +0000 (00:07 -0800)
committerSean Hefty <sean.hefty@intel.com>
Thu, 22 Dec 2011 08:07:51 +0000 (00:07 -0800)
commitbd9562c3a152f1aeb3cd985d906fd28d1da11fe1
tree94574abb2890bc28a5809912151a806757fc2551
parentbfd16bc803f919ce710bf640c38fd294a2f0e519
Allow 3rd party extensions to verb routines

In order to support OFED, vendor specific calls, or new ibverbs
operations, define a generic extension mechanism.  This allows
OFED, an RDMA vendor, or another registered 3rd party (for
example, the librdmacm) to define RDMA extensions, plus provides
a backwards compatible way to add new features to ibverbs.

Users which make use extensions are aware that they are not
only using an extended call, but are given information regarding
how widely the extension by be supported based on the name of the
extension.  E.g. a VENDOR extension is specific to a vendor, whereas
an OFA extension is standardized within an organization.
Support for extended functions, data structures, and enums are defined.

Extensions are referenced by name.  There is an assumption that
extension names are prefixed relative to the supporting party.
Until an extension has been incorporated into libibverbs, it
should be defined in an appropriate external header file.

Driver libraries that support extensions are given a new
registration call, ibv_register_device_ext().  Use of this call
indicates to libibverbs that the library allocates extended
versions of struct ibv_device and struct ibv_context.

The following new APIs are added to libibverbs to applications
to use to determine if an extension is supported and to obtain the
extended function calls.

ibv_have_ext_ops - returns true if an extension is supported
ibv_get_device_ext_ops - return extended operations for a device
ibv_get_ext_ops - return extended operations for an open context

To maintain backwards compatibility with existing applications,
internally, the library uses the last byte of the device name
to record if the device was registered with extension support.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
include/infiniband/driver.h
include/infiniband/verbs.h
src/device.c
src/ibverbs.h
src/init.c
src/libibverbs.map
src/verbs.c