Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Pablo Neira Ayuso
On Wed, May 06, 2020 at 02:24:39PM +0300, Paul Blakey wrote: > 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

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Roi Dayan
On 2020-05-11 2:59 PM, Pablo Neira Ayuso wrote: > On Mon, May 11, 2020 at 11:32:36AM +0300, Paul Blakey wrote: >> On 5/11/2020 1:14 AM, Pablo Neira Ayuso wrote: > [...] @@ -831,9 +832,14 @@ static void flow_offload_queue_work(struct flow_offload_work *offload) { struct f

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Roi Dayan
On 2020-05-11 2:59 PM, Pablo Neira Ayuso wrote: > On Mon, May 11, 2020 at 11:32:36AM +0300, Paul Blakey wrote: >> On 5/11/2020 1:14 AM, Pablo Neira Ayuso wrote: > [...] @@ -831,9 +832,14 @@ static void flow_offload_queue_work(struct flow_offload_work *offload) { struct f

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Pablo Neira Ayuso
On Mon, May 11, 2020 at 11:32:36AM +0300, Paul Blakey wrote: > On 5/11/2020 1:14 AM, Pablo Neira Ayuso wrote: [...] > >> @@ -831,9 +832,14 @@ static void flow_offload_queue_work(struct > >> flow_offload_work *offload) > >> { > >>struct flow_offload_work *offload; > >> > >> + if (test_and_s

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-11 Thread Paul Blakey
On 5/11/2020 1:14 AM, Pablo Neira Ayuso wrote: > Hi, > > On Wed, May 06, 2020 at 02:24:39PM +0300, Paul Blakey wrote: >> 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

Re: [PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-10 Thread Pablo Neira Ayuso
Hi, On Wed, May 06, 2020 at 02:24:39PM +0300, Paul Blakey wrote: > 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

[PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-06 Thread Paul Blakey
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 m