drivers/net: remove queue xstats auto-fill flag
[dpdk.git] / drivers / net / e1000 / igb_ethdev.c
index 3fdffe3..194da6b 100644 (file)
@@ -96,7 +96,7 @@ static int eth_igb_xstats_get_names(struct rte_eth_dev *dev,
                                    struct rte_eth_xstat_name *xstats_names,
                                    unsigned int size);
 static int eth_igb_xstats_get_names_by_id(struct rte_eth_dev *dev,
-               struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+               const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
                unsigned int limit);
 static int eth_igb_stats_reset(struct rte_eth_dev *dev);
 static int eth_igb_xstats_reset(struct rte_eth_dev *dev);
@@ -726,7 +726,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 
        eth_dev->dev_ops = &eth_igb_ops;
        eth_dev->rx_queue_count = eth_igb_rx_queue_count;
-       eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
        eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
        eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
        eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
@@ -743,7 +742,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
        }
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
 
@@ -920,7 +918,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
        PMD_INIT_FUNC_TRACE();
 
        eth_dev->dev_ops = &igbvf_eth_dev_ops;
-       eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
        eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
        eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
        eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
@@ -938,7 +935,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 
        pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->device_id = pci_dev->id.device_id;
        hw->vendor_id = pci_dev->id.vendor_id;
@@ -977,13 +973,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
                rte_eth_random_addr(perm_addr->addr_bytes);
                PMD_INIT_LOG(INFO, "\tVF MAC address not assigned by Host PF");
                PMD_INIT_LOG(INFO, "\tAssign randomly generated MAC address "
-                            "%02x:%02x:%02x:%02x:%02x:%02x",
-                            perm_addr->addr_bytes[0],
-                            perm_addr->addr_bytes[1],
-                            perm_addr->addr_bytes[2],
-                            perm_addr->addr_bytes[3],
-                            perm_addr->addr_bytes[4],
-                            perm_addr->addr_bytes[5]);
+                            RTE_ETHER_ADDR_PRT_FMT,
+                            RTE_ETHER_ADDR_BYTES(perm_addr));
        }
 
        diag = e1000_rar_set(hw, perm_addr->addr_bytes, 0);
@@ -1888,7 +1879,7 @@ static int eth_igb_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 }
 
 static int eth_igb_xstats_get_names_by_id(struct rte_eth_dev *dev,
-               struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+               const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
                unsigned int limit)
 {
        unsigned int i;
@@ -1907,7 +1898,7 @@ static int eth_igb_xstats_get_names_by_id(struct rte_eth_dev *dev,
        } else {
                struct rte_eth_xstat_name xstats_names_copy[IGB_NB_XSTATS];
 
-               eth_igb_xstats_get_names_by_id(dev, xstats_names_copy, NULL,
+               eth_igb_xstats_get_names_by_id(dev, NULL, xstats_names_copy,
                                IGB_NB_XSTATS);
 
                for (i = 0; i < limit; i++) {
@@ -2159,9 +2150,11 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
                }
                break;
        }
+       if (ret < 0)
+               return -EINVAL;
 
        ret += 1; /* add the size of '\0' */
-       if (fw_size < (u32)ret)
+       if (fw_size < (size_t)ret)
                return ret;
        else
                return 0;