Skip to content

Commit

Permalink
Add JIT & Interpreter build switches. (microsoft#2031)
Browse files Browse the repository at this point in the history
* draft

* nit

* doc update

* doc update

* description update

---------

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
  • Loading branch information
gtrevi and dthaler authored Feb 7, 2023
1 parent 31f4bbc commit 694485a
Show file tree
Hide file tree
Showing 14 changed files with 105 additions and 43 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ jobs:
build_nuget: true
build_options: /p:ReleaseJIT='True'

# Perform the native-only build.
regular_native-only:
# Always run this job.
if: github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push'
uses: ./.github/workflows/reusable-build.yml
with:
build_artifact: Build-x64-native-only
generate_release_package: true
build_nuget: true
build_options: /p:DisableJIT='True' /p:DisableInterpreter='True'

cmake:
# Always run this job.
if: github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push'
Expand Down Expand Up @@ -254,7 +265,6 @@ jobs:
code_coverage: false
gather_dumps: true


core_helper_fuzzer:
needs: libfuzzer
# Always run this job.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
- name: Build
if: steps.skip_check.outputs.should_skip != 'true'
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} ${{env.BUILD_OPTIONS}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.BUILD_OPTIONS}} ${{env.SOLUTION_FILE_PATH}}

- name: Copy LLVM libs for Fuzzing & Address Sanitizing
if: steps.skip_check.outputs.should_skip != 'true'
Expand Down
16 changes: 11 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
<PropertyGroup Condition="'$(AddressSanitizer)'=='True'">
<EnableASAN>true</EnableASAN>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalLibraryDirectories>$(VC_LibraryPath_VC_x64_Desktop);%(Link.AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Fuzzer)'=='Release|True'">
<EnableASAN>true</EnableASAN>
<AdditionalOptions>/fsanitize-coverage=inline-bool-flag /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -46,8 +41,19 @@
</ClCompile>
<Link>
<CETCompat>true</CETCompat>
<AdditionalLibraryDirectories>$(VC_LibraryPath_VC_x64_Desktop);%(Link.AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(DisableJIT)'=='Release|True'">
<ClCompile>
<PreprocessorDefinitions>CONFIG_BPF_JIT_DISABLED;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(DisableInterpreter)'=='Release|True'">
<ClCompile>
<PreprocessorDefinitions>CONFIG_BPF_INTERPRETER_DISABLED;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
Expand Down
6 changes: 4 additions & 2 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

option(EBPFFORWINDOWS_ENABLE_TESTS "Set to true to enable tests" true)
option(EBPFFORWINDOWS_ENABLE_INSTALL "Set to true to enable the install target")
option(EBPFFORWINDOWS_ENABLE_DISABLE_EBPF_INTERPRETER "Set to true to compile with the interpreter always disabled")
option(EBPFFORWINDOWS_DISABLE_JIT "Set to true to compile with the JIT compiler disabled")
option(EBPFFORWINDOWS_DISABLE_INTERPRETER "Set to true to compile with the Interpreter disabled")

set(EBPFFORWINDOWS_CODESIGN_CERTIFICATE_PATH "" CACHE STRING "Path to the certificate used for signing")
set(EBPFFORWINDOWS_CODESIGN_PASSWORD_ENV_VAR "" CACHE STRING "Name of the environment variable containing the certificate password")
Expand All @@ -19,7 +20,8 @@ endif()

message(STATUS "ebpf-for-windows - Tests: ${EBPFFORWINDOWS_ENABLE_TESTS}")
message(STATUS "ebpf-for-windows - Install targets: ${EBPFFORWINDOWS_ENABLE_INSTALL}")
message(STATUS "ebpf-for-windows - eBPF interpreter disabled: ${EBPFFORWINDOWS_ENABLE_DISABLE_EBPF_INTERPRETER}")
message(STATUS "ebpf-for-windows - eBPF JIT compiler disabled: ${EBPFFORWINDOWS_DISABLE_JIT}")
message(STATUS "ebpf-for-windows - eBPF interpreter disabled: ${EBPFFORWINDOWS_DISABLE_INTERPRETER}")
message(STATUS "ebpf-for-windows - Code signing enabled: ${codesign_enabled}")
message(STATUS "ebpf-for-windows - WDK_WINVER: ${EBPFFORWINDOWS_WDK_WINVER}")
message(STATUS "ebpf-for-windows - KMDF version: ${EBPFFORWINDOWS_WDK_KMDF_VERSION}")
Expand Down
10 changes: 8 additions & 2 deletions cmake/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ target_link_options("ebpf_for_windows_common_settings" INTERFACE
/DEBUG:Full
)

if(EBPFFORWINDOWS_ENABLE_DISABLE_EBPF_INTERPRETER)
if(EBPFFORWINDOWS_DISABLE_JIT)
target_compile_definitions("ebpf_for_windows_common_settings" INTERFACE
CONFIG_BPF_JIT_ALWAYS_ON=1
CONFIG_BPF_JIT_DISABLED=1
)
endif()

if(EBPFFORWINDOWS_DISABLE_INTERPRETER)
target_compile_definitions("ebpf_for_windows_common_settings" INTERFACE
CONFIG_BPF_INTERPRETER_DISABLED=1
)
endif()

Expand Down
28 changes: 18 additions & 10 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,27 +108,35 @@ The following steps need to be executed *once* before the first build on a new c

##### Setting compile time options when building from Developer Command Prompt

To build with specific compile time options, append `/p:DefineConstants=<option_name>`. Options available include:
To build with the specific compile time options for disabling JIT compiler and/or the Interpreter, append "`/p:<option>=True`". Available options are:

1. `CONFIG_BPF_JIT_ALWAYS_ON` - Compile eBPF Execution Context without support for eBPF interpreter.
1. `DisableJIT` - Compile eBPF's *Execution Context* without support for eBPF JIT compiler.
1. `DisableInterpreter` - Compile eBPF's *Execution Context* without support for eBPF interpreter.

#### Building using Visual Studio IDE

1. Open `ebpf-for-windows.sln`
1. Switch to debug / x64
1. Build solution
1. Open the `ebpf-for-windows.sln` solution.
1. Switch the configuration to "`Debug`|`x64`".
1. Rebuild the solution.

##### Setting compile time options when building from Visual Studio IDE

To build with specific compile time options:
To build with the specific compile time options for disabling JIT compiler and/or the interpreter:

1. Select the project to modify from the Solution Explorer.
1. Navigate to "C/C++" -> "Preprocessor" -> "Preprocessor Definitions"
1. Add the option to the list of preprocessor options.
1. Navigate to "`C/C++`" -> "`Preprocessor`" -> "`Preprocessor Definitions`"
1. Click the "`V`" combobox arrow and then "`Edit`" for adding the option(s) to the list of preprocessor options. Available options are:

Options available include:
* `CONFIG_BPF_JIT_DISABLED` - Compile eBPF's *Execution Context* without support for the eBPF JIT compiler.
* `CONFIG_BPF_INTERPRETER_DISABLED` - Compile eBPF's *Execution Context* without support for the eBPF interpreter.

1. `CONFIG_BPF_JIT_ALWAYS_ON` - Compile eBPF Execution Context without support for eBPF interpreter.
>*Note for Linux users*: this option is similar to the `CONFIG_BPF_JIT_ALWAYS_ON` which, as documented
[here](https://googleprojectzero.blogspot.com/2018/01/reading-privileged-memory-with-side.html), is used to disable support for the interpreter.

>Note: do the above steps for the following projects within the `ebpf-for-windows.sln` solution:
>- `api_test`
>- `execution_context_kernel`
>- `sample_ext_app`
This will build the following binaries:

Expand Down
10 changes: 7 additions & 3 deletions libs/execution_context/ebpf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2166,11 +2166,15 @@ ebpf_core_get_protocol_handler_properties(
// Native is always permitted.
bool native_permitted = true;

// JIT is permitted if HVCI is off.
#if defined(CONFIG_BPF_JIT_DISABLED)
bool jit_permitted = false;
#else
// JIT is permitted only if HVCI is off.
bool jit_permitted = (_ebpf_core_code_integrity_state == EBPF_CODE_INTEGRITY_DEFAULT) ? true : false;
#endif

// Interpret is only permitted if CONFIG_BPF_JIT_ALWAYS_ON is not set.
#if defined(CONFIG_BPF_JIT_ALWAYS_ON)
// Interpret is only permitted if CONFIG_BPF_INTERPRETER_DISABLED is not set.
#if defined(CONFIG_BPF_INTERPRETER_DISABLED)
bool interpret_permitted = false;
#else
bool interpret_permitted = true;
Expand Down
27 changes: 19 additions & 8 deletions libs/execution_context/ebpf_program.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ _ebpf_program_epoch_free(_In_ _Post_invalid_ void* context)
case EBPF_CODE_JIT:
ebpf_unmap_memory(program->code_or_vm.code.code_memory_descriptor);
break;
#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
case EBPF_CODE_EBPF:
if (program->code_or_vm.vm) {
ubpf_destroy(program->code_or_vm.vm);
Expand Down Expand Up @@ -729,7 +729,7 @@ _ebpf_program_update_interpret_helpers(_Inout_ ebpf_program_t* program, _Inout_
if (helper == NULL)
continue;

#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
if (ubpf_register(program->code_or_vm.vm, (unsigned int)index, NULL, (void*)helper) < 0) {
EBPF_LOG_MESSAGE_UINT64(
EBPF_TRACELOG_LEVEL_ERROR, EBPF_TRACELOG_KEYWORD_PROGRAM, "ubpf_register failed", index);
Expand Down Expand Up @@ -879,7 +879,7 @@ _ebpf_program_update_jit_helpers(_Inout_ ebpf_program_t* program, _Inout_ void*
return return_value;
}

#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
static ebpf_result_t
_ebpf_program_load_byte_code(
_Inout_ ebpf_program_t* program, _In_ const ebpf_instruction_t* instructions, size_t instruction_count)
Expand Down Expand Up @@ -965,16 +965,24 @@ ebpf_program_load_code(
ebpf_assert(
(code_type == EBPF_CODE_NATIVE && code_context != NULL) ||
(code_type != EBPF_CODE_NATIVE && code_context == NULL));
if (program->parameters.code_type == EBPF_CODE_JIT || program->parameters.code_type == EBPF_CODE_NATIVE)

switch (program->parameters.code_type) {

case EBPF_CODE_JIT:
case EBPF_CODE_NATIVE:
result = _ebpf_program_load_machine_code(program, code_context, code, code_size);
else if (program->parameters.code_type == EBPF_CODE_EBPF)
#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
break;

case EBPF_CODE_EBPF:
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
result = _ebpf_program_load_byte_code(
program, (const ebpf_instruction_t*)code, code_size / sizeof(ebpf_instruction_t));
#else
result = EBPF_BLOCKED_BY_POLICY;
#endif
else {
break;

default: {
EBPF_LOG_MESSAGE_UINT64(
EBPF_TRACELOG_LEVEL_ERROR,
EBPF_TRACELOG_KEYWORD_PROGRAM,
Expand All @@ -983,6 +991,8 @@ ebpf_program_load_code(

result = EBPF_INVALID_ARGUMENT;
}
}

EBPF_RETURN_RESULT(result);
}

Expand Down Expand Up @@ -1041,13 +1051,14 @@ ebpf_program_invoke(_In_ const ebpf_program_t* program, _Inout_ void* context, _
program_state_stored = true;

for (state.count = 0; state.count < MAX_TAIL_CALL_CNT; state.count++) {

if (current_program->parameters.code_type == EBPF_CODE_JIT ||
current_program->parameters.code_type == EBPF_CODE_NATIVE) {
ebpf_program_entry_point_t function_pointer;
function_pointer = (ebpf_program_entry_point_t)(current_program->code_or_vm.code.code_pointer);
*result = (function_pointer)(context);
} else {
#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
uint64_t out_value;
int ret = (uint32_t)(ubpf_exec(current_program->code_or_vm.vm, context, 1024, &out_value));
if (ret < 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions);_NO_CRT_STDIO_INLINE=1;CONFIG_BPF_JIT_ALWAYS_ON=1</PreprocessorDefinitions>
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions);_NO_CRT_STDIO_INLINE=1;</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\kernel;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)\external\ubpf\build\vm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4201;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
Expand Down
18 changes: 13 additions & 5 deletions tests/api_test/api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,20 @@ TEST_CASE("pinned_map_enum", "[pinned_map_enum]") { ebpf_test_pinned_map_enum();
_test_program_load(file, program_type, execution_type, expected_result); \
}

#if defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if defined(CONFIG_BPF_JIT_DISABLED)
#define JIT_LOAD_RESULT -EOTHER
#else
#define JIT_LOAD_RESULT 0
#endif

#if defined(CONFIG_BPF_INTERPRETER_DISABLED)
#define INTERPRET_LOAD_RESULT -EOTHER
#else
#define INTERPRET_LOAD_RESULT 0
#endif

// Load droppacket (JIT) without providing expected program type.
DECLARE_LOAD_TEST_CASE("droppacket.o", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_JIT, 0);
DECLARE_LOAD_TEST_CASE("droppacket.o", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_JIT, JIT_LOAD_RESULT);

DECLARE_LOAD_TEST_CASE("droppacket.sys", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_NATIVE, 0);

Expand All @@ -293,13 +299,13 @@ DECLARE_LOAD_TEST_CASE("droppacket.o", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_INTE
DECLARE_LOAD_TEST_CASE("droppacket.o", BPF_PROG_TYPE_XDP, EBPF_EXECUTION_INTERPRET, INTERPRET_LOAD_RESULT);

// Load bindmonitor (JIT) without providing expected program type.
DECLARE_LOAD_TEST_CASE("bindmonitor.o", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_JIT, 0);
DECLARE_LOAD_TEST_CASE("bindmonitor.o", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_JIT, JIT_LOAD_RESULT);

// Load bindmonitor (INTERPRET) without providing expected program type.
DECLARE_LOAD_TEST_CASE("bindmonitor.o", BPF_PROG_TYPE_UNSPEC, EBPF_EXECUTION_INTERPRET, INTERPRET_LOAD_RESULT);

// Load bindmonitor with providing expected program type.
DECLARE_LOAD_TEST_CASE("bindmonitor.o", BPF_PROG_TYPE_BIND, EBPF_EXECUTION_JIT, 0);
DECLARE_LOAD_TEST_CASE("bindmonitor.o", BPF_PROG_TYPE_BIND, EBPF_EXECUTION_JIT, JIT_LOAD_RESULT);

// Try to load bindmonitor with providing wrong program type.
DECLARE_LOAD_TEST_CASE("bindmonitor.o", BPF_PROG_TYPE_XDP, EBPF_EXECUTION_ANY, -EACCES);
Expand Down Expand Up @@ -407,10 +413,12 @@ divide_by_zero_test_km(ebpf_execution_type_t execution_type)
// If we don't bug-check, the test passed.
}

#if !defined(CONFIG_BPF_JIT_DISABLED)
TEST_CASE("ringbuf_api_jit", "[test_ringbuf_api]") { ring_buffer_api_test(EBPF_EXECUTION_JIT); }
TEST_CASE("divide_by_zero_jit", "[divide_by_zero]") { divide_by_zero_test_km(EBPF_EXECUTION_JIT); }
#endif

#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
TEST_CASE("ringbuf_api_interpret", "[test_ringbuf_api]") { ring_buffer_api_test(EBPF_EXECUTION_INTERPRET); }
TEST_CASE("divide_by_zero_interpret", "[divide_by_zero]") { divide_by_zero_test_km(EBPF_EXECUTION_INTERPRET); }
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/api_test/api_test.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;CONFIG_BPF_JIT_ALWAYS_ON=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\Platform;$(SolutionDir)libs\Platform\user;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\api_common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
Expand Down
5 changes: 4 additions & 1 deletion tests/performance/ExecutionContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,12 @@ test_lpm_trie_ipv4(bool preemptible)
measure.run_test();
}

#if !defined(CONFIG_BPF_JIT_DISABLED)
PERF_TEST(test_program_invoke_jit);
#endif
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
PERF_TEST(test_program_invoke_interpret);

#endif
PERF_TEST(test_bpf_map_lookup_elem_read<BPF_MAP_TYPE_HASH>);
PERF_TEST(test_bpf_map_lookup_elem_read<BPF_MAP_TYPE_ARRAY>);
PERF_TEST(test_bpf_map_lookup_elem_read<BPF_MAP_TYPE_PERCPU_HASH>);
Expand Down
8 changes: 6 additions & 2 deletions tests/sample/ext/app/sample_ext_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ sample_ebpf_ext_test(_In_ const struct bpf_object* object)
REQUIRE(memcmp(output_buffer.data(), expected_output, strlen(expected_output)) == 0);
}

#if !defined(CONFIG_BPF_JIT_DISABLED)
TEST_CASE("jit_test", "[sample_ext_test]")
{
struct bpf_object* object = nullptr;
Expand All @@ -120,8 +121,9 @@ TEST_CASE("jit_test", "[sample_ext_test]")

sample_ebpf_ext_test(object);
}
#endif

#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
TEST_CASE("interpret_test", "[sample_ext_test]")
{
struct bpf_object* object = nullptr;
Expand Down Expand Up @@ -153,10 +155,12 @@ utility_helpers_test(ebpf_execution_type_t execution_type)
verify_utility_helper_results(object, true);
}

#if !defined(CONFIG_BPF_JIT_ALWAYS_ON)
#if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
TEST_CASE("utility_helpers_test_interpret", "[sample_ext_test]") { utility_helpers_test(EBPF_EXECUTION_INTERPRET); }
#endif
#if !defined(CONFIG_BPF_JIT_DISABLED)
TEST_CASE("utility_helpers_test_jit", "[sample_ext_test]") { utility_helpers_test(EBPF_EXECUTION_JIT); }
#endif
TEST_CASE("utility_helpers_test_native", "[sample_ext_test]") { utility_helpers_test(EBPF_EXECUTION_NATIVE); }
TEST_CASE("netsh_add_program_test_sample_ebpf", "[sample_ext_test]")
{
Expand Down
2 changes: 1 addition & 1 deletion tests/sample/ext/app/sample_ext_app.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;CONFIG_BPF_JIT_ALWAYS_ON=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\netebpfext;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
Expand Down

0 comments on commit 694485a

Please sign in to comment.