Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-31 Thread David Ahern
On 10/31/18 6:02 PM, Jeff Barnhill wrote: > I'll follow this email with a new patch using ifacaddr6 instead of > creating a new struct. I ended up using fib6_nh.nh_dev to get the net, > instead of adding a back pointer to idev. It seems that idev was > recently removed in lieu of this, so if this

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-31 Thread Jeff Barnhill
I'll follow this email with a new patch using ifacaddr6 instead of creating a new struct. I ended up using fib6_nh.nh_dev to get the net, instead of adding a back pointer to idev. It seems that idev was recently removed in lieu of this, so if this is incorrect, please let me know. Hopefully, I got

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-30 Thread David Miller
From: David Ahern Date: Tue, 30 Oct 2018 16:06:46 -0600 > or make the table per namespace. This will increase namespace create/destroy cost, so I'd rather not for something like this.

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-30 Thread David Ahern
On 10/30/18 12:31 PM, David Miller wrote: > From: Jeff Barnhill <0xeff...@gmail.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. A

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-30 Thread David Miller
From: Jeff Barnhill <0xeff...@gmail.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

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-30 Thread Jeff Barnhill
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

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-29 Thread David Miller
From: Jeff Barnhill <0xeff...@gmail.com> Date: Sun, 28 Oct 2018 01:51:59 + > +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_ls

[PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-27 Thread Jeff Barnhill
icmp6_send() function is expensive on systems with a large number of interfaces. Every time it’s called, it has to verify that the source address does not correspond to an existing anycast address by looping through every device and every anycast address on the device. This can result in significa