Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/broadcom/genet/bcmmii.c drivers/net/hyperv/netvsc.c kernel/bpf/hashtab.c Almost entirely overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1298,6 +1298,8 @@ static void mpls_ifdown(struct net_device *dev, int event)
|
||||
{
|
||||
struct mpls_route __rcu **platform_label;
|
||||
struct net *net = dev_net(dev);
|
||||
unsigned int nh_flags = RTNH_F_DEAD | RTNH_F_LINKDOWN;
|
||||
unsigned int alive;
|
||||
unsigned index;
|
||||
|
||||
platform_label = rtnl_dereference(net->mpls.platform_label);
|
||||
@@ -1307,9 +1309,11 @@ static void mpls_ifdown(struct net_device *dev, int event)
|
||||
if (!rt)
|
||||
continue;
|
||||
|
||||
alive = 0;
|
||||
change_nexthops(rt) {
|
||||
if (rtnl_dereference(nh->nh_dev) != dev)
|
||||
continue;
|
||||
goto next;
|
||||
|
||||
switch (event) {
|
||||
case NETDEV_DOWN:
|
||||
case NETDEV_UNREGISTER:
|
||||
@@ -1317,13 +1321,16 @@ static void mpls_ifdown(struct net_device *dev, int event)
|
||||
/* fall through */
|
||||
case NETDEV_CHANGE:
|
||||
nh->nh_flags |= RTNH_F_LINKDOWN;
|
||||
if (event != NETDEV_UNREGISTER)
|
||||
ACCESS_ONCE(rt->rt_nhn_alive) = rt->rt_nhn_alive - 1;
|
||||
break;
|
||||
}
|
||||
if (event == NETDEV_UNREGISTER)
|
||||
RCU_INIT_POINTER(nh->nh_dev, NULL);
|
||||
next:
|
||||
if (!(nh->nh_flags & nh_flags))
|
||||
alive++;
|
||||
} endfor_nexthops(rt);
|
||||
|
||||
WRITE_ONCE(rt->rt_nhn_alive, alive);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user