Patch "ice: stop trashing VF VSI aggregator node ID information" has been added to the 6.6-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: stop trashing VF VSI aggregator node ID information

to the 6.6-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-stop-trashing-vf-vsi-aggregator-node-id-informat.patch
and it can be found in the queue-6.6 subdirectory.

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



commit cce5c9515d63c1413870568e654f6a6dc6922c68
Author: Jacob Keller <jacob.e.keller@xxxxxxxxx>
Date:   Wed Dec 6 12:19:05 2023 -0800

    ice: stop trashing VF VSI aggregator node ID information
    
    [ Upstream commit 7d881346121a97756f34e00e6296a5d63f001f7f ]
    
    When creating new VSIs, they are assigned into an aggregator node in the
    scheduler tree. Information about which aggregator node a VSI is assigned
    into is maintained by the vsi->agg_node structure. In ice_vsi_decfg(), this
    information is being destroyed, by overwriting the valid flag and the
    agg_id field to zero.
    
    For VF VSIs, this breaks the aggregator node configuration replay, which
    depends on this information. This results in VFs being inserted into the
    default aggregator node. The resulting configuration will have unexpected
    Tx bandwidth sharing behavior.
    
    This was broken by commit 6624e780a577 ("ice: split ice_vsi_setup into
    smaller functions"), which added the block to reset the agg_node data.
    
    The vsi->agg_node structure is not managed by the scheduler code, but is
    instead a wrapper around an aggregator node ID that is tracked at the VSI
    layer. Its been around for a long time, and its primary purpose was for
    handling VFs. The SR-IOV VF reset flow does not make use of the standard VSI
    rebuild/replay logic, and uses vsi->agg_node as part of its handling to
    rebuild the aggregator node configuration.
    
    The logic for aggregator nodes stretches  back to early ice driver code from
    commit b126bd6bcd67 ("ice: create scheduler aggregator node config and move
    VSIs")
    
    The logic in ice_vsi_decfg() which trashes the ice_agg_node data is clearly
    wrong. It destroys information that is necessary for handling VF reset,. It
    is also not the correct way to actually remove a VSI from an aggregator
    node. For that, we need to implement logic in the scheduler code. Further,
    non-VF VSIs properly replay their aggregator configuration using existing
    scheduler replay logic.
    
    To fix the VF replay logic, remove this broken aggregator node cleanup
    logic. This is the simplest way to immediately fix this.
    
    This ensures that VFs will have proper aggregate configuration after a
    reset. This is especially important since VFs often perform resets as part
    of their reconfiguration flows. Without fixing this, VFs will be placed in
    the default aggregator node and Tx bandwidth will not be shared in the
    expected and configured manner.
    
    Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")
    Signed-off-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>
    Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
    Tested-by: Rafal Romanowski <rafal.romanowski@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 73bbf06a76db9..8dbf7a381e49b 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2633,10 +2633,6 @@ void ice_vsi_decfg(struct ice_vsi *vsi)
 	if (vsi->type == ICE_VSI_VF &&
 	    vsi->agg_node && vsi->agg_node->valid)
 		vsi->agg_node->num_vsis--;
-	if (vsi->agg_node) {
-		vsi->agg_node->valid = false;
-		vsi->agg_node->agg_id = 0;
-	}
 }
 
 /**




[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