netfilter: rework conntrack/flowtable interaction
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | netfilter: nft_flow_offload: clear tcp MAXACK flag before moving to slowpathnet/ | +12 | 0 replies | |
| 2/7 | netfilter: nft_flow_offload: update tcp state flags under locknet/ | +11 | 0 replies | |
| 3/7 | netfilter: conntrack: remove skb argument from nf_ct_refreshinclude/ net/ net/ +4 more | +13 | 0 replies | |
| 4/7 | netfilter: flowtable: prefer plain nf_ct_refresh for setting initial timeoutnet/ | +1 | 0 replies | |
| 5/7 | netfilter: conntrack: rework offload nf_conn timeout extension logicinclude/ net/ net/ | +99 | 1 reply | |
| 6/7 | netfilter: nft_flow_offload: never grow the timeout when moving packets back to slowpathnet/ | +62 | 0 replies | |
| 7/7 | netfilter: nft_flow_offload: do not remove flowtable entry for fin packetsnet/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/7] netfilter: rework conntrack/flowtable interaction
This series resolves a few problems with flowtables when entries are moved from offload (hw/sw offload) back to the conntrack slowpath.
First patch fixes conntrack reset validation, we must clear MAXACK flag on reset packets in the sw flow offload path, conntrack state is stale, it cannot validate reset sequence number.
Second patch adds mandatory locking when manipulating ct state flags.
Third patch is a cleanup patch so existing API can be re-used when we lack an skb.
Patch 4 is a small preparation patch to reuse existing api and get rid of redundant one later.
Patch 5 moves timeout extension logic from conntrack GC to flowtable GC worker.
Patch 6 prevents accidental unwanted growth of conntrack timeout when handling packets of same flow in slowpath at same time.
Patch 7 is an optimization to keep entry in software flowtable when a fin is received.
NB: nftables flowtable selftest needs a minor fixup to exect 300s timeout instead of 5 days after inital move to slowpath, this is the only observed failure with nf kselftests or nftables shell tests.
Florian Westphal (7):
netfilter: nft_flow_offload: clear tcp MAXACK flag before moving to
slowpath
netfilter: nft_flow_offload: update tcp state flags under lock
netfilter: conntrack: remove skb argument from nf_ct_refresh
netfilter: flowtable: prefer plain nf_ct_refresh for setting initial
timeout
netfilter: conntrack: rework offload nf_conn timeout extension logic
netfilter: nft_flow_offload: never grow the timeout when moving
packets back to slowpath
netfilter: nft_flow_offload: do not remove flowtable entry for fin
packets
Patches vs. nf-next, but could be applied to nf too.
include/net/netfilter/nf_conntrack.h | 18 +-- net/netfilter/nf_conntrack_amanda.c | 2 +- net/netfilter/nf_conntrack_broadcast.c | 2 +- net/netfilter/nf_conntrack_core.c | 13 +- net/netfilter/nf_conntrack_h323_main.c | 4 +- net/netfilter/nf_conntrack_sip.c | 4 +- net/netfilter/nf_flow_table_core.c | 200 ++++++++++++++++++++++--- net/netfilter/nf_flow_table_ip.c | 5 +- net/netfilter/nft_ct.c | 2 +- net/netfilter/nft_flow_offload.c | 16 +- 10 files changed, 207 insertions(+), 59 deletions(-)
Signature · 1 line
2.44.2