ebpf: fold the lookup helpers into the lookup - #780
Merged
Merged
Conversation
lneto
force-pushed
the
claude_ebpf_lookup
branch
2 times, most recently
from
September 4, 2026 22:38
db41c49 to
20f2c52
Compare
lneto
force-pushed
the
claude_percpu_object
branch
from
September 4, 2026 22:38
5c2eddb to
d7c3441
Compare
lneto
force-pushed
the
claude_ebpf_lookup
branch
from
September 4, 2026 22:41
20f2c52 to
8d16881
Compare
lneto
force-pushed
the
claude_percpu_object
branch
2 times, most recently
from
September 4, 2026 22:42
fa86fce to
41d4314
Compare
lneto
force-pushed
the
claude_ebpf_lookup
branch
from
September 4, 2026 22:42
8d16881 to
fba9af6
Compare
lunatik_ebpf_checkkey carried an out parameter and a return code for two lines with one caller, and lunatik_ebpf_checkruntimes returned an int for the caller to test while the table it fetched sat in a global. The key check is inline now, and lunatik_ebpf_getruntimes returns the table it caches, so the lookup reads top to bottom: key, table, runtime, context. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lneto
force-pushed
the
claude_ebpf_lookup
branch
from
September 4, 2026 22:48
fba9af6 to
0c4375a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopens #773, which GitHub merged into its base branch while #762 was still open; #762 is on master now, and this is rebased onto it. The fold only exists once the second table,
_ENV.percpu, is gone.lunatik_ebpf_checkkeycarried an out parameter and a return code for two lines with one caller, andlunatik_ebpf_checkruntimesreturned an int for the caller to test while the table it fetched sat in a global. The key check is inline, andlunatik_ebpf_getruntimesreturns the table it caches, so the lookup is key, table, runtime, context.lunatik_ebpf_getctxloses a staged local. No behaviour change; the xdp and tc suites cover it, and the process-context case still fails with the refusal disabled.The cache of
_ENV.runtimesstays. Dropping it would readlunatik_envper packet, and that pointer is freed whenlunatik_rununloads while a pinned kfunc module can still receive packets; the cache holds its own reference, so it goes stale across such a reload but never dangles.Tested on 6.8.0-138 (aarch64): runtime 17/17, xdp 7/7, tc 6/6, clean dmesg.
🤖 Generated with Claude Code