Skip to content

Commit 85fb2cb

Browse files
Alexei Lazargregkh
authored andcommitted
net/mlx5e: Report zero bandwidth for non-ETS traffic classes
[ Upstream commit ffb1873 ] 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: 820c2c5 ("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> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Link: https://patch.msgid.link/20260717075125.1244877-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 499f294 commit 85fb2cb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
158158
}
159159
memcpy(ets->tc_tsa, priv->dcbx.tc_tsa, sizeof(ets->tc_tsa));
160160

161+
/* Report 0 for non ETS TSA */
162+
for (i = 0; i < ets->ets_cap; i++) {
163+
if (ets->tc_tx_bw[i] == MLX5E_MAX_BW_ALLOC &&
164+
priv->dcbx.tc_tsa[i] != IEEE_8021QAZ_TSA_ETS)
165+
ets->tc_tx_bw[i] = 0;
166+
}
167+
161168
return err;
162169
}
163170

0 commit comments

Comments
 (0)