From 47086f21fbb3c965ca7aa5b2eb61bb389090a086 Mon Sep 17 00:00:00 2001 From: ami-GS <1991.daiki@gmail.com> Date: Mon, 22 Apr 2024 11:53:49 -0700 Subject: [PATCH] all arch to build dataptah_xplat.c --- src/platform/CMakeLists.txt | 8 ++++---- src/platform/datapath_raw.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/CMakeLists.txt b/src/platform/CMakeLists.txt index dd636c7772..0d5707a9b1 100644 --- a/src/platform/CMakeLists.txt +++ b/src/platform/CMakeLists.txt @@ -12,7 +12,7 @@ endif() set(SOURCES crypt.c hashtable.c pcp.c platform_worker.c toeplitz.c) if("${CX_PLATFORM}" STREQUAL "windows") - set(SOURCES ${SOURCES} platform_winuser.c storage_winuser.c datapath_win.c datapath_winuser.c) + set(SOURCES ${SOURCES} platform_winuser.c storage_winuser.c datapath_win.c datapath_winuser.c datapath_xplat.c) if(QUIC_UWP_BUILD OR QUIC_GAMECORE_BUILD OR ${SYSTEM_PROCESSOR} STREQUAL "arm" OR @@ -20,11 +20,11 @@ if("${CX_PLATFORM}" STREQUAL "windows") ${SYSTEM_PROCESSOR} STREQUAL "arm64ec") set(SOURCES ${SOURCES} datapath_raw_dummy.c) else() - set(SOURCES ${SOURCES} datapath_xplat.c datapath_raw.c datapath_raw_win.c datapath_raw_socket.c datapath_raw_socket_win.c datapath_raw_xdp_win.c) + set(SOURCES ${SOURCES} datapath_raw.c datapath_raw_win.c datapath_raw_socket.c datapath_raw_socket_win.c datapath_raw_xdp_win.c) endif() else() set(LINUX_XDP_ENABLED FALSE) - set(SOURCES ${SOURCES} inline.c platform_posix.c storage_posix.c cgroup.c) + set(SOURCES ${SOURCES} inline.c platform_posix.c storage_posix.c cgroup.c datapath_xplat.c datapath_unix.c) if(CX_PLATFORM STREQUAL "linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") set(SOURCES ${SOURCES} datapath_linux.c datapath_epoll.c) if ((${UBUNTU_VERSION} STREQUAL "20.04") OR @@ -36,7 +36,7 @@ else() set(SOURCES ${SOURCES} datapath_raw_dummy.c) else() set(LINUX_XDP_ENABLED TRUE) - set(SOURCES ${SOURCES} datapath_xplat.c datapath_unix.c datapath_raw.c datapath_raw_linux.c datapath_raw_socket.c datapath_raw_socket_linux.c datapath_raw_xdp_linux.c) + set(SOURCES ${SOURCES} datapath_raw.c datapath_raw_linux.c datapath_raw_socket.c datapath_raw_socket_linux.c datapath_raw_xdp_linux.c) endif() else() set(SOURCES ${SOURCES} datapath_kqueue.c datapath_unix.c) diff --git a/src/platform/datapath_raw.c b/src/platform/datapath_raw.c index ffa939231f..e3967f647b 100644 --- a/src/platform/datapath_raw.c +++ b/src/platform/datapath_raw.c @@ -251,7 +251,7 @@ CxPlatDpRawRxEthernet( CXPLAT_DBG_ASSERT(Packets[i+1]->Next == NULL); i++; } - Datapath->ParentDataPath->UdpHandlers.Receive(CxPlatRawToSocket(Socket), Socket->ClientContext, (CXPLAT_RECV_DATA*)PacketChain); + Datapath->ParentDataPath->UdpHandlers.Receive(CxPlatRawToSocket(Socket), Socket->ClientContext, PacketChain); } else if (PacketChain->Reserved == L4_TYPE_TCP_SYN || PacketChain->Reserved == L4_TYPE_TCP_SYNACK) { CxPlatDpRawSocketAckSyn(Socket, PacketChain); CxPlatDpRawRxFree(PacketChain);