[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180103075426.GD761@splinter>
Date: Wed, 3 Jan 2018 09:54:26 +0200
From: Ido Schimmel <idosch@...sch.org>
To: David Ahern <dsahern@...il.com>
Cc: Ido Schimmel <idosch@...lanox.com>, netdev@...r.kernel.org,
davem@...emloft.net, roopa@...ulusnetworks.com,
nicolas.dichtel@...nd.com, mlxsw@...lanox.com
Subject: Re: [RFC PATCH net-next 16/19] ipv6: Flush multipath routes when all
siblings are dead
On Tue, Jan 02, 2018 at 10:38:19AM -0700, David Ahern wrote:
> On 12/31/17 9:15 AM, Ido Schimmel wrote:
> > @@ -3550,13 +3581,21 @@ static int fib6_ifdown(struct rt6_info *rt, void *p_arg)
> > }
> > return -2;
> > case NETDEV_DOWN:
> > - if (rt->dst.dev != dev)
> > - break;
> > - if (rt->rt6i_nsiblings == 0 ||
> > - !rt->rt6i_idev->cnf.ignore_routes_with_linkdown)
> > + if (rt->should_flush)
> > return -1;
> > - rt->rt6i_nh_flags |= (RTNH_F_DEAD | RTNH_F_LINKDOWN);
> > - break;
> > + if (!rt->rt6i_nsiblings)
> > + return rt->dst.dev == dev ? -1 : 0;
> > + if (rt6_multipath_uses_dev(rt, dev)) {
> > + if (rt->rt6i_nsiblings + 1 ==
> > + rt6_multipath_dead_count(rt, dev)) {
>
> I'd prefer a tmp variable to make that line more readable and still
> within the 80 column guideline.
> unsigned int count;
>
> count = rt6_multipath_dead_count(rt, dev);
> if (rt->rt6i_nsiblings + 1 == count) {
OK, will change.
Thanks!
>
>
> > + rt6_multipath_flush(rt);
> > + return -1;
> > + }
> > + rt6_multipath_nh_flags_set(rt, dev, RTNH_F_DEAD |
> > + RTNH_F_LINKDOWN);
> > + fib6_update_sernum(rt);
> > + }
> > + return -2;
Powered by blists - more mailing lists