X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_ethdev.c;h=2f5f86f84877457b61fea9462ff634812c0b639e;hb=d04fc01de2298e2b7e405f499a919d1bd4d551f1;hp=7a5747282da7c231150a79490b3927403c144c9b;hpb=73332ab85ef64324aa944789e714450a0b3fb8a8;p=dpdk.git diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 7a5747282d..2f5f86f848 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "efx.h" @@ -521,16 +522,18 @@ sfc_tx_queue_release(void *queue) sfc_adapter_unlock(sa); } -static void +static int sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { struct sfc_adapter *sa = dev->data->dev_private; struct sfc_port *port = &sa->port; uint64_t *mac_stats; + int ret; rte_spinlock_lock(&port->mac_stats_lock); - if (sfc_port_update_mac_stats(sa) != 0) + ret = sfc_port_update_mac_stats(sa); + if (ret != 0) goto unlock; mac_stats = port->mac_stats_buf; @@ -587,6 +590,8 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) unlock: rte_spinlock_unlock(&port->mac_stats_lock); + SFC_ASSERT(ret >= 0); + return -ret; } static void @@ -1787,8 +1792,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev) /* Copy PCI device info to the dev->data */ rte_eth_copy_pci_info(dev, pci_dev); - dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE; - rc = sfc_kvargs_parse(sa); if (rc != 0) goto fail_kvargs_parse;