summaryrefslogtreecommitdiffstats
path: root/libnetdata/ebpf/ebpf.h
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2020-05-18 21:03:32 -0400
committerGitHub <noreply@github.com>2020-05-19 11:03:32 +1000
commitedeb82fac99246b7d572744fe1d732fd6d9cb34e (patch)
tree244bf54702edd4f96cc03b974a0174761a1436c9 /libnetdata/ebpf/ebpf.h
parent3cf541f25558ef3b2f43b4bc857e64042a2d09e5 (diff)
install and enable eBPF Plugin by default (#8665)
* netdata_installer_kernels: New kernels This commit brings new kernels for our netdata-installer * RH detection This commit brings the RH detection to netdata-installer, but it cannot be tested yet until we merge a PR on kernel-collector * netdata_installer_kernels: RH kernels This commit brings updates that allows to install and run the collectors on RH * netdata_installer_kernels: Kernel variables This commit brings definitions instead magic number to the isntaller * netdata_installer_kernels: remove echo This commit removes echo to avoid new line * netdata_installer_kernels: Move C code This commit removes the C code that will be inserted in another PR * Update eBPF install to use released version. This updates the install code for the eBPF plugin to properly utilize (and verify) a tagged release of the plugin instead of pulling the upstream master branch. It also adds support for using a local copy of the tarball, and switchs the default behavior to install the eBPF plugin instead of not installing it. * Tidy-up messages relating to eBPF. * Fix typos in error handling functions. * ebpf-release: New kernels This commit brings the kernels necessary to support Debian 10.0 * ebpf-release: Bring support for new package format * ebpf-release: collector as loader This commit brings the necessary changes for the collector loads all the nfiles depending of the kernel it is running * Update eBPF install to use released version. This updates the install code for the eBPF plugin to properly utilize (and verify) a tagged release of the plugin instead of pulling the upstream master branch. It also adds support for using a local copy of the tarball, and switchs the default behavior to install the eBPF plugin instead of not installing it. * netdata_installer_kernels: New kernels This commit brings new kernels for our netdata-installer * RH detection This commit brings the RH detection to netdata-installer, but it cannot be tested yet until we merge a PR on kernel-collector * netdata_installer_kernels: RH kernels This commit brings updates that allows to install and run the collectors on RH * netdata_installer_kernels: Kernel variables This commit brings definitions instead magic number to the isntaller * netdata_installer_kernels: remove echo This commit removes echo to avoid new line * netdata_installer_kernels: Move C code This commit removes the C code that will be inserted in another PR * Tidy-up messages relating to eBPF. * Fix typos in error handling functions. * ebpf-release: New kernels This commit brings the kernels necessary to support Debian 10.0 * ebpf-release: Bring support for new package format * ebpf-release: collector as loader This commit brings the necessary changes for the collector loads all the nfiles depending of the kernel it is running * Fix package name handling. * Bump eBPF kernel-collector to v0.1.0 * Update --help to state eBPF is enabled by default and add --disable-ebpf option in --help output * Remove deprecated kernel version compatibility checks * Fix EBPF_TARBALL * Remove libc path detection logic (deprecated0 * Use the new package structure of kernel-collector * Relax the glob on netdata_ebpf as we may develop/distirbute other types of ebpf programs * Fix ownership of ebpf libraries/programs * Make the check-kernel-config.sh local to the installer * Make plugins.ebpf = yes (by default) Co-authored-by: Thiago Marques <thiagoftsm@gmail.com> Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Diffstat (limited to 'libnetdata/ebpf/ebpf.h')
-rw-r--r--libnetdata/ebpf/ebpf.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/libnetdata/ebpf/ebpf.h b/libnetdata/ebpf/ebpf.h
index e7cd651a67..d4fa138c56 100644
--- a/libnetdata/ebpf/ebpf.h
+++ b/libnetdata/ebpf/ebpf.h
@@ -26,6 +26,26 @@
*/
# define NETDATA_RH_8 2048
+/**
+ * Kernel 4.17
+ *
+ * 266496 = 4*65536 + 17*256
+ */
+# define NETDATA_EBPF_KERNEL_4_17 266496
+
+/**
+ * Kernel 4.15
+ *
+ * 265984 = 4*65536 + 15*256
+ */
+# define NETDATA_EBPF_KERNEL_4_15 265984
+
+/**
+ * Kernel 4.11
+ *
+ * 264960 = 4*65536 + 15*256
+ */
+# define NETDATA_EBPF_KERNEL_4_11 264960
typedef struct netdata_ebpf_events {
char type;
@@ -34,8 +54,9 @@ typedef struct netdata_ebpf_events {
} netdata_ebpf_events_t;
extern int clean_kprobe_events(FILE *out, int pid, netdata_ebpf_events_t *ptr);
-extern int get_kernel_version();
+extern int get_kernel_version(char *out, int size);
extern int get_redhat_release();
extern int has_condition_to_run(int version);
+extern char *ebpf_library_suffix(int version, int isrh);
#endif