Skip to content

Commit 6f36033

Browse files
committed
IB/srpt: Set srq_type to IB_SRQT_BASIC
Since commit 96104ed ("RDMA/core: Add SRQ type field"), kernel users of SRQs need to specify srq_type = IB_SRQT_BASIC in struct ib_srq_init_attr, or else most low-level drivers will fail in when srpt_add_one() calls ib_create_srq() and gets -ENOSYS. (mlx4_ib works OK nearly all of the time, because it just needs srq_type != IB_SRQT_XRC. And apparently nearly everyone using ib_srpt is using mlx4 hardware) Reported-by: Alexey Shvetsov <[email protected]> Cc: <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent 0034102 commit 6f36033

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,6 +3232,7 @@ static void srpt_add_one(struct ib_device *device)
32323232
srq_attr.attr.max_wr = sdev->srq_size;
32333233
srq_attr.attr.max_sge = 1;
32343234
srq_attr.attr.srq_limit = 0;
3235+
srq_attr.srq_type = IB_SRQT_BASIC;
32353236

32363237
sdev->srq = ib_create_srq(sdev->pd, &srq_attr);
32373238
if (IS_ERR(sdev->srq))

0 commit comments

Comments
 (0)