From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolay Aleksandrov Subject: Re: [patch net-next v2 03/12] ipmr: Add FIB notification access functions Date: Mon, 25 Sep 2017 12:40:16 +0300 Message-ID: References: <20170924172212.10096-1-jiri@resnulli.us> <20170924172212.10096-4-jiri@resnulli.us> <4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com, mlxsw@mellanox.com, andrew@lunn.ch To: Jiri Pirko , netdev@vger.kernel.org Return-path: Received: from mail-wm0-f50.google.com ([74.125.82.50]:45939 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933992AbdIYJkT (ORCPT ); Mon, 25 Sep 2017 05:40:19 -0400 Received: by mail-wm0-f50.google.com with SMTP id q124so17532946wmb.0 for ; Mon, 25 Sep 2017 02:40:19 -0700 (PDT) In-Reply-To: <4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com> Sender: netdev-owner@vger.kernel.org List-ID: On 25/09/17 12:35, Nikolay Aleksandrov wrote: > On 24/09/17 20:22, Jiri Pirko wrote: >> From: Yotam Gigi >> >> Make the ipmr module register as a FIB notifier. To do that, implement both >> the ipmr_seq_read and ipmr_dump ops. >> >> The ipmr_seq_read op returns a sequence counter that is incremented on >> every notification related operation done by the ipmr. To implement that, >> add a sequence counter in the netns_ipv4 struct and increment it whenever a >> new MFC route or VIF are added or deleted. The sequence operations are >> protected by the RTNL lock. >> >> The ipmr_dump iterates the list of MFC routes and the list of VIF entries >> and sends notifications about them. The entries dump is done under RCU >> where the VIF dump uses the mrt_lock too, as the vif->dev field can change >> under RCU. >> >> Signed-off-by: Yotam Gigi >> Reviewed-by: Ido Schimmel >> Signed-off-by: Jiri Pirko >> --- >> v1->v2: >> - Take the mrt_lock when dumping VIF entries. >> --- >> include/linux/mroute.h | 15 ++++++ >> include/net/netns/ipv4.h | 3 ++ >> net/ipv4/ipmr.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++- >> 3 files changed, 153 insertions(+), 2 deletions(-) >> > > LGTM, > > Reviewed-by: Nikolay Aleksandrov > > One note here if you're going to spin another version of the set, you can consider renaming the call_* functions to either mroute_* or ipmr_* (e.g. ipmr_call_...). I personally prefer the ipmr prefix.