[dpdk-dev] [PATCH v2] ethdev: report error on name truncation

Thomas Monjalon thomas at monjalon.net
Mon Jan 14 15:30:13 CET 2019


13/01/2019 16:38, Nithin Kumar Dabilpuram:
> Currently this api doesn't report error if name is
> truncated and so user is not sure about uniqueness
> of name. This change reports error to help user.
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
> ---
> +	if (rc >= RTE_MEMZONE_NAMESIZE) {
> +		RTE_ETHDEV_LOG(ERR, "truncated name");

It would be better understandable from an user perspective by saying
"ring name too long".
And it would be even better with \n at the end ;)

> +		rte_errno = ENAMETOOLONG;
> +		return NULL;
> +	}






More information about the dev mailing list