From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net] net/ipv6: Add anycast addresses to a global hashtable Date: Mon, 22 Oct 2018 19:26:28 -0700 Message-ID: References: <20181023021207.17072-1-0xeffeff@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org To: Jeff Barnhill <0xeffeff@gmail.com>, netdev@vger.kernel.org Return-path: Received: from mail-pg1-f195.google.com ([209.85.215.195]:40756 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbeJWKro (ORCPT ); Tue, 23 Oct 2018 06:47:44 -0400 Received: by mail-pg1-f195.google.com with SMTP id o14-v6so4205395pgv.7 for ; Mon, 22 Oct 2018 19:26:31 -0700 (PDT) In-Reply-To: <20181023021207.17072-1-0xeffeff@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/22/2018 07:12 PM, Jeff Barnhill wrote: > 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 significant delays for a CPU when there are a large number of > neighbors and ND timers are frequently timing out and calling > neigh_invalidate(). > > Add anycast addresses to a global hashtable to allow quick searching for > matching anycast addresses. This is based on inet6_addr_lst in addrconf.c. > I do not see this patch being netns aware ? Also I believe you misunderstood what was stored in net->ifindex You can look at dev_new_index() for what I mean.