]> git.openfabrics.org - ~shefty/libibverbs.git/commit
Infrastructure to support verbs extensions
authorYishai Hadas <yishaih@mellanox.com>
Sun, 26 Aug 2012 13:43:30 +0000 (16:43 +0300)
committerSean Hefty <sean.hefty@intel.com>
Fri, 7 Sep 2012 19:04:49 +0000 (12:04 -0700)
commitb1cc207d04e9df91c000aadd20d3612f3cb58552
treeff25a98f5caa5889dfa52d7e2a6a9aa3e69b3ee5
parentc4f087527d3c3bc50f6a2531e7b54241a9df9e86
Infrastructure to support verbs extensions

Infrastructure to support extended verbs capabilities in a forward/backward
manner.

The general operation as shown in the following pseudo-code:

ibv_open_device()
{
context = device->ops.alloc_context();
if (context == -1) {
context_ex = malloc(verbs_context + verbs_device->context_size);
verbs_device->init_context(context_ex);
context_ex->context.abi_compat = -1;
}
}

If the underlying provider supports extensions, it returns -1 from its
alloc_context() call.  Ibverbs then allocates the ibv_context structure and
calls into the provider to finish initializing it.

When extensions are supported, the ibv_device structure is embedded in a
larger verbs_device structure.  Similarly, ibv_context is embedded inside
a larger verbs_context structure.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Tzahi Oved <tzahio@mellanox.com>
include/infiniband/driver.h
include/infiniband/verbs.h
src/cmd.c
src/device.c
src/init.c
src/libibverbs.map