diff options
author | Ido Schimmel <idosch@nvidia.com> | 2020-11-04 15:30:26 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-06 11:28:49 -0800 |
commit | 1ec69d187cb8f564af570df7edf2c500dcb13702 (patch) | |
tree | d270eda199a2e4fd87daba863ef9fa371c610cad /drivers | |
parent | 5ca474f23454d4231e2e879d4d0daf3f85de582c (diff) | |
download | lwn-1ec69d187cb8f564af570df7edf2c500dcb13702.tar.gz lwn-1ec69d187cb8f564af570df7edf2c500dcb13702.zip |
nexthop: vxlan: Convert to new notification info
Convert the sole listener of the nexthop notification chain (the VXLAN
driver) to the new notification info.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/vxlan.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 876679af6f7c..b9db20b4ebfd 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -4684,9 +4684,14 @@ static void vxlan_fdb_nh_flush(struct nexthop *nh) static int vxlan_nexthop_event(struct notifier_block *nb, unsigned long event, void *ptr) { - struct nexthop *nh = ptr; + struct nh_notifier_info *info = ptr; + struct nexthop *nh; + + if (event != NEXTHOP_EVENT_DEL) + return NOTIFY_DONE; - if (!nh || event != NEXTHOP_EVENT_DEL) + nh = nexthop_find_by_id(info->net, info->id); + if (!nh) return NOTIFY_DONE; vxlan_fdb_nh_flush(nh); |