[dpdk-dev] [PATCH] ethdev: check if queue setupped in queue-related APIs

Stephen Hemminger stephen at networkplumber.org
Sat Oct 10 17:24:13 CEST 2020


On Sat, 10 Oct 2020 15:12:12 +0800
"Wei Hu (Xavier)" <huwei013 at chinasoftinc.com> wrote:

> +	if (dev->data->rx_queues[rx_queue_id] == NULL) {
> +		RTE_ETHDEV_LOG(ERR, "Rx queue %"PRIu16" of device with port_id=%"
> +				    PRIu16" has not been setupped\n",
> +				    rx_queue_id, port_id);
> +		return -EINVAL;
> +

Please use correct spelling.

Your change follows the existing style in rte_eth_dev_rx_queue_start() but
my preference is that message strings are not split across
lines. That makes it easier to use tools like grep to find messages in the source.

Use of PRIu16 is not required. And recent compiler standards would require space
around its use.

Suggest:
		RTE_ETHDEV_LOG(ERR, 
			       "Queue %u of device with port_id=%u has not been setup\n",
				rx_queue_id, port_id);


More information about the dev mailing list