chenBright commented on code in PR #3137:
URL: https://github.com/apache/brpc/pull/3137#discussion_r2492631751
##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -972,10 +1007,12 @@ ssize_t RdmaEndpoint::HandleCompletion(ibv_wc& wc) {
// Update window
uint32_t wnd_thresh = _local_window_capacity / 8;
- if (_window_size.fetch_add(acks, butil::memory_order_relaxed) >=
wnd_thresh
- || acks >= wnd_thresh) {
+ if (_pending_signaled_wrs.load(butil::memory_order_relaxed) <= 1 &&
Review Comment:
When _pending_signaled_wrs is greater than 1, _window_size is not updated,
and acks will be lost.
##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -918,6 +950,7 @@ int RdmaEndpoint::SendImm(uint32_t imm) {
ibv_send_wr wr;
memset(&wr, 0, sizeof(wr));
+ wr.wr_id = GenerateWrId();
Review Comment:
Would it be sufficient to set `wr_id` to a fixed value for `Imm`?
--
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]