🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Simon Horman Mon, 30 Nov 2026 19:53
Re: [PATCH net-next V2 5/5] net/mlx5: LAG, enable LAG over functions that do not represent a physical port
#24777
Author: Simon Horman
Date: Mon, 30 Nov 2026 19:53
37 lines
9832 bytes
On Fri, Nov 20, 2026 at 09:59:58AM +0200, Tariq Toukan wrote:
> From: Shay Drory <shayd@nvidia.com>
> 
> LAG membership assumes every member represents a physical port.
> A nested LAG of VFs/SFs does not fit that assumption; its member
> functions sit behind a multi_uplink_eswitch and each reports
> num_lag_ports < 2, so they do not represent a physical port.
> 
> Detect this with mlx5_virt_lag_is_supported(): let such a function join
> the LAG in mlx5_lag_add_mdev(), and skip the MLX5_LAG_XA_MARK_PORT mark
> and the PORT_CHANGE event notifier in mlx5_ldev_add_mdev(), since it is
> not a physical port.
> 
> These function only support MPESW, and netdevs addition to LAG is only
> needed for linux bond. Hence, don't allow such a lag to add netdevs to
> itself. For the same reason, don't register the LAG netdev notifier for
> it. Multipath LAG is not supported either, so skip mlx5_lag_mp_init()
> and do not register the FIB notifier for it.
> 
> Such a function may report num_lag_ports == 0, which ldev->ports keeps
> as is. Report at least one port from mlx5_lag_get_num_ports(), so user
> would avoid divide by 0.
> 
> Such a function selects the uplink through port_select_eswitch, not
> through a TX port affinity. Yet once its LAG is active, RDMA sets
> lag_active, and mlx5_ib_lag_should_assign_affinity() then assigns a TX
> port affinity to every QP, bypassing the num_lag_ports > 1 and
> lag_tx_port_affinity capability checks. Make
> mlx5_ib_lag_should_assign_affinity() return false for such a function.
> 
> Signed-off-by: Shay Drory <shayd@nvidia.com>
> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
> Reviewed-by: Mark Bloch <mbloch@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Reviewed-by: Simon Horman <horms@kernel.org>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads