nexthop: Pass extack to register_nexthop_notifier()
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 Nov 2020 13:30:34 +0000 (15:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Nov 2020 19:28:49 +0000 (11:28 -0800)
This will be used by the next patch which extends the function to replay
all the existing nexthops to the notifier block being registered.

Device drivers will be able to pass extack to the function since it is
passed to them upon reload from devlink.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vxlan.c
include/net/nexthop.h
net/ipv4/nexthop.c

index b9db20b4ebfd744658aef8be209e80764e33e0fe..183e708dc6cb399b3c6fdb49e462d05940229dcb 100644 (file)
@@ -4711,7 +4711,8 @@ static __net_init int vxlan_init_net(struct net *net)
        for (h = 0; h < PORT_HASH_SIZE; ++h)
                INIT_HLIST_HEAD(&vn->sock_list[h]);
 
-       return register_nexthop_notifier(net, &vn->nexthop_notifier_block);
+       return register_nexthop_notifier(net, &vn->nexthop_notifier_block,
+                                        NULL);
 }
 
 static void vxlan_destroy_tunnels(struct net *net, struct list_head *head)
index 9c85199b826efd0e4629c82af6f829d9403cbf85..226930d66b637d1ed2e30bc765d5c69d8f8b398b 100644 (file)
@@ -144,7 +144,8 @@ struct nh_notifier_info {
        };
 };
 
-int register_nexthop_notifier(struct net *net, struct notifier_block *nb);
+int register_nexthop_notifier(struct net *net, struct notifier_block *nb,
+                             struct netlink_ext_ack *extack);
 int unregister_nexthop_notifier(struct net *net, struct notifier_block *nb);
 void nexthop_set_hw_flags(struct net *net, u32 id, bool offload, bool trap);
 
index d5a2c28bea4906f7ab4c5e75e84daae3f02501be..9a235d5c56701aa92ba7ddb8c9157d9b2e76899a 100644 (file)
@@ -2118,7 +2118,8 @@ static struct notifier_block nh_netdev_notifier = {
        .notifier_call = nh_netdev_event,
 };
 
-int register_nexthop_notifier(struct net *net, struct notifier_block *nb)
+int register_nexthop_notifier(struct net *net, struct notifier_block *nb,
+                             struct netlink_ext_ack *extack)
 {
        return blocking_notifier_chain_register(&net->nexthop.notifier_chain,
                                                nb);