Skip to content

nf_tables: avoid retpoline overhead on set lookups

Florian Westphal netfilter-devel 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2netfilter: add and use nft_set_do_lookup helperinclude/net/netfilter/nf_tables_core.h net/netfilter/nft_lookup.c net/netfilter/nft_objref.c+11 -40 replies
2/2netfilter: nf_tables: prefer direct calls for set lookupsinclude/net/netfilter/nf_tables_core.h net/netfilter/nft_lookup.c net/netfilter/nft_set_bitmap.c +4 more+73 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf-next 0/2] nf_tables: avoid retpoline overhead on set lookups

This adds a nft_set_do_lookup() helper, then extends it to use direct calls when RETPOLINE feature is enabled.

For non-retpoline builds, nft_set_do_lookup() inline helper does a indirect call. INDIRECT_CALLABLE_SCOPE macro allows to keep the lookup functions static in this case.

Florian Westphal (2):
netfilter: add and use nft_set_do_lookup helper
netfilter: nf_tables: prefer direct calls for set lookups

 include/net/netfilter/nf_tables_core.h | 30 ++++++++++++++++++++++
 net/netfilter/nft_lookup.c             | 35 ++++++++++++++++++++++++--
 net/netfilter/nft_objref.c             |  4 +--
 net/netfilter/nft_set_bitmap.c         |  5 ++--
 net/netfilter/nft_set_hash.c           | 17 +++++++------
 net/netfilter/nft_set_pipapo.c         |  5 ++--
 net/netfilter/nft_set_pipapo_avx2.h    |  2 --
 net/netfilter/nft_set_rbtree.c         |  5 ++--
 8 files changed, 84 insertions(+), 19 deletions(-)
Signature · 1 line
2.26.3