lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250912140902.GC30363@horms.kernel.org>
Date: Fri, 12 Sep 2025 15:09:02 +0100
From: Simon Horman <horms@...nel.org>
To: Tariq Toukan <tariqt@...dia.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Saeed Mahameed <saeedm@...dia.com>,
	Leon Romanovsky <leon@...nel.org>, Mark Bloch <mbloch@...dia.com>,
	netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
	linux-kernel@...r.kernel.org, Gal Pressman <gal@...dia.com>,
	Parav Pandit <parav@...dia.com>, Shay Drory <shayd@...dia.com>
Subject: Re: [PATCH net-next 4/4] net/mlx5: Lag, add net namespace support

On Thu, Sep 11, 2025 at 09:31:07AM +0300, Tariq Toukan wrote:
> From: Shay Drory <shayd@...dia.com>
> 
> Update the LAG implementation to support net namespace isolation.
> 
> With recent changes to the devcom framework allowing namespace-aware
> matching, the LAG layer is updated to register devcom clients with the
> associated net namespace. This ensures that LAG formation only occurs
> between mlx5 interfaces that reside in the same namespace.
> 
> This change ensures that devices in different namespaces do not interfere
> with each other's LAG setup and behavior. For example, if two PCI PFs are
> in the same namespace, they are eligible to form a hardware LAG.
> 
> In addition, reload behavior for LAG is adjusted to handle namespace
> contexts appropriately.
> 
> Signed-off-by: Shay Drory <shayd@...dia.com>
> Reviewed-by: Mark Bloch <mbloch@...dia.com>
> Reviewed-by: Parav Pandit <parav@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/devlink.c |  5 -----
>  drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 14 +++++++++++---
>  drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h |  1 +
>  3 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
> index a0b68321355a..bfa44414be82 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
> @@ -204,11 +204,6 @@ static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change,
>  		return 0;
>  	}
>  
> -	if (mlx5_lag_is_active(dev)) {
> -		NL_SET_ERR_MSG_MOD(extack, "reload is unsupported in Lag mode");
> -		return -EOPNOTSUPP;
> -	}
> -

Maybe I'm missing something obvious. But I think this could do with
some further commentary in the commit message. Or perhaps being a separate
patch.

>  	if (mlx5_core_is_mp_slave(dev)) {
>  		NL_SET_ERR_MSG_MOD(extack, "reload is unsupported for multi port slave");
>  		return -EOPNOTSUPP;

...

> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
> index c2f256bb2bc2..4918eee2b3da 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
> @@ -67,6 +67,7 @@ struct mlx5_lag {
>  	struct workqueue_struct   *wq;
>  	struct delayed_work       bond_work;
>  	struct notifier_block     nb;
> +	possible_net_t net;

nit: inconsistent indentation.

>  	struct lag_mp             lag_mp;
>  	struct mlx5_lag_port_sel  port_sel;
>  	/* Protect lag fields/state changes */
> -- 
> 2.31.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ