net/mlx5e: Report zero bandwidth for non-ETS traffic
Subsystems (5)
Tariq Toukan
maintainerv2 cover net/mlx5e: Report zero bandwidth for non-ETS traffic
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, introduced by commit 820c2c5e773d ("net/mlx5e:
Read ETS settings directly from firmware"), and the set path does not reject the unsupported CB Shaper TSA, introduced 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, and rejects CB Shaper TSA configurations that the driver does not support.
Regards,
Tariq
V2:
- Dropped patch 2 "net/mlx5e: Validate bandwidth for non-ETS traffic classes" (Jakub). We'll submit a more generic version of it.
V1:
https://lore.kernel.org/all/[email protected]/
Alexei Lazar (2):
net/mlx5e: Report zero bandwidth for non-ETS traffic classes net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation
.../net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
base-commit: 3f1f755366687d051174739fb99f7d560202f60b
Signature · 1 line
2.44.0
Tariq Toukan
maintainerPATCH v2 1/2 net/mlx5e: Report zero bandwidth for non-ETS traffic classes
From: Alexei Lazar <[email protected]>
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.
--- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +7 -0
@@ -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; }
Signature · 1 line
2.44.0
Tariq Toukan
maintainerPATCH v2 2/2 net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation
In reply to Tariq ToukanFrom: Alexei Lazar <[email protected]>
Credit Based (CB) TSA is not supported by the mlx5 driver, so reject any configurations that specify it.
--- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +8 -0
@@ -324,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 ) {
Signature · 1 line
2.44.0
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 12 lines · On Fri, 17 Jul 2026 10:51:23 +0300 you wrote:
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, introduced by commit
820c2c5e773d("net/mlx5e:
Read ETS settings directly from firmware"), and the set path does not reject the unsupported CB Shaper TSA, introduced by commit08fb1dacdd76("net/mlx5e: Support DCBNL IEEE ETS").
Quoted 1 line
[...]
Here is the summary with links:
- [net,V2,1/2] net/mlx5e: Report zero bandwidth for non-ETS traffic classes
https://git.kernel.org/netdev/net/c/ffb1873b2df1 - [net,V2,2/2] net/mlx5e: Reject unsupported CB Shaper TSA in ETS validation https://git.kernel.org/netdev/net/c/9173e1d3c7c7
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html