From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, idosch@mellanox.com, mlxsw@mellanox.com
Subject: [patch net-next 00/10] mlxsw: Enable VRF offload
Date: Mon, 13 Mar 2017 08:35:26 +0100 [thread overview]
Message-ID: <1489390535-2566-1-git-send-email-jiri@resnulli.us> (raw)
From: Jiri Pirko <jiri@mellanox.com>
Ido says:
Packets received from netdevs enslaved to different VRF devices are
forwarded using different FIB tables. In the Spectrum ASIC this is
achieved by binding different router interfaces (RIFs) to different
virtual routers (VRs). Each RIF represents an enslaved netdev and each
VR has its own FIB table according to which packets are forwarded.
The first three patches mark the default FIB rules and extend the FIB
notification chain to include the rule's info as part of the
RULE_{ADD,DEL} events. This allows offloading drivers to sanitize the
rules they don't support and flush their tables.
Patches 4-5 introduce small changes in the VRF driver to allow capable
drivers to more easily offload VRFs.
Finally, the last patches gradually add support for VRFs in the mlxsw
driver. First, on top of port netdevs, stacked LAG and VLAN devices and
then on top of bridges.
Some limitations I would like to point out:
1) The old model where 'oif' / 'iif' rules were programmed for each L3
master device isn't supported. Upon insertion of these rules the driver
will flush its tables and forwarding will be done by the kernel instead.
It's inferior in every way to the single 'l3mdev' rule, so this shouldn't
be an issue.
2) Inter-VRF routes pointing to a VRF device aren't offloaded. Packets
hitting these routes will be forwarded by the kernel. Inter-VRF routes
pointing to netdevs enslaved to a different VRF are offloaded.
3) There's a small discrepancy between the kernel's datapath and the
device's. By default, packets forwarded by the kernel first do a lookup
in the LOCAL table and then in the VRF's table (assuming no match). In
the device, lookup is done only in the VRF's table, which is probably
the intended behavior.
Ido Schimmel (10):
net: fib_rules: Add default rule indication
ipv4: fib_rules: Add notifier info to FIB rules notifications
ipv4: fib_rules: Dump FIB rules when registering FIB notifier
net: Add netif_is_vrf_master helper
net: vrf: Set slave's private flag before linking
mlxsw: spectrum_router: Associate RIFs with correct VR
mlxsw: spectrum_router: Don't destroy RIF if L3 slave
mlxsw: spectrum_router: Add support for VRFs
mlxsw: spectrum_router: Add support for VRFs on top of bridges
mlxsw: spectrum_router: Don't abort on l3mdev rules
drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 +
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 71 ++++++++++++++++-
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 8 ++
.../net/ethernet/mellanox/mlxsw/spectrum_router.c | 89 +++++++++++++++++++++-
drivers/net/ethernet/rocker/Kconfig | 2 +-
drivers/net/ethernet/rocker/rocker_main.c | 15 +++-
drivers/net/vrf.c | 10 ++-
include/linux/netdevice.h | 8 ++
include/net/fib_rules.h | 3 +-
include/net/ip_fib.h | 7 ++
net/core/fib_rules.c | 1 +
net/ipv4/fib_rules.c | 32 ++++++--
12 files changed, 224 insertions(+), 23 deletions(-)
--
2.7.4
next reply other threads:[~2017-03-13 7:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 7:35 Jiri Pirko [this message]
2017-03-13 7:38 ` [patch net-next 01/10] net: fib_rules: Add default rule indication Jiri Pirko
2017-03-13 7:38 ` [patch net-next 02/10] ipv4: fib_rules: Add notifier info to FIB rules notifications Jiri Pirko
2017-03-13 7:38 ` [patch net-next 03/10] ipv4: fib_rules: Dump FIB rules when registering FIB notifier Jiri Pirko
2017-03-13 14:52 ` David Ahern
2017-03-13 17:33 ` Ido Schimmel
2017-03-13 7:38 ` [patch net-next 04/10] net: Add netif_is_vrf_master helper Jiri Pirko
2017-03-13 14:39 ` David Ahern
2017-03-13 15:01 ` Ido Schimmel
2017-03-13 15:15 ` David Ahern
2017-03-13 15:58 ` Ido Schimmel
2017-03-13 7:38 ` [patch net-next 05/10] net: vrf: Set slave's private flag before linking Jiri Pirko
2017-03-13 15:19 ` David Ahern
2017-03-13 7:38 ` [patch net-next 06/10] mlxsw: spectrum_router: Associate RIFs with correct VR Jiri Pirko
2017-03-13 7:38 ` [patch net-next 07/10] mlxsw: spectrum_router: Don't destroy RIF if L3 slave Jiri Pirko
2017-03-13 7:38 ` [patch net-next 08/10] mlxsw: spectrum_router: Add support for VRFs Jiri Pirko
2017-03-13 7:38 ` [patch net-next 09/10] mlxsw: spectrum_router: Add support for VRFs on top of bridges Jiri Pirko
2017-03-13 7:38 ` [patch net-next 10/10] mlxsw: spectrum_router: Don't abort on l3mdev rules Jiri Pirko
2017-03-13 14:59 ` David Ahern
2017-03-13 15:22 ` Ido Schimmel
2017-03-13 15:37 ` David Ahern
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=1489390535-2566-1-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).