Skip to content

Commit

Permalink
Fix call point of QuicRecvBufferTryIncreaseVirtualBufferLength
Browse files Browse the repository at this point in the history
  • Loading branch information
guhetier committed Jan 29, 2025
1 parent 3ca2f64 commit a35dec5
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/core/stream_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,18 +793,19 @@ QuicStreamOnBytesDelivered(
// low.
//

QuicTraceLogStreamVerbose(
IncreaseRxBuffer,
Stream,
"Increasing max RX buffer size to %u (MinRtt=%llu; TimeNow=%llu; LastUpdate=%llu)",
Stream->RecvBuffer.VirtualBufferLength * 2,
Stream->Connection->Paths[0].MinRtt,
TimeNow,
Stream->RecvWindowLastUpdate);

QuicRecvBufferIncreaseVirtualBufferLength(
if (QuicRecvBufferTryIncreaseVirtualBufferLength(
&Stream->RecvBuffer,
Stream->RecvBuffer.VirtualBufferLength * 2);
Stream->RecvBuffer.VirtualBufferLength * 2)) {

QuicTraceLogStreamVerbose(
IncreaseRxBuffer,
Stream,
"Increasing max RX buffer size to %u (MinRtt=%llu; TimeNow=%llu; LastUpdate=%llu)",
Stream->RecvBuffer.VirtualBufferLength * 2,
Stream->Connection->Paths[0].MinRtt,
TimeNow,
Stream->RecvWindowLastUpdate);
}
}
}

Expand Down Expand Up @@ -873,6 +874,7 @@ QuicStreamRecvFlush(
while (FlushRecv) {
CXPLAT_DBG_ASSERT(!Stream->Flags.SentStopSending);

// TODO guhetier: Need to allocate a variable nb of buffers
QUIC_BUFFER RecvBuffers[3];
QUIC_STREAM_EVENT Event = {0};
Event.Type = QUIC_STREAM_EVENT_RECEIVE;
Expand Down

0 comments on commit a35dec5

Please sign in to comment.