diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2022-02-21 13:44:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 13:44:23 +0000 |
commit | b9f05de31513ed3bce583c638156bc8aee0bd03a (patch) | |
tree | 0b78b6da16299d79950c7a3cd1eff74ddbc4976a /libnetdata | |
parent | 10ceb4532ba0e5998db75696d09a80fb7011c50d (diff) |
Update libs code (#12190)
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/ebpf/ebpf.c | 6 | ||||
-rw-r--r-- | libnetdata/ebpf/ebpf.h | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/libnetdata/ebpf/ebpf.c b/libnetdata/ebpf/ebpf.c index ca40492f11..78fa660f76 100644 --- a/libnetdata/ebpf/ebpf.c +++ b/libnetdata/ebpf/ebpf.c @@ -279,7 +279,7 @@ static char *ebpf_select_kernel_name(uint32_t selector) { static char *kernel_names[] = { NETDATA_IDX_STR_V3_10, NETDATA_IDX_STR_V4_14, NETDATA_IDX_STR_V4_16, NETDATA_IDX_STR_V4_18, NETDATA_IDX_STR_V5_4, NETDATA_IDX_STR_V5_10, - NETDATA_IDX_STR_V5_11, NETDATA_IDX_STR_V5_15 + NETDATA_IDX_STR_V5_11, NETDATA_IDX_STR_V5_15, NETDATA_IDX_STR_V5_16 }; return kernel_names[selector]; @@ -301,7 +301,9 @@ static int ebpf_select_max_index(int is_rhf, uint32_t kver) if (kver >= NETDATA_EBPF_KERNEL_4_11) return NETDATA_IDX_V4_18; } else { // Kernels from kernel.org - if (kver >= NETDATA_EBPF_KERNEL_5_15) + if (kver >= NETDATA_EBPF_KERNEL_5_16) + return NETDATA_IDX_V5_16; + else if (kver >= NETDATA_EBPF_KERNEL_5_15) return NETDATA_IDX_V5_15; else if (kver >= NETDATA_EBPF_KERNEL_5_11) return NETDATA_IDX_V5_11; diff --git a/libnetdata/ebpf/ebpf.h b/libnetdata/ebpf/ebpf.h index 1252996725..c86eafe2f9 100644 --- a/libnetdata/ebpf/ebpf.h +++ b/libnetdata/ebpf/ebpf.h @@ -57,7 +57,8 @@ enum netdata_ebpf_kernel_versions { NETDATA_EBPF_KERNEL_5_0 = 327680, // 327680 = 5 * 65536 + 0 * 256 NETDATA_EBPF_KERNEL_5_10 = 330240, // 330240 = 5 * 65536 + 10 * 256 NETDATA_EBPF_KERNEL_5_11 = 330496, // 330240 = 5 * 65536 + 11 * 256 - NETDATA_EBPF_KERNEL_5_15 = 331520 // 331520 = 5 * 65536 + 15 * 256 + NETDATA_EBPF_KERNEL_5_15 = 331520, // 331520 = 5 * 65536 + 15 * 256 + NETDATA_EBPF_KERNEL_5_16 = 331776 // 331776 = 5 * 65536 + 16 * 256 }; enum netdata_kernel_flag { @@ -68,7 +69,8 @@ enum netdata_kernel_flag { NETDATA_V5_4 = 1 << 4, NETDATA_V5_10 = 1 << 5, NETDATA_V5_11 = 1 << 6, - NETDATA_V5_15 = 1 << 7 + NETDATA_V5_15 = 1 << 7, + NETDATA_V5_16 = 1 << 8 }; enum netdata_kernel_idx { @@ -79,7 +81,8 @@ enum netdata_kernel_idx { NETDATA_IDX_V5_4 , NETDATA_IDX_V5_10, NETDATA_IDX_V5_11, - NETDATA_IDX_V5_15 + NETDATA_IDX_V5_15, + NETDATA_IDX_V5_16 }; #define NETDATA_IDX_STR_V3_10 "3.10" @@ -90,6 +93,7 @@ enum netdata_kernel_idx { #define NETDATA_IDX_STR_V5_10 "5.10" #define NETDATA_IDX_STR_V5_11 "5.11" #define NETDATA_IDX_STR_V5_15 "5.15" +#define NETDATA_IDX_STR_V5_16 "5.16" /** * Minimum value has relationship with libbpf support. |