Skip to content

Commit

Permalink
cleanup: rename modern-ebpf into modern_ebpf
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
  • Loading branch information
Andreagit97 authored and poiana committed Nov 27, 2023
1 parent 2ce8fe9 commit 00b7c56
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions falco.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ rules_file:
# Available engines:
# - `kmod`: Kernel Module (Kernel Module)
# - `ebpf`: eBPF (eBPF probe)
# - `modern-ebpf`: Modern eBPF (CO-RE eBPF probe)
# - `modern_ebpf`: Modern eBPF (CO-RE eBPF probe)
# - `gvisor`: gVisor (gVisor sandbox)
# - `replay`: Replay a scap trace file
# - `none`: No event producer loaded, useful to run with plugins.
Expand Down Expand Up @@ -233,7 +233,7 @@ rules_file:
# is important to note that enabling this option also means sacrificing some
# visibility into the system.
#
################### `cpus_for_each_buffer` (modern-ebpf only)
################### `cpus_for_each_buffer` (modern_ebpf only)
#
# --- [Description]
#
Expand Down Expand Up @@ -321,7 +321,7 @@ engine:
probe: /root/.falco/falco-bpf.o
buf_size_preset: 4
drop_failed_exit: false
modern-ebpf:
modern_ebpf:
cpus_for_each_buffer: 2
buf_size_preset: 4
drop_failed_exit: false
Expand Down Expand Up @@ -967,7 +967,7 @@ metrics:

# [DEPRECATED] `syscall_buf_size_preset`
#
# Deprecated in favor of engine.{kmod,ebpf,modern-ebpf}.buf_size_preset.
# Deprecated in favor of engine.{kmod,ebpf,modern_ebpf}.buf_size_preset.
# This config is evaluated only if the default `engine` config block is not changed,
# otherwise it is ignored.
#
Expand Down Expand Up @@ -1023,7 +1023,7 @@ syscall_buf_size_preset: 4

# [DEPRECATED] `syscall_drop_failed_exit`
#
# Deprecated in favor of engine.{kmod,ebpf,modern-ebpf}.drop_failed_exit.
# Deprecated in favor of engine.{kmod,ebpf,modern_ebpf}.drop_failed_exit.
# This config is evaluated only if the default `engine` config block is not changed,
# otherwise it is ignored.
#
Expand Down Expand Up @@ -1152,7 +1152,7 @@ base_syscalls:

# [DEPRECATED] `modern_bpf.cpus_for_each_syscall_buffer`, modern_bpf only
#
# Deprecated in favor of engine.modern-ebpf.cpus_for_each_buffer.
# Deprecated in favor of engine.modern_ebpf.cpus_for_each_buffer.
# This config is evaluated only if the default `engine` config block is not changed,
# otherwise it is ignored.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ engine:
probe: /path/to/probe.o
buf_size_preset: 4
drop_failed_exit: false
modern-ebpf:
modern_ebpf:
cpus_for_each_buffer: 2
buf_size_preset: 4
drop_failed_exit: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ engine:
probe: /path/to/probe.o
buf_size_preset: 4
drop_failed_exit: false
modern-ebpf:
modern_ebpf:
cpus_for_each_buffer: 2
buf_size_preset: 4
drop_failed_exit: false
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/load_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static falco::app::run_result apply_deprecated_options(falco::app::state& s)
if(s.config->m_cpus_for_each_syscall_buffer != DEFAULT_CPUS_FOR_EACH_SYSCALL_BUFFER)
{
falco_logger::log(falco_logger::level::WARNING,
"DEPRECATION NOTICE: 'modern_bpf.cpus_for_each_syscall_buffer' config is deprecated and will be removed in Falco 0.38! Use `engine.modern-ebpf.cpus_for_each_buffer' config instead\n");
"DEPRECATION NOTICE: 'modern_bpf.cpus_for_each_syscall_buffer' config is deprecated and will be removed in Falco 0.38! Use `engine.modern_ebpf.cpus_for_each_buffer' config instead\n");
}

// Replace the kmod default values in case the engine was open with the kmod.
Expand Down
8 changes: 4 additions & 4 deletions userspace/falco/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void falco_configuration::load_engine_config(const std::string& config_name, con
const std::unordered_map<std::string, engine_kind_t> engine_mode_lut = {
{"kmod",engine_kind_t::KMOD},
{"ebpf",engine_kind_t::EBPF},
{"modern-ebpf",engine_kind_t::MODERN_EBPF},
{"modern_ebpf",engine_kind_t::MODERN_EBPF},
{"replay",engine_kind_t::REPLAY},
{"gvisor",engine_kind_t::GVISOR},
{"none",engine_kind_t::NONE},
Expand Down Expand Up @@ -155,9 +155,9 @@ void falco_configuration::load_engine_config(const std::string& config_name, con
m_ebpf.m_drop_failed_exit = config.get_scalar<bool>("engine.ebpf.drop_failed_exit", DEFAULT_DROP_FAILED_EXIT);
break;
case engine_kind_t::MODERN_EBPF:
m_modern_ebpf.m_cpus_for_each_buffer = config.get_scalar<uint16_t>("engine.modern-ebpf.cpus_for_each_buffer", DEFAULT_CPUS_FOR_EACH_SYSCALL_BUFFER);
m_modern_ebpf.m_buf_size_preset = config.get_scalar<int16_t>("engine.modern-ebpf.buf_size_preset", DEFAULT_BUF_SIZE_PRESET);
m_modern_ebpf.m_drop_failed_exit = config.get_scalar<bool>("engine.modern-ebpf.drop_failed_exit", DEFAULT_DROP_FAILED_EXIT);
m_modern_ebpf.m_cpus_for_each_buffer = config.get_scalar<uint16_t>("engine.modern_ebpf.cpus_for_each_buffer", DEFAULT_CPUS_FOR_EACH_SYSCALL_BUFFER);
m_modern_ebpf.m_buf_size_preset = config.get_scalar<int16_t>("engine.modern_ebpf.buf_size_preset", DEFAULT_BUF_SIZE_PRESET);
m_modern_ebpf.m_drop_failed_exit = config.get_scalar<bool>("engine.modern_ebpf.drop_failed_exit", DEFAULT_DROP_FAILED_EXIT);
break;
case engine_kind_t::REPLAY:
m_replay.m_capture_file = config.get_scalar<std::string>("engine.replay.capture_file", "");
Expand Down

0 comments on commit 00b7c56

Please sign in to comment.