Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS committed Jul 8, 2024
1 parent 714042c commit d621df0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 58 deletions.
4 changes: 3 additions & 1 deletion src/core/recv_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,9 @@ QuicRecvBufferWrite(
//
// We have new data to read if we just wrote to the front of the buffer.
//
*ReadyToRead = UpdatedRange->Low == 0;
*ReadyToRead = UpdatedRange->Low == 0 &&
(RecvBuffer->RecvMode == QUIC_RECV_BUF_MODE_MULTIPLE ||
RecvBuffer->ReadPendingLength == 0);

//
// Write the data into the chunks now that everything has been validated.
Expand Down
20 changes: 6 additions & 14 deletions src/core/stream_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,9 @@ QuicStreamProcessStreamFrame(
Stream->Connection->Stats.Recv.TotalStreamBytes += Frame->Length;
}

if (Frame->Fin) {
if (Frame->Fin &&
(Stream->RecvBuffer.RecvMode == QUIC_RECV_BUF_MODE_MULTIPLE ||
Stream->RecvBuffer.ReadPendingLength == 0)) {
Stream->RecvMaxLength = EndOffset;
if (Stream->RecvBuffer.BaseOffset == Stream->RecvMaxLength) {
//
Expand Down Expand Up @@ -859,18 +861,6 @@ QuicStreamRecvFlush(
return;
}


if (Stream->RecvBuffer.RecvMode != QUIC_RECV_BUF_MODE_MULTIPLE &&
Stream->RecvBuffer.ReadPendingLength != 0) {
QuicTraceLogStreamVerbose(
IgnoreRecvFlushByReadPending,
Stream,
"Ignoring recv flush (ReadPendingLenght=%llu)",
Stream->RecvBuffer.ReadPendingLength);
return;
}


if (!Stream->Flags.ReceiveEnabled) {
QuicTraceLogStreamVerbose(
IgnoreRecvFlush,
Expand Down Expand Up @@ -1166,7 +1156,9 @@ QuicStreamRecvSetEnabledState(
CXPLAT_DBG_ASSERT(!Stream->Flags.SentStopSending);
Stream->Flags.ReceiveEnabled = NewRecvEnabled;

if (Stream->Flags.Started && NewRecvEnabled) {
if (Stream->Flags.Started && NewRecvEnabled &&
(Stream->RecvBuffer.RecvMode == QUIC_RECV_BUF_MODE_MULTIPLE ||
Stream->RecvBuffer.ReadPendingLength == 0)) {
//
// The application just resumed receive callbacks. Queue a
// flush receive operation to start draining the receive buffer.
Expand Down
20 changes: 0 additions & 20 deletions src/generated/linux/stream_recv.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,26 +397,6 @@ tracepoint(CLOG_STREAM_RECV_C, UpdateFlowControl , arg1);\



/*----------------------------------------------------------
// Decoder Ring for IgnoreRecvFlushByReadPending
// [strm][%p] Ignoring recv flush (ReadPendingLenght=%llu)
// QuicTraceLogStreamVerbose(
IgnoreRecvFlushByReadPending,
Stream,
"Ignoring recv flush (ReadPendingLenght=%llu)",
Stream->RecvBuffer.ReadPendingLength);
// arg1 = arg1 = Stream = arg1
// arg3 = arg3 = Stream->RecvBuffer.ReadPendingLength = arg3
----------------------------------------------------------*/
#ifndef _clog_4_ARGS_TRACE_IgnoreRecvFlushByReadPending
#define _clog_4_ARGS_TRACE_IgnoreRecvFlushByReadPending(uniqueId, arg1, encoded_arg_string, arg3)\
tracepoint(CLOG_STREAM_RECV_C, IgnoreRecvFlushByReadPending , arg1, arg3);\

#endif




/*----------------------------------------------------------
// Decoder Ring for IgnoreRecvFlush
// [strm][%p] Ignoring recv flush (recv disabled)
Expand Down
23 changes: 0 additions & 23 deletions src/generated/linux/stream_recv.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,29 +406,6 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, UpdateFlowControl,



/*----------------------------------------------------------
// Decoder Ring for IgnoreRecvFlushByReadPending
// [strm][%p] Ignoring recv flush (ReadPendingLenght=%llu)
// QuicTraceLogStreamVerbose(
IgnoreRecvFlushByReadPending,
Stream,
"Ignoring recv flush (ReadPendingLenght=%llu)",
Stream->RecvBuffer.ReadPendingLength);
// arg1 = arg1 = Stream = arg1
// arg3 = arg3 = Stream->RecvBuffer.ReadPendingLength = arg3
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IgnoreRecvFlushByReadPending,
TP_ARGS(
const void *, arg1,
unsigned long long, arg3),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg1, arg1)
ctf_integer(uint64_t, arg3, arg3)
)
)



/*----------------------------------------------------------
// Decoder Ring for IgnoreRecvFlush
// [strm][%p] Ignoring recv flush (recv disabled)
Expand Down

0 comments on commit d621df0

Please sign in to comment.