From: Simon Horman <horms@kernel.org>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, Ido Schimmel <idosch@nvidia.com>,
Amit Cohen <amcohen@nvidia.com>,
mlxsw@nvidia.com, Vladimir Oltean <olteanv@gmail.com>,
Vladyslav Mykhaliuk <vmykhaliuk@nvidia.com>
Subject: Re: [PATCH net-next 5/6] mlxsw: Add VXLAN bridge ports to same hardware domain as physical bridge ports
Date: Thu, 20 Mar 2025 16:00:27 +0000 [thread overview]
Message-ID: <20250320160027.GH889584@horms.kernel.org> (raw)
In-Reply-To: <7279056843140fae3a72c2d204c7886b79d03899.1742224300.git.petrm@nvidia.com>
On Mon, Mar 17, 2025 at 06:37:30PM +0100, Petr Machata wrote:
> From: Amit Cohen <amcohen@nvidia.com>
>
> When hardware floods packets to bridge ports, but flooding to VXLAN bridge
> port fails during encapsulation to one of the remote VTEPs, the packets are
> trapped to CPU. In such case, the packets are marked with
> skb->offload_fwd_mark, which means that packet was L2-forwarded in
> hardware. Software data path repeats flooding, but packets which are
> marked with skb->offload_fwd_mark 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
> (as mentioned above) this can result in remote VTEPs receiving duplicate
> packets. The packets are first flooded by hardware and after an
> encapsulation failure, they are flooded again to all remote VTEPs by
> software.
>
> Solve this by adding VXLAN bridge ports to the same hardware domain as
> physical bridge ports, so then nbp_switchdev_allowed_egress() will return
> false also for VXLAN, and packets will not be sent twice from VXLAN device.
>
> switchdev_bridge_port_offload() should get vxlan_dev not as const, so
> some changes are required. Call switchdev API from
> mlxsw_sp_bridge_vxlan_{join,leave}() which handle offload configurations.
>
> Reported-by: Vladimir Oltean <olteanv@gmail.com>
> Closes: https://lore.kernel.org/all/20250210152246.4ajumdchwhvbarik@skbuf/
> Reported-by: Vladyslav Mykhaliuk <vmykhaliuk@nvidia.com>
> Signed-off-by: Amit Cohen <amcohen@nvidia.com>
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
> Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-20 16:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 17:37 [PATCH net-next 0/6] mlxsw: Add VXLAN to the same hardware domain as physical bridge ports Petr Machata
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 [this message]
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=20250320160027.GH889584@horms.kernel.org \
--to=horms@kernel.org \
--cc=amcohen@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=vmykhaliuk@nvidia.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).