Patch "ice: Fix RDMA VSI removal during queue rebuild" has been added to the 6.4-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

    ice: Fix RDMA VSI removal during queue rebuild

to the 6.4-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:
     ice-fix-rdma-vsi-removal-during-queue-rebuild.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 6fb0117058c5cdf781258de11c0fc00c341754fc
Author: Rafal Rogalski <rafalx.rogalski@xxxxxxxxx>
Date:   Fri Jul 28 10:12:43 2023 -0700

    ice: Fix RDMA VSI removal during queue rebuild
    
    [ Upstream commit 4b31fd4d77ffa430d0b74ba1885ea0a41594f202 ]
    
    During qdisc create/delete, it is necessary to rebuild the queue
    of VSIs. An error occurred because the VSIs created by RDMA were
    still active.
    
    Added check if RDMA is active. If yes, it disallows qdisc changes
    and writes a message in the system logs.
    
    Fixes: 348048e724a0 ("ice: Implement iidc operations")
    Signed-off-by: Rafal Rogalski <rafalx.rogalski@xxxxxxxxx>
    Signed-off-by: Mateusz Palczewski <mateusz.palczewski@xxxxxxxxx>
    Signed-off-by: Kamil Maziarz <kamil.maziarz@xxxxxxxxx>
    Tested-by: Bharathi Sreenivas <bharathi.sreenivas@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230728171243.2446101-1-anthony.l.nguyen@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index fbe70458fda27..34e8e7cb1bc54 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -9055,6 +9055,7 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type,
 {
 	struct ice_netdev_priv *np = netdev_priv(netdev);
 	struct ice_pf *pf = np->vsi->back;
+	bool locked = false;
 	int err;
 
 	switch (type) {
@@ -9064,10 +9065,27 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type,
 						  ice_setup_tc_block_cb,
 						  np, np, true);
 	case TC_SETUP_QDISC_MQPRIO:
+		if (pf->adev) {
+			mutex_lock(&pf->adev_mutex);
+			device_lock(&pf->adev->dev);
+			locked = true;
+			if (pf->adev->dev.driver) {
+				netdev_err(netdev, "Cannot change qdisc when RDMA is active\n");
+				err = -EBUSY;
+				goto adev_unlock;
+			}
+		}
+
 		/* setup traffic classifier for receive side */
 		mutex_lock(&pf->tc_mutex);
 		err = ice_setup_tc_mqprio_qdisc(netdev, type_data);
 		mutex_unlock(&pf->tc_mutex);
+
+adev_unlock:
+		if (locked) {
+			device_unlock(&pf->adev->dev);
+			mutex_unlock(&pf->adev_mutex);
+		}
 		return err;
 	default:
 		return -EOPNOTSUPP;



[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