Skip to content

Commit

Permalink
add in all other nit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectsByJackHe committed Jan 8, 2025
1 parent 3dfceab commit 28955b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
16 changes: 3 additions & 13 deletions src/platform/datapath_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ typedef struct CXPLAT_SEND_DATA {

typedef struct CXPLAT_RECV_MSG_CONTROL_BUFFER {
char Data[CMSG_SPACE(sizeof(struct in6_pktinfo)) + // IP_PKTINFO
2 * CMSG_SPACE(sizeof(int)) // TOS
+ CMSG_SPACE(sizeof(int))]; // IP_TTL
3 * CMSG_SPACE(sizeof(int))]; // TOS + IP_TTL

} CXPLAT_RECV_MSG_CONTROL_BUFFER;

#ifdef DEBUG
Expand All @@ -205,7 +205,7 @@ typedef struct CXPLAT_RECV_MSG_CONTROL_BUFFER {
#else
#define CXPLAT_DBG_ASSERT_CMSG(CMsg, type)
#endif

CXPLAT_EVENT_COMPLETION CxPlatSocketContextUninitializeEventComplete;
CXPLAT_EVENT_COMPLETION CxPlatSocketContextFlushTxEventComplete;
CXPLAT_EVENT_COMPLETION CxPlatSocketContextIoEventComplete;
Expand Down Expand Up @@ -339,9 +339,6 @@ CxPlatDataPathCalculateFeatureSupport(
}

Datapath->Features |= CXPLAT_DATAPATH_FEATURE_TCP;
//
// TTL should always be available / enabled on Linux.
//
Datapath->Features |= CXPLAT_DATAPATH_FEATURE_TTL;
}

Expand Down Expand Up @@ -849,10 +846,6 @@ CxPlatSocketContextInitialize(
goto Exit;
}

//
// TTL should always be available / enabled on Linux.
//

//
// On Linux, IP_HOPLIMIT does not exist. So we will use IP_RECVTTL, IPV6_RECVHOPLIMIT instead.
//
Expand Down Expand Up @@ -1895,9 +1888,6 @@ CxPlatSocketContextRecvComplete(

CXPLAT_FRE_ASSERT(FoundLocalAddr);
CXPLAT_FRE_ASSERT(FoundTOS);
//
// TTL should always be available/enabled on Linux.
//
CXPLAT_FRE_ASSERT(FoundTTL);

QuicTraceEvent(
Expand Down
5 changes: 1 addition & 4 deletions src/platform/datapath_kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ typedef struct CXPLAT_DATAPATH {
CXPLAT_DATAPATH_PARTITION Partitions[];

} CXPLAT_DATAPATH;

CXPLAT_EVENT_COMPLETION CxPlatSocketContextUninitializeEventComplete;
CXPLAT_EVENT_COMPLETION CxPlatSocketContextIoEventComplete;

Expand Down Expand Up @@ -567,9 +567,6 @@ CxPlatDataPathGetSupportedFeatures(
_In_ CXPLAT_DATAPATH* Datapath
)
{
//
// Intentionally not enabling Feature_TTL on MacOS for now.
//
return Datapath->Features;
}

Expand Down
3 changes: 0 additions & 3 deletions src/platform/datapath_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ RawDataPathGetSupportedFeatures(
)
{
UNREFERENCED_PARAMETER(Datapath);
//
// TTL should always be available / enabled for XDP.
//
return CXPLAT_DATAPATH_FEATURE_RAW | CXPLAT_DATAPATH_FEATURE_TTL;
}

Expand Down

0 comments on commit 28955b3

Please sign in to comment.