ethdev: make stats and xstats reset callbacks return int
[dpdk.git] / drivers / net / axgbe / axgbe_ethdev.c
index 5a7da75..5036196 100644 (file)
@@ -15,15 +15,15 @@ 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 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);
 
@@ -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,6 +356,8 @@ axgbe_dev_stats_reset(struct rte_eth_dev *dev)
                txq->bytes = 0;
                txq->errors = 0;
        }
+
+       return 0;
 }
 
 static int