From: Matan Barak <[email protected]> In order to support IP based addressing, one needs to pass the L2 parameters to the provider drive. This is done through a new extendable interface between libibverbs and the provider library.
Signed-off-by: Matan Barak <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> --- include/infiniband/verbs.h | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index 71adf2a..ab497b1 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -40,6 +40,7 @@ #include <pthread.h> #include <stddef.h> #include <errno.h> +#include <sys/socket.h> #ifdef __cplusplus # define BEGIN_C_DECLS extern "C" { @@ -467,6 +468,28 @@ struct ibv_ah_attr { uint8_t port_num; }; +enum ibv_ah_attr_ex_attr_mask { + IBV_AH_ATTR_EX_LL = 1UL << 0, + IBV_AH_ATTR_EX_VID = 1UL << 1, +}; + +struct ibv_ah_attr_ex { + struct ibv_global_route grh; + uint16_t dlid; + uint8_t sl; + uint8_t src_path_bits; + uint8_t static_rate; + uint8_t is_global; + uint8_t port_num; + uint32_t comp_mask; + union { + struct sockaddr sa; + struct sockaddr_storage _s; + } ll; + uint16_t vid; +}; + + enum ibv_srq_attr_mask { IBV_SRQ_MAX_WR = 1 << 0, IBV_SRQ_LIMIT = 1 << 1 @@ -975,6 +998,8 @@ enum verbs_context_mask { struct verbs_context { /* "grows up" - new fields go here */ + struct ibv_ah * (*create_ah_ex)(struct ibv_pd *pd, + struct ibv_ah_attr_ex *attr); void (*_reserved_2)(void); int (*destroy_flow)(struct ibv_flow *flow); void (*_reserved_1)(void); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
