Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saxena-anurag committed Feb 27, 2024
1 parent ad2eddb commit 90edd35
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libs/execution_context/ebpf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ ebpf_core_terminate()
ebpf_platform_terminate();
}

#if !defined(CONFIG_BPF_JIT_DISABLED) || !defined(CONFIG_BPF_INTERPRETER_DISABLED)
_Must_inspect_result_ ebpf_result_t
ebpf_core_load_code(
ebpf_handle_t program_handle,
Expand All @@ -318,7 +317,6 @@ ebpf_core_load_code(
EBPF_OBJECT_RELEASE_REFERENCE((ebpf_core_object_t*)program);
EBPF_RETURN_RESULT(retval);
}
#endif

static ebpf_result_t
_ebpf_core_protocol_load_code(_In_ const ebpf_operation_load_code_request_t* request)
Expand Down Expand Up @@ -417,6 +415,7 @@ _ebpf_core_protocol_resolve_helper(
#if defined(CONFIG_BPF_JIT_DISABLED)
UNREFERENCED_PARAMETER(request);
UNREFERENCED_PARAMETER(reply);
UNREFERENCED_PARAMETER(reply_length);
EBPF_RETURN_RESULT(EBPF_OPERATION_NOT_SUPPORTED);
#else
uint32_t* request_helper_ids = NULL;
Expand Down Expand Up @@ -514,6 +513,7 @@ _ebpf_core_protocol_resolve_map(
#if defined(CONFIG_BPF_JIT_DISABLED)
UNREFERENCED_PARAMETER(request);
UNREFERENCED_PARAMETER(reply);
UNREFERENCED_PARAMETER(reply_length);
EBPF_RETURN_RESULT(EBPF_OPERATION_NOT_SUPPORTED);
#else
size_t map_handle_length;
Expand Down Expand Up @@ -2430,13 +2430,17 @@ typedef struct _ebpf_protocol_handler
// #if !defined(CONFIG_BPF_INTERPRETER_DISABLED)
#define PROTOCOL_INTERPRET_MODE 4
// #endif
#if !defined(CONFIG_BPF_JIT_DISABLED) || !defined(CONFIG_BPF_INTERPRETER_DISABLED)
#if !defined(CONFIG_BPF_JIT_DISABLED) && !defined(CONFIG_BPF_INTERPRETER_DISABLED)
#define PROTOCOL_JIT_OR_INTERPRET_MODE (PROTOCOL_JIT_MODE | PROTOCOL_INTERPRET_MODE)
#define PROTOCOL_ALL_MODES (PROTOCOL_NATIVE_MODE | PROTOCOL_JIT_MODE | PROTOCOL_INTERPRET_MODE)
#elif !defined(CONFIG_BPF_JIT_DISABLED)
#define PROTOCOL_JIT_OR_INTERPRET_MODE PROTOCOL_JIT_MODE
#define PROTOCOL_ALL_MODES (PROTOCOL_NATIVE_MODE | PROTOCOL_JIT_MODE)
#elif !defined(CONFIG_BPF_INTERPRETER_DISABLED)
#define PROTOCOL_JIT_OR_INTERPRET_MODE PROTOCOL_INTERPRET_MODE
#define PROTOCOL_ALL_MODES (PROTOCOL_NATIVE_MODE | PROTOCOL_INTERPRET_MODE)
#else
#define PROTOCOL_JIT_OR_INTERPRET_MODE PROTOCOL_NATIVE_MODE
#define PROTOCOL_ALL_MODES PROTOCOL_NATIVE_MODE
#endif

Expand Down

0 comments on commit 90edd35

Please sign in to comment.