[dpdk-dev] [PATCH v7 2/2] app/testpmd: add API for configuration of queue region

Wu, Jingjing jingjing.wu at intel.com
Fri Sep 29 16:29:21 CEST 2017


> +static void
> +cmd_queue_region_parsed(void *parsed_result,
> +			__attribute__((unused)) struct cmdline *cl,
> +			__attribute__((unused)) void *data)
> +{
> +	struct cmd_queue_region_result *res = parsed_result;
> +	int ret = 0;
> +#ifdef RTE_LIBRTE_I40E_PMD
> +	struct rte_i40e_rss_region_conf region_conf;
> +
> +	memset(&region_conf, 0, sizeof(region_conf));
> +	region_conf.op = RTE_PMD_I40E_QUEUE_REGION_SET;
> +	region_conf.region_id = res->region_id;
> +	region_conf.queue_num = res->queue_num_value;
> +	region_conf.queue_start_index = res->queue_id;
> +
> +	ret = rte_pmd_i40e_rss_queue_region_conf(res->port_id, &region_conf);
> +#endif
> +
> +	if (ret < 0)
> +		printf("queue region config programming error: (%s)\n",
> +				strerror(-ret));
> +}

If the RTE_LIBRTE_I40E_PMD is not built. The printf info would be incorrect.
And you need to check it the port id is valid or not.

Please check all new functions in this patch.

Thanks
Jingjing


More information about the dev mailing list