[dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set and flush

Chilikin, Andrey andrey.chilikin at intel.com
Fri Oct 13 12:06:33 CEST 2017


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:dev-bounces at dpdk.org] On Behalf Of Wei Zhao
> Sent: Wednesday, October 11, 2017 9:56 AM
> To: dev at dpdk.org
> Cc: Zhao1, Wei <wei.zhao1 at intel.com>
> 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.

> +	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;
> +}


More information about the dev mailing list