Hi, Andrey Yes, it is the number of queue pairs for pf.
> -----Original Message----- > From: Chilikin, Andrey > Sent: Wednesday, October 18, 2017 9:01 PM > To: Zhao1, Wei <[email protected]>; [email protected] > Cc: Yigit, Ferruh <[email protected]>; Xing, Beilei > <[email protected]>; Wu, Jingjing <[email protected]> > Subject: RE: [dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set and flush > > Hi Wei, > > Is there number of RX queues configured for the port? > If main_vsi->nb_used_qps reflects number of enabled RX queues, then it > can be used. > > Regards, > Andrey > > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Wednesday, October 18, 2017 4:01 AM > > To: Chilikin, Andrey <[email protected]>; [email protected] > > Cc: Yigit, Ferruh <[email protected]>; Xing, Beilei > > <[email protected]>; Wu, Jingjing <[email protected]> > > Subject: RE: [dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set and > > flush > > > > Hi,Andrey > > > > > -----Original Message----- > > > From: Chilikin, Andrey > > > Sent: Friday, October 13, 2017 6:07 PM > > > To: Zhao1, Wei <[email protected]>; [email protected] > > > Cc: Zhao1, Wei <[email protected]>; Yigit, Ferruh > > > <[email protected]>; Xing, Beilei <[email protected]>; Wu, > > > Jingjing <[email protected]> > > > Subject: RE: [dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set > > > and > > flush > > > > > > Hi Wei > > > > > > Sorry for the late comment, but I was not included to the patchset > > > CC list > > and > > > just found this new version. > > > > > > > -----Original Message----- > > > > From: dev [mailto:[email protected]] On Behalf Of Wei Zhao > > > > Sent: Wednesday, October 11, 2017 9:56 AM > > > > To: [email protected] > > > > Cc: Zhao1, Wei <[email protected]> > > > > Subject: [dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set and > > > > flush > > > > > > > > > <snip> > > > > > > > +int > > > > +i40e_flush_queue_region_all_conf(struct rte_eth_dev *dev, > > > > + struct i40e_hw *hw, struct i40e_pf *pf, uint16_t on) { > > > > + int32_t ret = -EINVAL; > > > > + struct i40e_queue_regions *info = &pf->queue_region; > > > > + > > > > + if (on) { > > > > + i40e_queue_region_pf_flowtype_conf(hw, pf); > > > > + > > > > + ret = i40e_vsi_update_queue_region_mapping(hw, pf); > > > > + if (ret != I40E_SUCCESS) { > > > > + PMD_DRV_LOG(INFO, "Failed to flush queue region > > > > mapping."); > > > > + return ret; > > > > + } > > > > + > > > > + ret = i40e_queue_region_dcb_configure(hw, pf); > > > > + if (ret != I40E_SUCCESS) { > > > > + PMD_DRV_LOG(INFO, "Failed to flush dcb."); > > > > + return ret; > > > > + } > > > > + > > > > + return 0; > > > > + } > > > > + > > > > + info->queue_region_number = 1; > > > > + info->region[0].queue_num = 64; > > > > > > Why number of queues is hardcoded to a magic number 64? How it will > > work > > > if VSI is enabled with smaller number of queues, for example, 1 or > > > 6? 64 is the maximum number of queues that can be used for RSS, but > > > VSI might > > be > > > created with only few queues. > > > > Yes, I know what is your mean, may be it should be change to > > > > struct i40e_vsi *main_vsi = pf->main_vsi; > > info->region[0].queue_num = main_vsi->nb_used_qps; > > > > Do you think so? > > > > > > > > > + info->region[0].queue_start_index = 0; > > > > + > > > > + ret = i40e_vsi_update_queue_region_mapping(hw, pf); > > > > + if (ret != I40E_SUCCESS) > > > > + PMD_DRV_LOG(INFO, "Failed to flush queue region > > > > mapping."); > > > > + > > > > + ret = i40e_dcb_init_configure(dev, TRUE); > > > > + if (ret != I40E_SUCCESS) { > > > > + PMD_DRV_LOG(INFO, "Failed to flush dcb."); > > > > + pf->flags &= ~I40E_FLAG_DCB; > > > > + } > > > > + > > > > + i40e_init_queue_region_conf(dev); > > > > + > > > > + return 0; > > > > +}

