Repository navigation
Merged
Conversation
This was referenced Nov 12, 2026
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.
Part of #542.
This PR adds the expressions
numgenandhashof nf_tables and more keys ofmeta, as nft_numgen.c, nft_hash.c and nft_meta.c of Linux. It is for the "sets and maps" and "optimizations" groups of tools/nftables/report.md.numgengives a counter (inc) or a random number (random) modulo a value, plus an offset.hashgives the jhash of registers (jhash) or the symmetric hash of the flow (symhash) modulo a value, plus an offset.metakeys:priority,pkttype,cpu,iifgroup,oifgroup,random,iifkind,oifkind,time,day,hour,sdifandsdifname. A rule can also setmeta priorityandmeta pkttype. A packet now has a priority and a type, asskb->priorityandskb->pkt_type.meta iifandmeta iifnameof a packet with no device give 0 and "", as in Linux.Tests
The tests/shell dirs that the change touches: json, maps, nft-f, optimizations, sets and transactions, 222 tests. The kernel had nft-27 (#707) and this PR.
meta iifgroup, still fails.cargo xtask boot-test inetpasses.RK_AARCH64_TESTS=inet cargo xtask boot-test aarch64passes: inet, inet with virtio-pci, and inet with virtio-pci behind a bridge. The load average of server2 was 25.68, 27.38, 28.93 at the start and 18.43, 21.37, 25.94 at the end.The full gate did not run.