[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190304141558.061824a7@cakuba.netronome.com>
Date:   Mon, 4 Mar 2019 14:15:58 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH net-next v3 2/3] xdp: Always use a devmap for
 XDP_REDIRECT to a device
On Mon, 04 Mar 2019 20:05:30 +0100, Toke Høiland-Jørgensen wrote:
> > Hm.  I think you'll still need a lock (mutex?) on the alloc path, but
> > the free path should be fine as long as you load the map pointer before
> > looking at the refcnt (atomic op ensuring the barrier there).  
> 
> Yeah, for the per-namespace refcnt it's pretty straight forward, the
> trouble is the global count that needs to iterate over all namespaces;
> probably need to put that all behind a (non-spin)lock, right?
Because net iteration is under RCU?  You can switch to taking
net_rwsem for that one, no?  I'm probably confused again ;)
Powered by blists - more mailing lists
 
