netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Barnhill <0xeffeff@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	yoshfuji@linux-ipv6.org
Subject: Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable
Date: Tue, 30 Oct 2018 07:10:58 -0400	[thread overview]
Message-ID: <CAL6e_pfB=8RE6XFTVj6Bz2qHRstPciS6x3TdHggxwcJqcAtwVQ@mail.gmail.com> (raw)
In-Reply-To: <20181029.203211.604037421868394185.davem@davemloft.net>

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@davemloft.net> wrote:
>
> From: Jeff Barnhill <0xeffeff@gmail.com>
> Date: Sun, 28 Oct 2018 01:51:59 +0000
>
> > +struct ipv6_ac_addrlist {
> > +     struct in6_addr         acal_addr;
> > +     possible_net_t          acal_pnet;
> > +     refcount_t              acal_users;
> > +     struct hlist_node       acal_lst; /* inet6_acaddr_lst */
> > +     struct rcu_head         rcu;
> > +};
>
> Please just add the hlist to ifcaddr6 instead of duplicating so much
> information and reference counters here.
>
> This seems to waste a lot of memory unnecessary and add lots of
> unnecessary object allocate/setup/destroy logic.

  reply	other threads:[~2018-10-30 20:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  2:12 [PATCH net] net/ipv6: Add anycast addresses to a global hashtable Jeff Barnhill
2018-10-23  2:26 ` Eric Dumazet
2018-10-23 18:21   ` Jeff Barnhill
2018-10-24  1:58     ` [PATCH net v2] " Jeff Barnhill
2018-10-24  3:12       ` Eric Dumazet
2018-10-24  5:06         ` Jeff Barnhill
2018-10-26 21:22           ` [PATCH net v3] " Jeff Barnhill
2018-10-26 21:44             ` David Ahern
2018-10-27 18:02               ` [PATCH net v4] " Jeff Barnhill
2018-10-27 23:39                 ` David Ahern
2018-10-28  1:27                   ` Jeff Barnhill
2018-10-28  1:51                     ` [PATCH net v5] " Jeff Barnhill
2018-10-30  3:32                       ` David Miller
2018-10-30 11:10                         ` Jeff Barnhill [this message]
2018-10-30 18:31                           ` David Miller
2018-10-30 22:06                             ` David Ahern
2018-10-30 23:19                               ` David Miller
2018-11-01  0:02                                 ` Jeff Barnhill
2018-11-01  0:14                                   ` [PATCH net v6] " Jeff Barnhill
2018-11-01  5:34                                     ` Stephen Hemminger
2018-11-02 20:23                                       ` [PATCH net v7] " Jeff Barnhill
2018-11-03  6:55                                         ` David Miller
2018-11-01  2:53                                   ` [PATCH net v5] " David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL6e_pfB=8RE6XFTVj6Bz2qHRstPciS6x3TdHggxwcJqcAtwVQ@mail.gmail.com' \
    --to=0xeffeff@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).