On Wed, Jun 10, 2015 at 7:37 PM, Andy Gospodarek <go...@cumulusnetworks.com> wrote:
> @@ -1129,7 +1142,15 @@ int fib_sync_down_dev(struct net_device *dev, int > force) > dead++; > else if (nexthop_nh->nh_dev == dev && > nexthop_nh->nh_scope != scope) { > - nexthop_nh->nh_flags |= RTNH_F_DEAD; > + switch (event) { > + case NETDEV_DOWN: > + case NETDEV_UNREGISTER: > + nexthop_nh->nh_flags |= RTNH_F_DEAD; > + /* fall through */ > + case NETDEV_CHANGE: > + nexthop_nh->nh_flags |= > RTNH_F_LINKDOWN; > + break; > + } > #ifdef CONFIG_IP_ROUTE_MULTIPATH > spin_lock_bh(&fib_multipath_lock); > fi->fib_power -= nexthop_nh->nh_power; > @@ -1139,14 +1160,22 @@ int fib_sync_down_dev(struct net_device *dev, int > force) > dead++; > } > #ifdef CONFIG_IP_ROUTE_MULTIPATH > - if (force > 1 && nexthop_nh->nh_dev == dev) { > + if (event == NETDEV_UNREGISTER && nexthop_nh->nh_dev > == dev) { > dead = fi->fib_nhs; > break; > } > #endif > } endfor_nexthops(fi) > if (dead == fi->fib_nhs) { > - fi->fib_flags |= RTNH_F_DEAD; > + switch (event) { > + case NETDEV_DOWN: > + case NETDEV_UNREGISTER: > + fi->fib_flags |= RTNH_F_DEAD; > + /* fall through */ > + case NETDEV_CHANGE: > + fi->fib_flags |= RTNH_F_LINKDOWN; RTNH_F_LINKDOWN is to mark linkdown nexthop devs....why is the route fi being marked RTNH_F_LINKDOWN? The RTNH_F_LINKDOWN comment says: #define RTNH_F_LINKDOWN 16 /* carrier-down on nexthop */ It's a per-nh flag, not per-route flag, correct? Can you show an ECMP example with only a subset of the nexthops dev linkdowned? Show the ip route output after going thru some link down/up events on some of the nexthops devs. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html