From: Moni Shoua <monis@xxxxxxxxxxxx> Support in ODP with SRQ is considered as a per-transport capability. Applications need to check that SRQ with ODP is supported if access to an ODP MR happens with a QP that has a shared receive queue. In addition, ibv_devinfo was updated to report this capability. Signed-off-by: Moni Shoua <monis@xxxxxxxxxxxx> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> --- libibverbs/examples/devinfo.c | 5 ++++- libibverbs/man/ibv_query_device_ex.3 | 1 + libibverbs/verbs.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c index 75bdd8c..e928b05 100644 --- a/libibverbs/examples/devinfo.c +++ b/libibverbs/examples/devinfo.c @@ -288,7 +288,8 @@ static void print_odp_trans_caps(uint32_t trans) IBV_ODP_SUPPORT_RECV | IBV_ODP_SUPPORT_WRITE | IBV_ODP_SUPPORT_READ | - IBV_ODP_SUPPORT_ATOMIC); + IBV_ODP_SUPPORT_ATOMIC | + IBV_ODP_SUPPORT_SRQ_RECV); if (!trans) { printf("\t\t\t\t\tNO SUPPORT\n"); @@ -303,6 +304,8 @@ static void print_odp_trans_caps(uint32_t trans) printf("\t\t\t\t\tSUPPORT_READ\n"); if (trans & IBV_ODP_SUPPORT_ATOMIC) printf("\t\t\t\t\tSUPPORT_ATOMIC\n"); + if (trans & IBV_ODP_SUPPORT_SRQ_RECV) + printf("\t\t\t\t\tSUPPORT_SRQ\n"); if (trans & unknown_transport_caps) printf("\t\t\t\t\tUnknown flags: 0x%" PRIX32 "\n", trans & unknown_transport_caps); diff --git a/libibverbs/man/ibv_query_device_ex.3 b/libibverbs/man/ibv_query_device_ex.3 index 3ad9eec..f99f818 100644 --- a/libibverbs/man/ibv_query_device_ex.3 +++ b/libibverbs/man/ibv_query_device_ex.3 @@ -60,6 +60,7 @@ enum ibv_odp_transport_cap_bits { IBV_ODP_SUPPORT_WRITE = 1 << 2, /* RDMA-Write operations support on-demand paging */ IBV_ODP_SUPPORT_READ = 1 << 3, /* RDMA-Read operations support on-demand paging */ IBV_ODP_SUPPORT_ATOMIC = 1 << 4, /* RDMA-Atomic operations support on-demand paging */ + IBV_ODP_SUPPORT_SRQ_RECV = 1 << 5, /* SRQ receive operations support on-demand paging */ }; struct ibv_tso_caps { diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 94e4916..9561e39 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -204,6 +204,7 @@ enum ibv_odp_transport_cap_bits { IBV_ODP_SUPPORT_WRITE = 1 << 2, IBV_ODP_SUPPORT_READ = 1 << 3, IBV_ODP_SUPPORT_ATOMIC = 1 << 4, + IBV_ODP_SUPPORT_SRQ_RECV = 1 << 5, }; struct ibv_odp_caps { -- 1.8.3.1