Patch "net/mlx5e: Do not update SBCM when prio2buffer command is invalid" has been added to the 6.3-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/mlx5e: Do not update SBCM when prio2buffer command is invalid

to the 6.3-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-mlx5e-do-not-update-sbcm-when-prio2buffer-comman.patch
and it can be found in the queue-6.3 subdirectory.

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



commit 5e4391b7467bd397371f7495d6a6dc2df920a236
Author: Maher Sanalla <msanalla@xxxxxxxxxx>
Date:   Tue May 9 17:56:01 2023 +0300

    net/mlx5e: Do not update SBCM when prio2buffer command is invalid
    
    [ Upstream commit 623efc4cbd6115db36716e31037cb6d1f3ce6754 ]
    
    The shared buffer pools configuration which are stored in the SBCM
    register are updated when the user changes the prio2buffer mapping.
    
    However, in case the user desired prio2buffer change is invalid,
    which can occur due to mapping a lossless priority to a not large enough
    buffer, the SBCM update should not be performed, as the user command is
    failed.
    
    Thus, Perform the SBCM update only after xoff threshold calculation is
    performed and the user prio2buffer mapping is validated.
    
    Fixes: a440030d8946 ("net/mlx5e: Update shared buffer along with device buffer changes")
    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/port_buffer.c b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c
index 0d78527451bca..7e8e96cc5cd08 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c
@@ -442,11 +442,11 @@ static int update_buffer_lossy(struct mlx5_core_dev *mdev,
 	}
 
 	if (changed) {
-		err = port_update_pool_cfg(mdev, port_buffer);
+		err = update_xoff_threshold(port_buffer, xoff, max_mtu, port_buff_cell_sz);
 		if (err)
 			return err;
 
-		err = update_xoff_threshold(port_buffer, xoff, max_mtu, port_buff_cell_sz);
+		err = port_update_pool_cfg(mdev, port_buffer);
 		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