]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: server: make use of ib_alloc_cq_any() instead of ib_alloc_cq()
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Sep 2025 06:05:31 +0000 (08:05 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:54 +0000 (18:29 -0500)
commit 20cf4e026730 ("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>
fs/smb/server/transport_rdma.c

index f9734d7025b43d46eb5f8a4ad819fa109c298758..e78347831d2ffe9fe790f93eebd89657cbee9bbb 100644 (file)
@@ -2037,9 +2037,10 @@ static int smb_direct_create_qpair(struct smbdirect_socket *sc,
                return ret;
        }
 
-       sc->ib.send_cq = ib_alloc_cq(sc->ib.dev, sc,
-                                sp->send_credit_target + cap->max_rdma_ctxs,
-                                0, IB_POLL_WORKQUEUE);
+       sc->ib.send_cq = ib_alloc_cq_any(sc->ib.dev, sc,
+                                        sp->send_credit_target +
+                                        cap->max_rdma_ctxs,
+                                        IB_POLL_WORKQUEUE);
        if (IS_ERR(sc->ib.send_cq)) {
                pr_err("Can't create RDMA send CQ\n");
                ret = PTR_ERR(sc->ib.send_cq);
@@ -2047,8 +2048,9 @@ static int smb_direct_create_qpair(struct smbdirect_socket *sc,
                goto err;
        }
 
-       sc->ib.recv_cq = ib_alloc_cq(sc->ib.dev, sc,
-                                    sp->recv_credit_max, 0, IB_POLL_WORKQUEUE);
+       sc->ib.recv_cq = ib_alloc_cq_any(sc->ib.dev, sc,
+                                        sp->recv_credit_max,
+                                        IB_POLL_WORKQUEUE);
        if (IS_ERR(sc->ib.recv_cq)) {
                pr_err("Can't create RDMA recv CQ\n");
                ret = PTR_ERR(sc->ib.recv_cq);