]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/axgbe/axgbe_ethdev.c
ethdev: make stats and xstats reset callbacks return int
[dpdk.git] / drivers / net / axgbe / axgbe_ethdev.c
index 4fcede889daef03342de3840561f43e9ed039c0f..503619672627c6b8885bbbb7984296c72811d9e5 100644 (file)
@@ -15,16 +15,16 @@ static int  axgbe_dev_start(struct rte_eth_dev *dev);
 static void axgbe_dev_stop(struct rte_eth_dev *dev);
 static void axgbe_dev_interrupt_handler(void *param);
 static void axgbe_dev_close(struct rte_eth_dev *dev);
-static void axgbe_dev_promiscuous_enable(struct rte_eth_dev *dev);
-static void axgbe_dev_promiscuous_disable(struct rte_eth_dev *dev);
+static int axgbe_dev_promiscuous_enable(struct rte_eth_dev *dev);
+static int axgbe_dev_promiscuous_disable(struct rte_eth_dev *dev);
 static void axgbe_dev_allmulticast_enable(struct rte_eth_dev *dev);
 static void axgbe_dev_allmulticast_disable(struct rte_eth_dev *dev);
 static int axgbe_dev_link_update(struct rte_eth_dev *dev,
                                 int wait_to_complete);
 static int axgbe_dev_stats_get(struct rte_eth_dev *dev,
                                struct rte_eth_stats *stats);
-static void axgbe_dev_stats_reset(struct rte_eth_dev *dev);
-static void axgbe_dev_info_get(struct rte_eth_dev *dev,
+static int axgbe_dev_stats_reset(struct rte_eth_dev *dev);
+static int  axgbe_dev_info_get(struct rte_eth_dev *dev,
                               struct rte_eth_dev_info *dev_info);
 
 /* The set of PCI devices this driver supports */
@@ -236,7 +236,7 @@ axgbe_dev_close(struct rte_eth_dev *dev)
        axgbe_dev_clear_queues(dev);
 }
 
-static void
+static int
 axgbe_dev_promiscuous_enable(struct rte_eth_dev *dev)
 {
        struct axgbe_port *pdata = dev->data->dev_private;
@@ -244,9 +244,11 @@ axgbe_dev_promiscuous_enable(struct rte_eth_dev *dev)
        PMD_INIT_FUNC_TRACE();
 
        AXGMAC_IOWRITE_BITS(pdata, MAC_PFR, PR, 1);
+
+       return 0;
 }
 
-static void
+static int
 axgbe_dev_promiscuous_disable(struct rte_eth_dev *dev)
 {
        struct axgbe_port *pdata = dev->data->dev_private;
@@ -254,6 +256,8 @@ axgbe_dev_promiscuous_disable(struct rte_eth_dev *dev)
        PMD_INIT_FUNC_TRACE();
 
        AXGMAC_IOWRITE_BITS(pdata, MAC_PFR, PR, 0);
+
+       return 0;
 }
 
 static void
@@ -333,7 +337,7 @@ axgbe_dev_stats_get(struct rte_eth_dev *dev,
        return 0;
 }
 
-static void
+static int
 axgbe_dev_stats_reset(struct rte_eth_dev *dev)
 {
        struct axgbe_rx_queue *rxq;
@@ -352,9 +356,11 @@ axgbe_dev_stats_reset(struct rte_eth_dev *dev)
                txq->bytes = 0;
                txq->errors = 0;
        }
+
+       return 0;
 }
 
-static void
+static int
 axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
        struct axgbe_port *pdata = dev->data->dev_private;
@@ -393,6 +399,8 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        dev_info->default_txconf = (struct rte_eth_txconf) {
                .tx_free_thresh = AXGBE_TX_FREE_THRESH,
        };
+
+       return 0;
 }
 
 static void axgbe_get_all_hw_features(struct axgbe_port *pdata)