Patch "net/mlx5: Read the TC mapping of all priorities on ETS query" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5: Read the TC mapping of all priorities on ETS query

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5-read-the-tc-mapping-of-all-priorities-on-et.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 14262b3472e1a14fe1967de8be9232b14a9a328f
Author: Maher Sanalla <msanalla@xxxxxxxxxx>
Date:   Wed Mar 15 11:04:38 2023 +0200

    net/mlx5: Read the TC mapping of all priorities on ETS query
    
    [ Upstream commit 44d553188c38ac74b799dfdcebafef2f7bb70942 ]
    
    When ETS configurations are queried by the user to get the mapping
    assignment between packet priority and traffic class, only priorities up
    to maximum TCs are queried from QTCT register in FW to retrieve their
    assigned TC, leaving the rest of the priorities mapped to the default
    TC #0 which might be misleading.
    
    Fix by querying the TC mapping of all priorities on each ETS query,
    regardless of the maximum number of TCs configured in FW.
    
    Fixes: 820c2c5e773d ("net/mlx5e: Read ETS settings directly from firmware")
    Signed-off-by: Maher Sanalla <msanalla@xxxxxxxxxx>
    Reviewed-by: Moshe Shemesh <moshe@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 2449731b7d79a..89de92d064836 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -117,12 +117,14 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
 	if (!MLX5_CAP_GEN(priv->mdev, ets))
 		return -EOPNOTSUPP;
 
-	ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
-	for (i = 0; i < ets->ets_cap; i++) {
+	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
 		err = mlx5_query_port_prio_tc(mdev, i, &ets->prio_tc[i]);
 		if (err)
 			return err;
+	}
 
+	ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
+	for (i = 0; i < ets->ets_cap; i++) {
 		err = mlx5_query_port_tc_group(mdev, i, &tc_group[i]);
 		if (err)
 			return err;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux