From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next v2 1/2] mlxsw: spectrum_router: Return an error for non-default FIB rules Date: Wed, 2 May 2018 09:26:03 -0600 Message-ID: References: <20180502071735.32352-1-idosch@mellanox.com> <20180502071735.32352-2-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, jiri@mellanox.com, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:40984 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbeEBP0G (ORCPT ); Wed, 2 May 2018 11:26:06 -0400 Received: by mail-pg0-f65.google.com with SMTP id m21-v6so10881109pgv.8 for ; Wed, 02 May 2018 08:26:06 -0700 (PDT) In-Reply-To: <20180502071735.32352-2-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 5/2/18 1:17 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. Next, I think we need a user override flag for rules to prevent hardware from limiting the rules that can be added and aborting offload. For example, if the user knows that a rule is meant to direct traffic out of a management VRF and is unrelated to front panel ports the offload should ignore it. > > 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 > --- > drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > Acked-by: David Ahern