> On Jan 13, 2019, at 2:02 PM, Thomas Monjalon <tho...@monjalon.net> wrote:
>
> 13/01/2019 20:28, Wiles, Keith:
>>> On Jan 13, 2019, at 9:38 AM, Nithin Kumar Dabilpuram
>>> <ndabilpu...@marvell.com> wrote:
>>> --- a/lib/librte_ethdev/rte_ethdev.c
>>> +++ b/lib/librte_ethdev/rte_ethdev.c
>>> + if (rc >= RTE_MEMZONE_NAMESIZE) {
>>> + RTE_ETHDEV_LOG(ERR, "truncated name");
>>> + rte_errno = ENAMETOOLONG;
>>> + return NULL;
>>> + }
>>
>> I we are already returning an error here should the RTE_LOG be DEBUG
>> and not ERR.
>> Of course this does mean we would have to check return codes :-)
>
> In the general case, we should always log the errors as RTE_LOG_ERR,
> no matter it is handled and logged again at an upper level.
> Don't you think so?
My only concern is cluttering up the console output and developers should be
checking return codes, which I know we do not do sometimes in DPDK.
I think we need to do some cleaning up of DPDK and test return codes or make
the function return void, but that is a different problem then this one.
If we are fine with this type of log style then we can leave it. To me is just
seem redundant if we are returning a code the calling function should report
the error. In some cases we will get two or more messages about the same
problem depending on the call path.
>
>
Regards,
Keith