netfilter: nft_meta: add support for slave device matching
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | netfilter: nft_meta: move time handling to helpernet/ | +22 | 0 replies | |
| 2/9 | netfilter: nft_meta: move pkttype handling to helpernet/ | +51 | 0 replies | |
| 3/9 | netfilter: nft_meta: move sk uid/git handling to helpernet/ | +36 | 0 replies | |
| 4/9 | netfilter: nft_meta: move cgroup handling to helpernet/ | +15 | 0 replies | |
| 5/9 | netfilter: nft_meta: move interface kind handling to helpernet/ | +25 | 0 replies | |
| 6/9 | netfilter: nft_meta: move all interface related keys to helpernet/ | +70 | 0 replies | |
| 7/9 | netfilter: nft_meta: place prandom handling in a helpernet/ | +9 | 0 replies | |
| 8/9 | netfilter: nft_meta: place rtclassid handling in a helpernet/ | +16 | 0 replies | |
| 9/9 | netfilter: nft_meta: add support for slave device ifindex matchinginclude/ net/ | +73 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/9] netfilter: nft_meta: add support for slave device matching
Martin Willi recently proposed addition of new xt_slavedev module to allow matching the real interface within a VRF domain.
This adds an nft equivalent:
meta sdif "realdev" accept
meta sdifname "realdev" accept
In case packet had no vrf slave, sdif stores 0 or "" name, just like 'oif/oifname' would on input.
sdif(name) is restricted to the ipv4/ipv6 input and forward hooks, as it depends on ip(6) stack parsing/storing info in skb->cb[].
Because meta main eval function is now exceeding more than 200 LOC, the first patches are diet work to debloat the function by using helpers where appropriate.
Last patch adds the sdif/sdifname functionality.
Function old new delta nft_meta_get_eval_pkttype_lo - 588 +588 nft_meta_get_eval_time - 404 +404 nft_meta_get_eval_skugid - 397 +397 nft_meta_get_eval_cgroup - 234 +234 nft_meta_get_eval_sif - 148 +148 nft_meta_get_eval_kind - 138 +138 nft_meta_get_eval_sifname - 91 +91 nft_meta_get_validate 111 169 +58 nft_prandom_u32 - 20 +20
nft_meta_get_eval 2904 1261 -1643
Total: Before=6076, After=6511, chg +7.16%