netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>, <netdev@vger.kernel.org>
Cc: Ido Schimmel <idosch@nvidia.com>, Petr Machata <petrm@nvidia.com>,
	"Amit Cohen" <amcohen@nvidia.com>, <mlxsw@nvidia.com>
Subject: [PATCH net-next 0/6] mlxsw: Add VXLAN to the same hardware domain as physical bridge ports
Date: Mon, 17 Mar 2025 18:37:25 +0100	[thread overview]
Message-ID: <cover.1742224300.git.petrm@nvidia.com> (raw)

Amit Cohen writes:

Packets which are trapped to CPU for forwarding in software data path
are handled according to driver marking of skb->offload_{,l3}_fwd_mark.
Packets which are marked as L2-forwarded in hardware, will not be flooded
by the bridge to bridge ports which are in the same hardware domain as the
ingress port.

Currently, mlxsw does not add VXLAN bridge ports to the same hardware
domain as physical bridge ports despite the fact that the device is able
to forward packets to and from VXLAN tunnels in hardware. In some
scenarios this can result in remote VTEPs receiving duplicate packets.

To solve such packets duplication, add VXLAN bridge ports to the same
hardware domain as other bridge ports.

One complication is ARP suppression which requires the local VTEP to avoid
flooding ARP packets to remote VTEPs if the local VTEP is able to reply on
behalf of remote hosts. This is currently implemented by having the device
flood ARP packets in hardware and trapping them during VXLAN encapsulation,
but marking them with skb->offload_fwd_mark=1 so that the bridge will not
re-flood them to physical bridge ports.

The above scheme will break when VXLAN bridge ports are added to the same
hardware domain as physical bridge ports as ARP packets that cannot be
suppressed by the bridge will not be able to egress the VXLAN bridge ports
due to hardware domain filtering. This is solved by trapping ARP packets
when they enter the device and not marking them as being forwarded in
hardware.

Patch set overview:
Patch #1 sets hardware to trap ARP packets at layer 2
Patches #2-#4 are preparations for setting hardwarwe domain of VXLAN
Patch #5 sets hardware domain of VXLAN
Patch #6 extends VXLAN flood test to verify that this set solves the
packets duplication

Amit Cohen (6):
  mlxsw: Trap ARP packets at layer 2 instead of layer 3
  mlxsw: spectrum: Call mlxsw_sp_bridge_vxlan_{join, leave}() for
    VLAN-aware bridge
  mlxsw: spectrum_switchdev: Add an internal API for VXLAN leave
  mlxsw: spectrum_switchdev: Move mlxsw_sp_bridge_vxlan_join()
  mlxsw: Add VXLAN bridge ports to same hardware domain as physical
    bridge ports
  selftests: vxlan_bridge: Test flood with unresolved FDB entry

 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 22 ++-----
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  4 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       | 66 +++++++++++++------
 .../ethernet/mellanox/mlxsw/spectrum_trap.c   | 12 ++--
 drivers/net/ethernet/mellanox/mlxsw/trap.h    |  5 +-
 .../net/forwarding/vxlan_bridge_1d.sh         |  8 +++
 .../net/forwarding/vxlan_bridge_1q.sh         | 15 +++++
 7 files changed, 83 insertions(+), 49 deletions(-)

-- 
2.47.0


             reply	other threads:[~2025-03-17 17:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 17:37 Petr Machata [this message]
2025-03-17 17:37 ` [PATCH net-next 1/6] mlxsw: Trap ARP packets at layer 2 instead of layer 3 Petr Machata
2025-03-20 15:57   ` Simon Horman
2025-03-17 17:37 ` [PATCH net-next 2/6] mlxsw: spectrum: Call mlxsw_sp_bridge_vxlan_{join, leave}() for VLAN-aware bridge Petr Machata
2025-03-20 15:58   ` Simon Horman
2025-03-17 17:37 ` [PATCH net-next 3/6] mlxsw: spectrum_switchdev: Add an internal API for VXLAN leave Petr Machata
2025-03-20 15:58   ` Simon Horman
2025-03-17 17:37 ` [PATCH net-next 4/6] mlxsw: spectrum_switchdev: Move mlxsw_sp_bridge_vxlan_join() Petr Machata
2025-03-20 15:58   ` Simon Horman
2025-03-17 17:37 ` [PATCH net-next 5/6] mlxsw: Add VXLAN bridge ports to same hardware domain as physical bridge ports Petr Machata
2025-03-20 16:00   ` Simon Horman
2025-03-17 17:37 ` [PATCH net-next 6/6] selftests: vxlan_bridge: Test flood with unresolved FDB entry Petr Machata
2025-03-20 16:00   ` Simon Horman
2025-03-24 22:20 ` [PATCH net-next 0/6] mlxsw: Add VXLAN to the same hardware domain as physical bridge ports patchwork-bot+netdevbpf

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=cover.1742224300.git.petrm@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=amcohen@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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).