Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: src/InfRcTransport.cc

Issue 1381001: Tiny patch that is intended to fix RAM-359.
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/InfRcTransportTest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/InfRcTransport.cc
diff --git a/src/InfRcTransport.cc b/src/InfRcTransport.cc
index 8c26edcaf86d545eb117a631d554caffe37687e7..828a10df67f5709aa9efa07e1ded9c4d422934a7 100644
--- a/src/InfRcTransport.cc
+++ b/src/InfRcTransport.cc
@@ -404,6 +404,13 @@ InfRcTransport::InfRcSession::cancelRequest(
}
foreach (ClientRpc& rpc, transport->outstandingRpcs) {
if (rpc.notifier == notifier) {
+
+ // Wait until NIC completes all ongoing transmits. This will
+ // guarantee that we don't send garbaged rpc if NIC has already
+ // started DMA transmit of data from the rpc that we want to cancel.
+ while (transport->freeTxBuffers.size() != MAX_TX_QUEUE_DEPTH) {
+ transport->reapTxBuffers();
+ }
erase(transport->outstandingRpcs, rpc);
transport->clientRpcPool.destroy(&rpc);
--transport->numUsedClientSrqBuffers;
« no previous file with comments | « no previous file | src/InfRcTransportTest.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld aab5469