public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>
Cc: Eric Woudstra <ericwouds@gmail.com>,
	Petr Machata <petrm@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 net-next] net: mlxsw_sp: Use switchdev_handle_port_obj_add_foreign() for vxlan
Date: Mon, 10 Feb 2025 17:22:46 +0200	[thread overview]
Message-ID: <20250210152246.4ajumdchwhvbarik@skbuf> (raw)
In-Reply-To: <Z6mhQL-b58L5xkK4@shredder>

On Mon, Feb 10, 2025 at 08:48:32AM +0200, Ido Schimmel wrote:
> On Sat, Feb 08, 2025 at 03:15:18PM +0100, Eric Woudstra wrote:
> > Sending as RFC as I do not own this hardware. This code is not tested.
> > 
> > Vladimir found this part of the spectrum switchdev, while looking at
> > another issue here:
> > 
> > https://lore.kernel.org/all/20250207220408.zipucrmm2yafj4wu@skbuf/
> > 
> > As vxlan seems a foreign port, wouldn't it be better to use
> > switchdev_handle_port_obj_add_foreign() ?
> 
> Thanks for the patch, but the VXLAN port is not foreign to the other
> switch ports. That is, forwarding between these ports and VXLAN happens
> in hardware. And yes, switchdev_bridge_port_offload() does need to be
> called for the VXLAN port so that it's assigned the same hardware domain
> as the other ports.

Thanks, this is useful. I'm not providing a patch yet because there are
still things I don't understand.

Have you seen any of the typical problems associated with the software
bridge thinking vxlan isn't part of the same hwdom as the ingress
physical port, and, say, flooding packets twice to vxlan, when the
switch had already forwarded a copy of the packet? In almost 4 years
since commit 2f5dc00f7a3e ("net: bridge: switchdev: let drivers inform
which bridge ports are offloaded"), I would have expected such issues
would have been noticed?

Do we require a Fixes: tag for this?

And then, switchdev_bridge_port_offload() has a brport_dev argument,
which would pretty clearly be passed as vxlan_dev by
mlxsw_sp_bridge_8021d_vxlan_join() and
mlxsw_sp_bridge_vlan_aware_vxlan_join(), but it also has one other
"struct net_device *dev" argument, on which br_switchdev_port_offload()
wants to call dev_get_port_parent_id(), to see what hwdom (what other
bridge ports) to associate it to.

Usually we use the mlxsw_sp_port->dev as the second argument, but which
port to use here? Any random port that's under the bridge, or is there a
specific one for the vxlan that should be used?

  reply	other threads:[~2025-02-10 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-08 14:15 [RFC PATCH v1 net-next] net: mlxsw_sp: Use switchdev_handle_port_obj_add_foreign() for vxlan Eric Woudstra
2025-02-10  6:48 ` Ido Schimmel
2025-02-10 15:22   ` Vladimir Oltean [this message]
2025-02-11 14:31     ` Ido Schimmel
2025-02-11 15:23       ` Vladimir Oltean
2025-02-12 14:07         ` Ido Schimmel

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=20250210152246.4ajumdchwhvbarik@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ericwouds@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.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