From mboxrd@z Thu Jan 1 00:00:00 1970 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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 9ABEFC43461 for ; Fri, 11 Sep 2020 17:06:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 607DE214F1 for ; Fri, 11 Sep 2020 17:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgIKRGr (ORCPT ); Fri, 11 Sep 2020 13:06:47 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:59691 "EHLO wout4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbgIKPCH (ORCPT ); Fri, 11 Sep 2020 11:02:07 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 395B25FD; Fri, 11 Sep 2020 11:01:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 11 Sep 2020 11:01:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ZBkwRA 7NmwUIgfCFhD2iLxQnKMFDDovL9M6lmFS46ow=; b=A1ik8nc8LZ9AWKjiayh8O+ fJdFJXuFItVrQfswB+zyayrCQK6humK1oV04XhgKTRc+K37iKx5fy+ci2+0y+bsJ DD3HStGm6RJHmZbtsNz0uTJ7Ux2plPHEwe2yJXVMiMJVzKZsmnyooZoEwbiS8zI9 3VSzum/bdU1+487G++WH59uAGO6sWzgllz4aHHKzj7+O4wd40aUmJtbuHNdfvMpr ckCGpmVknJEUW067tvOAwV28Kxke1XRLwz2b2HxHCHsFGZbUEj0KSlkqEd8w8B7M T49eRkoaC+Yn1geFy5qKNjE6gBvFWhayo0ilQTrjRsACNEuqQESakFyuYSej+HrA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudehledgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucfkphepkeegrddvvdelrdefiedrudefudenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: from localhost (igld-84-229-36-131.inter.net.il [84.229.36.131]) by mail.messagingengine.com (Postfix) with ESMTPA id 14C433280063; Fri, 11 Sep 2020 11:01:38 -0400 (EDT) Date: Fri, 11 Sep 2020 18:01:37 +0300 From: Ido Schimmel To: David Ahern Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, roopa@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: Re: [RFC PATCH net-next 07/22] nexthop: Prepare new notification info Message-ID: <20200911150137.GC3160975@shredder> References: <20200908091037.2709823-1-idosch@idosch.org> <20200908091037.2709823-8-idosch@idosch.org> <1c27afdc-870e-f775-18c9-a7ea5afee6dc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c27afdc-870e-f775-18c9-a7ea5afee6dc@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Sep 08, 2020 at 08:55:06AM -0600, David Ahern wrote: > On 9/8/20 3:10 AM, Ido Schimmel wrote: > > From: Ido Schimmel > > > > Prepare the new notification information so that it could be passed to > > listeners in the new patch. > > > > Signed-off-by: Ido Schimmel > > --- > > net/ipv4/nexthop.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 108 insertions(+) > > > > Reviewed-by: David Ahern > > one trivial comment below. > > > +static void > > +__nh_notifier_single_info_init(struct nh_notifier_single_info *nh_info, > > + const struct nexthop *nh) > > +{ > > + struct nh_info *nhi = rtnl_dereference(nh->nh_info); > > + > > + nh_info->dev = nhi->fib_nhc.nhc_dev; > > + nh_info->gw_family = nhi->fib_nhc.nhc_gw_family; > > + if (nh_info->gw_family == AF_INET) > > + nh_info->ipv4 = nhi->fib_nhc.nhc_gw.ipv4; > > + else if (nh_info->gw_family == AF_INET6) > > + nh_info->ipv6 = nhi->fib_nhc.nhc_gw.ipv6; > > add a blank line here to make it easier to read. Done > > > + nh_info->is_reject = nhi->reject_nh; > > + nh_info->is_fdb = nhi->fdb_nh; > > + nh_info->is_encap = !!nhi->fib_nhc.nhc_lwtstate; Also changed this to 'has_encap' given your previous comment > > +} > > + >