Skip to content

Commit

Permalink
unify datapath_raw_winXXX
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS committed Nov 27, 2024
1 parent f6bc45c commit 6c1b53c
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 142 deletions.
3 changes: 1 addition & 2 deletions scripts/clog.inputs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
../src/platform/datapath_raw_xdp_winuser.c
../src/platform/datapath_raw_xdp_winkernel.c
../src/platform/datapath_raw_xdp_linux.c
../src/platform/datapath_raw_winuser.c
../src/platform/datapath_raw_winkernel.c
../src/platform/datapath_raw_win.c
../src/platform/datapath_raw_linux.c
../src/platform/datapath_raw.c
../src/platform/crypt_bcrypt.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
#include <clog.h>
#endif
#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER CLOG_DATAPATH_RAW_WINUSER_C
#define TRACEPOINT_PROVIDER CLOG_DATAPATH_RAW_WIN_C
#undef TRACEPOINT_PROBE_DYNAMIC_LINKAGE
#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
#undef TRACEPOINT_INCLUDE
#define TRACEPOINT_INCLUDE "datapath_raw_winuser.c.clog.h.lttng.h"
#if !defined(DEF_CLOG_DATAPATH_RAW_WINUSER_C) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define DEF_CLOG_DATAPATH_RAW_WINUSER_C
#define TRACEPOINT_INCLUDE "datapath_raw_win.c.clog.h.lttng.h"
#if !defined(DEF_CLOG_DATAPATH_RAW_WIN_C) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define DEF_CLOG_DATAPATH_RAW_WIN_C
#include <lttng/tracepoint.h>
#define __int64 __int64_t
#include "datapath_raw_winuser.c.clog.h.lttng.h"
#include "datapath_raw_win.c.clog.h.lttng.h"
#endif
#include <lttng/tracepoint-event.h>
#ifndef _clog_MACRO_QuicTraceEvent
Expand All @@ -34,7 +34,7 @@ extern "C" {
----------------------------------------------------------*/
#ifndef _clog_4_ARGS_TRACE_AllocFailure
#define _clog_4_ARGS_TRACE_AllocFailure(uniqueId, encoded_arg_string, arg2, arg3)\
tracepoint(CLOG_DATAPATH_RAW_WINUSER_C, AllocFailure , arg2, arg3);\
tracepoint(CLOG_DATAPATH_RAW_WIN_C, AllocFailure , arg2, arg3);\

#endif

Expand All @@ -54,7 +54,7 @@ tracepoint(CLOG_DATAPATH_RAW_WINUSER_C, AllocFailure , arg2, arg3);\
----------------------------------------------------------*/
#ifndef _clog_4_ARGS_TRACE_LibraryErrorStatus
#define _clog_4_ARGS_TRACE_LibraryErrorStatus(uniqueId, encoded_arg_string, arg2, arg3)\
tracepoint(CLOG_DATAPATH_RAW_WINUSER_C, LibraryErrorStatus , arg2, arg3);\
tracepoint(CLOG_DATAPATH_RAW_WIN_C, LibraryErrorStatus , arg2, arg3);\

#endif

Expand All @@ -76,7 +76,7 @@ tracepoint(CLOG_DATAPATH_RAW_WINUSER_C, LibraryErrorStatus , arg2, arg3);\
----------------------------------------------------------*/
#ifndef _clog_5_ARGS_TRACE_DatapathErrorStatus
#define _clog_5_ARGS_TRACE_DatapathErrorStatus(uniqueId, encoded_arg_string, arg2, arg3, arg4)\
tracepoint(CLOG_DATAPATH_RAW_WINUSER_C, DatapathErrorStatus , arg2, arg3, arg4);\
tracepoint(CLOG_DATAPATH_RAW_WIN_C, DatapathErrorStatus , arg2, arg3, arg4);\

#endif

Expand All @@ -87,5 +87,5 @@ tracepoint(CLOG_DATAPATH_RAW_WINUSER_C, DatapathErrorStatus , arg2, arg3, arg4);
}
#endif
#ifdef CLOG_INLINE_IMPLEMENTATION
#include "quic.clog_datapath_raw_winuser.c.clog.h.c"
#include "quic.clog_datapath_raw_win.c.clog.h.c"
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// arg2 = arg2 = "CXPLAT_DATAPATH" = arg2
// arg3 = arg3 = sizeof(CXPLAT_ROUTE_RESOLUTION_WORKER) = arg3
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WINUSER_C, AllocFailure,
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WIN_C, AllocFailure,
TP_ARGS(
const char *, arg2,
unsigned long long, arg3),
Expand All @@ -35,7 +35,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WINUSER_C, AllocFailure,
// arg2 = arg2 = Status = arg2
// arg3 = arg3 = "CxPlatThreadCreate" = arg3
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WINUSER_C, LibraryErrorStatus,
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WIN_C, LibraryErrorStatus,
TP_ARGS(
unsigned int, arg2,
const char *, arg3),
Expand All @@ -60,7 +60,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WINUSER_C, LibraryErrorStatus,
// arg3 = arg3 = Status = arg3
// arg4 = arg4 = "ResolveIpNetEntry2" = arg4
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WINUSER_C, DatapathErrorStatus,
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WIN_C, DatapathErrorStatus,
TP_ARGS(
const void *, arg2,
unsigned int, arg3,
Expand Down
12 changes: 0 additions & 12 deletions src/generated/linux/datapath_raw_winkernel.c.clog.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#else
#define TRACEPOINT_DEFINE
#endif
#include "datapath_raw_winuser.c.clog.h"
#include "datapath_raw_win.c.clog.h"

This file was deleted.

2 changes: 1 addition & 1 deletion src/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if("${CX_PLATFORM}" STREQUAL "windows")
${SYSTEM_PROCESSOR} STREQUAL "arm64ec")
set(SOURCES ${SOURCES} datapath_raw_dummy.c)
else()
set(SOURCES ${SOURCES} datapath_raw.c datapath_raw_winuser.c datapath_raw_socket.c datapath_raw_socket_win.c datapath_raw_socket_common.c datapath_raw_xdp_winuser.c)
set(SOURCES ${SOURCES} datapath_raw.c datapath_raw_win.c datapath_raw_socket.c datapath_raw_socket_win.c datapath_raw_socket_common.c datapath_raw_xdp_winuser.c)
endif()
else()
set(SOURCES ${SOURCES} inline.c platform_posix.c storage_posix.c cgroup.c datapath_unix.c)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "datapath_raw_win.h"
#ifdef QUIC_CLOG
#include "datapath_raw_winuser.c.clog.h"
#include "datapath_raw_win.c.clog.h"
#endif

#pragma warning(disable:4116) // unnamed type definition in parentheses
Expand Down Expand Up @@ -241,5 +241,7 @@ CXPLAT_THREAD_CALLBACK(CxPlatRouteResolutionWorkerThread, Context)
CXPLAT_FREE(Operation, QUIC_POOL_ROUTE_RESOLUTION_OPER);
}

#ifndef _KERNEL_MODE
return 0;
#endif
}
111 changes: 0 additions & 111 deletions src/platform/datapath_raw_winkernel.c

This file was deleted.

2 changes: 1 addition & 1 deletion src/platform/platform.kernel.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ClCompile Include="datapath_xplat.c" />
<ClCompile Include="datapath_win.c" />
<ClCompile Include="datapath_raw.c" />
<ClCompile Include="datapath_raw_winkernel.c" />
<ClCompile Include="datapath_raw_win.c" />
<ClCompile Include="datapath_raw_socket.c" />
<ClCompile Include="datapath_raw_socket_common.c" />
<ClCompile Include="datapath_raw_socket_win.c" />
Expand Down

0 comments on commit 6c1b53c

Please sign in to comment.