🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24777

Re: [PATCH net-next V2 5/5] net/mlx5: LAG, enable LAG over functions that do not represent a physical port

#24777
From: 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>
Technical Details
Message-ID: <20261130195315.GJ804035@horms.kernel.org>
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374430-linux-kernel-netdev=dewy.ru
References: <20261120075959.2533702-1-tariqt@nvidia.com> <20261120075959.2533702-6-tariqt@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374430-linux-kernel-netdev=dewy.ru
From: horms@kernel.org (Simon Horman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next V2 5/5] net/mlx5: LAG, enable LAG over functions
 that do not represent a physical port
Date: Mon, 30 Nov 2026 19:53:15 +0000
Organization: Usenet Network
Message-ID: <20261130195315.GJ804035@horms.kernel.org>
References: <20261120075959.2533702-1-tariqt@nvidia.com>
 <20261120075959.2533702-6-tariqt@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1523278"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:HpRGJiPusx8GQ88RtZ+eI5HjvxE= sha256:g5C62R7clf2HCFCthTP02cbcMjVqu5Rh3K24I4jq8xY=
	sha1:5X6AxLsQkj6HC2pkkdSGqc5l0oU= sha256:qMTfOSvXM4j5GX+irace6Zy9Yu4zJhmJLyyhaRsKWUs=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id B4CC8125FFC; Mon, 30 Nov 2026 22:53:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id W54Ym9UBbvD5;
	Mon, 30 Nov 2026 22:53:36 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-374430-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 9F2E2126000; Mon, 30 Nov 2026 22:53:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id AE08124E32; Mon, 30 Nov 2026 19:53:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796068402;
	b=xZW+kSpSsJbHR0U/nRKFOmAM9of3n0R7y73RAwp4FKO651frizoHTxlqAg5WOMdW7qCz
	 MYhOPQ51I2494TKAhjPoh8lsrMwr/dRhERIhNMI2YSQ7xi7AfKlpI39eR0Vw0yc/pGHGv
	 yDToLwhY+XLMo4ezHotgqvdLVZhI+fEq8IPBbxRTj88ellfz17RRlzJ2Zn9CRt/YZpJDg
	 4utCzBgln+yjMdJUb3Ogk/dW70faIyHnYrDC2f84BJzDjFSW1TGuKLdQGYJ7ri4Mb1JTn
	 Z3bEOLoI3XaUrzZk6fmT//IZeHPnwchK0KZEIX9pW0B6RJiVaMqJkXreeo4CVvP+p8w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796068402;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=o76cAHQBYFVXg+DEggK6eIDMj6pjZ7QopE1oxMQPNvM=;
	b=f6hrV9EnwqC5sXUX710S7XVioeduZwzuB2ukB75wlyIgSF08KQ4gPFCsjgMPaH6MjksY
	 FbFvRhF0g6dsk/+nilZXZqxrbH1FJtmaw4JkW63ysqeZu+qVXi1ho+e4xZnAaR+BbUp13
	 NBPx4B7HlTDJ+Euy7u09fsZm+nY2HN2zX0lBj3UkHwGn6IeX8pMJjiAEbgmgNtiB4oUlU
	 ruM2TYe2aO25deglJeyJDNEqaIsakNVTbYtV7UUeWU53Z0HreoYzEB8+ryKPOnANBvHag
	 eJB/Ac7TikVF9UNOfWXg1fchnKea1UsHe+ZB14zKF4SFsyjfvAl9SBFTMF9WYdZnV6A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZyKOVrBZ;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B539606A320;
	Mon, 30 Nov 2026 19:53:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZyKOVrBZ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796068401;
	b=4ZviqHg5QOW8shG6VnHQHA3DCk3DJLdGRp7gnrPdiO61hMLyUW6w17PlzigCmFzGVY9y
	 w4c1ubXr5mpsjutdlj1aUShIiB+SuBt8sagNRCb39Sz8urGlAkYD79wSG1UdQix7ClGJf
	 cU3QPPtVTVU5ePkcELpPUtfnwP4Gkpxeh5yWh4VxERMT6LyE4AksapoW8EqbaFseqYNpJ
	 zuQVH7Cu9ogL/J2+1zNktpp96S76eHiCDRlLvjhMtCjcVDj3GEnrScb2M1EHxWL74dPT+
	 Olgjab+NS7Eq+sHUxzHey+/2JtixqgpgkbBMkaEV7sqzFeEgK44lWyjOltJOegDft4Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796068401;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=o76cAHQBYFVXg+DEggK6eIDMj6pjZ7QopE1oxMQPNvM=;
	b=TCP4fXPKYlAIzR/cPiGmA35rM3uuUKJvZbEih/Gr7fjZ6Rn9cDxjbzjsp8A5bZLghaIN
	 g5YNgVSX3z+O+bmO5/MhTx4wYWCD2ZxN6R61HmZMn9vQzN7Dpa8z7D06yNVFo/W1D2Gls
	 CfPhidKl2KxqWWwSnnQVSqQTkqh+IcWlVEHyoMXfi6h4JVn7O+f/ztacHImKwLWrEMSdg
	 j+p6lwcssqF5Bawc0qg4oHr7Px4a9rYAWb/BFbtQbulD0db+fLYjIE0GPovuuk6imm9fa
	 aAqmLmInWXXwT302JM7RWfnQRS+up3QyS74Y0axEa5yOu70kbBUL36mSW5upfNzNgxA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZyKOVrBZ;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C67C606A32D;
	Mon, 30 Nov 2026 19:53:21 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7E991F00924;
	Mon, 30 Nov 2026 19:53:17 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796068400;
	bh=o76cAHQBYFVXg+DEggK6eIDMj6pjZ7QopE1oxMQPNvM=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=ZyKOVrBZJMxnUv2QCU8tOIKwVTzqcwhxJjZXAcj2VCMJHtSwrFuGiS1t9FTi6qUx1
	 CHmWmqe1LVgStM8hQ8xKD6bwiiA/SFwJc5c/AarkymKkvwTT8wW/KYUK+jQCR7Rolc
	 tseRXaeeDPtVH3vo/mkm4dlaVPxrRmTnh5wRmqz6XVdNhi8sisFG87h852zGNa/vem
	 mV5rFHR8/koOS8CEgE8czR1LJDeEpi+C4OFnVTU8vBfu+86nMOj3J0RETqQiTzz50V
	 /BQUb84jSYkAJfc++Frv7feJ47B7lfFsjuoW1BdKqior3zQMfolLpVrhZNc5gDsXHY
	 ITjDANa/LMIpQ==
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, netdev@vger.kernel.org,
	Paolo Abeni <pabeni@redhat.com>,
	Akiva Goldberger <agoldberger@nvidia.com>,
	Gal Pressman <gal@nvidia.com>, Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leon@kernel.org>, linux-rdma@vger.kernel.org,
	Mark Bloch <mbloch@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
	Or Har-Toov <ohartoov@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>, Shay Drory <shayd@nvidia.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261120075959.2533702-6-tariqt@nvidia.com>