From 124267a629c30d0acb5e5c931772cc8d0f3c43ac Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 22:52:55 -0700 Subject: [PATCH 2/5] gnu: Add %bpf-extra-linux-options. * gnu/packages/linux (%bpf-extra-linux-options): New variable. --- gnu/packages/linux.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index c0ac8f24bc..4daa371c6b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -619,6 +619,22 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." ("CONFIG_CIFS" . m) ("CONFIG_9P_FS" . m))) +;; See https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration +(define %bpf-extra-linux-options + `(("CONFIG_BPF" . #t) + ("CONFIG_BPF_SYSCALL" . #t) + ;; optional, for tc filters + ("CONFIG_NET_CLS_BPF" . m) + ;; optional, for tc actions + ("CONFIG_NET_ACT_BPF" . m) + ("CONFIG_BPF_JIT" . #t) + ;; for Linux kernel versions 4.1 through 4.6 + ;; ("CONFIG_HAVE_BPF_JIT" . y) + ;; for Linux kernel versions 4.7 and later + ("CONFIG_HAVE_EBPF_JIT" . #t) + ;; optional, for kprobes + ("CONFIG_BPF_EVENTS" . #t))) + (define (config->string options) (string-join (map (match-lambda ((option . 'm) -- 2.26.2