ibv_create_srq_ex(struct ibv_pd *pd, struct ibv_srq_init_attr_ex *srq_init_attr_ex)
{
struct verbs_context *vctx = verbs_get_ctx_op(pd->context, create_srq_ex);
- return vctx ? vctx->create_srq_ex(pd, srq_init_attr_ex) : NULL;
+ if (!vctx) {
+ errno = ENOSYS;
+ return NULL;
+ }
+ return vctx->create_srq_ex(pd, srq_init_attr_ex);
}
/**
*/
int ibv_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr);
-static inline struct ibv_srq *
-ibv_get_srq_num(struct ibv_srq *srq)
+static inline uint32_t ibv_get_srq_num(struct ibv_srq *srq)
{
struct verbs_context *vctx = verbs_get_ctx_op(pd->context, get_srq_num);
- return vctx ? vctx->get_srq_num(srq) : NULL;
+ if (!vctx) {
+ errno = ENOSYS;
+ return 0;
+ }
+ return vctx->get_srq_num(srq);
}
/**