From: Ido Schimmel <idosch@idosch•org>
To: David Ahern <dsahern@gmail•com>
Cc: Ido Schimmel <idosch@mellanox•com>,
netdev@vger•kernel.org, davem@davemloft•net, jiri@mellanox•com,
mlxsw@mellanox•com
Subject: Re: [PATCH net-next 1/2] mlxsw: spectrum_router: Return an error for non-default FIB rules
Date: Tue, 1 May 2018 18:19:27 +0300 [thread overview]
Message-ID: <20180501151927.GA20577@splinter.mtl.com> (raw)
In-Reply-To: <320c79af-3de6-f012-75a2-e5a7effde9f6@gmail.com>
On Tue, May 01, 2018 at 09:16:23AM -0600, David Ahern wrote:
> On 5/1/18 2:16 AM, Ido Schimmel wrote:
> > Since commit 9776d32537d2 ("net: Move call_fib_rule_notifiers up in
> > fib_nl_newrule") it is possible to forbid the installation of
> > unsupported FIB rules.
> >
> > Have mlxsw return an error for non-default FIB rules in addition to the
> > existing extack message.
> >
> > Example:
> > # ip rule add from 198.51.100.1 table 10
> > Error: mlxsw_spectrum: FIB rules not supported.
> >
> > Note that offload is only aborted when non-default FIB rules are already
> > installed and merely replayed during module initialization.
> >
> > Signed-off-by: Ido Schimmel <idosch@mellanox•com>
> > ---
> > drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
> > index 8e4edb634b11..baea97560029 100644
> > --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
> > +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
> > @@ -5899,7 +5899,7 @@ static int mlxsw_sp_router_fib_rule_event(unsigned long event,
> > }
> >
> > if (err < 0)
> > - NL_SET_ERR_MSG_MOD(extack, "FIB rules not supported. Aborting offload");
> > + NL_SET_ERR_MSG_MOD(extack, "FIB rules not supported");
> >
> > return err;
>
> shouldn't mlxsw_sp_router_fib_rule_event return -EOPNOTSUPP instead of
> -1 (EPERM)?
The -1 wasn't visible until now so it didn't matter. Will change to
-EOPNOTSUPP in v2. Thanks
next prev parent reply other threads:[~2018-05-01 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 8:16 [PATCH net-next 0/2] mlxsw: Reject unsupported FIB configurations Ido Schimmel
2018-05-01 8:16 ` [PATCH net-next 1/2] mlxsw: spectrum_router: Return an error for non-default FIB rules Ido Schimmel
2018-05-01 15:16 ` David Ahern
2018-05-01 15:19 ` Ido Schimmel [this message]
2018-05-01 8:16 ` [PATCH net-next 2/2] mlxsw: spectrum_router: Return an error for routes added after abort Ido Schimmel
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=20180501151927.GA20577@splinter.mtl.com \
--to=idosch@idosch$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@gmail$(echo .)com \
--cc=idosch@mellanox$(echo .)com \
--cc=jiri@mellanox$(echo .)com \
--cc=mlxsw@mellanox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.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