Skip to content

Commit

Permalink
updated names
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav2699 committed Dec 3, 2024
1 parent 3f17438 commit d4ed890
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 63 deletions.
16 changes: 8 additions & 8 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -5213,12 +5213,12 @@ QuicConnRecvFrames(
return FALSE;
}

if (Frame.UpdateMaxAckDelay < MS_TO_US(MsQuicLib.TimerResolutionMs)) {
if (Frame.RequestedMaxAckDelay < MS_TO_US(MsQuicLib.TimerResolutionMs)) {
QuicTraceEvent(
ConnError,
"[conn][%p] ERROR, %s.",
Connection,
"UpdateMaxAckDelay is less than TimerResolution");
"RequestedMaxAckDelay is less than TimerResolution");
QuicConnTransportError(Connection, QUIC_ERROR_PROTOCOL_VIOLATION);
return FALSE;
}
Expand All @@ -5234,16 +5234,16 @@ QuicConnRecvFrames(

Connection->NextRecvAckFreqSeqNum = Frame.SequenceNumber + 1;
Connection->State.IgnoreReordering = Frame.ReorderingThreshold == 0;
if (Frame.UpdateMaxAckDelay == 0) {
if (Frame.RequestedMaxAckDelay == 0) {
Connection->Settings.MaxAckDelayMs = 0;
} else if (Frame.UpdateMaxAckDelay < 1000) {
} else if (Frame.RequestedMaxAckDelay < 1000) {
Connection->Settings.MaxAckDelayMs = 1;
} else {
CXPLAT_DBG_ASSERT(US_TO_MS(Frame.UpdateMaxAckDelay) <= UINT32_MAX);
Connection->Settings.MaxAckDelayMs = (uint32_t)US_TO_MS(Frame.UpdateMaxAckDelay);
CXPLAT_DBG_ASSERT(US_TO_MS(Frame.RequestedMaxAckDelay) <= UINT32_MAX);
Connection->Settings.MaxAckDelayMs = (uint32_t)US_TO_MS(Frame.RequestedMaxAckDelay);
}
if (Frame.PacketTolerance < UINT8_MAX) {
Connection->PacketTolerance = (uint8_t)Frame.PacketTolerance;
if (Frame.AckElicitingThreshold < UINT8_MAX) {
Connection->PacketTolerance = (uint8_t)Frame.AckElicitingThreshold;
} else {
Connection->PacketTolerance = UINT8_MAX; // Cap to 0xFF for space savings.
}
Expand Down
18 changes: 9 additions & 9 deletions src/core/frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,8 @@ QuicAckFrequencyFrameEncode(
uint16_t RequiredLength =
QuicVarIntSize(QUIC_FRAME_ACK_FREQUENCY) +
QuicVarIntSize(Frame->SequenceNumber) +
QuicVarIntSize(Frame->PacketTolerance) +
QuicVarIntSize(Frame->UpdateMaxAckDelay) +
QuicVarIntSize(Frame->AckElicitingThreshold) +
QuicVarIntSize(Frame->RequestedMaxAckDelay) +
QuicVarIntSize(Frame->ReorderingThreshold);

if (BufferLength < *Offset + RequiredLength) {
Expand All @@ -1257,8 +1257,8 @@ QuicAckFrequencyFrameEncode(
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->AckElicitingThreshold, Buffer);
Buffer = QuicVarIntEncode(Frame->RequestedMaxAckDelay, Buffer);
Buffer = QuicVarIntEncode(Frame->ReorderingThreshold, Buffer);
*Offset += RequiredLength;

Expand All @@ -1276,8 +1276,8 @@ QuicAckFrequencyFrameDecode(
)
{
if (!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->SequenceNumber) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->PacketTolerance) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->UpdateMaxAckDelay) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->AckElicitingThreshold) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->RequestedMaxAckDelay) ||
!QuicVarIntDecode(BufferLength, Buffer, Offset, &Frame->ReorderingThreshold)) {
return FALSE;
}
Expand Down Expand Up @@ -1940,13 +1940,13 @@ QuicFrameLog(

QuicTraceLogVerbose(
FrameLogAckFrequency,
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu",
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu",
PtkConnPre(Connection),
PktRxPre(Rx),
PacketNumber,
Frame.SequenceNumber,
Frame.PacketTolerance,
Frame.UpdateMaxAckDelay,
Frame.AckElicitingThreshold,
Frame.RequestedMaxAckDelay,
Frame.ReorderingThreshold);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,8 @@ QuicDatagramFrameDecode(
typedef struct QUIC_ACK_FREQUENCY_EX {

QUIC_VAR_INT SequenceNumber;
QUIC_VAR_INT PacketTolerance;
QUIC_VAR_INT UpdateMaxAckDelay; // In microseconds (us)
QUIC_VAR_INT AckElicitingThreshold;
QUIC_VAR_INT RequestedMaxAckDelay; // In microseconds (us)
QUIC_VAR_INT ReorderingThreshold;
} QUIC_ACK_FREQUENCY_EX;

Expand Down
4 changes: 2 additions & 2 deletions src/core/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,8 @@ QuicSendWriteFrames(

QUIC_ACK_FREQUENCY_EX Frame;
Frame.SequenceNumber = Connection->SendAckFreqSeqNum;
Frame.PacketTolerance = Connection->PeerPacketTolerance;
Frame.UpdateMaxAckDelay = MS_TO_US(QuicConnGetAckDelay(Connection));
Frame.AckElicitingThreshold = Connection->PeerPacketTolerance;
Frame.RequestedMaxAckDelay = MS_TO_US(QuicConnGetAckDelay(Connection));
Frame.ReorderingThreshold = Connection->PeerReorderingThreshold;

if (QuicAckFrequencyFrameEncode(
Expand Down
24 changes: 10 additions & 14 deletions src/generated/linux/frame.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -1173,32 +1173,28 @@ tracepoint(CLOG_FRAME_C, FrameLogAckFrequencyInvalid , arg2, arg3, arg4);\

/*----------------------------------------------------------
// Decoder Ring for FrameLogAckFrequency
// [%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreOrder:%hhu IgnoreCE:%hhu
// [%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu
// QuicTraceLogVerbose(
FrameLogAckFrequency,
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreOrder:%hhu IgnoreCE:%hhu",
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu",
PtkConnPre(Connection),
PktRxPre(Rx),
PacketNumber,
Frame.SequenceNumber,
Frame.PacketTolerance,
Frame.UpdateMaxAckDelay,
Frame.ReorderingThreshold,
Frame.IgnoreOrder,
Frame.IgnoreCE);
Frame.AckElicitingThreshold,
Frame.RequestedMaxAckDelay,
Frame.ReorderingThreshold);
// arg2 = arg2 = PtkConnPre(Connection) = arg2
// arg3 = arg3 = PktRxPre(Rx) = arg3
// arg4 = arg4 = PacketNumber = arg4
// arg5 = arg5 = Frame.SequenceNumber = arg5
// arg6 = arg6 = Frame.PacketTolerance = arg6
// arg7 = arg7 = Frame.UpdateMaxAckDelay = arg7
// arg6 = arg6 = Frame.AckElicitingThreshold = arg6
// arg7 = arg7 = Frame.RequestedMaxAckDelay = arg7
// arg8 = arg8 = Frame.ReorderingThreshold = arg8
// arg9 = arg9 = Frame.IgnoreOrder = arg9
// arg10 = arg10 = Frame.IgnoreCE = arg10
----------------------------------------------------------*/
#ifndef _clog_11_ARGS_TRACE_FrameLogAckFrequency
#define _clog_11_ARGS_TRACE_FrameLogAckFrequency(uniqueId, encoded_arg_string, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10)\
tracepoint(CLOG_FRAME_C, FrameLogAckFrequency , arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);\
#ifndef _clog_9_ARGS_TRACE_FrameLogAckFrequency
#define _clog_9_ARGS_TRACE_FrameLogAckFrequency(uniqueId, encoded_arg_string, arg2, arg3, arg4, arg5, arg6, arg7, arg8)\
tracepoint(CLOG_FRAME_C, FrameLogAckFrequency , arg2, arg3, arg4, arg5, arg6, arg7, arg8);\

#endif

Expand Down
26 changes: 9 additions & 17 deletions src/generated/linux/frame.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -1479,28 +1479,24 @@ TRACEPOINT_EVENT(CLOG_FRAME_C, FrameLogAckFrequencyInvalid,

/*----------------------------------------------------------
// Decoder Ring for FrameLogAckFrequency
// [%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreOrder:%hhu IgnoreCE:%hhu
// [%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu
// QuicTraceLogVerbose(
FrameLogAckFrequency,
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreOrder:%hhu IgnoreCE:%hhu",
"[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu",
PtkConnPre(Connection),
PktRxPre(Rx),
PacketNumber,
Frame.SequenceNumber,
Frame.PacketTolerance,
Frame.UpdateMaxAckDelay,
Frame.ReorderingThreshold,
Frame.IgnoreOrder,
Frame.IgnoreCE);
Frame.AckElicitingThreshold,
Frame.RequestedMaxAckDelay,
Frame.ReorderingThreshold);
// arg2 = arg2 = PtkConnPre(Connection) = arg2
// arg3 = arg3 = PktRxPre(Rx) = arg3
// arg4 = arg4 = PacketNumber = arg4
// arg5 = arg5 = Frame.SequenceNumber = arg5
// arg6 = arg6 = Frame.PacketTolerance = arg6
// arg7 = arg7 = Frame.UpdateMaxAckDelay = arg7
// arg6 = arg6 = Frame.AckElicitingThreshold = arg6
// arg7 = arg7 = Frame.RequestedMaxAckDelay = arg7
// arg8 = arg8 = Frame.ReorderingThreshold = arg8
// arg9 = arg9 = Frame.IgnoreOrder = arg9
// arg10 = arg10 = Frame.IgnoreCE = arg10
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_FRAME_C, FrameLogAckFrequency,
TP_ARGS(
Expand All @@ -1510,9 +1506,7 @@ TRACEPOINT_EVENT(CLOG_FRAME_C, FrameLogAckFrequency,
unsigned long long, arg5,
unsigned long long, arg6,
unsigned long long, arg7,
unsigned long long, arg8,
unsigned char, arg9,
unsigned char, arg10),
unsigned long long, arg8),
TP_FIELDS(
ctf_integer(unsigned char, arg2, arg2)
ctf_integer(unsigned char, arg3, arg3)
Expand All @@ -1521,8 +1515,6 @@ TRACEPOINT_EVENT(CLOG_FRAME_C, FrameLogAckFrequency,
ctf_integer(uint64_t, arg6, arg6)
ctf_integer(uint64_t, arg7, arg7)
ctf_integer(uint64_t, arg8, arg8)
ctf_integer(unsigned char, arg9, arg9)
ctf_integer(unsigned char, arg10, arg10)
)
)

Expand Down Expand Up @@ -1699,7 +1691,7 @@ TRACEPOINT_EVENT(CLOG_FRAME_C, ConnError,
const void *, arg2,
const char *, arg3),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2)
ctf_integer_hex(uint64_t, arg2, arg2)
ctf_string(arg3, arg3)
)
)
14 changes: 3 additions & 11 deletions src/manifest/clog.sidecar
Original file line number Diff line number Diff line change
Expand Up @@ -4306,7 +4306,7 @@
},
"FrameLogAckFrequency": {
"ModuleProperites": {},
"TraceString": "[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreOrder:%hhu IgnoreCE:%hhu",
"TraceString": "[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu",
"UniqueId": "FrameLogAckFrequency",
"splitArgs": [
{
Expand Down Expand Up @@ -4336,14 +4336,6 @@
{
"DefinationEncoding": "llu",
"MacroVariableName": "arg8"
},
{
"DefinationEncoding": "hhu",
"MacroVariableName": "arg9"
},
{
"DefinationEncoding": "hhu",
"MacroVariableName": "arg10"
}
],
"macroName": "QuicTraceLogVerbose"
Expand Down Expand Up @@ -14713,9 +14705,9 @@
"EncodingString": "[%c][%cX][%llu] ECN [Invalid]"
},
{
"UniquenessHash": "f1eaafb0-988a-0711-b22f-e430cc97bbbb",
"UniquenessHash": "92b3c109-06f5-8316-5792-593a28f376c3",
"TraceID": "FrameLogAckFrequency",
"EncodingString": "[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu PktTolerance:%llu MaxAckDelay:%llu ReorderThreshold:%llu IgnoreOrder:%hhu IgnoreCE:%hhu"
"EncodingString": "[%c][%cX][%llu] ACK_FREQUENCY SeqNum:%llu AckElicitThreshold:%llu MaxAckDelay:%llu ReorderThreshold:%llu"
},
{
"UniquenessHash": "262b3f95-1062-851d-c2d8-c46867da793b",
Expand Down

0 comments on commit d4ed890

Please sign in to comment.