[dpdk-dev] [PATCH] net/sfc: add support for xstats retrieval by ID
Andrew Rybchenko
arybchenko at solarflare.com
Wed Jul 12 16:36:09 CEST 2017
On 07/12/2017 05:18 PM, Remy Horton wrote:
>
> On 08/07/2017 16:45, Andrew Rybchenko wrote:
>> From: Ivan Malov <ivan.malov at oktetlabs.ru>
>>
>> Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
> [..]
>
> Reviewed-by: Remy Horton <remy.horton at intel.com>
>
>
>> + rc = sfc_port_update_mac_stats(sa);
>> + if (rc != 0) {
>> + SFC_ASSERT(rc > 0);
>> + ret = -rc;
>
> sfc_port_update_mac_stats() really ought to be returning -EINVAL or
> -ENOMEM rather than EINVAL/ENOMEM then doing a negation here.
It is the decision made on driver implementation to convert to negative
errno
at rte_eth_dev_ops return.
Inside the driver we use positive errno since base driver uses positive
errno and
a number of places where base driver API is called (and conversion would
be required)
is significantly bigger than a number of rte_eth_dev_ops.
> Other than that, code seems OK..
Many thanks for the review.
More information about the dev
mailing list