Skip to content

Commit

Permalink
removed IgnoreCE
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav2699 committed Dec 3, 2024
1 parent 5fdcc8d commit 3f17438
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 30 deletions.
31 changes: 4 additions & 27 deletions src/core/frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,18 +1234,6 @@ QuicDatagramFrameDecode(
return TRUE;
}

typedef struct QUIC_ACK_FREQUENCY_EXTRAS {

union {
struct {
uint8_t IgnoreCE : 1;
uint8_t Reserved : 6;
};
uint8_t Value;
};

} QUIC_ACK_FREQUENCY_EXTRAS;

_Success_(return != FALSE)
BOOLEAN
QuicAckFrequencyFrameEncode(
Expand All @@ -1260,25 +1248,18 @@ QuicAckFrequencyFrameEncode(
QuicVarIntSize(Frame->SequenceNumber) +
QuicVarIntSize(Frame->PacketTolerance) +
QuicVarIntSize(Frame->UpdateMaxAckDelay) +
QuicVarIntSize(Frame->ReorderingThreshold) +
sizeof(QUIC_ACK_FREQUENCY_EXTRAS);
QuicVarIntSize(Frame->ReorderingThreshold);

if (BufferLength < *Offset + RequiredLength) {
return FALSE;
}

CXPLAT_DBG_ASSERT(Frame->IgnoreCE <= 1); // IgnoreCE should only be 0 or 1.

QUIC_ACK_FREQUENCY_EXTRAS Extras = { .Value = 0 };
Extras.IgnoreCE = Frame->IgnoreCE;

Buffer = Buffer + *Offset;
Buffer = QuicVarIntEncode(QUIC_FRAME_ACK_FREQUENCY, Buffer);
Buffer = QuicVarIntEncode(Frame->SequenceNumber, Buffer);
Buffer = QuicVarIntEncode(Frame->PacketTolerance, Buffer);
Buffer = QuicVarIntEncode(Frame->UpdateMaxAckDelay, Buffer);
Buffer = QuicVarIntEncode(Frame->ReorderingThreshold, Buffer);
QuicUint8Encode(Extras.Value, Buffer);
*Offset += RequiredLength;

return TRUE;
Expand All @@ -1294,15 +1275,12 @@ QuicAckFrequencyFrameDecode(
_Out_ QUIC_ACK_FREQUENCY_EX* Frame
)
{
QUIC_ACK_FREQUENCY_EXTRAS Extras;
if (!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->SequenceNumber) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->PacketTolerance) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->UpdateMaxAckDelay) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->ReorderingThreshold) ||
!QuicUint8tDecode(BufferLength, Buffer, Offset, &Extras.Value)) {
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->ReorderingThreshold)) {
return FALSE;
}
Frame->IgnoreCE = Extras.IgnoreCE;
return TRUE;
}

Expand Down Expand Up @@ -1962,15 +1940,14 @@ QuicFrameLog(

QuicTraceLogVerbose(
FrameLogAckFrequency,
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreCE:%hhu",
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu",
PtkConnPre(Connection),
PktRxPre(Rx),
PacketNumber,
Frame.SequenceNumber,
Frame.PacketTolerance,
Frame.UpdateMaxAckDelay,
Frame.ReorderingThreshold,
Frame.IgnoreCE);
Frame.ReorderingThreshold);
break;
}

Expand Down
2 changes: 0 additions & 2 deletions src/core/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,6 @@ typedef struct QUIC_ACK_FREQUENCY_EX {
QUIC_VAR_INT PacketTolerance;
QUIC_VAR_INT UpdateMaxAckDelay; // In microseconds (us)
QUIC_VAR_INT ReorderingThreshold;
BOOLEAN IgnoreCE;

} QUIC_ACK_FREQUENCY_EX;

_Success_(return != FALSE)
Expand Down
1 change: 0 additions & 1 deletion src/core/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,6 @@ QuicSendWriteFrames(
Frame.PacketTolerance = Connection->PeerPacketTolerance;
Frame.UpdateMaxAckDelay = MS_TO_US(QuicConnGetAckDelay(Connection));
Frame.ReorderingThreshold = Connection->PeerReorderingThreshold;
Frame.IgnoreCE = FALSE;

if (QuicAckFrequencyFrameEncode(
&Frame,
Expand Down

0 comments on commit 3f17438

Please sign in to comment.