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

Ferruh Yigit ferruh.yigit at intel.com
Thu Jan 17 18:07:34 CET 2019


On 1/17/2019 3:38 PM, Thomas Monjalon wrote:
> 17/01/2019 15:13, 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>
>> ---
>> +	rc = snprintf(z_name, sizeof(z_name), "eth_p%d_q%d_%s",
>> +		      dev->data->port_id, queue_id, ring_name);
>> +
>> +	if (rc >= RTE_MEMZONE_NAMESIZE) {
>> +		RTE_ETHDEV_LOG(ERR, "ring name too long\n");
>> +		rte_errno = ENAMETOOLONG;
>> +		return NULL;
>> +	}
> 
> Usually we don't insert a blank line before a test of a return value.
> It's really a nitpick, so Ferruh, it's up to you to keep it or not when applying.
> 
> Acked-by: Thomas Monjalon <thomas at monjalon.net>
> 

Applied to dpdk-next-net/master, thanks.

(Blank line removed while merging)


More information about the dev mailing list