Skip to contentSkip to conversation

xprtrdma: Make sure Send CQ is allocated on an existing compvec

PATCH In review Nicolas Morey-Chaisemartin 3 participants 4 messages Feb 5, 2019 – Feb 12, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 xprtrdma: Make sure Send CQ is allocated on an existing compvec

Make sure the device has at least 2 completion vectors before allocating to compvec#1

Fixes a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode)

---
Changes since v2:
- Split line for checkpatch to be happy

 net/sunrpc/xprtrdma/verbs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/sunrpc/xprtrdma/verbs.c +2 -1
index b725911c0f3f..5fe727a7db82 100644
@@ -546,7 +546,8 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
 
 	sendcq = ib_alloc_cq(ia->ri_device, NULL,
 			     ep->rep_attr.cap.max_send_wr + 1,
-			     1, IB_POLL_WORKQUEUE);
+			     ia->ri_device->num_comp_vectors > 1 ? 1 : 0,
+			     IB_POLL_WORKQUEUE);
 	if (IS_ERR(sendcq)) {
 		rc = PTR_ERR(sendcq);
 		dprintk("RPC:       %s: failed to create send CQ: %i\n",
Signature · 1 line
2.18.0
Reviewed-by on v3 1/1
#1 lore raw
Quoted 9 lines · Nicolas Morey-Chaisemartin

Make sure the device has at least 2 completion vectors before allocating to compvec#1

Fixes a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode)

Anna, can you see that this fix gets into v5.0-rc ? Thanks!

Quoted 23 lines

---
Changes since v2:
- Split line for checkpatch to be happy

net/sunrpc/xprtrdma/verbs.c | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
net/sunrpc/xprtrdma/verbs.c +2 -1
index b725911c0f3f..5fe727a7db82 100644
@@ -546,7 +546,8 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
 
 	sendcq = ib_alloc_cq(ia->ri_device, NULL,
 			     ep->rep_attr.cap.max_send_wr + 1,
-			     1, IB_POLL_WORKQUEUE);
+			     ia->ri_device->num_comp_vectors > 1 ? 1 : 0,
+			     IB_POLL_WORKQUEUE);
 	if (IS_ERR(sendcq)) {
 		rc = PTR_ERR(sendcq);
 		dprintk("RPC:       %s: failed to create send CQ: %i\n",
Signature · 1 line
2.18.0

--
Chuck Lever

#2 lore raw
Quoted 13 lines · Chuck Lever
Quoted 8 lines · Nicolas Morey-Chaisemartin

Make sure the device has at least 2 completion vectors before allocating to compvec#1

Fixes a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode)

Anna, can you see that this fix gets into v5.0-rc ? Thanks!

Ping.

Haven't seen this upstream nor in the nfs repo (maybe I'm not checking the right one :) ) Any chance this gets picked up for 5.0 ?

Nicolas

#3 lore raw
Quoted 17 lines · Nicolas Morey-Chaisemartin

NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 10 lines · Chuck Lever
Quoted 8 lines

On Feb 5, 2019, at 12:21 PM, Nicolas Morey-Chaisemartin < [email protected]> wrote:

Make sure the device has at least 2 completion vectors before allocating to compvec#1

Fixes a4699f5647f3 (xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode)
Quoted 8 lines
Quoted 3 lines

Anna, can you see that this fix gets into v5.0-rc ? Thanks!

Ping.

Haven't seen this upstream nor in the nfs repo (maybe I'm not checking the right one :) )
Any chance this gets picked up for 5.0 ?

Thanks for the reminder! I'll plan on pushing it out for 5.0 this week.

Thanks,
Anna

Quoted 2 lines

Nicolas