On 07/12/2017 05:18 PM, Remy Horton wrote:

On 08/07/2017 16:45, Andrew Rybchenko wrote:
From: Ivan Malov <ivan.ma...@oktetlabs.ru>

Signed-off-by: Ivan Malov <ivan.ma...@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
[..]

Reviewed-by: Remy Horton <remy.hor...@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.

Reply via email to