All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next 0/9] netfilter: nft_meta: add support for slave device matching
@ 2019-12-18 11:05 Florian Westphal
  2019-12-18 11:05 ` [PATCH nf-next 1/9] netfilter: nft_meta: move time handling to helper Florian Westphal
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Florian Westphal @ 2019-12-18 11:05 UTC (permalink / raw)
  To: netfilter-devel

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%



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-12-26 16:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-18 11:05 [PATCH nf-next 0/9] netfilter: nft_meta: add support for slave device matching Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 1/9] netfilter: nft_meta: move time handling to helper Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 2/9] netfilter: nft_meta: move pkttype " Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 3/9] netfilter: nft_meta: move sk uid/git " Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 4/9] netfilter: nft_meta: move cgroup " Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 5/9] netfilter: nft_meta: move interface kind " Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 6/9] netfilter: nft_meta: move all interface related keys " Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 7/9] netfilter: nft_meta: place prandom handling in a helper Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 8/9] netfilter: nft_meta: place rtclassid " Florian Westphal
2019-12-18 11:05 ` [PATCH nf-next 9/9] netfilter: nft_meta: add support for slave device ifindex matching Florian Westphal
2019-12-19 16:46   ` David Ahern
2019-12-19 17:08     ` Florian Westphal
2019-12-20  1:27       ` David Ahern
2019-12-26 16:42 ` [PATCH nf-next 0/9] netfilter: nft_meta: add support for slave device matching Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.