Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/binding.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ QuicBindingInitialize(
QuicBindingGetRemoteAddress(Binding, &DatapathRemoteAddr);
QuicTraceEvent(
BindingCreated,
"[bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"[bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
Binding,
Binding->Socket,
CASTED_CLOG_BYTEARRAY(sizeof(DatapathLocalAddr), &DatapathLocalAddr),
Expand Down Expand Up @@ -262,7 +262,7 @@ QuicBindingTraceRundown(
QuicBindingGetRemoteAddress(Binding, &DatapathRemoteAddr);
QuicTraceEvent(
BindingRundown,
"[bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"[bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
Binding,
Binding->Socket,
CASTED_CLOG_BYTEARRAY(sizeof(DatapathLocalAddr), &DatapathLocalAddr),
Expand Down
2 changes: 1 addition & 1 deletion src/core/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ QuicLibraryLazyInitialize(
BOOLEAN AcquireLock
)
{
const CXPLAT_UDP_DATAPATH_CALLBACKS DatapathCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS DatapathCallbacks = {
QuicBindingReceive,
QuicBindingUnreachable,
};
Expand Down
8 changes: 4 additions & 4 deletions src/generated/linux/binding.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ tracepoint(CLOG_BINDING_C, BindingErrorStatus , arg2, arg3, arg4);\

/*----------------------------------------------------------
// Decoder Ring for BindingCreated
// [bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// [bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// QuicTraceEvent(
BindingCreated,
"[bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"[bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
Binding,
Binding->Socket,
CASTED_CLOG_BYTEARRAY(sizeof(DatapathLocalAddr), &DatapathLocalAddr),
Expand Down Expand Up @@ -236,10 +236,10 @@ tracepoint(CLOG_BINDING_C, BindingDestroyed , arg2);\

/*----------------------------------------------------------
// Decoder Ring for BindingRundown
// [bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// [bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// QuicTraceEvent(
BindingRundown,
"[bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"[bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
Binding,
Binding->Socket,
CASTED_CLOG_BYTEARRAY(sizeof(DatapathLocalAddr), &DatapathLocalAddr),
Expand Down
8 changes: 4 additions & 4 deletions src/generated/linux/binding.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingErrorStatus,

/*----------------------------------------------------------
// Decoder Ring for BindingCreated
// [bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// [bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// QuicTraceEvent(
BindingCreated,
"[bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"[bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
Binding,
Binding->Socket,
CASTED_CLOG_BYTEARRAY(sizeof(DatapathLocalAddr), &DatapathLocalAddr),
Expand Down Expand Up @@ -243,10 +243,10 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingDestroyed,

/*----------------------------------------------------------
// Decoder Ring for BindingRundown
// [bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// [bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!
// QuicTraceEvent(
BindingRundown,
"[bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"[bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
Binding,
Binding->Socket,
CASTED_CLOG_BYTEARRAY(sizeof(DatapathLocalAddr), &DatapathLocalAddr),
Expand Down
12 changes: 6 additions & 6 deletions src/inc/quic_datapath.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,24 +405,24 @@ typedef CXPLAT_DATAPATH_UNREACHABLE_CALLBACK *CXPLAT_DATAPATH_UNREACHABLE_CALLBA
//
// UDP Callback function pointers used by the datapath.
//
typedef struct CXPLAT_UDP_DATAPATH_CALLBACKS {
typedef struct CXPLAT_DATAPATH_DGRAM_CALLBACKS {
Comment on lines 405 to +408

CXPLAT_DATAPATH_RECEIVE_CALLBACK_HANDLER Receive;
CXPLAT_DATAPATH_UNREACHABLE_CALLBACK_HANDLER Unreachable;

} CXPLAT_UDP_DATAPATH_CALLBACKS;
} CXPLAT_DATAPATH_DGRAM_CALLBACKS;

//
// TCP Callback function pointers used by the datapath.
//
typedef struct CXPLAT_TCP_DATAPATH_CALLBACKS {
typedef struct CXPLAT_DATAPATH_CONN_CALLBACKS {
Comment on lines 415 to +418

CXPLAT_DATAPATH_ACCEPT_CALLBACK_HANDLER Accept;
CXPLAT_DATAPATH_CONNECT_CALLBACK_HANDLER Connect;
CXPLAT_DATAPATH_RECEIVE_CALLBACK_HANDLER Receive;
CXPLAT_DATAPATH_SEND_COMPLETE_CALLBACK_HANDLER SendComplete;

} CXPLAT_TCP_DATAPATH_CALLBACKS;
} CXPLAT_DATAPATH_CONN_CALLBACKS;

typedef enum CXPLAT_DATAPATH_FEATURES {
CXPLAT_DATAPATH_FEATURE_NONE = 0x00000000,
Expand Down Expand Up @@ -485,8 +485,8 @@ _IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS
CxPlatDataPathInitialize(
_In_ uint32_t ClientRecvContextLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're claiming this is more abstracted, should we also rename the variables from Udp/Tcp? Or is that out of scope for now / forever?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to do it here.
I first did a big research replace and reverted it because for most instances, UdpCallbacks is actually specifically about UDP, but this definition is generic.

_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a naming perspective, I'd follow the BSD socket types, since their abstraction is about as good as any:

DGRAM_CALLBACKS for a datapath built upon SOCK_DGRAM semantics
STREAM_CALLBACKS for a datapath built upon SOCK_STREAM semantics instead of CONN_CALLBACKS

This is imperfect, for sure, but should be most intuitive as long as our set of datapath models roughly align with BSD socket semantics.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered STREAM, but what hold me is that for RDMA, for instance, we have a connection-oriented, reliable, datagram-oriented protocol, but not a stream.

If you think STREAM is more intuitive and is worth the slight over-use, I'm ok going with it.

_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDatapath
Expand Down
4 changes: 2 additions & 2 deletions src/manifest/MsQuicEtw.man
Original file line number Diff line number Diff line change
Expand Up @@ -4417,11 +4417,11 @@
/>
<string
id="Etw.BindingCreated"
value="[bind][%1] Created, Udp=%2 LocalAddr=%4 RemoteAddr=%6"
value="[bind][%1] Created, Socket=%2 LocalAddr=%4 RemoteAddr=%6"
/>
<string
id="Etw.BindingRundown"
value="[bind][%1] Rundown, Udp=%2 LocalAddr=%4 RemoteAddr=%6"
value="[bind][%1] Rundown, Socket=%2 LocalAddr=%4 RemoteAddr=%6"
/>
<string
id="Etw.BindingDestroyed"
Expand Down
12 changes: 6 additions & 6 deletions src/manifest/clog.sidecar
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
},
"BindingCreated": {
"ModuleProperites": {},
"TraceString": "[bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"TraceString": "[bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"UniqueId": "BindingCreated",
"splitArgs": [
{
Expand Down Expand Up @@ -401,7 +401,7 @@
},
"BindingRundown": {
"ModuleProperites": {},
"TraceString": "[bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"TraceString": "[bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!",
"UniqueId": "BindingRundown",
"splitArgs": [
{
Expand Down Expand Up @@ -13129,9 +13129,9 @@
"EncodingString": "[bind][%p] Cleaning up"
},
{
"UniquenessHash": "de67327e-34fe-e36e-e687-09f38be7e043",
"UniquenessHash": "050d2c92-57c6-a3ae-3094-5469e2d2d844",
"TraceID": "BindingCreated",
"EncodingString": "[bind][%p] Created, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!"
"EncodingString": "[bind][%p] Created, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!"
},
{
"UniquenessHash": "9dc8a42f-5829-5abf-0bb0-5040ff1428b9",
Expand Down Expand Up @@ -13169,9 +13169,9 @@
"EncodingString": "[bind][%p] Listener (%p) already registered on ALPN"
},
{
"UniquenessHash": "229b6b27-7423-c3ab-5a3e-f99929ef7e50",
"UniquenessHash": "7890b25c-8aa6-dc5a-b9ca-8b4e82b34e4c",
"TraceID": "BindingRundown",
"EncodingString": "[bind][%p] Rundown, Udp=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!"
"EncodingString": "[bind][%p] Rundown, Socket=%p LocalAddr=%!ADDR! RemoteAddr=%!ADDR!"
},
{
"UniquenessHash": "8419ad0b-e226-53e3-837c-4eebd4cc6619",
Expand Down
2 changes: 1 addition & 1 deletion src/perf/lib/SecNetPerfMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ QuicMainStart(
WorkerPool = CxPlatWorkerPoolCreate(nullptr, CXPLAT_WORKER_POOL_REF_TOOL);
#endif

const CXPLAT_UDP_DATAPATH_CALLBACKS DatapathCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS DatapathCallbacks = {
PerfServer::DatapathReceive,
PerfServer::DatapathUnreachable
};
Expand Down
2 changes: 1 addition & 1 deletion src/perf/lib/Tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void TcpConfiguration::SecConfigCallback(

// ############################# ENGINE #############################

const CXPLAT_TCP_DATAPATH_CALLBACKS TcpEngine::TcpCallbacks = {
const CXPLAT_DATAPATH_CONN_CALLBACKS TcpEngine::TcpCallbacks = {
TcpServer::AcceptCallback,
TcpConnection::ConnectCallback,
TcpConnection::ReceiveCallback,
Expand Down
2 changes: 1 addition & 1 deletion src/perf/lib/Tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TcpEngine {
CxPlatLockDispatch ConnectionLock;
CXPLAT_LIST_ENTRY Connections;
public:
static const CXPLAT_TCP_DATAPATH_CALLBACKS TcpCallbacks;
static const CXPLAT_DATAPATH_CONN_CALLBACKS TcpCallbacks;
static const CXPLAT_TLS_CALLBACKS TlsCallbacks;
const TcpAcceptHandler AcceptHandler;
const TcpConnectHandler ConnectHandler;
Expand Down
4 changes: 2 additions & 2 deletions src/platform/datapath_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ CxPlatProcessorContextInitialize(
QUIC_STATUS
DataPathInitialize(
_In_ uint32_t ClientRecvDataLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDatapath
Expand Down
4 changes: 2 additions & 2 deletions src/platform/datapath_iouring.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ CxPlatProcessorContextInitialize(
QUIC_STATUS
DataPathInitialize(
_In_ uint32_t ClientRecvDataLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDatapath
Expand Down
6 changes: 3 additions & 3 deletions src/platform/datapath_kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ typedef struct CXPLAT_DATAPATH {
//
// UDP handlers.
//
CXPLAT_UDP_DATAPATH_CALLBACKS UdpHandlers;
CXPLAT_DATAPATH_DGRAM_CALLBACKS UdpHandlers;
Comment on lines 343 to +346

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally agree it would be best to do a comprehensive refactor.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix the comments, in most places.
In that one specifically, "UDP handlers" is accurate, because we are in a specific datapath that deals with UDP (while from the core layer point of view, it shouldn't matter)


//
// The Worker pool
Expand Down Expand Up @@ -431,8 +431,8 @@ CxPlatProcessorContextInitialize(
QUIC_STATUS
CxPlatDataPathInitialize(
_In_ uint32_t ClientRecvDataLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDataPath
Expand Down
4 changes: 2 additions & 2 deletions src/platform/datapath_winkernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,8 @@ _IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS
DataPathInitialize(
_In_ uint32_t ClientRecvDataLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDataPath
Expand Down
4 changes: 2 additions & 2 deletions src/platform/datapath_winuser.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ _IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS
DataPathInitialize(
_In_ uint32_t ClientRecvDataLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDatapath
Expand Down
4 changes: 2 additions & 2 deletions src/platform/datapath_xplat.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ _IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS
CxPlatDataPathInitialize(
_In_ uint32_t ClientRecvContextLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDataPath
Expand Down
8 changes: 4 additions & 4 deletions src/platform/platform_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ typedef struct CXPLAT_DATAPATH_COMMON {
//
// The UDP callback function pointers.
//
CXPLAT_UDP_DATAPATH_CALLBACKS UdpHandlers;
CXPLAT_DATAPATH_DGRAM_CALLBACKS UdpHandlers;
Comment on lines 43 to +46

//
// The TCP callback function pointers.
//
CXPLAT_TCP_DATAPATH_CALLBACKS TcpHandlers;
CXPLAT_DATAPATH_CONN_CALLBACKS TcpHandlers;
Comment on lines 48 to +51

//
// The Worker WorkerPool
Expand Down Expand Up @@ -1089,8 +1089,8 @@ _IRQL_requires_max_(PASSIVE_LEVEL)
QUIC_STATUS
DataPathInitialize(
_In_ uint32_t ClientRecvDataLength,
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks,
_In_ CXPLAT_WORKER_POOL* WorkerPool,
_In_ CXPLAT_DATAPATH_INIT_CONFIG* InitConfig,
_Out_ CXPLAT_DATAPATH** NewDatapath
Expand Down
16 changes: 8 additions & 8 deletions src/platform/unittest/DataPathTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,24 +420,24 @@ struct DataPathTest : public ::testing::TestWithParam<int32_t>
{
}

const CXPLAT_UDP_DATAPATH_CALLBACKS EmptyUdpCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS EmptyUdpCallbacks = {
EmptyReceiveCallback,
EmptyUnreachableCallback,
};

const CXPLAT_UDP_DATAPATH_CALLBACKS UdpRecvCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS UdpRecvCallbacks = {
UdpDataRecvCallback,
EmptyUnreachableCallback,
};

const CXPLAT_TCP_DATAPATH_CALLBACKS EmptyTcpCallbacks = {
const CXPLAT_DATAPATH_CONN_CALLBACKS EmptyTcpCallbacks = {
EmptyAcceptCallback,
EmptyConnectCallback,
EmptyReceiveCallback,
TcpEmptySendCompleteCallback
};

const CXPLAT_TCP_DATAPATH_CALLBACKS TcpRecvCallbacks = {
const CXPLAT_DATAPATH_CONN_CALLBACKS TcpRecvCallbacks = {
TcpAcceptCallback,
TcpConnectCallback,
TcpDataRecvCallback,
Expand All @@ -457,8 +457,8 @@ struct CxPlatDataPath {
CXPLAT_DATAPATH* Datapath {nullptr};
QUIC_STATUS InitStatus;
CxPlatDataPath(
_In_opt_ const CXPLAT_UDP_DATAPATH_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_TCP_DATAPATH_CALLBACKS* TcpCallbacks = nullptr,
_In_opt_ const CXPLAT_DATAPATH_DGRAM_CALLBACKS* UdpCallbacks,
_In_opt_ const CXPLAT_DATAPATH_CONN_CALLBACKS* TcpCallbacks = nullptr,
_In_ uint32_t ClientRecvContextLength = 0,
_In_opt_ QUIC_GLOBAL_EXECUTION_CONFIG* Config = nullptr
) noexcept
Expand Down Expand Up @@ -729,13 +729,13 @@ TEST_F(DataPathTest, InitializeInvalid)
{
ASSERT_EQ(QUIC_STATUS_INVALID_PARAMETER, CxPlatDataPathInitialize(0, nullptr, nullptr, nullptr, nullptr, nullptr));
{
const CXPLAT_UDP_DATAPATH_CALLBACKS InvalidUdpCallbacks = { nullptr, EmptyUnreachableCallback };
const CXPLAT_DATAPATH_DGRAM_CALLBACKS InvalidUdpCallbacks = { nullptr, EmptyUnreachableCallback };
CxPlatDataPath Datapath(&InvalidUdpCallbacks);
ASSERT_EQ(QUIC_STATUS_INVALID_PARAMETER, Datapath.GetInitStatus());
ASSERT_EQ(nullptr, Datapath.Datapath);
}
{
const CXPLAT_UDP_DATAPATH_CALLBACKS InvalidUdpCallbacks = { EmptyReceiveCallback, nullptr };
const CXPLAT_DATAPATH_DGRAM_CALLBACKS InvalidUdpCallbacks = { EmptyReceiveCallback, nullptr };
CxPlatDataPath Datapath(&InvalidUdpCallbacks);
ASSERT_EQ(QUIC_STATUS_INVALID_PARAMETER, Datapath.GetInitStatus());
ASSERT_EQ(nullptr, Datapath.Datapath);
Expand Down
2 changes: 1 addition & 1 deletion src/test/lib/QuicDrill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ struct DrillSender {
_In_ uint16_t NetworkPort
)
{
const CXPLAT_UDP_DATAPATH_CALLBACKS DatapathCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS DatapathCallbacks = {
DrillUdpRecvCallback,
DrillUdpUnreachCallback,
};
Expand Down
2 changes: 1 addition & 1 deletion src/tools/attack/attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ main(
(AttackType <= 0 || AttackType > 4)) {
PrintUsage();
} else {
const CXPLAT_UDP_DATAPATH_CALLBACKS DatapathCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS DatapathCallbacks = {
UdpRecvCallback,
UdpUnreachCallback,
};
Expand Down
2 changes: 1 addition & 1 deletion src/tools/lb/loadbalancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ main(int argc, char **argv)
CxPlatInitialize();
CXPLAT_WORKER_POOL* WorkerPool = CxPlatWorkerPoolCreate(nullptr, CXPLAT_WORKER_POOL_REF_TOOL);

CXPLAT_UDP_DATAPATH_CALLBACKS LbUdpCallbacks { LbReceive, NoOpUnreachable };
CXPLAT_DATAPATH_DGRAM_CALLBACKS LbUdpCallbacks { LbReceive, NoOpUnreachable };
CXPLAT_DATAPATH_INIT_CONFIG DataPathInitConfig = {0};
CxPlatDataPathInitialize(0, &LbUdpCallbacks, nullptr, WorkerPool, &DataPathInitConfig, &Datapath);
PublicInterface = new LbPublicInterface(&PublicAddr);
Expand Down
2 changes: 1 addition & 1 deletion src/tools/recvfuzz/recvfuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ void SetupAndFuzz() {
CxPlatInitialize();

CXPLAT_DATAPATH* Datapath;
const CXPLAT_UDP_DATAPATH_CALLBACKS DatapathCallbacks = {
const CXPLAT_DATAPATH_DGRAM_CALLBACKS DatapathCallbacks = {
UdpRecvCallback,
UdpUnreachCallback,
};
Expand Down
Loading