Merge branch 'net-mlx5e-report-zero-bandwidth-for-non-ets-traffic'

Tariq Toukan says:

====================
net/mlx5e: Report zero bandwidth for non-ETS traffic

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, introduced by commit 820c2c5e77 ("net/mlx5e:
Read ETS settings directly from firmware"), and the set path does
not reject the unsupported CB Shaper TSA, introduced by commit
08fb1dacdd ("net/mlx5e: Support DCBNL IEEE ETS").

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

Link: https://patch.msgid.link/20260717075125.1244877-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2026-07-23 08:24:55 -07:00
commit 6bd1befbd3

View File

@ -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;
}
@ -317,6 +324,14 @@ static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
}
}
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;
}
}
/* Validate Bandwidth Sum */
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {