alxrxs commented on code in PR #3569:
URL: https://github.com/apache/brpc/pull/3569#discussion_r4194413626


##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -1138,7 +1218,8 @@ static ibv_qp* AllocateQp(ibv_cq* send_cq, ibv_cq* 
recv_cq, uint32_t sq_size, ui
     attr.cap.max_send_sge = GetRdmaMaxSge();
     attr.cap.max_recv_sge = 1;
     attr.qp_type = IBV_QPT_RC;
-    return IbvCreateQp(GetRdmaPd(), &attr);
+    return CreateQpWithInlineData(GetRdmaPd(), &attr, GetRdmaVendorId(),

Review Comment:
   Good idea, done in 8887173. `CreateQpWithInlineData()` now remembers the 
inline size the last QP was created with and starts the next QP there, so on a 
48-byte Intel device only the first QP goes 216 → 101 → 48, and the rest ask 
for 48 straight away.
   
   If the remembered size is refused with EINVAL, it keeps stepping down from 
there and remembers the new size. Other failures leave it alone. Each QP still 
reads its own grant from `attr.cap.max_inline_data`, including the 236-byte cap 
on Mellanox.
   
   I added a unit test for this (`create_qp_reuses_inline_size`), and the RDMA 
unit tests pass (90/90).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to