[{"id":1774326,"web_url":"http://patchwork.ozlabs.org/comment/1774326/","msgid":"<fbf5db3b-a324-eed2-e6b8-b4b89e11f3c3@huawei.com>","list_archive_url":null,"date":"2017-09-25T01:19:21","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":71804,"url":"http://patchwork.ozlabs.org/api/people/71804/","name":"Yunsheng Lin","email":"linyunsheng@huawei.com"},"content":"Hi, Jiri\n\nOn 2017/9/25 1:22, Jiri Pirko wrote:\n> From: Yotam Gigi <yotamg@mellanox.com>\n> \n> Make the ipmr module register as a FIB notifier. To do that, implement both\n> the ipmr_seq_read and ipmr_dump ops.\n> \n> The ipmr_seq_read op returns a sequence counter that is incremented on\n> every notification related operation done by the ipmr. To implement that,\n> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n> new MFC route or VIF are added or deleted. The sequence operations are\n> protected by the RTNL lock.\n> \n> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n> and sends notifications about them. The entries dump is done under RCU\n> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n> under RCU.\n> \n> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n> ---\n> v1->v2:\n>  - Take the mrt_lock when dumping VIF entries.\n> ---\n>  include/linux/mroute.h   |  15 ++++++\n>  include/net/netns/ipv4.h |   3 ++\n>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>  3 files changed, 153 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/linux/mroute.h b/include/linux/mroute.h\n> index 10028f2..54c5cb8 100644\n> --- a/include/linux/mroute.h\n> +++ b/include/linux/mroute.h\n> @@ -5,6 +5,7 @@\n>  #include <linux/pim.h>\n>  #include <linux/rhashtable.h>\n>  #include <net/sock.h>\n> +#include <net/fib_notifier.h>\n>  #include <uapi/linux/mroute.h>\n>  \n>  #ifdef CONFIG_IP_MROUTE\n> @@ -58,6 +59,14 @@ struct vif_device {\n>  \tint\t\tlink;\t\t\t/* Physical interface index\t*/\n>  };\n>  \n> +struct vif_entry_notifier_info {\n> +\tstruct fib_notifier_info info;\n> +\tstruct net_device *dev;\n> +\tvifi_t vif_index;\n> +\tunsigned short vif_flags;\n> +\tu32 tb_id;\n> +};\n> +\n>  #define VIFF_STATIC 0x8000\n>  \n>  #define VIF_EXISTS(_mrt, _idx) ((_mrt)->vif_table[_idx].dev != NULL)\n> @@ -146,6 +155,12 @@ struct mfc_cache {\n>  \tstruct rcu_head\trcu;\n>  };\n>  \n> +struct mfc_entry_notifier_info {\n> +\tstruct fib_notifier_info info;\n> +\tstruct mfc_cache *mfc;\n> +\tu32 tb_id;\n> +};\n> +\n>  struct rtmsg;\n>  int ipmr_get_route(struct net *net, struct sk_buff *skb,\n>  \t\t   __be32 saddr, __be32 daddr,\n> diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h\n> index 8387f09..abc84d9 100644\n> --- a/include/net/netns/ipv4.h\n> +++ b/include/net/netns/ipv4.h\n> @@ -163,6 +163,9 @@ struct netns_ipv4 {\n>  \tstruct fib_notifier_ops\t*notifier_ops;\n>  \tunsigned int\tfib_seq;\t/* protected by rtnl_mutex */\n>  \n> +\tstruct fib_notifier_ops\t*ipmr_notifier_ops;\n\nCan we add a const here?\n\n> +\tunsigned int\tipmr_seq;\t/* protected by rtnl_mutex */\n> +\n>  \tatomic_t\trt_genid;\n>  };\n>  #endif\n> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c\n> index 86dc5f9..49879c3 100644\n> --- a/net/ipv4/ipmr.c\n> +++ b/net/ipv4/ipmr.c\n> @@ -264,6 +264,16 @@ static void __net_exit ipmr_rules_exit(struct net *net)\n>  \tfib_rules_unregister(net->ipv4.mr_rules_ops);\n>  \trtnl_unlock();\n>  }\n> +\n> +static int ipmr_rules_dump(struct net *net, struct notifier_block *nb)\n> +{\n> +\treturn fib_rules_dump(net, nb, RTNL_FAMILY_IPMR);\n> +}\n> +\n> +static unsigned int ipmr_rules_seq_read(struct net *net)\n> +{\n> +\treturn fib_rules_seq_read(net, RTNL_FAMILY_IPMR);\n> +}\n>  #else\n>  #define ipmr_for_each_table(mrt, net) \\\n>  \tfor (mrt = net->ipv4.mrt; mrt; mrt = NULL)\n> @@ -298,6 +308,16 @@ static void __net_exit ipmr_rules_exit(struct net *net)\n>  \tnet->ipv4.mrt = NULL;\n>  \trtnl_unlock();\n>  }\n> +\n> +static int ipmr_rules_dump(struct net *net, struct notifier_block *nb)\n> +{\n> +\treturn 0;\n> +}\n> +\n> +static unsigned int ipmr_rules_seq_read(struct net *net)\n> +{\n> +\treturn 0;\n> +}\n>  #endif\n>  \n>  static inline int ipmr_hash_cmp(struct rhashtable_compare_arg *arg,\n> @@ -587,6 +607,43 @@ static struct net_device *ipmr_reg_vif(struct net *net, struct mr_table *mrt)\n>  }\n>  #endif\n>  \n> +static int call_ipmr_vif_entry_notifier(struct notifier_block *nb,\n> +\t\t\t\t\tstruct net *net,\n> +\t\t\t\t\tenum fib_event_type event_type,\n> +\t\t\t\t\tstruct vif_device *vif,\n> +\t\t\t\t\tvifi_t vif_index, u32 tb_id)\n> +{\n> +\tstruct vif_entry_notifier_info info = {\n> +\t\t.info = {\n> +\t\t\t.family = RTNL_FAMILY_IPMR,\n> +\t\t\t.net = net,\n> +\t\t},\n> +\t\t.dev = vif->dev,\n> +\t\t.vif_index = vif_index,\n> +\t\t.vif_flags = vif->flags,\n> +\t\t.tb_id = tb_id,\n> +\t};\n\nWe only use info.info which is fib_notifier_info, the\nvif_entry_notifier_info seems to be not needed, why not just\nuse fib_notifier_info?\n\n> +\n> +\treturn call_fib_notifier(nb, net, event_type, &info.info);\n> +}\n> +\n> +static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb,\n> +\t\t\t\t\tstruct net *net,\n> +\t\t\t\t\tenum fib_event_type event_type,\n> +\t\t\t\t\tstruct mfc_cache *mfc, u32 tb_id)\n> +{\n> +\tstruct mfc_entry_notifier_info info = {\n> +\t\t.info = {\n> +\t\t\t.family = RTNL_FAMILY_IPMR,\n> +\t\t\t.net = net,\n> +\t\t},\n> +\t\t.mfc = mfc,\n> +\t\t.tb_id = tb_id\n> +\t};\n> +\n\nAs above.\n\n> +\treturn call_fib_notifier(nb, net, event_type, &info.info);\n> +}\n> +\n>  /**\n>   *\tvif_delete - Delete a VIF entry\n>   *\t@notify: Set to 1, if the caller is a notifier_call\n> @@ -3050,14 +3107,87 @@ static const struct net_protocol pim_protocol = {\n>  };\n>  #endif\n>  \n> +static unsigned int ipmr_seq_read(struct net *net)\n> +{\n> +\tASSERT_RTNL();\n> +\n> +\treturn net->ipv4.ipmr_seq + ipmr_rules_seq_read(net);\n> +}\n> +\n> +static int ipmr_dump(struct net *net, struct notifier_block *nb)\n> +{\n> +\tstruct mr_table *mrt;\n> +\tint err;\n> +\n> +\terr = ipmr_rules_dump(net, nb);\n> +\tif (err)\n> +\t\treturn err;\n> +\n> +\tipmr_for_each_table(mrt, net) {\n> +\t\tstruct vif_device *v = &mrt->vif_table[0];\n> +\t\tstruct mfc_cache *mfc;\n> +\t\tint vifi;\n> +\n> +\t\t/* Notifiy on table VIF entries */\n> +\t\tread_lock(&mrt_lock);\n> +\t\tfor (vifi = 0; vifi < mrt->maxvif; vifi++, v++) {\n> +\t\t\tif (!v->dev)\n> +\t\t\t\tcontinue;\n> +\n> +\t\t\tcall_ipmr_vif_entry_notifier(nb, net, FIB_EVENT_VIF_ADD,\n> +\t\t\t\t\t\t     v, vifi, mrt->id);\n> +\t\t}\n> +\t\tread_unlock(&mrt_lock);\n> +\n> +\t\t/* Notify on table MFC entries */\n> +\t\tlist_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list)\n> +\t\t\tcall_ipmr_mfc_entry_notifier(nb, net,\n> +\t\t\t\t\t\t     FIB_EVENT_ENTRY_ADD, mfc,\n> +\t\t\t\t\t\t     mrt->id);\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n> +static const struct fib_notifier_ops ipmr_notifier_ops_template = {\n> +\t.family\t\t= RTNL_FAMILY_IPMR,\n> +\t.fib_seq_read\t= ipmr_seq_read,\n> +\t.fib_dump\t= ipmr_dump,\n> +\t.owner\t\t= THIS_MODULE,\n> +};\n> +\n> +int __net_init ipmr_notifier_init(struct net *net)\n> +{\n> +\tstruct fib_notifier_ops *ops;\n> +\n> +\tnet->ipv4.ipmr_seq = 0;\n> +\n> +\tops = fib_notifier_ops_register(&ipmr_notifier_ops_template, net);\n> +\tif (IS_ERR(ops))\n> +\t\treturn PTR_ERR(ops);\n> +\tnet->ipv4.ipmr_notifier_ops = ops;\n> +\n> +\treturn 0;\n> +}\n> +\n> +static void __net_exit ipmr_notifier_exit(struct net *net)\n> +{\n> +\tfib_notifier_ops_unregister(net->ipv4.ipmr_notifier_ops);\n> +\tnet->ipv4.ipmr_notifier_ops = NULL;\n> +}\n> +\n>  /* Setup for IP multicast routing */\n>  static int __net_init ipmr_net_init(struct net *net)\n>  {\n>  \tint err;\n>  \n> +\terr = ipmr_notifier_init(net);\n> +\tif (err)\n> +\t\tgoto ipmr_notifier_fail;\n> +\n>  \terr = ipmr_rules_init(net);\n>  \tif (err < 0)\n> -\t\tgoto fail;\n> +\t\tgoto ipmr_rules_fail;\n>  \n>  #ifdef CONFIG_PROC_FS\n>  \terr = -ENOMEM;\n> @@ -3074,7 +3204,9 @@ static int __net_init ipmr_net_init(struct net *net)\n>  proc_vif_fail:\n>  \tipmr_rules_exit(net);\n>  #endif\n> -fail:\n> +ipmr_rules_fail:\n> +\tipmr_notifier_exit(net);\n> +ipmr_notifier_fail:\n>  \treturn err;\n>  }\n>  \n> @@ -3084,6 +3216,7 @@ static void __net_exit ipmr_net_exit(struct net *net)\n>  \tremove_proc_entry(\"ip_mr_cache\", net->proc_net);\n>  \tremove_proc_entry(\"ip_mr_vif\", net->proc_net);\n>  #endif\n> +\tipmr_notifier_exit(net);\n>  \tipmr_rules_exit(net);\n>  }\n>  \n>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0mTQ4gP4z9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 11:19:38 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753696AbdIYBTg (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 24 Sep 2017 21:19:36 -0400","from szxga05-in.huawei.com ([45.249.212.191]:6559 \"EHLO\n\tszxga05-in.huawei.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752947AbdIYBTd (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sun, 24 Sep 2017 21:19:33 -0400","from 172.30.72.58 (EHLO DGGEMS402-HUB.china.huawei.com)\n\t([172.30.72.58])\n\tby dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DHY70224; Mon, 25 Sep 2017 09:19:24 +0800 (CST)","from [127.0.0.1] (10.74.191.121) by DGGEMS402-HUB.china.huawei.com\n\t(10.3.19.202) with Microsoft SMTP Server id 14.3.301.0;\n\tMon, 25 Sep 2017 09:19:20 +0800"],"Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","To":"Jiri Pirko <jiri@resnulli.us>, <netdev@vger.kernel.org>","CC":"<davem@davemloft.net>, <yotamg@mellanox.com>,\n\t<idosch@mellanox.com>, <mlxsw@mellanox.com>,\n\t<nikolay@cumulusnetworks.com>, <andrew@lunn.ch>","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>","From":"Yunsheng Lin <linyunsheng@huawei.com>","Message-ID":"<fbf5db3b-a324-eed2-e6b8-b4b89e11f3c3@huawei.com>","Date":"Mon, 25 Sep 2017 09:19:21 +0800","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.0","MIME-Version":"1.0","In-Reply-To":"<20170924172212.10096-4-jiri@resnulli.us>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Originating-IP":"[10.74.191.121]","X-CFilter-Loop":"Reflected","X-Mirapoint-Virus-RAPID-Raw":"score=unknown(0),\n\trefid=str=0001.0A090201.59C8599F.0040, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32","X-Mirapoint-Loop-Id":"c8d51d31e3936b22194f2cfdcade0530","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774425,"web_url":"http://patchwork.ozlabs.org/comment/1774425/","msgid":"<54bef87c-8b7a-2512-3763-bac3469db421@mellanox.com>","list_archive_url":null,"date":"2017-09-25T05:38:28","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":69965,"url":"http://patchwork.ozlabs.org/api/people/69965/","name":"Yotam Gigi","email":"yotamg@mellanox.com"},"content":"On 09/25/2017 04:19 AM, Yunsheng Lin wrote:\n> Hi, Jiri\n>\n> On 2017/9/25 1:22, Jiri Pirko wrote:\n>> From: Yotam Gigi <yotamg@mellanox.com>\n>>\n>> Make the ipmr module register as a FIB notifier. To do that, implement both\n>> the ipmr_seq_read and ipmr_dump ops.\n>>\n>> The ipmr_seq_read op returns a sequence counter that is incremented on\n>> every notification related operation done by the ipmr. To implement that,\n>> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n>> new MFC route or VIF are added or deleted. The sequence operations are\n>> protected by the RTNL lock.\n>>\n>> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n>> and sends notifications about them. The entries dump is done under RCU\n>> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n>> under RCU.\n>>\n>> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n>> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n>> ---\n>> v1->v2:\n>>  - Take the mrt_lock when dumping VIF entries.\n>> ---\n>>  include/linux/mroute.h   |  15 ++++++\n>>  include/net/netns/ipv4.h |   3 ++\n>>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>>  3 files changed, 153 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/include/linux/mroute.h b/include/linux/mroute.h\n>> index 10028f2..54c5cb8 100644\n>> --- a/include/linux/mroute.h\n>> +++ b/include/linux/mroute.h\n>> @@ -5,6 +5,7 @@\n>>  #include <linux/pim.h>\n>>  #include <linux/rhashtable.h>\n>>  #include <net/sock.h>\n>> +#include <net/fib_notifier.h>\n>>  #include <uapi/linux/mroute.h>\n>>  \n>>  #ifdef CONFIG_IP_MROUTE\n>> @@ -58,6 +59,14 @@ struct vif_device {\n>>  \tint\t\tlink;\t\t\t/* Physical interface index\t*/\n>>  };\n>>  \n>> +struct vif_entry_notifier_info {\n>> +\tstruct fib_notifier_info info;\n>> +\tstruct net_device *dev;\n>> +\tvifi_t vif_index;\n>> +\tunsigned short vif_flags;\n>> +\tu32 tb_id;\n>> +};\n>> +\n>>  #define VIFF_STATIC 0x8000\n>>  \n>>  #define VIF_EXISTS(_mrt, _idx) ((_mrt)->vif_table[_idx].dev != NULL)\n>> @@ -146,6 +155,12 @@ struct mfc_cache {\n>>  \tstruct rcu_head\trcu;\n>>  };\n>>  \n>> +struct mfc_entry_notifier_info {\n>> +\tstruct fib_notifier_info info;\n>> +\tstruct mfc_cache *mfc;\n>> +\tu32 tb_id;\n>> +};\n>> +\n>>  struct rtmsg;\n>>  int ipmr_get_route(struct net *net, struct sk_buff *skb,\n>>  \t\t   __be32 saddr, __be32 daddr,\n>> diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h\n>> index 8387f09..abc84d9 100644\n>> --- a/include/net/netns/ipv4.h\n>> +++ b/include/net/netns/ipv4.h\n>> @@ -163,6 +163,9 @@ struct netns_ipv4 {\n>>  \tstruct fib_notifier_ops\t*notifier_ops;\n>>  \tunsigned int\tfib_seq;\t/* protected by rtnl_mutex */\n>>  \n>> +\tstruct fib_notifier_ops\t*ipmr_notifier_ops;\n> Can we add a const here?\n\nIt cannot be const as it get initialized it in ipmr_notifier_init.\n\n>\n>> +\tunsigned int\tipmr_seq;\t/* protected by rtnl_mutex */\n>> +\n>>  \tatomic_t\trt_genid;\n>>  };\n>>  #endif\n>> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c\n>> index 86dc5f9..49879c3 100644\n>> --- a/net/ipv4/ipmr.c\n>> +++ b/net/ipv4/ipmr.c\n>> @@ -264,6 +264,16 @@ static void __net_exit ipmr_rules_exit(struct net *net)\n>>  \tfib_rules_unregister(net->ipv4.mr_rules_ops);\n>>  \trtnl_unlock();\n>>  }\n>> +\n>> +static int ipmr_rules_dump(struct net *net, struct notifier_block *nb)\n>> +{\n>> +\treturn fib_rules_dump(net, nb, RTNL_FAMILY_IPMR);\n>> +}\n>> +\n>> +static unsigned int ipmr_rules_seq_read(struct net *net)\n>> +{\n>> +\treturn fib_rules_seq_read(net, RTNL_FAMILY_IPMR);\n>> +}\n>>  #else\n>>  #define ipmr_for_each_table(mrt, net) \\\n>>  \tfor (mrt = net->ipv4.mrt; mrt; mrt = NULL)\n>> @@ -298,6 +308,16 @@ static void __net_exit ipmr_rules_exit(struct net *net)\n>>  \tnet->ipv4.mrt = NULL;\n>>  \trtnl_unlock();\n>>  }\n>> +\n>> +static int ipmr_rules_dump(struct net *net, struct notifier_block *nb)\n>> +{\n>> +\treturn 0;\n>> +}\n>> +\n>> +static unsigned int ipmr_rules_seq_read(struct net *net)\n>> +{\n>> +\treturn 0;\n>> +}\n>>  #endif\n>>  \n>>  static inline int ipmr_hash_cmp(struct rhashtable_compare_arg *arg,\n>> @@ -587,6 +607,43 @@ static struct net_device *ipmr_reg_vif(struct net *net, struct mr_table *mrt)\n>>  }\n>>  #endif\n>>  \n>> +static int call_ipmr_vif_entry_notifier(struct notifier_block *nb,\n>> +\t\t\t\t\tstruct net *net,\n>> +\t\t\t\t\tenum fib_event_type event_type,\n>> +\t\t\t\t\tstruct vif_device *vif,\n>> +\t\t\t\t\tvifi_t vif_index, u32 tb_id)\n>> +{\n>> +\tstruct vif_entry_notifier_info info = {\n>> +\t\t.info = {\n>> +\t\t\t.family = RTNL_FAMILY_IPMR,\n>> +\t\t\t.net = net,\n>> +\t\t},\n>> +\t\t.dev = vif->dev,\n>> +\t\t.vif_index = vif_index,\n>> +\t\t.vif_flags = vif->flags,\n>> +\t\t.tb_id = tb_id,\n>> +\t};\n> We only use info.info which is fib_notifier_info, the\n> vif_entry_notifier_info seems to be not needed, why not just\n> use fib_notifier_info?\n\nNo, that's not true.\n\nThe driver gets the notification with a pointer to a fib_notifier_info struct,\nand according to the type field uses container_of to get to the parent struct,\nwhich in this case is vif_entry_notifier_info. All the fields here are needed.\nYou can see this code in patch 10.\n\nBy the way, this function is completely symmetric to fib4 (which is in\nfib_trie.c +88) and fib6 (which is in ip6_fib +336) notify functions, who uses\nthe exact same process.\n\n>\n>> +\n>> +\treturn call_fib_notifier(nb, net, event_type, &info.info);\n>> +}\n>> +\n>> +static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb,\n>> +\t\t\t\t\tstruct net *net,\n>> +\t\t\t\t\tenum fib_event_type event_type,\n>> +\t\t\t\t\tstruct mfc_cache *mfc, u32 tb_id)\n>> +{\n>> +\tstruct mfc_entry_notifier_info info = {\n>> +\t\t.info = {\n>> +\t\t\t.family = RTNL_FAMILY_IPMR,\n>> +\t\t\t.net = net,\n>> +\t\t},\n>> +\t\t.mfc = mfc,\n>> +\t\t.tb_id = tb_id\n>> +\t};\n>> +\n> As above.\n\n\nAs above.\n\n\n>\n>> +\treturn call_fib_notifier(nb, net, event_type, &info.info);\n>> +}\n>> +\n>>  /**\n>>   *\tvif_delete - Delete a VIF entry\n>>   *\t@notify: Set to 1, if the caller is a notifier_call\n>> @@ -3050,14 +3107,87 @@ static const struct net_protocol pim_protocol = {\n>>  };\n>>  #endif\n>>  \n>> +static unsigned int ipmr_seq_read(struct net *net)\n>> +{\n>> +\tASSERT_RTNL();\n>> +\n>> +\treturn net->ipv4.ipmr_seq + ipmr_rules_seq_read(net);\n>> +}\n>> +\n>> +static int ipmr_dump(struct net *net, struct notifier_block *nb)\n>> +{\n>> +\tstruct mr_table *mrt;\n>> +\tint err;\n>> +\n>> +\terr = ipmr_rules_dump(net, nb);\n>> +\tif (err)\n>> +\t\treturn err;\n>> +\n>> +\tipmr_for_each_table(mrt, net) {\n>> +\t\tstruct vif_device *v = &mrt->vif_table[0];\n>> +\t\tstruct mfc_cache *mfc;\n>> +\t\tint vifi;\n>> +\n>> +\t\t/* Notifiy on table VIF entries */\n>> +\t\tread_lock(&mrt_lock);\n>> +\t\tfor (vifi = 0; vifi < mrt->maxvif; vifi++, v++) {\n>> +\t\t\tif (!v->dev)\n>> +\t\t\t\tcontinue;\n>> +\n>> +\t\t\tcall_ipmr_vif_entry_notifier(nb, net, FIB_EVENT_VIF_ADD,\n>> +\t\t\t\t\t\t     v, vifi, mrt->id);\n>> +\t\t}\n>> +\t\tread_unlock(&mrt_lock);\n>> +\n>> +\t\t/* Notify on table MFC entries */\n>> +\t\tlist_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list)\n>> +\t\t\tcall_ipmr_mfc_entry_notifier(nb, net,\n>> +\t\t\t\t\t\t     FIB_EVENT_ENTRY_ADD, mfc,\n>> +\t\t\t\t\t\t     mrt->id);\n>> +\t}\n>> +\n>> +\treturn 0;\n>> +}\n>> +\n>> +static const struct fib_notifier_ops ipmr_notifier_ops_template = {\n>> +\t.family\t\t= RTNL_FAMILY_IPMR,\n>> +\t.fib_seq_read\t= ipmr_seq_read,\n>> +\t.fib_dump\t= ipmr_dump,\n>> +\t.owner\t\t= THIS_MODULE,\n>> +};\n>> +\n>> +int __net_init ipmr_notifier_init(struct net *net)\n>> +{\n>> +\tstruct fib_notifier_ops *ops;\n>> +\n>> +\tnet->ipv4.ipmr_seq = 0;\n>> +\n>> +\tops = fib_notifier_ops_register(&ipmr_notifier_ops_template, net);\n>> +\tif (IS_ERR(ops))\n>> +\t\treturn PTR_ERR(ops);\n>> +\tnet->ipv4.ipmr_notifier_ops = ops;\n>> +\n>> +\treturn 0;\n>> +}\n>> +\n>> +static void __net_exit ipmr_notifier_exit(struct net *net)\n>> +{\n>> +\tfib_notifier_ops_unregister(net->ipv4.ipmr_notifier_ops);\n>> +\tnet->ipv4.ipmr_notifier_ops = NULL;\n>> +}\n>> +\n>>  /* Setup for IP multicast routing */\n>>  static int __net_init ipmr_net_init(struct net *net)\n>>  {\n>>  \tint err;\n>>  \n>> +\terr = ipmr_notifier_init(net);\n>> +\tif (err)\n>> +\t\tgoto ipmr_notifier_fail;\n>> +\n>>  \terr = ipmr_rules_init(net);\n>>  \tif (err < 0)\n>> -\t\tgoto fail;\n>> +\t\tgoto ipmr_rules_fail;\n>>  \n>>  #ifdef CONFIG_PROC_FS\n>>  \terr = -ENOMEM;\n>> @@ -3074,7 +3204,9 @@ static int __net_init ipmr_net_init(struct net *net)\n>>  proc_vif_fail:\n>>  \tipmr_rules_exit(net);\n>>  #endif\n>> -fail:\n>> +ipmr_rules_fail:\n>> +\tipmr_notifier_exit(net);\n>> +ipmr_notifier_fail:\n>>  \treturn err;\n>>  }\n>>  \n>> @@ -3084,6 +3216,7 @@ static void __net_exit ipmr_net_exit(struct net *net)\n>>  \tremove_proc_entry(\"ip_mr_cache\", net->proc_net);\n>>  \tremove_proc_entry(\"ip_mr_vif\", net->proc_net);\n>>  #endif\n>> +\tipmr_notifier_exit(net);\n>>  \tipmr_rules_exit(net);\n>>  }\n>>  \n>>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=Mellanox.com header.i=@Mellanox.com\n\theader.b=\"bR7+yEIn\"; dkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=yotamg@mellanox.com; "],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0tDM6dNCz9t4B\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 15:38:43 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932111AbdIYFil (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 01:38:41 -0400","from mail-ve1eur01on0073.outbound.protection.outlook.com\n\t([104.47.1.73]:15296\n\t\"EHLO EUR01-VE1-obe.outbound.protection.outlook.com\"\n\trhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP\n\tid S1753580AbdIYFik (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 25 Sep 2017 01:38:40 -0400","from localhost.localdomain (79.181.49.40) by\n\tAM5PR0502MB2961.eurprd05.prod.outlook.com (2603:10a6:203:96::11) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7;\n\tMon, 25 Sep 2017 05:38:32 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n\ts=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=F9D7QEGog+4bxHiSg+7W6VgO1XblKck1dpwRyEyJb2I=;\n\tb=bR7+yEIn+FZiEjRN0QxZT3DfRryMsHkik9BfMJUgrKfYpMDx87ZsC50470f1yQosrjzedgIi7RsqKmTWzNq1GzzRCtuUhsYxLFuwCW1/IqHqAIXknA7C2P4d+HMxMW9/W1yQK5IjLWEhwQHs1sf4E93Isi+s0CWnjnDdrLrCcos=","Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","To":"Yunsheng Lin <linyunsheng@huawei.com>,\n\tJiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org","Cc":"davem@davemloft.net, idosch@mellanox.com, mlxsw@mellanox.com,\n\tnikolay@cumulusnetworks.com, andrew@lunn.ch","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>\n\t<fbf5db3b-a324-eed2-e6b8-b4b89e11f3c3@huawei.com>","From":"Yotam Gigi <yotamg@mellanox.com>","Message-ID":"<54bef87c-8b7a-2512-3763-bac3469db421@mellanox.com>","Date":"Mon, 25 Sep 2017 08:38:28 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<fbf5db3b-a324-eed2-e6b8-b4b89e11f3c3@huawei.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","X-Originating-IP":"[79.181.49.40]","X-ClientProxiedBy":"DB6PR0202CA0018.eurprd02.prod.outlook.com\n\t(2603:10a6:4:29::28) To AM5PR0502MB2961.eurprd05.prod.outlook.com\n\t(2603:10a6:203:96::11)","X-MS-PublicTrafficType":"Email","X-MS-Office365-Filtering-Correlation-Id":"f51c0a6a-dbeb-4396-fe8f-08d503d7aaeb","X-MS-Office365-Filtering-HT":"Tenant","X-Microsoft-Antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075);\n\tSRVR:AM5PR0502MB2961; ","X-Microsoft-Exchange-Diagnostics":["1; AM5PR0502MB2961;\n\t3:1Q/89X+FlKOP031gXfuhayfypaDsYPwuZ/f7tRQRuf9rAdd7fR42Cd9+u7JFiujoCdssP7c7INJG8s9WNDa9TT9/sTXsijHwE0r2iuErq9UJZ4QoHvcjdd+OQafPE1BPkJ1mjlmS23YveSjcHTqDFAISrAVLTXkrhbVbVnnphiRP5dVP4Y9fbX8nZJjmollwVTLPhRgEHsxP/tCPMG3eoEseHzpskKqj/SQ1VopohzgjvIwtsKk7gkuohi5urpcX;\n\t25:ni/yDYpGsU1FT0OxqJUaaS7NFKfOHO2DqO2tymg3xvlxbddgC+ppYHS/mq9srLUD/BXSl7wMAnBIy5AO71KmayI62p/Kdb6EtW5aGVOy+BlBuKm4bprJhFMAt6im9HaQ4wQi829Nib2hww1xP6LVpyNfRMQslqEWgCwrkKgJSHseV+uNwEK0lb7jtpI1BPhKBQv7/MuNOs4/uEFP8uSDvYdBXO1Aj3AayJNDtu7q53yHWQ+g7aBp6MgnqN7aAxvtTI/EPJyPYDXH1qTid6glUfVEgI4c/ycYUH7hKQQZ9a0N5qoxQOj46bOsodnWuJyK9Cq3lxjyLzdGOqFhp5IlxA==;\n\t31:9u7X01YY8GbMCnLnZLRtVJxK3aHw+JWi0MyHdFtRo+3egR+iUu7sLjcMPhDBKbgjAtMbq3JZ6itwBALQS02CqULxtXRXcSjsUhD1U5zdpao0HIBmr5jc/iuVgtokLF4ZSJlWJ9oNlbByWkaJFCao5ir3Jlqft0kIP7nu9VUT0yMUC0HS0PnSvRH4Mmfviuv8nAUAh1pHJR9VGKjbv5fX6UvQtysSVDcb2gDPx8Ah1Ow=","1; AM5PR0502MB2961;\n\t20:+3zcEJcuuFDDIOoS/xLaTilW/Rzbo95BK/JWH9jqmR+f4JGnT65irsWdmSWchIndsjKldkClwD3xXhmJAgMR7E4ONiXvUFd/dEJ2Z27EqxXO8bRvQ34HQQcrYq5kk3k8Zcf3mko1EGLp8a/N/cd4oitsclfLIk2NBTnMl+enYNVIsgKlwR4BlWYdunLfV9JE4R9lAfim53nD5eH9vIr+q7GFmY/T5nU35GELpdRPOIjt25PMnhOTuYrqRxeUE8b6aWDhcwgLT96fqfIIpYfpKRV3VpsliOQFE5NzpplsbDya6x6XvOfbMwYb+KyeEjoVa4KnsXDLRMDkDCSuQ+Tgfop/wemAmSO6xis9qXcYBAsNPsoMOCnI7AV0e9RcTZG/DDxcD+xnbPT6nqxCanRDOwEkwF1RQ7AhOK6CVSehD6znHnt0Uh62KzJhhksm0l8cdKHpjXH21uOXQvnpFhfrE94FACQppgrkA6XaOHiG/a6UbehOiX9EUCoTwDnyl9z+;\n\t4:lfm5CqpjtvmxopGEl+9a87NyxvFcKYtqLxh2Ir4LTThgYpJ1P3n1NzdjJMYnZWh7N2Q+BqK/24PH6JcoKEazjQsLoRICvr/xT9OR84ucGd1Y6eKqgulzzl7gnIkUJbQNRE/dgZUZiB2c+EFDeQ1rbvg9R01BPPgDhMUxtMeqHkfzoK9qj4x1Tz8ITxct9IssSZUjs+YutANpzcJPcNBivnAipbeewEFHCP8yGfil2RPS96gN0bm13oG9YF24CgQe","=?utf-8?q?1=3BAM5PR0502MB2961=3B23=3As7?=\n\t=?utf-8?q?JgWPhWrlTIyxejRIsXb0uDECWZZRhNBRRrLKdipZHO3t2pd3Q/zFDZAp?=\n\t=?utf-8?q?1gvwVithnEPR3saTRfYALY2Yf5f17r4m2tIuVnsbr3/IutW2TPZfZ/Kw?=\n\t=?utf-8?q?ZkKc9d9I5mbrjxc9auS3ZRyZPdQzrxurvYEVpPmuhKmVoUCekq9t1ApI?=\n\t=?utf-8?q?GMATGViNpL5t9+Nt+nd7W/C+Pyj/P7rKwT6DX4wMvo7kmaDJPLR0lNSi?=\n\t=?utf-8?q?F8l3OcPci7IYl1e691PzzfWGkOEgS94RU3AiGNJ687gPZNVJwtPYsqwU?=\n\t=?utf-8?q?QglT1fz7XqEaLs/m5Wv3SJKb0eKA5LQSGhewhqpZ2Qm9s9tBwt/4bhHy?=\n\t=?utf-8?q?LxxkGcsp1j5d98RtNCR4QH/2f/4AjD+YcO0tZHO7LoN2018o6q+wJo44?=\n\t=?utf-8?q?DR/vvPcqldoti8LmjDtTIv1MCasSdonFSDpALmbsidNzCp2n0TC8wGay?=\n\t=?utf-8?q?5hOITpT1kSZ6g/lo0L/mNxnZ6gh1g0ayFgSgPh2Uyk7FfLo6sDjvaGj7?=\n\t=?utf-8?q?5sEHMGfhSPKNbR+UbXdIp/NodENJYjndtzcYyleR2WTfF14oVjEZlMLO?=\n\t=?utf-8?q?xOmUTdzIl90dvTa5sk2GPh0usEj8tl7PyNzDIuSkd0m1ipLCDWBYFeSu?=\n\t=?utf-8?q?7w4VJ8+iipAbH/KQuiPVpe3e7ZRibK3+/SoAVk/iqYRtatYaYIf4TgpI?=\n\t=?utf-8?q?25WhbOhxObH0hwJsqsoK7IAsMVyHe4cpFeGZhsx/trNf+ATbkmnPeJC6?=\n\t=?utf-8?q?66hUPIXnOZRxbEzC06YWWPbdWKBNibiv2lmaDxzPqkqNgBnojHOekG6R?=\n\t=?utf-8?q?+JLJ3gtZHr/XvmdjrDRbhGwG6b965dco3IIVgv+34e348f2XZJUdp+PE?=\n\t=?utf-8?q?EB3mL9cfDCptDOygepkS/3PRyTYFMfu07zKEFcAHqa9Dl/4hupgZjl/s?=\n\t=?utf-8?q?rv4gYMd4P0X9IdEV0XOGa+7T2Q1xHLWGdGd2k4FYHIQ4drGYGm8oRF4e?=\n\t=?utf-8?q?+8GDZQWJWqu9LAli4DHMtLEI3IgD/wEY50hNnuLXZrKblqnbkxIu+f13?=\n\t=?utf-8?q?Gh3KAcsUYQc4UVotatLlVUIGPQjxvq3U1y9O2Snupww9q0CzxoQXnBxP?=\n\t=?utf-8?q?tDGnvmsI383H4IA4VBN2/mv/B/XfyL5wNwFFmpH5p4biwp5Cmc3zGOQ5?=\n\t=?utf-8?q?uhZ4LxIYlItOhJK/lZglWPQPbBFyEVBOpghod0M0ruLVd2XWyYEXv50w?=\n\t=?utf-8?q?UT7I3vGUmeCSjcblY9yzr7ULdObVi1N6KeXxxANN78zGhlImLWqqpELH?=\n\t=?utf-8?q?ymhSFmxwYD3EauFyIdI9pb02fCJCQcgZqlpz+Eom4omKuqc+cnDK6K83?=\n\t=?utf-8?q?zVTssRCGGz2sMxojb1nEHPeovQ7ej+/e59hPYtkUGNFCm5lQnc++NrvD?=\n\t=?utf-8?q?X2y8qhG3WHda/DJjVkXe2UCs8zFLEQx9vefttyrW/yaFZzSsDElRPN0Z?=\n\t=?utf-8?q?5DMO77Zg/yrNJVfC6PkElmMAOdjg=3D=3D?=","1; AM5PR0502MB2961;\n\t6:9GQcA3FaMHfFrw6cmBIE3AlntunApg0UyPfER45Wj4f8hj58qemHHTB6SvAtkV1boAzKVnNr0NiblVp6Qvl0hZIJ4tx9OTU9IvAVBpOzuqMEqx3AFFF6mTOAoha3lWB3DQx5x+hUVP/4tK0MNhyZ2yCGOaJk/rv/NHskI1c6l4VswALsnhU+Q10gZZpThtXOuIz+h36E1kJblst3zsZ1gcaSSsftCiYN8NcVATnRPYVfcSvEHKAMjdpIo4FANvyWoM14lDl8K9zJuOYeougc3TOxUFOBWjMWy8l+DL0d/ddUPjYIDKX6sz4Fc0ERw9pMaGFZOuSKgRgrYL/Bvkj8tQ==;\n\t5:z4lpfyIKLB+TMsr3VnvPGZOMuHhBBglY/Cx2FLGL4/9mdEXao1FHDTQR9baNd9YNK0ta5NdZYuoMM3FQDqdeY8vtbbvLPi4mwVKZNjQtNqD24OPnu29XB9F5eIpXjv04K9l8CPXUUL6f6bh/PFccLQ==;\n\t24:e11M3peTFn5hy9UQztei3infhYCrhqDdrfun5uUs00gwG27ScDWsTQGIiYkR4dSrXxLhMDNaRA8rO/KUhUolrdto7yo3PoZzP81bLkyJlwc=;\n\t7:ia4FzqFGX9oETs8aoHy0GoTQrIxbFqGQf/FOUVXyfrRpg4CAh+BcgaY5V+reCuHZG9a+HUvSXzys+PEPbZg7jIlkOJCR3Bn76CST0fRRATKYoys4JWxINeTqqQBGM3Cf+5/bzacmGFAuttduQRoF0sDpWgRMSKXQhuakTeQ2zdSp2B2THuTg7m+x1cdgHQUaqajlQ1Cfmhd/0A0P0x2gG6W6PaBr3H6Zgn/SIN4fPvE="],"X-MS-TrafficTypeDiagnostic":"AM5PR0502MB2961:","X-Exchange-Antispam-Report-Test":"UriScan:;","X-Microsoft-Antispam-PRVS":"<AM5PR0502MB2961D993E98FD963CB9B740AAC7A0@AM5PR0502MB2961.eurprd05.prod.outlook.com>","X-Exchange-Antispam-Report-CFA-Test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:AM5PR0502MB2961; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:AM5PR0502MB2961; ","X-Forefront-PRVS":"04410E544A","X-Forefront-Antispam-Report":"SFV:NSPM;\n\tSFS:(10009020)(6009001)(6069001)(39860400002)(376002)(346002)(24454002)(189002)(377454003)(199003)(6486002)(68736007)(478600001)(6506006)(7736002)(25786009)(36756003)(4326008)(229853002)(8936002)(189998001)(110136005)(316002)(105586002)(53546010)(101416001)(33646002)(23676002)(3846002)(86362001)(230700001)(31696002)(305945005)(15650500001)(58126008)(66066001)(8676002)(65956001)(6512007)(81166006)(5660300001)(47776003)(53936002)(64126003)(83506001)(16526017)(6116002)(6666003)(65826007)(50466002)(97736004)(65806001)(106356001)(81156014)(2906002)(31686004)(76176999)(54356999)(50986999)(6246003)(2950100002)(6606295002);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0502MB2961;\n\tH:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords;\n\tMX:1; A:1; LANG:en; ","Received-SPF":"None (protection.outlook.com: mellanox.com does not designate\n\tpermitted sender hosts)","SpamDiagnosticOutput":"1:99","SpamDiagnosticMetadata":"NSPM","X-OriginatorOrg":"Mellanox.com","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"25 Sep 2017 05:38:32.2769\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"a652971c-7d2e-4d9b-a6a4-d149256f461b","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"AM5PR0502MB2961","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774441,"web_url":"http://patchwork.ozlabs.org/comment/1774441/","msgid":"<fb08799d-f1ae-6ee7-c65f-f949e60bf07d@huawei.com>","list_archive_url":null,"date":"2017-09-25T06:32:37","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":71804,"url":"http://patchwork.ozlabs.org/api/people/71804/","name":"Yunsheng Lin","email":"linyunsheng@huawei.com"},"content":"Hi, Yotam\n\nOn 2017/9/25 13:38, Yotam Gigi wrote:\n> On 09/25/2017 04:19 AM, Yunsheng Lin wrote:\n>> Hi, Jiri\n>>\n>> On 2017/9/25 1:22, Jiri Pirko wrote:\n>>> From: Yotam Gigi <yotamg@mellanox.com>\n>>>\n>>> Make the ipmr module register as a FIB notifier. To do that, implement both\n>>> the ipmr_seq_read and ipmr_dump ops.\n>>>\n>>> The ipmr_seq_read op returns a sequence counter that is incremented on\n>>> every notification related operation done by the ipmr. To implement that,\n>>> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n>>> new MFC route or VIF are added or deleted. The sequence operations are\n>>> protected by the RTNL lock.\n>>>\n>>> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n>>> and sends notifications about them. The entries dump is done under RCU\n>>> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n>>> under RCU.\n>>>\n>>> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n>>> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n>>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n>>> ---\n>>> v1->v2:\n>>>  - Take the mrt_lock when dumping VIF entries.\n>>> ---\n>>>  include/linux/mroute.h   |  15 ++++++\n>>>  include/net/netns/ipv4.h |   3 ++\n>>>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>>>  3 files changed, 153 insertions(+), 2 deletions(-)\n>>>\n>>> diff --git a/include/linux/mroute.h b/include/linux/mroute.h\n>>> index 10028f2..54c5cb8 100644\n>>> --- a/include/linux/mroute.h\n>>> +++ b/include/linux/mroute.h\n>>> @@ -5,6 +5,7 @@\n>>>  #include <linux/pim.h>\n>>>  #include <linux/rhashtable.h>\n>>>  #include <net/sock.h>\n>>> +#include <net/fib_notifier.h>\n>>>  #include <uapi/linux/mroute.h>\n>>>  \n>>>  #ifdef CONFIG_IP_MROUTE\n>>> @@ -58,6 +59,14 @@ struct vif_device {\n>>>  \tint\t\tlink;\t\t\t/* Physical interface index\t*/\n>>>  };\n>>>  \n>>> +struct vif_entry_notifier_info {\n>>> +\tstruct fib_notifier_info info;\n>>> +\tstruct net_device *dev;\n>>> +\tvifi_t vif_index;\n>>> +\tunsigned short vif_flags;\n>>> +\tu32 tb_id;\n>>> +};\n>>> +\n>>>  #define VIFF_STATIC 0x8000\n>>>  \n>>>  #define VIF_EXISTS(_mrt, _idx) ((_mrt)->vif_table[_idx].dev != NULL)\n>>> @@ -146,6 +155,12 @@ struct mfc_cache {\n>>>  \tstruct rcu_head\trcu;\n>>>  };\n>>>  \n>>> +struct mfc_entry_notifier_info {\n>>> +\tstruct fib_notifier_info info;\n>>> +\tstruct mfc_cache *mfc;\n>>> +\tu32 tb_id;\n>>> +};\n>>> +\n>>>  struct rtmsg;\n>>>  int ipmr_get_route(struct net *net, struct sk_buff *skb,\n>>>  \t\t   __be32 saddr, __be32 daddr,\n>>> diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h\n>>> index 8387f09..abc84d9 100644\n>>> --- a/include/net/netns/ipv4.h\n>>> +++ b/include/net/netns/ipv4.h\n>>> @@ -163,6 +163,9 @@ struct netns_ipv4 {\n>>>  \tstruct fib_notifier_ops\t*notifier_ops;\n>>>  \tunsigned int\tfib_seq;\t/* protected by rtnl_mutex */\n>>>  \n>>> +\tstruct fib_notifier_ops\t*ipmr_notifier_ops;\n>> Can we add a const here?\n> \n> It cannot be const as it get initialized it in ipmr_notifier_init.\n> \n>>\n>>> +\tunsigned int\tipmr_seq;\t/* protected by rtnl_mutex */\n>>> +\n>>>  \tatomic_t\trt_genid;\n>>>  };\n>>>  #endif\n>>> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c\n>>> index 86dc5f9..49879c3 100644\n>>> --- a/net/ipv4/ipmr.c\n>>> +++ b/net/ipv4/ipmr.c\n>>> @@ -264,6 +264,16 @@ static void __net_exit ipmr_rules_exit(struct net *net)\n>>>  \tfib_rules_unregister(net->ipv4.mr_rules_ops);\n>>>  \trtnl_unlock();\n>>>  }\n>>> +\n>>> +static int ipmr_rules_dump(struct net *net, struct notifier_block *nb)\n>>> +{\n>>> +\treturn fib_rules_dump(net, nb, RTNL_FAMILY_IPMR);\n>>> +}\n>>> +\n>>> +static unsigned int ipmr_rules_seq_read(struct net *net)\n>>> +{\n>>> +\treturn fib_rules_seq_read(net, RTNL_FAMILY_IPMR);\n>>> +}\n>>>  #else\n>>>  #define ipmr_for_each_table(mrt, net) \\\n>>>  \tfor (mrt = net->ipv4.mrt; mrt; mrt = NULL)\n>>> @@ -298,6 +308,16 @@ static void __net_exit ipmr_rules_exit(struct net *net)\n>>>  \tnet->ipv4.mrt = NULL;\n>>>  \trtnl_unlock();\n>>>  }\n>>> +\n>>> +static int ipmr_rules_dump(struct net *net, struct notifier_block *nb)\n>>> +{\n>>> +\treturn 0;\n>>> +}\n>>> +\n>>> +static unsigned int ipmr_rules_seq_read(struct net *net)\n>>> +{\n>>> +\treturn 0;\n>>> +}\n>>>  #endif\n>>>  \n>>>  static inline int ipmr_hash_cmp(struct rhashtable_compare_arg *arg,\n>>> @@ -587,6 +607,43 @@ static struct net_device *ipmr_reg_vif(struct net *net, struct mr_table *mrt)\n>>>  }\n>>>  #endif\n>>>  \n>>> +static int call_ipmr_vif_entry_notifier(struct notifier_block *nb,\n>>> +\t\t\t\t\tstruct net *net,\n>>> +\t\t\t\t\tenum fib_event_type event_type,\n>>> +\t\t\t\t\tstruct vif_device *vif,\n>>> +\t\t\t\t\tvifi_t vif_index, u32 tb_id)\n>>> +{\n>>> +\tstruct vif_entry_notifier_info info = {\n>>> +\t\t.info = {\n>>> +\t\t\t.family = RTNL_FAMILY_IPMR,\n>>> +\t\t\t.net = net,\n>>> +\t\t},\n>>> +\t\t.dev = vif->dev,\n>>> +\t\t.vif_index = vif_index,\n>>> +\t\t.vif_flags = vif->flags,\n>>> +\t\t.tb_id = tb_id,\n>>> +\t};\n>> We only use info.info which is fib_notifier_info, the\n>> vif_entry_notifier_info seems to be not needed, why not just\n>> use fib_notifier_info?\n> \n> No, that's not true.\n> \n> The driver gets the notification with a pointer to a fib_notifier_info struct,\n> and according to the type field uses container_of to get to the parent struct,\n> which in this case is vif_entry_notifier_info. All the fields here are needed.\n> You can see this code in patch 10.\n> \n> By the way, this function is completely symmetric to fib4 (which is in\n> fib_trie.c +88) and fib6 (which is in ip6_fib +336) notify functions, who uses\n> the exact same process.\n\nThanks for clarifying, I am not familar with ipmr, so only checking\ncoding style.\n\n\n> \n>>\n>>> +\n>>> +\treturn call_fib_notifier(nb, net, event_type, &info.info);\n>>> +}\n>>> +\n>>> +static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb,\n>>> +\t\t\t\t\tstruct net *net,\n>>> +\t\t\t\t\tenum fib_event_type event_type,\n>>> +\t\t\t\t\tstruct mfc_cache *mfc, u32 tb_id)\n>>> +{\n>>> +\tstruct mfc_entry_notifier_info info = {\n>>> +\t\t.info = {\n>>> +\t\t\t.family = RTNL_FAMILY_IPMR,\n>>> +\t\t\t.net = net,\n>>> +\t\t},\n>>> +\t\t.mfc = mfc,\n>>> +\t\t.tb_id = tb_id\n>>> +\t};\n>>> +\n>> As above.\n> \n> \n> As above.\n> \n> \n>>\n>>> +\treturn call_fib_notifier(nb, net, event_type, &info.info);\n>>> +}\n>>> +\n>>>  /**\n>>>   *\tvif_delete - Delete a VIF entry\n>>>   *\t@notify: Set to 1, if the caller is a notifier_call\n>>> @@ -3050,14 +3107,87 @@ static const struct net_protocol pim_protocol = {\n>>>  };\n>>>  #endif\n>>>  \n>>> +static unsigned int ipmr_seq_read(struct net *net)\n>>> +{\n>>> +\tASSERT_RTNL();\n>>> +\n>>> +\treturn net->ipv4.ipmr_seq + ipmr_rules_seq_read(net);\n>>> +}\n>>> +\n>>> +static int ipmr_dump(struct net *net, struct notifier_block *nb)\n>>> +{\n>>> +\tstruct mr_table *mrt;\n>>> +\tint err;\n>>> +\n>>> +\terr = ipmr_rules_dump(net, nb);\n>>> +\tif (err)\n>>> +\t\treturn err;\n>>> +\n>>> +\tipmr_for_each_table(mrt, net) {\n>>> +\t\tstruct vif_device *v = &mrt->vif_table[0];\n>>> +\t\tstruct mfc_cache *mfc;\n>>> +\t\tint vifi;\n>>> +\n>>> +\t\t/* Notifiy on table VIF entries */\n>>> +\t\tread_lock(&mrt_lock);\n>>> +\t\tfor (vifi = 0; vifi < mrt->maxvif; vifi++, v++) {\n>>> +\t\t\tif (!v->dev)\n>>> +\t\t\t\tcontinue;\n>>> +\n>>> +\t\t\tcall_ipmr_vif_entry_notifier(nb, net, FIB_EVENT_VIF_ADD,\n>>> +\t\t\t\t\t\t     v, vifi, mrt->id);\n>>> +\t\t}\n>>> +\t\tread_unlock(&mrt_lock);\n>>> +\n>>> +\t\t/* Notify on table MFC entries */\n>>> +\t\tlist_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list)\n>>> +\t\t\tcall_ipmr_mfc_entry_notifier(nb, net,\n>>> +\t\t\t\t\t\t     FIB_EVENT_ENTRY_ADD, mfc,\n>>> +\t\t\t\t\t\t     mrt->id);\n>>> +\t}\n>>> +\n>>> +\treturn 0;\n>>> +}\n>>> +\n>>> +static const struct fib_notifier_ops ipmr_notifier_ops_template = {\n>>> +\t.family\t\t= RTNL_FAMILY_IPMR,\n>>> +\t.fib_seq_read\t= ipmr_seq_read,\n>>> +\t.fib_dump\t= ipmr_dump,\n>>> +\t.owner\t\t= THIS_MODULE,\n>>> +};\n>>> +\n>>> +int __net_init ipmr_notifier_init(struct net *net)\n>>> +{\n>>> +\tstruct fib_notifier_ops *ops;\n>>> +\n>>> +\tnet->ipv4.ipmr_seq = 0;\n>>> +\n>>> +\tops = fib_notifier_ops_register(&ipmr_notifier_ops_template, net);\n>>> +\tif (IS_ERR(ops))\n>>> +\t\treturn PTR_ERR(ops);\n>>> +\tnet->ipv4.ipmr_notifier_ops = ops;\n>>> +\n>>> +\treturn 0;\n>>> +}\n>>> +\n>>> +static void __net_exit ipmr_notifier_exit(struct net *net)\n>>> +{\n>>> +\tfib_notifier_ops_unregister(net->ipv4.ipmr_notifier_ops);\n>>> +\tnet->ipv4.ipmr_notifier_ops = NULL;\n>>> +}\n>>> +\n>>>  /* Setup for IP multicast routing */\n>>>  static int __net_init ipmr_net_init(struct net *net)\n>>>  {\n>>>  \tint err;\n>>>  \n>>> +\terr = ipmr_notifier_init(net);\n>>> +\tif (err)\n>>> +\t\tgoto ipmr_notifier_fail;\n>>> +\n>>>  \terr = ipmr_rules_init(net);\n>>>  \tif (err < 0)\n>>> -\t\tgoto fail;\n>>> +\t\tgoto ipmr_rules_fail;\n>>>  \n>>>  #ifdef CONFIG_PROC_FS\n>>>  \terr = -ENOMEM;\n>>> @@ -3074,7 +3204,9 @@ static int __net_init ipmr_net_init(struct net *net)\n>>>  proc_vif_fail:\n>>>  \tipmr_rules_exit(net);\n>>>  #endif\n>>> -fail:\n>>> +ipmr_rules_fail:\n>>> +\tipmr_notifier_exit(net);\n>>> +ipmr_notifier_fail:\n>>>  \treturn err;\n>>>  }\n>>>  \n>>> @@ -3084,6 +3216,7 @@ static void __net_exit ipmr_net_exit(struct net *net)\n>>>  \tremove_proc_entry(\"ip_mr_cache\", net->proc_net);\n>>>  \tremove_proc_entry(\"ip_mr_vif\", net->proc_net);\n>>>  #endif\n>>> +\tipmr_notifier_exit(net);\n>>>  \tipmr_rules_exit(net);\n>>>  }\n>>>  \n>>>\n> \n> \n> .\n>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0vQs0225z9sNV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 16:32:52 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932385AbdIYGcv (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 02:32:51 -0400","from szxga05-in.huawei.com ([45.249.212.191]:6567 \"EHLO\n\tszxga05-in.huawei.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932135AbdIYGcu (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 02:32:50 -0400","from 172.30.72.60 (EHLO DGGEMS412-HUB.china.huawei.com)\n\t([172.30.72.60])\n\tby dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DHZ14052; Mon, 25 Sep 2017 14:32:42 +0800 (CST)","from [127.0.0.1] (10.74.191.121) by DGGEMS412-HUB.china.huawei.com\n\t(10.3.19.212) with Microsoft SMTP Server id 14.3.301.0;\n\tMon, 25 Sep 2017 14:32:39 +0800"],"Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","To":"Yotam Gigi <yotamg@mellanox.com>, Jiri Pirko <jiri@resnulli.us>,\n\t<netdev@vger.kernel.org>","CC":"<davem@davemloft.net>, <idosch@mellanox.com>, <mlxsw@mellanox.com>,\n\t<nikolay@cumulusnetworks.com>, <andrew@lunn.ch>","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>\n\t<fbf5db3b-a324-eed2-e6b8-b4b89e11f3c3@huawei.com>\n\t<54bef87c-8b7a-2512-3763-bac3469db421@mellanox.com>","From":"Yunsheng Lin <linyunsheng@huawei.com>","Message-ID":"<fb08799d-f1ae-6ee7-c65f-f949e60bf07d@huawei.com>","Date":"Mon, 25 Sep 2017 14:32:37 +0800","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.0","MIME-Version":"1.0","In-Reply-To":"<54bef87c-8b7a-2512-3763-bac3469db421@mellanox.com>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Originating-IP":"[10.74.191.121]","X-CFilter-Loop":"Reflected","X-Mirapoint-Virus-RAPID-Raw":"score=unknown(0),\n\trefid=str=0001.0A020202.59C8A30C.004A, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32","X-Mirapoint-Loop-Id":"c8d51d31e3936b22194f2cfdcade0530","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774576,"web_url":"http://patchwork.ozlabs.org/comment/1774576/","msgid":"<4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com>","list_archive_url":null,"date":"2017-09-25T09:35:57","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":66448,"url":"http://patchwork.ozlabs.org/api/people/66448/","name":"Nikolay Aleksandrov","email":"nikolay@cumulusnetworks.com"},"content":"On 24/09/17 20:22, Jiri Pirko wrote:\n> From: Yotam Gigi <yotamg@mellanox.com>\n> \n> Make the ipmr module register as a FIB notifier. To do that, implement both\n> the ipmr_seq_read and ipmr_dump ops.\n> \n> The ipmr_seq_read op returns a sequence counter that is incremented on\n> every notification related operation done by the ipmr. To implement that,\n> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n> new MFC route or VIF are added or deleted. The sequence operations are\n> protected by the RTNL lock.\n> \n> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n> and sends notifications about them. The entries dump is done under RCU\n> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n> under RCU.\n> \n> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n> ---\n> v1->v2:\n>  - Take the mrt_lock when dumping VIF entries.\n> ---\n>  include/linux/mroute.h   |  15 ++++++\n>  include/net/netns/ipv4.h |   3 ++\n>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>  3 files changed, 153 insertions(+), 2 deletions(-)\n> \n\nLGTM,\n\nReviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=cumulusnetworks.com\n\theader.i=@cumulusnetworks.com header.b=\"Y7eBruX1\"; \n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0zVD6k1Nz9t3R\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 19:36:04 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934403AbdIYJgD (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 05:36:03 -0400","from mail-wm0-f41.google.com ([74.125.82.41]:49682 \"EHLO\n\tmail-wm0-f41.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932817AbdIYJgB (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 05:36:01 -0400","by mail-wm0-f41.google.com with SMTP id r74so17568304wme.4\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 02:36:01 -0700 (PDT)","from [192.168.0.103] (46-10-142-144.ip.btc-net.bg. [46.10.142.144])\n\tby smtp.googlemail.com with ESMTPSA id\n\tq24sm3669474edb.49.2017.09.25.02.35.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Sep 2017 02:35:59 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cumulusnetworks.com; s=google;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=0CpVDUwLW3n9XROvKFiLH4E4FNraR/ZxCqIECK/aQ3M=;\n\tb=Y7eBruX1pS/uBEAdd8tQn6O6Eg/xeHJi2/L1OJTHA6La+Qn4AkCGnBHRMRbsFZKVaz\n\t/BYobwj7QyJaAGuXNk2ykzYAp633UhD0osNwUpk3O8R2jYa+Qm0RH2BUDp9acEx0+R36\n\t0SbPQ+vgt+91Dk3dVM1VxFnsECD+Wdp/ud5BQ=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=0CpVDUwLW3n9XROvKFiLH4E4FNraR/ZxCqIECK/aQ3M=;\n\tb=hr2qQUKpW2/z+quxWJB50EVOEvgg8CiR9o19D3HrE+9GoufsNxQr/QgGNJf45dgUZ3\n\tmY1Q/Mz3tyxkebRlpVf/It3nR4k045oovp696KJCgy0yl8CYveQ7T0QkSy+2LlBFosi/\n\tNRFPyvFXiTD55aC7kgW7r0KbgZIIqxnPvFMsi4Rz1nU7s7S4ca7RYaPszAQcawYcGgUI\n\tcGFSrHXbDo7aeQQ4QIANNUWPu6FqZ7qF6pREzAUuw/NeVZt79y8hrYri8Nzflsj1ZTzZ\n\tRg6zwrfFDUZekk0zez9sG7WeWKOBVf9FfhfIXp/nvkRbX/lOMA2bCWls2RF67g6OXPoq\n\tydeQ==","X-Gm-Message-State":"AHPjjUhHaGcuICMJngd7NTzX1TXoneV1n0cjnpnqfq7ml6rSaVxSC0aI\n\trJsvaWhWuSE+TXu8U1gPwj3crg==","X-Google-Smtp-Source":"AOwi7QDkN49LPhTlbGiGoL8Wfwqe9MdfqhRg3WnrVnaMQgmwv+8NMnruEaDnOxMpkqXBqnRghSbsoQ==","X-Received":"by 10.80.151.51 with SMTP id c48mr13412429edb.167.1506332160583; \n\tMon, 25 Sep 2017 02:36:00 -0700 (PDT)","Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","To":"Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>","Cc":"davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com, andrew@lunn.ch","From":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Message-ID":"<4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com>","Date":"Mon, 25 Sep 2017 12:35:57 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tIcedove/45.6.0","MIME-Version":"1.0","In-Reply-To":"<20170924172212.10096-4-jiri@resnulli.us>","Content-Type":"text/plain; charset=windows-1252","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774583,"web_url":"http://patchwork.ozlabs.org/comment/1774583/","msgid":"<bcf097e3-9c6c-b4bd-ac1e-8675ae87510e@cumulusnetworks.com>","list_archive_url":null,"date":"2017-09-25T09:40:16","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":66448,"url":"http://patchwork.ozlabs.org/api/people/66448/","name":"Nikolay Aleksandrov","email":"nikolay@cumulusnetworks.com"},"content":"On 25/09/17 12:35, Nikolay Aleksandrov wrote:\n> On 24/09/17 20:22, Jiri Pirko wrote:\n>> From: Yotam Gigi <yotamg@mellanox.com>\n>>\n>> Make the ipmr module register as a FIB notifier. To do that, implement both\n>> the ipmr_seq_read and ipmr_dump ops.\n>>\n>> The ipmr_seq_read op returns a sequence counter that is incremented on\n>> every notification related operation done by the ipmr. To implement that,\n>> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n>> new MFC route or VIF are added or deleted. The sequence operations are\n>> protected by the RTNL lock.\n>>\n>> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n>> and sends notifications about them. The entries dump is done under RCU\n>> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n>> under RCU.\n>>\n>> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n>> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n>> ---\n>> v1->v2:\n>>  - Take the mrt_lock when dumping VIF entries.\n>> ---\n>>  include/linux/mroute.h   |  15 ++++++\n>>  include/net/netns/ipv4.h |   3 ++\n>>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>>  3 files changed, 153 insertions(+), 2 deletions(-)\n>>\n> \n> LGTM,\n> \n> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>\n> \n> \n\nOne note here if you're going to spin another version of the set, you can\nconsider renaming the call_* functions to either mroute_* or ipmr_* (e.g.\nipmr_call_...). I personally prefer the ipmr prefix.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=cumulusnetworks.com\n\theader.i=@cumulusnetworks.com header.b=\"C8JRQ2Kf\"; \n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0zbB40Ssz9sBW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 19:40:22 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934235AbdIYJkU (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 05:40:20 -0400","from mail-wm0-f50.google.com ([74.125.82.50]:45939 \"EHLO\n\tmail-wm0-f50.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S933992AbdIYJkT (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 05:40:19 -0400","by mail-wm0-f50.google.com with SMTP id q124so17532946wmb.0\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 02:40:19 -0700 (PDT)","from [192.168.0.103] (46-10-142-144.ip.btc-net.bg. [46.10.142.144])\n\tby smtp.googlemail.com with ESMTPSA id\n\tw51sm3108884edd.60.2017.09.25.02.40.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Sep 2017 02:40:17 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cumulusnetworks.com; s=google;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=O+kyMj1C1J38NVZnf6SEJP3eNHgbxwDm2nt3inZC3rk=;\n\tb=C8JRQ2Kf3N8wktIbqtmvszryhimm15/3bxVyQkBpvnfKggVNv79PbjKz4y+/qNYf9J\n\tKVmnpP784qPyi+e6ATvOHG7WmyjdNV54i0o47wPhf59iPlrswVhENgjOUPRXiVnu0IHq\n\t0WKFLeda0fHBW2t3GZUylPJhChNpBD39GQcZM=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=O+kyMj1C1J38NVZnf6SEJP3eNHgbxwDm2nt3inZC3rk=;\n\tb=bKCt5cPS4zByHYB4NU1RKM0ZAAgcbL6Q3vIJ1pCvZu8KSYk3Ic+in+EzlxdAvSRn5l\n\tpauYMeq3ezf5XRYI7Ihrap5/j/cOLP2hauOw6d2hxbAVixiEOaQpGpiHyakuAUUh/rVA\n\tMhcVkmaQbWUTz0uirmiQHUY1RBGdsikahXhp8KXwAZjD343QqCyue4rOJNQTzViSXRvR\n\tgqv/HVhDIBdDtycjiLGZlJc5Qmkc38q0fL28Pc1ByCz23eO4IRks4X3r7RJIZXN0laoq\n\tOLM3ru5bkiFxMtBhjaEFWAhRiCdX6zUZT84rFpyzkFBROFw70SBaOUjupCAtqPr9K+5X\n\tHIEA==","X-Gm-Message-State":"AHPjjUhfz9dLLX79DA4LWRaV7hH7V+khYpVC3TzE+7kX3XewK4ad0Fk1\n\tfUVcCb5fTtA6yrDsMXE9ITPstQ==","X-Google-Smtp-Source":"AOwi7QCbNwm9wfBW2LjQNyLuiNvepgrTy6nn3N8SK4IiE721icXESMobjgmfa++fDw1z055mV/EJ/g==","X-Received":"by 10.80.221.197 with SMTP id x5mr13024684edk.166.1506332418441; \n\tMon, 25 Sep 2017 02:40:18 -0700 (PDT)","Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","To":"Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>\n\t<4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com>","Cc":"davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com, andrew@lunn.ch","From":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Message-ID":"<bcf097e3-9c6c-b4bd-ac1e-8675ae87510e@cumulusnetworks.com>","Date":"Mon, 25 Sep 2017 12:40:16 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tIcedove/45.6.0","MIME-Version":"1.0","In-Reply-To":"<4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com>","Content-Type":"text/plain; charset=windows-1252","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774586,"web_url":"http://patchwork.ozlabs.org/comment/1774586/","msgid":"<20170925094713.GD1899@nanopsycho>","list_archive_url":null,"date":"2017-09-25T09:47:13","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":15321,"url":"http://patchwork.ozlabs.org/api/people/15321/","name":"Jiri Pirko","email":"jiri@resnulli.us"},"content":"Mon, Sep 25, 2017 at 11:40:16AM CEST, nikolay@cumulusnetworks.com wrote:\n>On 25/09/17 12:35, Nikolay Aleksandrov wrote:\n>> On 24/09/17 20:22, Jiri Pirko wrote:\n>>> From: Yotam Gigi <yotamg@mellanox.com>\n>>>\n>>> Make the ipmr module register as a FIB notifier. To do that, implement both\n>>> the ipmr_seq_read and ipmr_dump ops.\n>>>\n>>> The ipmr_seq_read op returns a sequence counter that is incremented on\n>>> every notification related operation done by the ipmr. To implement that,\n>>> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n>>> new MFC route or VIF are added or deleted. The sequence operations are\n>>> protected by the RTNL lock.\n>>>\n>>> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n>>> and sends notifications about them. The entries dump is done under RCU\n>>> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n>>> under RCU.\n>>>\n>>> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n>>> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n>>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n>>> ---\n>>> v1->v2:\n>>>  - Take the mrt_lock when dumping VIF entries.\n>>> ---\n>>>  include/linux/mroute.h   |  15 ++++++\n>>>  include/net/netns/ipv4.h |   3 ++\n>>>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>>>  3 files changed, 153 insertions(+), 2 deletions(-)\n>>>\n>> \n>> LGTM,\n>> \n>> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>\n>> \n>> \n>\n>One note here if you're going to spin another version of the set, you can\n>consider renaming the call_* functions to either mroute_* or ipmr_* (e.g.\n>ipmr_call_...). I personally prefer the ipmr prefix.\n\nThe naming scheme in this patch is aligned with the rest of the code.\nPlease see \"call_netdevice_notifiers\" for example.\nPlease feel free to send a patch to chanche them all.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"XZlTryLL\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0zlB5Nqzz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 19:47:18 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934088AbdIYJrQ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 05:47:16 -0400","from mail-wr0-f196.google.com ([209.85.128.196]:38459 \"EHLO\n\tmail-wr0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751880AbdIYJrP (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 05:47:15 -0400","by mail-wr0-f196.google.com with SMTP id p37so1637852wrb.5\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 02:47:14 -0700 (PDT)","from localhost (ip-89-177-136-69.net.upcbroadband.cz.\n\t[89.177.136.69]) by smtp.gmail.com with ESMTPSA id\n\tk141sm5587956wmg.15.2017.09.25.02.47.13\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 02:47:13 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=hlDfbr1adAyQba3qDBBIi7fKsxwggROVHKfVSCmdKT0=;\n\tb=XZlTryLLYgyacr69gdI0dJCMC2eccpCIjje8iFoFSjfCrJdvy2f53LqmxCKIY1bO5A\n\tyCnEhKFnBpKfWal1D1KouudFA/GS+hCJ1Vsr/RwQuJ4onzy/s+E1fLOarZHnNMg/uBl8\n\tKNGtW/mHENUPwGly7I0aF+HdXtq7BPmyd6ntTn7lPGq3sVdxtN3CR2t8ZB4WNHz1/w6x\n\tK0gZUDrazYOrNM++WU5Z0GAUScnlQfAD1AmtWaKHARtcro5iGGzhWeUoMvS8BistI/LE\n\tZY3IHvHiD87Lm48PkbpnfxFO8F7fBtHNwez35LVN/UyE02/Xe5N/BksjFVTGhp5bN08E\n\tQw0g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=hlDfbr1adAyQba3qDBBIi7fKsxwggROVHKfVSCmdKT0=;\n\tb=pJhTywVFEztLzrkQNAG+u6YihMuSoC5f2GPwzWqaO4B6qeHp0qBCRMwxRsOIW5egV1\n\t3dryvUbF9XDwnIms8eyP0cTnkWOQN40qk7AImIl7GDr583QXAyguZV+WCIXDOH6ybYwc\n\tDhLNLgpBTFvEYlDnWpQsngmWZHxIJ1K5W5rClgA+f5KfZWZxyJd/cVsIt6MaZi77CvwL\n\tgoNf3Hep9/8Cg54JDPr+bWLxZk5vK+NuicXmvw5amVrs33aH+Hbaoqf/sj6ULI0oH3oE\n\tzXkpvxPx4LI6kLgvH8H1kwF6ZtmDNq7n4NgQI12Zdefmi1IXJbRWO+CtVdJO2bRWdNbz\n\tOqlg==","X-Gm-Message-State":"AHPjjUgUfAcVsdQcMAfjl4OxL3St5WUSIHpBQNRB40D58L5bb23kp57q\n\tuoxQ/r64ZyY4/z0AZ+O6F2i+Ig==","X-Google-Smtp-Source":"AOwi7QARBY9VlSG4swqtgq9ggESw0Ppa8hgvmPVpRu4QlH3Ah4fnDrytpoutdlN0B5kX+7OxIcDS6A==","X-Received":"by 10.223.150.27 with SMTP id b27mr5523349wra.100.1506332834253; \n\tMon, 25 Sep 2017 02:47:14 -0700 (PDT)","Date":"Mon, 25 Sep 2017 11:47:13 +0200","From":"Jiri Pirko <jiri@resnulli.us>","To":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","Cc":"netdev@vger.kernel.org, davem@davemloft.net, yotamg@mellanox.com,\n\tidosch@mellanox.com, mlxsw@mellanox.com, andrew@lunn.ch","Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","Message-ID":"<20170925094713.GD1899@nanopsycho>","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>\n\t<4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com>\n\t<bcf097e3-9c6c-b4bd-ac1e-8675ae87510e@cumulusnetworks.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<bcf097e3-9c6c-b4bd-ac1e-8675ae87510e@cumulusnetworks.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1774593,"web_url":"http://patchwork.ozlabs.org/comment/1774593/","msgid":"<9360a6b5-c7e6-ec77-5efd-5dfc0a1a7848@cumulusnetworks.com>","list_archive_url":null,"date":"2017-09-25T09:59:07","subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","submitter":{"id":66448,"url":"http://patchwork.ozlabs.org/api/people/66448/","name":"Nikolay Aleksandrov","email":"nikolay@cumulusnetworks.com"},"content":"On 25/09/17 12:47, Jiri Pirko wrote:\n> Mon, Sep 25, 2017 at 11:40:16AM CEST, nikolay@cumulusnetworks.com wrote:\n>> On 25/09/17 12:35, Nikolay Aleksandrov wrote:\n>>> On 24/09/17 20:22, Jiri Pirko wrote:\n>>>> From: Yotam Gigi <yotamg@mellanox.com>\n>>>>\n>>>> Make the ipmr module register as a FIB notifier. To do that, implement both\n>>>> the ipmr_seq_read and ipmr_dump ops.\n>>>>\n>>>> The ipmr_seq_read op returns a sequence counter that is incremented on\n>>>> every notification related operation done by the ipmr. To implement that,\n>>>> add a sequence counter in the netns_ipv4 struct and increment it whenever a\n>>>> new MFC route or VIF are added or deleted. The sequence operations are\n>>>> protected by the RTNL lock.\n>>>>\n>>>> The ipmr_dump iterates the list of MFC routes and the list of VIF entries\n>>>> and sends notifications about them. The entries dump is done under RCU\n>>>> where the VIF dump uses the mrt_lock too, as the vif->dev field can change\n>>>> under RCU.\n>>>>\n>>>> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>\n>>>> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n>>>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n>>>> ---\n>>>> v1->v2:\n>>>>  - Take the mrt_lock when dumping VIF entries.\n>>>> ---\n>>>>  include/linux/mroute.h   |  15 ++++++\n>>>>  include/net/netns/ipv4.h |   3 ++\n>>>>  net/ipv4/ipmr.c          | 137 ++++++++++++++++++++++++++++++++++++++++++++++-\n>>>>  3 files changed, 153 insertions(+), 2 deletions(-)\n>>>>\n>>>\n>>> LGTM,\n>>>\n>>> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>\n>>>\n>>>\n>>\n>> One note here if you're going to spin another version of the set, you can\n>> consider renaming the call_* functions to either mroute_* or ipmr_* (e.g.\n>> ipmr_call_...). I personally prefer the ipmr prefix.\n> \n> The naming scheme in this patch is aligned with the rest of the code.\n\nDefinitely not aligned with the rest of the ipmr code because it does not\nhave such calls. Its notifications have a prefix which is not call_.\n\n> Please see \"call_netdevice_notifiers\" for example.\n\nSure, I don't care that much which style you choose, that's why I wrote\n_consider_, since this code is contained within ipmr and is not exported\nanywhere.\n\n> Please feel free to send a patch to chanche them all.\n> \n\nJumping the gun a little bit here. :-)","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=cumulusnetworks.com\n\theader.i=@cumulusnetworks.com header.b=\"GRcELsEV\"; \n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y100y0bhhz9t62\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 19:59:14 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753869AbdIYJ7L (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 05:59:11 -0400","from mail-wm0-f48.google.com ([74.125.82.48]:45551 \"EHLO\n\tmail-wm0-f48.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751408AbdIYJ7K (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 25 Sep 2017 05:59:10 -0400","by mail-wm0-f48.google.com with SMTP id q124so17692572wmb.0\n\tfor <netdev@vger.kernel.org>; Mon, 25 Sep 2017 02:59:10 -0700 (PDT)","from [192.168.0.103] (46-10-142-144.ip.btc-net.bg. [46.10.142.144])\n\tby smtp.googlemail.com with ESMTPSA id\n\tm25sm3689893edj.17.2017.09.25.02.59.07\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Sep 2017 02:59:08 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cumulusnetworks.com; s=google;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=7L4YRlPs7aOCoKM7HskQHlpIvrnkBOarSidfkNuAekA=;\n\tb=GRcELsEVfLpuB3F0htlSxUynxHJ+Mn5kWSRusGyR8L603Fzb5nVzuI8xmcbRaP6nix\n\td2MPwt/6ZIya8RBdRWJRKK6ZrD8WeI0QJouVLyBHtrubVMfeSCfHaqyP4ZZ6c/pK+Bw5\n\tpd9tT6B+S9yL6VhVUY4pJtL+eNNkFERhqt4f4=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=7L4YRlPs7aOCoKM7HskQHlpIvrnkBOarSidfkNuAekA=;\n\tb=Re9sM6DQiAgucmA/vjvruk0Bi726m0Nq2pUCbU382Wgi4jmgH1sIJt1lUskRUu7CSm\n\tOuVvbZKJLEEZ5Gr21Kq0NmycahCixDAqJEq7XQMCYIZ/6VEmgZ+y11HyvOQd6U4+uTvM\n\tLoYEKLE7L6dEukFlZQZ5rpYRdIGpN2UQTTx7kumpMSrKaJQnkvi6xGLya6hEV2jgC7MB\n\tHYLc8aYcyrj+BwLpURm/zunA4SfsSaFr9UIXf/9Y2ioGaHyiz7lw6MwJkYdYGvStrF7Q\n\tlnElwT2fKTPTMxmTHP7Jtl3tabf3mGJKGEncJiuQ+ZP9JsAdKhTx+4vOFMtZ8YoOmxdW\n\t51TQ==","X-Gm-Message-State":"AHPjjUg5Znt7oZOFcemmQw+uDTMp+ZLgzLKi8rLfdOa1T/qJedqyIIKP\n\tAQNng5UeLNKR7BHXtYmcmFuEdw==","X-Google-Smtp-Source":"AOwi7QBX8xAnyA0D1H8qnKvXwTR5TdD494DwFBVReNX2g9aP+TIvO4+5+Kyzh3jdn3rGCAzkyqT9XA==","X-Received":"by 10.80.180.214 with SMTP id x22mr13085725edd.230.1506333549396;\n\tMon, 25 Sep 2017 02:59:09 -0700 (PDT)","Subject":"Re: [patch net-next v2 03/12] ipmr: Add FIB notification access\n\tfunctions","To":"Jiri Pirko <jiri@resnulli.us>","References":"<20170924172212.10096-1-jiri@resnulli.us>\n\t<20170924172212.10096-4-jiri@resnulli.us>\n\t<4c09e09c-d184-0d69-110d-a3d5ba721564@cumulusnetworks.com>\n\t<bcf097e3-9c6c-b4bd-ac1e-8675ae87510e@cumulusnetworks.com>\n\t<20170925094713.GD1899@nanopsycho>","Cc":"netdev@vger.kernel.org, davem@davemloft.net, yotamg@mellanox.com,\n\tidosch@mellanox.com, mlxsw@mellanox.com, andrew@lunn.ch","From":"Nikolay Aleksandrov <nikolay@cumulusnetworks.com>","X-Enigmail-Draft-Status":"N1110","Message-ID":"<9360a6b5-c7e6-ec77-5efd-5dfc0a1a7848@cumulusnetworks.com>","Date":"Mon, 25 Sep 2017 12:59:07 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tIcedove/45.6.0","MIME-Version":"1.0","In-Reply-To":"<20170925094713.GD1899@nanopsycho>","Content-Type":"text/plain; charset=windows-1252","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]