Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-12 Thread John Fastabend
On 16-09-11 11:12 PM, Cong Wang wrote: > On Fri, Sep 9, 2016 at 8:52 AM, John Fastabend > wrote: >> On 16-09-08 10:26 PM, Cong Wang wrote: >>> On Thu, Sep 8, 2016 at 8:51 AM, Eric Dumazet wrote: On Thu, 2016-09-08 at 08:47 -0700, John Fastabend wrote: > Works for me. FWIW I find th

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-11 Thread Cong Wang
On Fri, Sep 9, 2016 at 8:52 AM, John Fastabend wrote: > On 16-09-08 10:26 PM, Cong Wang wrote: >> On Thu, Sep 8, 2016 at 8:51 AM, Eric Dumazet wrote: >>> On Thu, 2016-09-08 at 08:47 -0700, John Fastabend wrote: >>> Works for me. FWIW I find this plenty straightforward and don't really s

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-11 Thread Cong Wang
On Fri, Sep 9, 2016 at 5:23 AM, Eric Dumazet wrote: > On Thu, 2016-09-08 at 22:24 -0700, Cong Wang wrote: >> On Thu, Sep 8, 2016 at 8:35 AM, Eric Dumazet wrote: >> > From: Eric Dumazet >> > >> > As reported by Cong Wang, I was lazy when I did initial RCU conversion >> > of tc_mirred, as I though

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-09 Thread John Fastabend
On 16-09-08 10:26 PM, Cong Wang wrote: > On Thu, Sep 8, 2016 at 8:51 AM, Eric Dumazet wrote: >> On Thu, 2016-09-08 at 08:47 -0700, John Fastabend wrote: >> >>> Works for me. FWIW I find this plenty straightforward and don't really >>> see the need to make the hash table itself rcu friendly. >>> >>

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-09 Thread Eric Dumazet
On Thu, 2016-09-08 at 22:59 -0700, Cong Wang wrote: > On Thu, Sep 8, 2016 at 10:48 PM, Alexei Starovoitov > wrote: > > > > imo the deliberate small race in Eric's initial lock removal in mirred > > was a good design choice. I think he did this patch only to > > silence the complains with the code

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-09 Thread Eric Dumazet
On Thu, 2016-09-08 at 22:24 -0700, Cong Wang wrote: > On Thu, Sep 8, 2016 at 8:35 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > As reported by Cong Wang, I was lazy when I did initial RCU conversion > > of tc_mirred, as I thought I could avoid allocation/freeing of a > > parameter block.

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-09 Thread Eric Dumazet
On Thu, 2016-09-08 at 22:26 -0700, Cong Wang wrote: > On Thu, Sep 8, 2016 at 8:51 AM, Eric Dumazet wrote: > > On Thu, 2016-09-08 at 08:47 -0700, John Fastabend wrote: > > > >> Works for me. FWIW I find this plenty straightforward and don't really > >> see the need to make the hash table itself rcu

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread Cong Wang
On Thu, Sep 8, 2016 at 10:48 PM, Alexei Starovoitov wrote: > > imo the deliberate small race in Eric's initial lock removal in mirred > was a good design choice. I think he did this patch only to > silence the complains with the code instead of arguing with words. > imo the initial code is good as

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread Alexei Starovoitov
On Thu, Sep 08, 2016 at 10:24:32PM -0700, Cong Wang wrote: > On Thu, Sep 8, 2016 at 8:35 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > As reported by Cong Wang, I was lazy when I did initial RCU conversion > > of tc_mirred, as I thought I could avoid allocation/freeing of a > > parameter

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread Cong Wang
On Thu, Sep 8, 2016 at 8:51 AM, Eric Dumazet wrote: > On Thu, 2016-09-08 at 08:47 -0700, John Fastabend wrote: > >> Works for me. FWIW I find this plenty straightforward and don't really >> see the need to make the hash table itself rcu friendly. >> >> Acked-by: John Fastabend >> > > Yes, it seem

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread Cong Wang
On Thu, Sep 8, 2016 at 8:35 AM, Eric Dumazet wrote: > From: Eric Dumazet > > As reported by Cong Wang, I was lazy when I did initial RCU conversion > of tc_mirred, as I thought I could avoid allocation/freeing of a > parameter block. Quote from Eric Dumazet: https://www.mail-archive.com/netdev@

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread Eric Dumazet
On Thu, 2016-09-08 at 08:47 -0700, John Fastabend wrote: > Works for me. FWIW I find this plenty straightforward and don't really > see the need to make the hash table itself rcu friendly. > > Acked-by: John Fastabend > Yes, it seems this hash table is used in control path, with RTNL held anyw

Re: [PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread John Fastabend
On 16-09-08 08:35 AM, Eric Dumazet wrote: > From: Eric Dumazet > > As reported by Cong Wang, I was lazy when I did initial RCU conversion > of tc_mirred, as I thought I could avoid allocation/freeing of a > parameter block. > > Use an intermediate object so that fast path can get a consistent >

[PATCH net] net_sched: act_mirred: full rcu conversion

2016-09-08 Thread Eric Dumazet
From: Eric Dumazet As reported by Cong Wang, I was lazy when I did initial RCU conversion of tc_mirred, as I thought I could avoid allocation/freeing of a parameter block. Use an intermediate object so that fast path can get a consistent snapshot of multiple variables (dev, action, eaction, ok_p