bpftune: add new package - #30446
bpftune: add new package#30446fluffball3 wants to merge 1 commit into
Conversation
| define Package/bpftune | ||
| $(call Package/bpftune/default) | ||
| TITLE:=BPF driven auto-tuning (no-BTF by default) | ||
| DEPENDS:=+@KERNEL_BPF_EVENTS +@KERNEL_CGROUPS +@KERNEL_CGROUP_BPF +@KERNEL_NAMESPACES +@KERNEL_NET_NS +libnl-route +libcap +libbpf |
There was a problem hiding this comment.
Including bpf.mk without adding $(BPF_DEPENDS) (@HAS_BPF_TOOLCHAIN +@NEED_BPF_TOOLCHAIN) lets the package be selected on configs with no LLVM/BPF toolchain. The two other bpf.mk consumers in this feed both carry it — net/tcp-in-udp/Makefile:27 and net/uspot/Makefile:31.
| DEPENDS:=+@KERNEL_BPF_EVENTS +@KERNEL_CGROUPS +@KERNEL_CGROUP_BPF +@KERNEL_NAMESPACES +@KERNEL_NET_NS +libnl-route +libcap +libbpf | |
| DEPENDS:=+@KERNEL_BPF_EVENTS +@KERNEL_CGROUPS +@KERNEL_CGROUP_BPF +@KERNEL_NAMESPACES +@KERNEL_NET_NS +libnl-route +libcap +libbpf $(BPF_DEPENDS) |
Generated by Claude Code
There was a problem hiding this comment.
| CFLAGS += -DBPFTUNE_VERSION='"$(PKG_VERSION)-$(PKG_RELEASE)"' | ||
|
|
||
| MAKE_FLAGS += BPF_KARCH="$(BPF_KARCH)" |
There was a problem hiding this comment.
Two values the patched src/Makefile needs never reach the sub-make:
CFLAGSis in neitherMAKE_VARSnorMAKE_FLAGSas a package-level variable, andsrc/Makefilehard-assignsCFLAGS = -fPIC -Wall -Wextra -g -std=c99, which also overrides the environmentCFLAGScarryingTARGET_CFLAGS. So this-DBPFTUNE_VERSIONis dead and the binary reports an empty version, which will also trip CI's generic version check unless atest-version.shis added.CLANG ?= clangandLLVM_STRIP ?= llvm-stripinsrc/Makefileare never overridden, so the BPF objects are built with whateverclangis onPATHrather than the toolchainbpf.mkresolves.
| CFLAGS += -DBPFTUNE_VERSION='"$(PKG_VERSION)-$(PKG_RELEASE)"' | |
| MAKE_FLAGS += BPF_KARCH="$(BPF_KARCH)" | |
| MAKE_FLAGS += \ | |
| BPFTUNE_VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \ | |
| BPF_KARCH="$(BPF_KARCH)" \ | |
| CLANG="$(CLANG)" \ | |
| LLVM_STRIP="$(LLVM_STRIP)" |
Generated by Claude Code
There was a problem hiding this comment.
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bpftune $(1)/usr/sbin/bpftune | ||
| $(INSTALL_DIR) $(1)/usr/lib | ||
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/libbpftune.so.0.4.2 $(1)/usr/lib/libbpftune.so.0.4.2 | ||
| $(LN) $(1)/usr/lib/libbpftune.so.0.4.2 $(1)/usr/lib/libbpftune.so |
There was a problem hiding this comment.
This records the absolute build-host path ($(1) = the ipkg staging dir) as the symlink target, so /usr/lib/libbpftune.so dangles on the device. Use a relative target, as e.g. libs/libjwt/Makefile:43 does.
| $(LN) $(1)/usr/lib/libbpftune.so.0.4.2 $(1)/usr/lib/libbpftune.so | |
| $(LN) libbpftune.so.0.4.2 $(1)/usr/lib/libbpftune.so |
Generated by Claude Code
There was a problem hiding this comment.
| define Package/bpftune-full/install | ||
| $(call Package/bpftune/install) | ||
| endef |
There was a problem hiding this comment.
bpftune-full depends on bpftune and installs the byte-identical file list, so both packages own /usr/sbin/bpftune, /usr/lib/libbpftune.so*, the tuner plugins and the init script and cannot be co-installed. Since the split is purely about kernel config symbols, drop this block entirely — package-pack.mk guards on ifdef Package/$(1)/install, so an undefined install yields the intended empty meta-package — and drop the duplicated Package/bpftune-full/conffiles block on lines 67-70 with it.
Generated by Claude Code
There was a problem hiding this comment.
| @@ -0,0 +1,2 @@ | |||
| # Optional: Override arguments passed to bpftune. | |||
| #command_args="-R -c /sys/fs/cgroup -d" | |||
There was a problem hiding this comment.
Nothing on OpenWrt sources /etc/conf.d/* — /etc/rc.common does not, and no other package in this feed installs there — so command_args set here is never read and the init script always uses its built-in default. The PR description says the package ships "a UCI configuration file"; making that true (a /etc/config/bpftune read with config_load/config_get in start_service) would both match the description and actually take effect.
Generated by Claude Code
There was a problem hiding this comment.
solved by turning the file into a real UCI config read with config_get, thanks
Generated by Claude Code
| start_pre() { | ||
| checkconf > /dev/null 2>&1 | ||
| } | ||
|
|
||
| start_service() | ||
| { | ||
| start_pre |
There was a problem hiding this comment.
Does bpftune -S exit on its own? The transcript in the PR description shows bpftune -dS staying in the foreground after "bpftune works in legacy mode", and if that is what -S does then start_pre blocks /etc/init.d/bpftune start forever — including the "$i" start that default_postinst runs at install time. Separately, start_pre is not an rc.common hook and its exit status is discarded here, so a failed check does not prevent the daemon from starting.
Generated by Claude Code
There was a problem hiding this comment.
bpftune -S is just a compatibility check that's all. It does exit after that I didn't include the part where it shows terminal again. I think even if it does fail then bpftune just doesn't start. I added the check just incase anyway.
|
|
||
| USE_PROCD=1 | ||
|
|
||
| START=81 |
There was a problem hiding this comment.
nit: the PR description says the service is disabled by default, but default_postinst runs enable and start for every script in /etc/init.d/, so bpftune runs from install. If opt-in is intended it has to be arranged explicitly; otherwise the description should be corrected.
Generated by Claude Code
There was a problem hiding this comment.
| $(BPF_OBJS): $(patsubst %.o,%.c,$(BPF_OBJS)) ../include/bpftune/bpftune.bpf.h | ||
| - $(CLANG) $(BPF_CFLAGS) -D__TARGET_ARCH_$(SRCARCH) -O2 -target bpf \ | ||
| - $(INCLUDES) -c $(patsubst %.o,%.c,$(@)) -o $(@) | ||
| + $(CLANG) $(BPF_CFLAGS) -D__TARGET_ARCH_$(BPF_KARCH) -O2 -target bpf$(if $(CONFIG_BIG_ENDIAN),eb,el) \ |
There was a problem hiding this comment.
Neither variable resolves the way this assumes: BPF_KARCH is hardcoded to mips for every target, and CONFIG_BIG_ENDIAN is a .config variable that is not exported into the sub-make, so this expands to -D__TARGET_ARCH_mips ... -target bpfel on every target. That means big-endian targets (ath79, mpc85xx, …) get little-endian BPF objects, and vmlinux-fallback.patch's #if defined(__TARGET_ARCH_x86) can never match, so even x86 builds pull in vmlinux_aarch64.h. Pass BPF_TARGET/BPF_ARCH from bpf.mk through MAKE_FLAGS and use those here instead. Same on lines 88 and 96.
Generated by Claude Code
There was a problem hiding this comment.
There was a problem hiding this comment.
Patches in this feed carry a numeric prefix that pins apply order (010-, 100-, 500-, …); all four files here are unprefixed. Also give fix-libbpftune.patch a descriptive subject and a Signed-off-by: — the sigval_t → union sigval and struct sockaddr cast changes are musl/portability fixes with a real upstream to send them to, unlike the OpenWrt-only build hacks in the other three.
Generated by Claude Code
There was a problem hiding this comment.
OK I'll look into it. Thanks for the advice.
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=bpftune | ||
| PKG_VERSION:=0.4 |
There was a problem hiding this comment.
nit: PKG_VERSION is 0.4 while everything actually shipped is 0.4-2 / soname 0.4.2 — the tarball, the PKG_BUILD_DIR override and the installed library all disagree with it. PKG_VERSION:=0.4.2 (keeping 0.4-2 in PKG_SOURCE/PKG_SOURCE_URL and PKG_BUILD_DIR) makes the package version match what is installed.
Generated by Claude Code
There was a problem hiding this comment.
72382ee to
352398c
Compare
| $(call Package/bpftune/default) | ||
| TITLE:=BPF driven auto-tuning (no-BTF by default) | ||
| DEPENDS:=+@KERNEL_BPF_EVENTS +@KERNEL_CGROUPS +@KERNEL_CGROUP_BPF \ | ||
| +@KERNEL_NAMESPACES +@KERNEL_NET_NS +@TCP_CONG_HTCP +@TCP_CONG_DCTCP \ |
There was a problem hiding this comment.
TCP_CONG_HTCP and TCP_CONG_DCTCP are not OpenWrt Kconfig symbols — they exist only as # CONFIG_… is not set lines in target/linux/generic/config-6.12:6650-6652, with nothing in config/Config-kernel.in exposing them. +@FOO is emitted as select FOO in the generated Config.in, so kconfig warns about an undefined symbol and neither congestion algorithm is actually enabled. Either drop them (documenting them as manual prerequisites, like the other kernel options in the PR description) or land KERNEL_TCP_CONG_* symbols in openwrt first.
Generated by Claude Code
There was a problem hiding this comment.
solved by dropping them and documenting them as manual prerequisites, thanks
Generated by Claude Code
| go_arch=$(subst \ | ||
| aarch64,arm64,$(subst \ | ||
| i386,x86,$(subst \ | ||
| loongarch64,loongarch,$(subst \ | ||
| mipsel,mips,$(subst \ | ||
| mips64,mips,$(subst \ | ||
| mips64el,mips,$(1))))))) | ||
|
|
||
| GO_ARCH:=$(call go_arch,$(ARCH)) | ||
|
|
||
| MAKE_FLAGS += \ | ||
| BPFTUNE_VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \ | ||
| SRCARCH="$(GO_ARCH)" \ |
There was a problem hiding this comment.
Nothing maps x86_64, so on x86/64 SRCARCH stays x86_64 and -D__TARGET_ARCH_x86_64 never satisfies #if defined(__TARGET_ARCH_x86) in vmlinux-fallback.patch — x86 builds silently take the vmlinux_aarch64.h branch. armeb (ixp4xx) and powerpc64 (qoriq) are unmapped too. go_arch/GO_ARCH is a Go-toolchain name lifted from Go packaging, while this value is a kernel __TARGET_ARCH_* suffix.
| go_arch=$(subst \ | |
| aarch64,arm64,$(subst \ | |
| i386,x86,$(subst \ | |
| loongarch64,loongarch,$(subst \ | |
| mipsel,mips,$(subst \ | |
| mips64,mips,$(subst \ | |
| mips64el,mips,$(1))))))) | |
| GO_ARCH:=$(call go_arch,$(ARCH)) | |
| MAKE_FLAGS += \ | |
| BPFTUNE_VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \ | |
| SRCARCH="$(GO_ARCH)" \ | |
| bpf_srcarch=$(subst \ | |
| aarch64,arm64,$(subst \ | |
| armeb,arm,$(subst \ | |
| i386,x86,$(subst \ | |
| x86_64,x86,$(subst \ | |
| loongarch64,loongarch,$(subst \ | |
| mipsel,mips,$(subst \ | |
| mips64,mips,$(subst \ | |
| powerpc64,powerpc,$(1)))))))) | |
| BPF_SRCARCH:=$(call bpf_srcarch,$(ARCH)) | |
| MAKE_FLAGS += \ | |
| BPFTUNE_VERSION="$(PKG_VERSION)-$(PKG_RELEASE)" \ | |
| SRCARCH="$(BPF_SRCARCH)" \ |
Generated by Claude Code
There was a problem hiding this comment.
|
|
||
| procd_open_instance | ||
| procd_set_param file $CONFIGFILE | ||
| config_load 'bpftune' |
There was a problem hiding this comment.
config_load populates the UCI context but nothing reads it back — there is no config_get, so command_args still always comes from the default on line 13. And files/bpftune.confd, now installed as /etc/config/bpftune, is shell syntax (command_args="…"), not UCI config/option stanzas, so it could not supply a value even with a config_get here. Either convert the file to a UCI section and read it (config_get command_args <section> args '-R -c /sys/fs/cgroup'), or drop config_load and CONFIGFILE.
Generated by Claude Code
There was a problem hiding this comment.
| VERSION_SCRIPT := libbpftune.map | ||
|
|
||
| -CFLAGS = -fPIC -Wall -Wextra -g -I../include -std=c99 | ||
| +CFLAGS = -fPIC -Wall -Wextra -g -std=c99 |
There was a problem hiding this comment.
A plain CFLAGS = in the makefile beats the environment, so the TARGET_CFLAGS/TARGET_CPPFLAGS that MAKE_VARS exports never reach the compiler — bpftune and the tuner .sos are built without the target's optimisation, -fhonour-copts and hardening flags. Use += so the upstream flags append instead.
| +CFLAGS = -fPIC -Wall -Wextra -g -std=c99 | |
| +CFLAGS += -fPIC -Wall -Wextra -g -std=c99 |
Generated by Claude Code
There was a problem hiding this comment.
| +ifeq ($(VMLINUX_H),) | ||
| +VMLINUX_H_FILE := $(wildcard $(PKG_BUILD_DIR)/vmlinux.h) |
There was a problem hiding this comment.
PKG_BUILD_DIR is a package-Makefile variable that is neither exported (rules.mk exports only STAGING_DIR*) nor passed via MAKE_FLAGS, so it is empty inside this sub-make: the wildcard can never match, and -I$(PKG_BUILD_DIR) on line 71 would expand to a bare -I if it ever did. The condition is also inverted — ifeq ($(VMLINUX_H),) skips the lookup exactly when a VMLINUX_H has been supplied. Passing PKG_BUILD_DIR="$(PKG_BUILD_DIR)" in MAKE_FLAGS and testing ifneq ($(VMLINUX_H),) would make this block reachable.
Generated by Claude Code
There was a problem hiding this comment.
00cc97d to
6418aec
Compare
| +# Try to reach generated vmlinux.h if it exists | ||
| +ifneq ($(VMLINUX_H),) | ||
| +VMLINUX_H_FILE := $(wildcard $(PKG_BUILD_DIR)/vmlinux.h) | ||
| +endif |
There was a problem hiding this comment.
VMLINUX_H is never set anywhere — not in MAKE_FLAGS, not exported by the build system, not assigned in src/Makefile — so the guard is always false, VMLINUX_H_FILE stays empty and -DVMLINUX_H is never added; passing PKG_BUILD_DIR through MAKE_FLAGS does not help while the block is unreachable. Nothing in the package generates $(PKG_BUILD_DIR)/vmlinux.h either, so the wildcard would not match today even without the guard. Drop the ifneq/endif (or set VMLINUX_H in MAKE_FLAGS) and regenerate the patch with make package/bpftune/refresh so the hunk header matches.
Generated by Claude Code
There was a problem hiding this comment.
| $(INSTALL_DIR) $(1)/etc | ||
| $(INSTALL_DIR) $(1)/etc/config | ||
| $(INSTALL_DIR) $(1)/etc/init.d | ||
| $(INSTALL_DATA) ./files/bpftune.confd $(1)/etc/config/bpftune |
There was a problem hiding this comment.
With config_load now gone from the init script, nothing reads this file, so the command_args override it advertises has no effect — and it is shell syntax sitting in the UCI directory, which is not what /etc/config/ is for. Either make it a real UCI section and read it with config_get in start_service, or drop the file together with its conffiles entry and the /etc/config INSTALL_DIR on line 105.
Generated by Claude Code
There was a problem hiding this comment.
| bpftune aims to provide lightweight, always-on auto-tuning of system | ||
| behaviour. By using BPF observability features, we can continuously | ||
| monitor and adjust system behaviour at a fine grain. (Needs TCP_CONG_HTCP | ||
| and TCP_CONG_DCTCP from target/linux/generated/config.* manually enabled |
There was a problem hiding this comment.
nit: there is no target/linux/generated/ in openwrt — these live in target/linux/generic/config-6.12:6650-6652. Same wording on line 59.
| and TCP_CONG_DCTCP from target/linux/generated/config.* manually enabled | |
| and TCP_CONG_DCTCP from target/linux/generic/config-<version> manually enabled |
Generated by Claude Code
There was a problem hiding this comment.
| bpf_srcarch=$(subst \ | ||
| aarch64,arm64,$(subst \ | ||
| armeb,arm,$(subst \ | ||
| i386,x86,$(subst \ | ||
| x86_64,x86,$(subst \ | ||
| loongarch64,loongarch,$(subst \ | ||
| mipsel,mips,$(subst \ | ||
| mips64,mips,$(subst \ | ||
| powerpc64,powerpc,$(1))))))))) |
There was a problem hiding this comment.
nit: riscv64 is the one remaining OpenWrt ARCH value left unmapped here, so riscv targets get -D__TARGET_ARCH_riscv64 while libbpf's bpf_tracing.h matches on __TARGET_ARCH_riscv. Intentional, or worth adding next to armeb/powerpc64?
| bpf_srcarch=$(subst \ | |
| aarch64,arm64,$(subst \ | |
| armeb,arm,$(subst \ | |
| i386,x86,$(subst \ | |
| x86_64,x86,$(subst \ | |
| loongarch64,loongarch,$(subst \ | |
| mipsel,mips,$(subst \ | |
| mips64,mips,$(subst \ | |
| powerpc64,powerpc,$(1))))))))) | |
| bpf_srcarch=$(subst \ | |
| aarch64,arm64,$(subst \ | |
| armeb,arm,$(subst \ | |
| i386,x86,$(subst \ | |
| x86_64,x86,$(subst \ | |
| loongarch64,loongarch,$(subst \ | |
| mipsel,mips,$(subst \ | |
| mips64,mips,$(subst \ | |
| powerpc64,powerpc,$(subst \ | |
| riscv64,riscv,$(1)))))))))) |
Generated by Claude Code
There was a problem hiding this comment.
| @@ -0,0 +1,2 @@ | |||
| config defaults | |||
There was a problem hiding this comment.
This is an anonymous section, so config_load names it cfg1 (functions.sh:112) and the config_get ARGS defaults command_args in the init script matches nothing. The net effect is worse than the option being ignored: config_get assigns unconditionally, so ARGS ends up empty and bpftune is started with no arguments at all. Name the section.
| config defaults | |
| config defaults 'defaults' |
Generated by Claude Code
There was a problem hiding this comment.
|
|
||
| checkconf() { | ||
| config_load 'bpftune' | ||
| config_get ARGS defaults command_args |
There was a problem hiding this comment.
Without a fourth argument config_get expands to ${CONFIG_defaults_command_args:-}, so a commented-out or removed command_args clears ARGS instead of leaving the default from line 13 in place. Pass the fallback explicitly.
| config_get ARGS defaults command_args | |
| config_get ARGS defaults command_args "$ARGS" |
Generated by Claude Code
There was a problem hiding this comment.
| define Package/bpftune-full | ||
| $(call Package/bpftune/default) | ||
| TITLE:=bpftune with BTF support (might cause crashloops on limited hardware). | ||
| DEPENDS:=+bpftune +@KERNEL_DEBUG_INFO +@KERNEL_DEBUG_INFO_BTF \ |
There was a problem hiding this comment.
+@KERNEL_DEBUG_INFO_BTF becomes a select, but that symbol depends on !KERNEL_DEBUG_INFO_REDUCED and KERNEL_DEBUG_INFO_REDUCED is default y as soon as KERNEL_DEBUG_INFO is on — which this same line selects. So kconfig reports an unmet direct dependency and bpftune-full ships without the BTF it exists to provide; a DEPENDS cannot deselect a symbol, so KERNEL_DEBUG_INFO_REDUCED=n needs listing as a manual prerequisite in the description next to TCP_CONG_HTCP/TCP_CONG_DCTCP.
Generated by Claude Code
There was a problem hiding this comment.
solved by documenting KERNEL_DEBUG_INFO_REDUCED=n as a manual prerequisite in the package description, thanks
Generated by Claude Code
0323719 to
25c4ae7
Compare
Formality Check: Suggestions AvailableWe checked this pull request against the contribution guidelines. Here is what needs your attention:
|
|
Added bpftune-gaming packages based on this fork: https://github.com/KyleGospo/bpftune |
| PKG_SOURCE_DATE:=2026-08-26 | ||
| PKG_SOURCE_VERSION:=f562f776aac16478a2eeae1bf4871a66dd0070c3 | ||
| PKG_MIRROR_HASH:=fb49aaad19ee711226b8bf62ded281e7346750c4e4d08909b2a37ac58765438c | ||
| PKG_BUILD_DIR:=$(BUILD_DIR)/bpftune-$(PKG_VERSION)$(if $(BUILD_VARIANT),-$(BUILD_VARIANT)) |
There was a problem hiding this comment.
The unpack extracts the tarball's own top-level directory — $(PKG_NAME)-$(PKG_VERSION), i.e. bpftune-0.4.2-f562f77 (download.mk:15-16) — into $(PKG_BUILD_DIR)/.. (unpack.mk:6). With -gaming appended to the leaf name the sources land in $(BUILD_DIR)/bpftune-0.4.2-f562f77 and the gaming build dir stays empty, so both gaming variants fail to build. Put the variant in a parent directory, as package.mk:11 and e.g. net/openssh/Makefile:19 do.
| PKG_BUILD_DIR:=$(BUILD_DIR)/bpftune-$(PKG_VERSION)$(if $(BUILD_VARIANT),-$(BUILD_VARIANT)) | |
| PKG_BUILD_DIR:=$(BUILD_DIR)/$(if $(BUILD_VARIANT),bpftune-$(BUILD_VARIANT)/)bpftune-$(PKG_VERSION) |
Generated by Claude Code
There was a problem hiding this comment.
| define Package/bpftune-full/install | ||
| $(call Package/bpftune/install) | ||
| endef |
There was a problem hiding this comment.
bpftune-full sets no VARIANT, so it builds from the same tree as bpftune and now ships a byte-identical file list — both own /usr/sbin/bpftune, /usr/lib/libbpftune.so*, the tuner plugins and the init script, and cannot be co-installed. Since the split is purely about kernel config symbols, drop this block — package-pack.mk:350 guards on ifdef Package/$(1)/install, so an undefined install yields the intended empty meta-package — and put +bpftune back into its DEPENDS on line 46.
Generated by Claude Code
There was a problem hiding this comment.
| define Package/bpftune-gaming | ||
| $(call Package/bpftune/default) | ||
| URL:=https://github.com/KyleGospo/bpftune | ||
| TITLE:=Fork of bpftune with gaming tuner without BTF support (needs TCP_CONG_HTCP and TCP_CONG_DCTCP) | ||
| VARIANT:=gaming | ||
| endef |
There was a problem hiding this comment.
bpftune-gaming installs the same paths as bpftune (/usr/sbin/bpftune, /usr/lib/libbpftune.so*, the tuner plugins, /etc/init.d/bpftune, /etc/config/bpftune) but nothing declares the clash, so both can be selected and the second install overwrites the first. Add a CONFLICTS here and the matching entries to the other three packages.
| define Package/bpftune-gaming | |
| $(call Package/bpftune/default) | |
| URL:=https://github.com/KyleGospo/bpftune | |
| TITLE:=Fork of bpftune with gaming tuner without BTF support (needs TCP_CONG_HTCP and TCP_CONG_DCTCP) | |
| VARIANT:=gaming | |
| endef | |
| define Package/bpftune-gaming | |
| $(call Package/bpftune/default) | |
| URL:=https://github.com/KyleGospo/bpftune | |
| TITLE:=Fork of bpftune with gaming tuner without BTF support (needs TCP_CONG_HTCP and TCP_CONG_DCTCP) | |
| VARIANT:=gaming | |
| CONFLICTS:=bpftune | |
| endef |
Generated by Claude Code
| define Package/bpftune/conffiles | ||
| /etc/config/bpftune | ||
| endef |
There was a problem hiding this comment.
conffiles is read per package (package-pack.mk:383), so bpftune-full, bpftune-gaming and bpftune-gaming-full ship /etc/config/bpftune through the shared install block with nothing marking it as a config file — user edits are lost on upgrade for those three.
| define Package/bpftune/conffiles | |
| /etc/config/bpftune | |
| endef | |
| define Package/bpftune/conffiles | |
| /etc/config/bpftune | |
| endef | |
| define Package/bpftune-full/conffiles | |
| /etc/config/bpftune | |
| endef | |
| define Package/bpftune-gaming/conffiles | |
| /etc/config/bpftune | |
| endef | |
| define Package/bpftune-gaming-full/conffiles | |
| /etc/config/bpftune | |
| endef |
Generated by Claude Code
| PKG_SOURCE_PROTO:=git | ||
| PKG_SOURCE_URL:=https://github.com/KyleGospo/bpftune.git |
There was a problem hiding this comment.
nit: two things about the move to the fork's git tree:
PKG_SOURCE_PROTO:=gitis a last resort in this feed when a release tarball exists; the previous revision fetched a codeload tarball, and that form works against a fork commit too.bpftuneandbpftune-fullare now built from this fork as well, yet still advertiseURL:=https://github.com/oracle/bpftuneon lines 38 and 44. Is the non-gaming build meant to track oracle instead?
Generated by Claude Code
| PKG_MIRROR_HASH:=fb49aaad19ee711226b8bf62ded281e7346750c4e4d08909b2a37ac58765438c | ||
| PKG_BUILD_DIR:=$(BUILD_DIR)/bpftune-$(PKG_VERSION)$(if $(BUILD_VARIANT),-$(BUILD_VARIANT)) | ||
|
|
||
| PKG_LICENSE:=GPL-2.0-WITH-Linux-syscall-note |
There was a problem hiding this comment.
nit: this changed from GPL-2.0-or-later while PKG_LICENSE_FILES still points at the same COPYING, and the commit message says nothing about it. The Linux-syscall-note exception normally covers kernel UAPI headers rather than a userspace project — what in the fork's licensing prompted the switch?
Generated by Claude Code
bpftune aims to provide lightweight, always-on auto-tuning of system behaviour. Adapts the bpftune-gaming fork by KyleGospo for openwrt. https://github.com/KyleGospo/bpftune Signed-off-by: Shon Sebastian <fluffball3@proton.me>
| DEPENDS:=+bpftune +@KERNEL_DEBUG_INFO +@KERNEL_DEBUG_INFO_BTF \ | ||
| +@KERNEL_NAMESPACES +@KERNEL_NET_NS |
There was a problem hiding this comment.
This pulls in the plain bpftune build, not the gaming one, and bpftune-gaming declares CONFLICTS:=bpftune on line 55 — so the BTF-enabled gaming package either ships the non-gaming binary or cannot be co-installed with the variant it is named after.
| DEPENDS:=+bpftune +@KERNEL_DEBUG_INFO +@KERNEL_DEBUG_INFO_BTF \ | |
| +@KERNEL_NAMESPACES +@KERNEL_NET_NS | |
| DEPENDS:=+bpftune-gaming +@KERNEL_DEBUG_INFO +@KERNEL_DEBUG_INFO_BTF \ | |
| +@KERNEL_NAMESPACES +@KERNEL_NET_NS |
Generated by Claude Code
| define Package/bpftune-gaming-full/install | ||
| $(call Package/bpftune-gaming/install) | ||
| endef |
There was a problem hiding this comment.
This is the same duplication just dropped from bpftune-full: the package installs the whole file list of the package it depends on, so both own /usr/sbin/bpftune, /usr/lib/libbpftune.so*, the tuners and the init script. Drop the block so bpftune-gaming-full is an empty meta-package too.
Generated by Claude Code
| define Package/bpftune-full/conffiles | ||
| /etc/config/bpftune | ||
| endef |
There was a problem hiding this comment.
nit: bpftune-full no longer has an install block, so it ships no /etc/config/bpftune to protect and this registers a conffile the package does not contain. Drop it — and lines 129-131 with it, if Package/bpftune-gaming-full/install goes away.
Generated by Claude Code
📦 Package Details
Maintainer: @fluffball3
Description:
bpftune aims to provide lightweight, always-on auto-tuning of system behaviour. By using BPF observability features, we can continuously monitor and adjust system behaviour at a fine grain. Includes gaming tuner from bpftune fork.
Packaged version:
0.4-2-f562f77
Upstream project:
https://github.com/KyleGospo/bpftune
The package includes:
Additional kconfigs required:
Kconfigs required for running bpftune:
Optional ones:
🧪 Run Testing Details
Tested and confirmed legacy and no-BTF modes working using
bpftune -dSbut couldn't achieve full support as mentioned here atleast on my device.Things needing to be fixed:
Legacy mode working: