Skip to content

Commit

Permalink
Make networkDataPerSocketRead mode the highest priority mode
Browse files Browse the repository at this point in the history
Summary:
networkDataPerSocketRead has other impacts on behavior beyond the read function being used. It affects how reads and write loopers are updated.

When this option is turned on, its read function must be the highest priority otherwise any other reader will stall and stop reading packets.

Differential Revision: D66888140

fbshipit-source-id: 630dbbf51b02bac2f22f1ece534ad60cf61d88ea
  • Loading branch information
jbeshay authored and facebook-github-bot committed Dec 6, 2024
1 parent 590fb16 commit 18f4254
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions quic/client/QuicClientTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1692,14 +1692,14 @@ void QuicClientTransport::onNotifyDataAvailable(
? conn_->transportSettings.readCoalescingSize
: readBufferSize;

if (conn_->transportSettings.shouldUseRecvfromForBatchRecv) {
readWithRecvfrom(sock, readAllocSize, numPackets);
if (conn_->transportSettings.networkDataPerSocketRead) {
readWithRecvmsgSinglePacketLoop(sock, readAllocSize);
} else if (conn_->transportSettings.shouldUseWrapperRecvmmsgForBatchRecv) {
readWithRecvmmsgWrapper(sock, readAllocSize, numPackets);
} else if (conn_->transportSettings.shouldUseRecvmmsgForBatchRecv) {
readWithRecvmmsg(sock, readAllocSize, numPackets);
} else if (conn_->transportSettings.networkDataPerSocketRead) {
readWithRecvmsgSinglePacketLoop(sock, readAllocSize);
} else if (conn_->transportSettings.shouldUseRecvfromForBatchRecv) {
readWithRecvfrom(sock, readAllocSize, numPackets);
} else {
readWithRecvmsg(sock, readAllocSize, numPackets);
}
Expand Down

0 comments on commit 18f4254

Please sign in to comment.