> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Jacob > Keller > Sent: Tuesday, September 10, 2024 1:08 AM > To: Intel Wired LAN <[email protected]>; Nguyen, Anthony L > <[email protected]> > Cc: Keller, Jacob E <[email protected]>; Kitszel, Przemyslaw > <[email protected]> > 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 <[email protected]> > --- > 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 <[email protected]>
