[dpdk-dev] [PATCH v6] ethdev: add sanity checks in control APIs

Stephen Hemminger stephen at networkplumber.org
Fri Apr 16 18:28:53 CEST 2021


On Fri, 16 Apr 2021 11:22:02 +0100
Kevin Traynor <ktraynor at redhat.com> wrote:

> > +	if (dev_conf == NULL) {
> > +		RTE_ETHDEV_LOG(ERR,
> > +			"Cannot configure ethdev port %u to NULL dev_conf\n",  
> 
> The others use a natural sounding names instead of argument name. If you
> wanted to match that it could be "..to NULL conf"

I would prefer that error messages don't try to be English sentences.
The wording ends up awkward. and overly wordy.
If function name is automatically included by RTE_ETHDEV_LOG() then
Just:
		RTE_ETHDEV_LOG(ERR, "NULL ethdev")
should be enough for programmer to find/fix the problem


More information about the dev mailing list