[Intel-wired-lan] [PATCH iwl-next 1/2] ice: consistently use q_idx in ice_vc_cfg_qs_msg()

Romanowski, Rafal rafal.romanowski at intel.com
Fri Sep 27 09:13:12 UTC 2024


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Jacob
> Keller
> Sent: Tuesday, September 10, 2024 1:08 AM
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>
> Cc: Keller, Jacob E <jacob.e.keller at intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel at intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next 1/2] ice: consistently use q_idx in
> ice_vc_cfg_qs_msg()
> 
> The ice_vc_cfg_qs_msg() function is used to configure VF queues in response to a
> VIRTCHNL_OP_CONFIG_VSI_QUEUES command.
> 
> The virtchnl command contains an array of queue pair data for configuring Tx and
> Rx queues. This data includes a queue ID. When configuring the queues, the
> driver generally uses this queue ID to determine which Tx and Rx ring to program.
> However, a handful of places use the index into the queue pair data from the VF.
> While most VF implementations appear to send this data in order, it is not
> mandated by the virtchnl and it is not verified that the queue pair data comes in
> order.
> 
> Fix the driver to consistently use the q_idx field instead of the 'i'
> iterator value when accessing the rings. For the Rx case, introduce a local ring
> variable to keep lines short.
> 
> Fixes: 7ad15440acf8 ("ice: Refactor VIRTCHNL_OP_CONFIG_VSI_QUEUES
> handling")
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_virtchnl.c | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> index 59f62306b9cb..b6ec01f6fa73 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
> @@ -1715,8 +1715,8 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8


Tested-by: Rafal Romanowski <rafal.romanowski at intel.com>





More information about the Intel-wired-lan mailing list