All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, idosch@mellanox.com, mlxsw@mellanox.com,
	dsa@cumulusnetworks.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: [patch net-next v2 9/9] mlxsw: spectrum_router: Don't abort on l3mdev rules
Date: Wed, 15 Mar 2017 12:05:12 +0100	[thread overview]
Message-ID: <1489575912-6469-10-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1489575912-6469-1-git-send-email-jiri@resnulli.us>

From: Ido Schimmel <idosch@mellanox.com>

Before we allow port netdevs to be enslaved to a VRF master we need to
make sure the device's routing tables won't be flushed upon the
insertion of a l3mdev rule.

Note that we assume the notified l3mdev rule is a simple rule as used by
the VRF master. We don't check for the presence of other selectors such
as 'iif' and 'oif'.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 4924d9f..04c8c56 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -2563,7 +2563,7 @@ static void mlxsw_sp_router_fib_event_work(struct work_struct *work)
 	case FIB_EVENT_RULE_ADD: /* fall through */
 	case FIB_EVENT_RULE_DEL:
 		rule = fib_work->fr_info.rule;
-		if (!mlxsw_sp_fib4_rule_default(rule))
+		if (!mlxsw_sp_fib4_rule_default(rule) && !rule->l3mdev)
 			mlxsw_sp_router_fib4_abort(mlxsw_sp);
 		fib_rule_put(rule);
 		break;
-- 
2.7.4

      parent reply	other threads:[~2017-03-15 11:05 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
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 ` Jiri Pirko [this message]

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=1489575912-6469-10-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=idosch@mellanox.com \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=lorenzo@google.com \
    --cc=mateusz.bajorski@nokia.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=shm@cumulusnetworks.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.