Skip to content

Commit

Permalink
nv_ebpf: As discussed internally, let us set as optional, avoiding is…
Browse files Browse the repository at this point in the history
…sue with Docker
  • Loading branch information
thiagoftsm committed Mar 8, 2024
1 parent d53bfbf commit 831c6e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/collectors/network-viewer.plugin/network-viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,9 +1075,10 @@ int main(int argc __maybe_unused, char **argv __maybe_unused) {

// ----------------------------------------------------------------------------------------------------------------

if(argc == 2 && strcmp(argv[1], "debug") == 0) {
if(argc >= 2 && strcmp(argv[1], "debug") == 0) {
#if defined(ENABLE_PLUGIN_EBPF) && !defined(__cplusplus)
network_viewer_load_ebpf();
if(argc == 3 && strcmp(argv[2], "ebpf") == 0)
network_viewer_load_ebpf();

if (ebpf_nv_module.maps[0].map_fd > 0)
nd_log(NDLS_COLLECTORS, NDLP_INFO, "PLUGIN: the plugin will use eBPF %s to monitor sockets.",
Expand All @@ -1101,7 +1102,8 @@ int main(int argc __maybe_unused, char **argv __maybe_unused) {
}

#if defined(ENABLE_PLUGIN_EBPF) && !defined(__cplusplus)
network_viewer_load_ebpf();
if(argc == 3 && strcmp(argv[2], "ebpf") == 0)
network_viewer_load_ebpf();
#endif

// ----------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 831c6e6

Please sign in to comment.