Skip to content

netfilter: nf_nat_masquerade: don't block rtnl lock

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: nf_nat_masquerade: make async masq_inet6_event handling genericnet/netfilter/nf_nat_masquerade.c+75 -470 replies
2/2netfilter: nf_nat_masquerade: defer conntrack walk to work queuenet/netfilter/nf_nat_masquerade.c+24 -260 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchMartin Zaharinov
1/2
2/2Reported-and-tested-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH nf 0/2] netfilter: nf_nat_masquerade: don't block rtnl lock

nf_nat_masquerade registers conntrack notifiers to early-expire conntracks that have been using the downed device/removed address.

With large number of disappearing devices (ppp), iterating the table for every notification blocks the rtnl lock for multiple seconds.

This change unconditionally defers the walk to the system work queue so that rtnl lock is not blocked longer than needed.

This is not a regression, the notifier and cleanup walk have existed since the functionality was added more than 20 years ago.

Florian Westphal (2):
netfilter: nf_nat_masquerade: make async masq_inet6_event handling
generic
netfilter: nf_nat_masquerade: defer conntrack walk to work queue

 net/netfilter/nf_nat_masquerade.c | 168 +++++++++++++++++-------------
 1 file changed, 97 insertions(+), 71 deletions(-)
Signature · 1 line
2.32.0