[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170315153618.GB30399@splinter.mtl.com>
Date: Wed, 15 Mar 2017 17:36:18 +0200
From: Ido Schimmel <idosch@...sch.org>
To: David Ahern <dsa@...ulusnetworks.com>
Cc: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
davem@...emloft.net, idosch@...lanox.com, mlxsw@...lanox.com,
shm@...ulusnetworks.com, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, kaber@...sh.net, lorenzo@...gle.com,
mateusz.bajorski@...ia.com
Subject: Re: [patch net-next v2 3/9] ipv4: fib_rules: Dump FIB rules when
registering FIB notifier
On Wed, Mar 15, 2017 at 09:22:10AM -0600, David Ahern wrote:
> On 3/15/17 5:05 AM, Jiri Pirko wrote:
> > @@ -2510,10 +2511,20 @@ static void mlxsw_sp_router_fib4_abort(struct mlxsw_sp *mlxsw_sp)
> > dev_warn(mlxsw_sp->bus_info->dev, "Failed to set abort trap.\n");
> > }
> >
> > +static bool mlxsw_sp_fib4_rule_default(const struct fib_rule *rule)
> > +{
> > + if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL ||
> > + (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN &&
> > + rule->table != RT_TABLE_DEFAULT))
> > + return false;
> > + return true;
> > +}
> > +
>
> Since a default rule is defined by fib_default_rule_add(), and its
> callers, IPv4 and IPv6 should have the above as an exported helper.
OK. Will add this in IPv4 code. When we add support for IPv6 I'll do the
same there.
Thanks
Powered by blists - more mailing lists