Re: [RFC PATCH v1 net-next] net: mlxsw_sp: Use switchdev_handle_port_obj_add_foreign() for vxlan

From: Ido Schimmel
Date: Mon Feb 10 2025 - 01:48:54 EST


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.