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

Wei Hu (Xavier) huwei013 at chinasoftinc.com
Mon Oct 12 05:21:49 CEST 2020


Hi, Stephen Hemminger

On 2020/10/10 23:24, Stephen Hemminger wrote:
> 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);

I fixed it in V2.

Thanks, xavier



More information about the dev mailing list