Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/3] net/mlx5e: Report zero bandwidth for non-ETS traffic
@ 2026-06-22 11:29 Tariq Toukan
  2026-06-22 11:29 ` [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes Tariq Toukan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tariq Toukan @ 2026-06-22 11:29 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Alexei Lazar, Carolina Jubran, Leon Romanovsky, linux-kernel,
	linux-rdma, Mark Bloch, Saeed Mahameed, Tariq Toukan,
	Gal Pressman

Hi,

The IEEE 802.1Qaz standard restricts bandwidth allocation percentages
to Enhanced Transmission Selection (ETS) traffic classes; STRICT,
VENDOR, and CB Shaper TSA types carry no bandwidth semantics.  Two
problems exist in the mlx5e DCBNL ETS implementation: the get path
reports 100% bandwidth for all TCs regardless of TSA type due to a
hardware limitation, and the set path neither rejects non-zero
bandwidth values for non-ETS TCs nor rejects the unsupported CB
Shaper TSA altogether.  The first issue was introduced by commit
820c2c5e773d ("net/mlx5e: Read ETS settings directly from firmware")
and the latter two by commit 08fb1dacdd76 ("net/mlx5e: Support DCBNL
IEEE ETS").

This series by Alexei Lazar fixes the get path to report zero
bandwidth for non-ETS traffic classes, adds validation to reject
non-zero bandwidth for non-ETS TCs on the set path, and rejects CB
Shaper TSA configurations that the driver does not support.

Regards,
Tariq

Alexei Lazar (3):
  net/mlx5e: Report zero bandwidth for non-ETS traffic classes
  net/mlx5e: Validate bandwidth for non-ETS traffic classes
  net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation

 .../ethernet/mellanox/mlx5/core/en_dcbnl.c    | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)


base-commit: d07d80b6a129a44538cda1549b7acf95154fb197
-- 
2.44.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes
  2026-06-22 11:29 [PATCH net 0/3] net/mlx5e: Report zero bandwidth for non-ETS traffic Tariq Toukan
@ 2026-06-22 11:29 ` Tariq Toukan
  2026-06-22 13:48   ` Pavan Chebbi
  2026-06-22 11:29 ` [PATCH net 2/3] net/mlx5e: Validate " Tariq Toukan
  2026-06-22 11:29 ` [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation Tariq Toukan
  2 siblings, 1 reply; 7+ messages in thread
From: Tariq Toukan @ 2026-06-22 11:29 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Alexei Lazar, Carolina Jubran, Leon Romanovsky, linux-kernel,
	linux-rdma, Mark Bloch, Saeed Mahameed, Tariq Toukan,
	Gal Pressman

From: Alexei Lazar <alazar@nvidia.com>

The IEEE 802.1Qaz standard defines that bandwidth allocation percentages
only apply to Enhanced Transmission Selection (ETS) traffic classes.
For STRICT and VENDOR transmission selection algorithms, bandwidth
percentage values are not applicable.

Currently for non-ETS 100 bandwidth is being reported for all traffic
classes in the get operation due to hardware limitation, regardless of
their TSA type.

Fix this by reporting 0 for non-ETS traffic classes.

Fixes: 820c2c5e773d ("net/mlx5e: Read ETS settings directly from firmware")
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 4b86df6d5b9e..762f0a46c120 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -173,6 +173,13 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
 	}
 	memcpy(ets->tc_tsa, priv->dcbx.tc_tsa, sizeof(ets->tc_tsa));
 
+	/* Report 0 for non ETS TSA */
+	for (i = 0; i < ets->ets_cap; i++) {
+		if (ets->tc_tx_bw[i] == MLX5E_MAX_BW_ALLOC &&
+		    priv->dcbx.tc_tsa[i] != IEEE_8021QAZ_TSA_ETS)
+			ets->tc_tx_bw[i] = 0;
+	}
+
 	return err;
 }
 
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net 2/3] net/mlx5e: Validate bandwidth for non-ETS traffic classes
  2026-06-22 11:29 [PATCH net 0/3] net/mlx5e: Report zero bandwidth for non-ETS traffic Tariq Toukan
  2026-06-22 11:29 ` [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes Tariq Toukan
@ 2026-06-22 11:29 ` Tariq Toukan
  2026-06-22 13:49   ` Pavan Chebbi
  2026-06-22 11:29 ` [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation Tariq Toukan
  2 siblings, 1 reply; 7+ messages in thread
From: Tariq Toukan @ 2026-06-22 11:29 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Alexei Lazar, Carolina Jubran, Leon Romanovsky, linux-kernel,
	linux-rdma, Mark Bloch, Saeed Mahameed, Tariq Toukan,
	Gal Pressman

From: Alexei Lazar <alazar@nvidia.com>

The IEEE 802.1Qaz standard defines that bandwidth allocation percentages
only apply to ETS traffic classes.

Reject ETS configurations that specify non-zero bandwidth for traffic
classes.

Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS")
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 762f0a46c120..e4161603cdc0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -324,6 +324,17 @@ static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
 		}
 	}
 
+	/* Validate Non ETS BW */
+	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
+		if (ets->tc_tsa[i] != IEEE_8021QAZ_TSA_ETS &&
+		    ets->tc_tx_bw[i]) {
+			netdev_err(netdev,
+				   "Failed to validate ETS: tc=%d BW is not 0 for non-ETS TC (tsa=%u, bw=%u)\n",
+				   i, ets->tc_tsa[i], ets->tc_tx_bw[i]);
+			return -EINVAL;
+		}
+	}
+
 	/* Validate Bandwidth Sum */
 	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
 		if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation
  2026-06-22 11:29 [PATCH net 0/3] net/mlx5e: Report zero bandwidth for non-ETS traffic Tariq Toukan
  2026-06-22 11:29 ` [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes Tariq Toukan
  2026-06-22 11:29 ` [PATCH net 2/3] net/mlx5e: Validate " Tariq Toukan
@ 2026-06-22 11:29 ` Tariq Toukan
  2026-06-22 13:50   ` Pavan Chebbi
  2 siblings, 1 reply; 7+ messages in thread
From: Tariq Toukan @ 2026-06-22 11:29 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Alexei Lazar, Carolina Jubran, Leon Romanovsky, linux-kernel,
	linux-rdma, Mark Bloch, Saeed Mahameed, Tariq Toukan,
	Gal Pressman

From: Alexei Lazar <alazar@nvidia.com>

Credit Based (CB) TSA is not supported by the mlx5 driver, so reject
any configurations that specify it.

Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS")
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index e4161603cdc0..602b982b1bbf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -326,6 +326,12 @@ static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
 
 	/* Validate Non ETS BW */
 	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
+		if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_CB_SHAPER) {
+			netdev_err(netdev,
+				   "Failed to validate ETS: CB Shaper is not supported\n");
+			return -EOPNOTSUPP;
+		}
+
 		if (ets->tc_tsa[i] != IEEE_8021QAZ_TSA_ETS &&
 		    ets->tc_tx_bw[i]) {
 			netdev_err(netdev,
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes
  2026-06-22 11:29 ` [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes Tariq Toukan
@ 2026-06-22 13:48   ` Pavan Chebbi
  0 siblings, 0 replies; 7+ messages in thread
From: Pavan Chebbi @ 2026-06-22 13:48 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni, Alexei Lazar, Carolina Jubran,
	Leon Romanovsky, linux-kernel, linux-rdma, Mark Bloch,
	Saeed Mahameed, Gal Pressman

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

On Mon, Jun 22, 2026 at 5:00 PM Tariq Toukan <tariqt@nvidia.com> wrote:
>
> From: Alexei Lazar <alazar@nvidia.com>
>
> The IEEE 802.1Qaz standard defines that bandwidth allocation percentages
> only apply to Enhanced Transmission Selection (ETS) traffic classes.
> For STRICT and VENDOR transmission selection algorithms, bandwidth
> percentage values are not applicable.
>
> Currently for non-ETS 100 bandwidth is being reported for all traffic
> classes in the get operation due to hardware limitation, regardless of
> their TSA type.
>
> Fix this by reporting 0 for non-ETS traffic classes.
>
> Fixes: 820c2c5e773d ("net/mlx5e: Read ETS settings directly from firmware")
> Signed-off-by: Alexei Lazar <alazar@nvidia.com>
> Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>

LGTM. Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5469 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 2/3] net/mlx5e: Validate bandwidth for non-ETS traffic classes
  2026-06-22 11:29 ` [PATCH net 2/3] net/mlx5e: Validate " Tariq Toukan
@ 2026-06-22 13:49   ` Pavan Chebbi
  0 siblings, 0 replies; 7+ messages in thread
From: Pavan Chebbi @ 2026-06-22 13:49 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni, Alexei Lazar, Carolina Jubran,
	Leon Romanovsky, linux-kernel, linux-rdma, Mark Bloch,
	Saeed Mahameed, Gal Pressman

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Mon, Jun 22, 2026 at 5:00 PM Tariq Toukan <tariqt@nvidia.com> wrote:
>
> From: Alexei Lazar <alazar@nvidia.com>
>
> The IEEE 802.1Qaz standard defines that bandwidth allocation percentages
> only apply to ETS traffic classes.
>
> Reject ETS configurations that specify non-zero bandwidth for traffic
> classes.
>
> Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS")
> Signed-off-by: Alexei Lazar <alazar@nvidia.com>
> Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5469 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation
  2026-06-22 11:29 ` [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation Tariq Toukan
@ 2026-06-22 13:50   ` Pavan Chebbi
  0 siblings, 0 replies; 7+ messages in thread
From: Pavan Chebbi @ 2026-06-22 13:50 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni, Alexei Lazar, Carolina Jubran,
	Leon Romanovsky, linux-kernel, linux-rdma, Mark Bloch,
	Saeed Mahameed, Gal Pressman

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

On Mon, Jun 22, 2026 at 5:02 PM Tariq Toukan <tariqt@nvidia.com> wrote:
>
> From: Alexei Lazar <alazar@nvidia.com>
>
> Credit Based (CB) TSA is not supported by the mlx5 driver, so reject
> any configurations that specify it.
>
> Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS")
> Signed-off-by: Alexei Lazar <alazar@nvidia.com>
> Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5469 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-22 13:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 11:29 [PATCH net 0/3] net/mlx5e: Report zero bandwidth for non-ETS traffic Tariq Toukan
2026-06-22 11:29 ` [PATCH net 1/3] net/mlx5e: Report zero bandwidth for non-ETS traffic classes Tariq Toukan
2026-06-22 13:48   ` Pavan Chebbi
2026-06-22 11:29 ` [PATCH net 2/3] net/mlx5e: Validate " Tariq Toukan
2026-06-22 13:49   ` Pavan Chebbi
2026-06-22 11:29 ` [PATCH net 3/3] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation Tariq Toukan
2026-06-22 13:50   ` Pavan Chebbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox