Skip to content

netfilter: nat: do not use rhltable

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"include/net/netfilter/nf_conntrack.h include/net/netfilter/nf_nat.h net/netfilter/nf_nat_core.c+54 -801 reply
2/2netfilter: nat: use keyed locksnet/netfilter/nf_nat_core.c+24 -120 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 0/2] netfilter: nat: do not use rhltable

This reverts the conversion of the nat bysource table to rhlist that I did last year.

It was a bad idea to begin with.

Fast lookup is not essential; in most cases there is no lookup at all because original tuple is not taken and can be used as-is. What needs to be fast is insertion and deletion.

With rhlist, deletion is slow as it requires a list traversal. So, switch back to a statically-sized table for bysource hash.

 include/net/netfilter/nf_conntrack.h |    3 
 include/net/netfilter/nf_nat.h       |    1 
 net/netfilter/nf_nat_core.c          |  142 ++++++++++++++++-------------------
 3 files changed, 66 insertions(+), 80 deletions(-)