]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: flowtable: Add pending bit for offload work
authorPaul Blakey <paulb@mellanox.com>
Wed, 6 May 2020 11:24:39 +0000 (14:24 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 11 May 2020 14:26:33 +0000 (16:26 +0200)
commit478c7d840af169980b9f0b4c0e97b17f64f2678e
tree5b4b9c2b376a5327a3b5f6a9fd62b424f0be8877
parent89c365785ff040e7fbbd284ffd18f12231c40de0
netfilter: flowtable: Add pending bit for offload work

Gc step can queue offloaded flow del work or stats work.
Those work items can race each other and a flow could be freed
before the stats work is executed and querying it.
To avoid that, add a pending bit that if a work exists for a flow
don't queue another work for it.
This will also avoid adding multiple stats works in case stats work
didn't complete but gc step started again.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_flow_table.h
net/netfilter/nf_flow_table_offload.c