Imported Upstream version 16.11.2
[deb_dpdk.git] / drivers / net / thunderx / nicvf_ethdev.c
index 466e49c..2da5af0 100644 (file)
@@ -41,7 +41,6 @@
 #include <inttypes.h>
 #include <netinet/in.h>
 #include <sys/queue.h>
-#include <sys/timerfd.h>
 
 #include <rte_alarm.h>
 #include <rte_atomic.h>
@@ -245,7 +244,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
        /* Reading per RX ring stats */
        for (qidx = rx_start; qidx <= rx_end; qidx++) {
-               if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS)
+               if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
                        break;
 
                nicvf_hw_get_rx_qstats(nic, &rx_qstats, qidx);
@@ -258,7 +257,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
        /* Reading per TX ring stats */
        for (qidx = tx_start; qidx <= tx_end; qidx++) {
-               if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS)
+               if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
                        break;
 
                nicvf_hw_get_tx_qstats(nic, &tx_qstats, qidx);
@@ -277,7 +276,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
                /* Reading per RX ring stats */
                for (qidx = rx_start; qidx <= rx_end; qidx++) {
-                       if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS)
+                       if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
                                break;
 
                        nicvf_hw_get_rx_qstats(snic, &rx_qstats,
@@ -290,7 +289,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
                nicvf_tx_range(dev, snic, &tx_start, &tx_end);
                /* Reading per TX ring stats */
                for (qidx = tx_start; qidx <= tx_end; qidx++) {
-                       if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS)
+                       if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
                                break;
 
                        nicvf_hw_get_tx_qstats(snic, &tx_qstats,