Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5F59C43381 for ; Sun, 31 Mar 2019 00:12:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9AB8120850 for ; Sun, 31 Mar 2019 00:12:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O04GMXLR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731039AbfCaAMA (ORCPT ); Sat, 30 Mar 2019 20:12:00 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42663 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730978AbfCaAMA (ORCPT ); Sat, 30 Mar 2019 20:12:00 -0400 Received: by mail-pl1-f194.google.com with SMTP id cv12so2712635plb.9 for ; Sat, 30 Mar 2019 17:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xHMFlW4kX60fJHN7LAy2ZsS3763uAaBNTnP+uqxUZDo=; b=O04GMXLR6WYj23rh+AxA+kgbdX8oLjlU+c03SYDkLZdHQIXERrshAP7qNxfnkjFmLP N/8C1d3DkvGgJezLV0WQaGDC5fB2a+ub/GZbU+loOObbcN3YM0qFDeePASmgRSsAmJlb wznN8bpZ6BBkWRVMxRTFajb3iAqvWNa+DUkBeuwns6ayoPm7ILMfLm2j8dayUB7DqT3L AyW8prdU0IIyCCI+9gA2sYHeG5gnsG2dVH6ZuVu9fwK6h9HHnL6z5/uVvDx42AIxe4m5 wmDMH7JaitwnqaO96/oFtZL7lgf54LxCuWMhoat4cDFKRSu6Ic0zUBHk1QvNefivfOI8 UkIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xHMFlW4kX60fJHN7LAy2ZsS3763uAaBNTnP+uqxUZDo=; b=bSM3wOeVnBd7MapXMhrkGylHir14FyTwWn3w8xOfSvlXHg8YFAUp6F9eTnAUSIMpFV Zc2zg5VjzR3YXSWfe4K7a1iRDI2GnqQnkyT3FwEn0Lq7V23L14EOYXF4lIYGmCJokliy 8ZV0Fck87m3xX+ZadlkkEDJXVSt9tBYF7HdtI/Fvuuwt4Zka/FJeo4cyO4cF0wRlDfiu vk7CHYJODazK/aanZyOQMh1uE1U+1y/gbWzobp1I+61hz/uqPIaKwXGtsAI0JwvWnWU4 XB/r8yFYFyqTHSB6igo7dseGGE/pwgNhqrDNeoaq57/w5XTH5pBMWRzzDZvJaYU4buZO PHgQ== X-Gm-Message-State: APjAAAW5lYs17xTG4InCcAy+g1T8hxcGUNUYydq6mBWBBsxWn11Dal3W FGsFR2RUQXDOt+emEIHxRzE= X-Google-Smtp-Source: APXvYqx2LMxe3SfWJGdtnwzlz1ZnmQ2eXKzAANiCJqdaE80Wmb2GvmTnEvQPHhPNK7hQflf3TqyYaA== X-Received: by 2002:a17:902:f094:: with SMTP id go20mr34031070plb.159.1553991119381; Sat, 30 Mar 2019 17:11:59 -0700 (PDT) Received: from ?IPv6:2601:284:8200:5cfb:34a5:69f:cf0f:3ef0? ([2601:284:8200:5cfb:34a5:69f:cf0f:3ef0]) by smtp.googlemail.com with ESMTPSA id u15sm9256223pfm.163.2019.03.30.17.11.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2019 17:11:58 -0700 (PDT) Subject: Re: [PATCH net-next 3/8] ipv4: Move cached routes to fib_nh_common To: David Ahern , davem@davemloft.net, netdev@vger.kernel.org Cc: idosch@mellanox.com References: <20190330004731.23959-1-dsahern@kernel.org> <20190330004731.23959-4-dsahern@kernel.org> From: David Ahern Message-ID: Date: Sat, 30 Mar 2019 18:11:56 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190330004731.23959-4-dsahern@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 3/29/19 6:47 PM, David Ahern wrote: > From: David Ahern > > While the cached routes, nh_pcpu_rth_output and nh_rth_input, are IPv4 > specific, a later patch wants to make them accessible for IPv6 > gateways with IPv4 routes but also allow IPv6 routes to have their own > cached entries. Move the IPv4 cached routes from fib_nh to fib_nh_common > and update references. > > Signed-off-by: David Ahern > --- > include/net/ip_fib.h | 6 ++++-- > net/ipv4/fib_semantics.c | 33 +++++++++++++++++---------------- > net/ipv4/route.c | 18 +++++++++--------- > 3 files changed, 30 insertions(+), 27 deletions(-) > > diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h > index 5070bc531ca4..cce437a1b2ff 100644 > --- a/include/net/ip_fib.h > +++ b/include/net/ip_fib.h > @@ -92,6 +92,10 @@ struct fib_nh_common { > > int nhc_weight; > atomic_t nhc_upper_bound; > + > + /* v4 specific, but allows v6 gw with v4 routes */ > + struct rtable __rcu * __percpu *nhc_pcpu_rth_output; > + struct rtable __rcu *nhc_rth_input; > }; > Dave: please drop this set. I need to take another look at the combinations and make sure I did not miss something.