From: Qingfang Deng <hidden> Date: 2026-09-09 08:17:18
nf_flow_table_cleanup() walks every registered flow table, checking the
network namespace for each flow in nf_flow_table_do_cleanup(). As a
result, tables in other namespaces are still iterated and their cleanup
work is flushed.
Compare the flow table's namespace with the device's namespace in
nf_flow_table_cleanup() and skip nonmatching tables. This avoids
unnecessary iteration and work flushing, and leaves the per-flow cleanup
callback to check only the interface index.
Signed-off-by: Qingfang Deng <redacted>
---
net/netfilter/nf_flow_table_core.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
From: Phil Sutter <phil@nwl.cc> Date: 2026-09-09 11:16:27
Hi,
On Wed, Sep 09, 2026 at 04:17:04PM +0800, Qingfang Deng wrote:
quoted hunk
nf_flow_table_cleanup() walks every registered flow table, checking the
network namespace for each flow in nf_flow_table_do_cleanup(). As a
result, tables in other namespaces are still iterated and their cleanup
work is flushed.
Compare the flow table's namespace with the device's namespace in
nf_flow_table_cleanup() and skip nonmatching tables. This avoids
unnecessary iteration and work flushing, and leaves the per-flow cleanup
callback to check only the interface index.
Signed-off-by: Qingfang Deng <redacted>
---
net/netfilter/nf_flow_table_core.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
A second caller of nf_flow_table_gc_cleanup is
nf_flow_table_indr_cleanup in net/netfilter/nf_flow_table_offload.c. Is
the net_eq-check needed there as well? If not, could you please update
the patch description with a statement explaining why?
Thanks, Phil
From: Qingfang Deng <hidden> Date: 2026-09-09 14:18:26
Hi,
On 9/9/2026 7:16 PM, Phil Sutter wrote:
A second caller of nf_flow_table_gc_cleanup is
nf_flow_table_indr_cleanup in net/netfilter/nf_flow_table_offload.c. Is
the net_eq-check needed there as well? If not, could you please update
the patch description with a statement explaining why?
No. Its callback uses the device bound to the flowtable, which belongs to the same namespace.
Kind regards,
Qingfang