[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181030.113147.173837020180526004.davem@davemloft.net>
Date: Tue, 30 Oct 2018 11:31:47 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: 0xeffeff@...il.com
Cc: netdev@...r.kernel.org, kuznet@....inr.ac.ru,
yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global
hashtable
From: Jeff Barnhill <0xeffeff@...il.com>
Date: Tue, 30 Oct 2018 07:10:58 -0400
> I originally started implementing it the way you suggested; however,
> it seemed to complicate management of that structure because it isn't
> currently using rcu. Also, assuming that can be worked out, where
> would I get the net from? Would I need to store a copy in ifcaddr6,
> or is there some way to access it during ipv6_chk_acast_addr()? It
> seems that if I don't add a copy of net, but instead access it through
> aca_rt(?), then freeing the ifcaddr6 memory becomes problematic
> (detaching it from idev, while read_rcu may still be accessing it).
> On Mon, Oct 29, 2018 at 11:32 PM David Miller <davem@...emloft.net> wrote:
I don't think converting the structure over to RCU, especially because
all of the read paths (everything leading to ipv6_chk_acast_dev()) are
taking RCU locks already.
And I cannot understand how having _two_ structures to manage a piece
of information can be less complicated than just one.
You can add a backpointer to the 'idev' in ifacaddr6 to get at the
network namespace. You don't even need to do additional reference
counting because the idev->ac_list is always purged before an idev
is destroyed.
Powered by blists - more mailing lists