Commit ce7e9c8a authored by Ido Schimmel's avatar Ido Schimmel Committed by Jakub Kicinski

nexthop: Pass extack to register_nexthop_notifier()

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: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 833a1065
...@@ -4711,7 +4711,8 @@ static __net_init int vxlan_init_net(struct net *net) ...@@ -4711,7 +4711,8 @@ static __net_init int vxlan_init_net(struct net *net)
for (h = 0; h < PORT_HASH_SIZE; ++h) for (h = 0; h < PORT_HASH_SIZE; ++h)
INIT_HLIST_HEAD(&vn->sock_list[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) static void vxlan_destroy_tunnels(struct net *net, struct list_head *head)
......
...@@ -144,7 +144,8 @@ struct nh_notifier_info { ...@@ -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); 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); void nexthop_set_hw_flags(struct net *net, u32 id, bool offload, bool trap);
......
...@@ -2118,7 +2118,8 @@ static struct notifier_block nh_netdev_notifier = { ...@@ -2118,7 +2118,8 @@ static struct notifier_block nh_netdev_notifier = {
.notifier_call = nh_netdev_event, .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, return blocking_notifier_chain_register(&net->nexthop.notifier_chain,
nb); nb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment