summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-13 12:07:23 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-29 22:01:23 -0400
commit412d99a657ba0974a60dbfaf46ba807da7a3589e (patch)
tree0500cc0ea606886cbcf9f3f5c986aec53e3ac14a /gnu/packages/linux.scm
parentafacfa33ec4b52cb9ffb9b0a7a0c1e68cf264673 (diff)
gnu: linux-libre-with-bpf: Deprecate in favor of linux-libre.
The kernel has progressively enabled the BPF settings, to the point where having a separate kernel for it makes little sense, so repatriate the few non-default BPF-related configs to our main kernel. * gnu/packages/linux.scm (%bpf-extra-linux-options): Delete variable. (default-extra-linux-options): Enable CONFIG_NET_CLS_BPF and CONFIG_NET_ACT_BPF. CONFIG_IKHEADERS is dropped as it adds 4 MiB to the kernel image and appears somewhat redundant with BTF debug info. (linux-libre-with-bpf): Deprecate to linux-libre. Change-Id: Id672241916dcbcdca7cbc16d869d00223446cd3d
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm46
1 files changed, 3 insertions, 43 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2575f687da..3129c5a073 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -874,6 +874,8 @@ ARCH and optionally VARIANT, or #f if there is no such configuration."
,@(if (version>=? version "5.13")
'(("BPF_UNPRIV_DEFAULT_OFF" . #t))
'())
+ ("CONFIG_NET_CLS_BPF" . m) ;classify packets based on BPF filters
+ ("CONFIG_NET_ACT_BPF" . m) ;to execute BPF code on packets
;; Compress kernel modules via Zstd.
,(if (version>=? version "5.13")
'("CONFIG_MODULE_COMPRESS_ZSTD" . #t)
@@ -930,30 +932,6 @@ 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
- `(;; Needed for probes
- ("CONFIG_UPROBE_EVENTS" . #t)
- ("CONFIG_KPROBE_EVENTS" . #t)
- ;; kheaders module also helpful for tracing
- ("CONFIG_IKHEADERS" . #t)
- ("CONFIG_BPF" . #t)
- ("CONFIG_BPF_SYSCALL" . #t)
- ("CONFIG_BPF_JIT_ALWAYS_ON" . #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)
- ;; kheaders module
- ("CONFIG_IKHEADERS" . #t)))
-
(define (config->string options)
(string-join (map (match-lambda
((option . 'm)
@@ -1431,25 +1409,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
(default-extra-linux-options linux-libre-version))))
(define-public linux-libre-with-bpf
- (let ((base-linux-libre
- (make-linux-libre*
- linux-libre-6.8-version
- linux-libre-6.8-gnu-revision
- linux-libre-6.8-source
- '("x86_64-linux" "i686-linux" "armhf-linux"
- "aarch64-linux" "powerpc64le-linux" "riscv64-linux")
- #:extra-version "bpf"
- #:configuration-file kernel-config
- #:extra-options
- (append %bpf-extra-linux-options
- (default-extra-linux-options linux-libre-6.8-version)))))
- (package
- (inherit base-linux-libre)
- (inputs (modify-inputs (package-inputs base-linux-libre)
- (prepend cpio)))
- (synopsis "Linux-libre with BPF support")
- (description "This package provides GNU Linux-Libre with support
-for @acronym{BPF, the Berkeley Packet Filter}."))))
+ (deprecated-package "linux-libre-with-bpf" linux-libre))
;;;