diff options
| author | Jacob Keller <[email protected]> | 2025-06-18 22:24:39 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-07-10 21:36:58 +0000 |
| commit | 4f98ac2d8e53c414ef79d7ea1fd0201e45d76779 (patch) | |
| tree | a9987dee37a51f1db5c7f11e8a0cda355dfaf445 /drivers/net/ethernet/intel/ice/ice_virtchnl.c | |
| parent | ice: save RSS hash configuration for migration (diff) | |
| download | kernel-4f98ac2d8e53c414ef79d7ea1fd0201e45d76779.tar.gz kernel-4f98ac2d8e53c414ef79d7ea1fd0201e45d76779.zip | |
ice: move ice_vsi_update_l2tsel to ice_lib.c
A future change is going to need to call ice_vsi_update_l2tsel from a new
context outside of ice_virtchnl.c
Since this function deals with a generic VSI, move it into ice_lib.c to
enable calling it from other places in the ice driver.
Signed-off-by: Jacob Keller <[email protected]>
Reviewed-by: Madhu Chittim <[email protected]>
Reviewed-by: Przemek Kitszel <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_virtchnl.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_virtchnl.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c index 0a8f15ecac1f..307252500f02 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c @@ -3860,48 +3860,6 @@ ice_vc_ena_vlan_offload(struct ice_vsi *vsi, return 0; } -#define ICE_L2TSEL_QRX_CONTEXT_REG_IDX 3 -#define ICE_L2TSEL_BIT_OFFSET 23 -enum ice_l2tsel { - ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG2_2ND, - ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG1, -}; - -/** - * ice_vsi_update_l2tsel - update l2tsel field for all Rx rings on this VSI - * @vsi: VSI used to update l2tsel on - * @l2tsel: l2tsel setting requested - * - * Use the l2tsel setting to update all of the Rx queue context bits for l2tsel. - * This will modify which descriptor field the first offloaded VLAN will be - * stripped into. - */ -static void ice_vsi_update_l2tsel(struct ice_vsi *vsi, enum ice_l2tsel l2tsel) -{ - struct ice_hw *hw = &vsi->back->hw; - u32 l2tsel_bit; - int i; - - if (l2tsel == ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG2_2ND) - l2tsel_bit = 0; - else - l2tsel_bit = BIT(ICE_L2TSEL_BIT_OFFSET); - - for (i = 0; i < vsi->alloc_rxq; i++) { - u16 pfq = vsi->rxq_map[i]; - u32 qrx_context_offset; - u32 regval; - - qrx_context_offset = - QRX_CONTEXT(ICE_L2TSEL_QRX_CONTEXT_REG_IDX, pfq); - - regval = rd32(hw, qrx_context_offset); - regval &= ~BIT(ICE_L2TSEL_BIT_OFFSET); - regval |= l2tsel_bit; - wr32(hw, qrx_context_offset, regval); - } -} - /** * ice_vc_ena_vlan_stripping_v2_msg * @vf: VF the message was received from |
