public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch•org>
To: David Ahern <dsa@cumulusnetworks•com>
Cc: Jiri Pirko <jiri@resnulli•us>,
	netdev@vger•kernel.org, davem@davemloft•net, idosch@mellanox•com,
	mlxsw@mellanox•com, shm@cumulusnetworks•com,
	kuznet@ms2•inr.ac.ru, jmorris@namei•org, yoshfuji@linux-ipv6•org,
	kaber@trash•net, lorenzo@google•com, mateusz.bajorski@nokia•com
Subject: Re: [patch net-next v2 3/9] ipv4: fib_rules: Dump FIB rules when registering FIB notifier
Date: Wed, 15 Mar 2017 17:36:18 +0200	[thread overview]
Message-ID: <20170315153618.GB30399@splinter.mtl.com> (raw)
In-Reply-To: <fc5a1b5e-e9e6-ad78-081d-d031ebed1a2c@cumulusnetworks.com>

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

  reply	other threads:[~2017-03-15 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 11:05 [patch net-next v2 0/9] mlxsw: Enable VRF offload Jiri Pirko
2017-03-15 11:05 ` [patch net-next v2 1/9] net: fib_rules: Check if selector matches all packets Jiri Pirko
2017-03-15 15:15   ` David Ahern
2017-03-15 15:30     ` Ido Schimmel
2017-03-15 15:33       ` David Ahern
2017-03-15 15:37         ` Ido Schimmel
2017-03-15 11:05 ` [patch net-next v2 2/9] ipv4: fib_rules: Add notifier info to FIB rules notifications Jiri Pirko
2017-03-15 15:16   ` David Ahern
2017-03-15 11:05 ` [patch net-next v2 3/9] ipv4: fib_rules: Dump FIB rules when registering FIB notifier Jiri Pirko
2017-03-15 15:22   ` David Ahern
2017-03-15 15:36     ` Ido Schimmel [this message]
2017-03-15 11:05 ` [patch net-next v2 4/9] net: vrf: Set slave's private flag before linking Jiri Pirko
2017-03-15 11:05 ` [patch net-next v2 5/9] mlxsw: spectrum_router: Associate RIFs with correct VR Jiri Pirko
2017-03-15 11:05 ` [patch net-next v2 6/9] mlxsw: spectrum_router: Don't destroy RIF if L3 slave Jiri Pirko
2017-03-15 11:05 ` [patch net-next v2 7/9] mlxsw: spectrum_router: Add support for VRFs Jiri Pirko
2017-03-15 11:05 ` [patch net-next v2 8/9] mlxsw: spectrum_router: Add support for VRFs on top of bridges Jiri Pirko
2017-03-15 11:05 ` [patch net-next v2 9/9] mlxsw: spectrum_router: Don't abort on l3mdev rules Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170315153618.GB30399@splinter.mtl.com \
    --to=idosch@idosch$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=dsa@cumulusnetworks$(echo .)com \
    --cc=idosch@mellanox$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=jmorris@namei$(echo .)org \
    --cc=kaber@trash$(echo .)net \
    --cc=kuznet@ms2$(echo .)inr.ac.ru \
    --cc=lorenzo@google$(echo .)com \
    --cc=mateusz.bajorski@nokia$(echo .)com \
    --cc=mlxsw@mellanox$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shm@cumulusnetworks$(echo .)com \
    --cc=yoshfuji@linux-ipv6$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox