Skip to content

Commit 942ce74

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: make use of ib_alloc_cq_any() instead of ib_alloc_cq()
commit 20cf4e0 ("rdma: Enable ib_alloc_cq to spread work over a device's comp_vectors") happened before ksmbd was upstreamed, but after the out of tree ksmbd (a.k.a. cifsd) was developed. So we still used ib_alloc_cq(). Acked-by: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 8aa23ba commit 942ce74

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

fs/smb/server/transport_rdma.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,18 +2037,20 @@ static int smb_direct_create_qpair(struct smbdirect_socket *sc,
20372037
return ret;
20382038
}
20392039

2040-
sc->ib.send_cq = ib_alloc_cq(sc->ib.dev, sc,
2041-
sp->send_credit_target + cap->max_rdma_ctxs,
2042-
0, IB_POLL_WORKQUEUE);
2040+
sc->ib.send_cq = ib_alloc_cq_any(sc->ib.dev, sc,
2041+
sp->send_credit_target +
2042+
cap->max_rdma_ctxs,
2043+
IB_POLL_WORKQUEUE);
20432044
if (IS_ERR(sc->ib.send_cq)) {
20442045
pr_err("Can't create RDMA send CQ\n");
20452046
ret = PTR_ERR(sc->ib.send_cq);
20462047
sc->ib.send_cq = NULL;
20472048
goto err;
20482049
}
20492050

2050-
sc->ib.recv_cq = ib_alloc_cq(sc->ib.dev, sc,
2051-
sp->recv_credit_max, 0, IB_POLL_WORKQUEUE);
2051+
sc->ib.recv_cq = ib_alloc_cq_any(sc->ib.dev, sc,
2052+
sp->recv_credit_max,
2053+
IB_POLL_WORKQUEUE);
20522054
if (IS_ERR(sc->ib.recv_cq)) {
20532055
pr_err("Can't create RDMA recv CQ\n");
20542056
ret = PTR_ERR(sc->ib.recv_cq);

0 commit comments

Comments
 (0)