Skip to content

Commit 0f09871

Browse files
Kalesh APselvintxavier
authored andcommitted
bnxt_re/lib: Dont allow unsupported qp type creation
libbnxt_re should not pass down the commands to create the unsupported QP types. Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
1 parent 5efc181 commit 0f09871

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

providers/bnxt_re/verbs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,11 @@ static int bnxt_re_check_qp_limits(struct bnxt_re_context *cntx,
11381138
rdev = cntx->rdev;
11391139
devattr = &rdev->devattr;
11401140

1141+
if (attr->qp_type != IBV_QPT_RC &&
1142+
attr->qp_type != IBV_QPT_UD &&
1143+
attr->qp_type != IBV_QPT_RAW_PACKET)
1144+
return EINVAL;
1145+
11411146
if (attr->cap.max_send_sge > devattr->max_sge)
11421147
return EINVAL;
11431148
if (attr->cap.max_recv_sge > devattr->max_sge)

0 commit comments

Comments
 (0)