From 961d1e847c2ec76446863542abd164522c5d745d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ragnar=20Dahl=C3=A9n?= Date: Wed, 6 Apr 2016 14:25:14 +0100 Subject: [PATCH] linux: kernel config for extended BPF support - Enable BPF_SYSCALL and BPF_EVENTS - Build modules for NET_CLS_BPF and NET_ACT_BPF With these config options we can leverage the full potential of BPF for tracing and instrumenting Linux systems, for example using libraries/tools like those provided by the bcc project. --- pkgs/os-specific/linux/kernel/common-config.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index f3dd32386bc9..58af04fbb8ab 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -118,6 +118,10 @@ with stdenv.lib; ${optionalString (stdenv.system == "x86_64-linux") '' BPF_JIT y ''} + ${optionalString (versionAtLeast version "4.4") '' + NET_CLS_BPF m + NET_ACT_BPF m + ''} # Wireless networking. CFG80211_WEXT? y # Without it, ipw2200 drivers don't build @@ -398,6 +402,10 @@ with stdenv.lib; ${optionalString (versionAtLeast version "3.10") '' UPROBE_EVENT y ''} + ${optionalString (versionAtLeast version "4.4") '' + BPF_SYSCALL y + BPF_EVENTS y + ''} FUNCTION_PROFILER y RING_BUFFER_BENCHMARK n