ethdev: fix extended statistics name index
[dpdk.git] / drivers / net / vhost / rte_eth_vhost.c
index 766d4ef..3c48155 100644 (file)
@@ -324,6 +324,7 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
                                *(uint64_t *)(((char *)vq)
                                + vhost_rxport_stat_strings[t].offset);
                }
+               xstats[count].id = count;
                count++;
        }
        for (t = 0; t < VHOST_NB_XSTATS_TXPORT; t++) {
@@ -336,6 +337,7 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
                                *(uint64_t *)(((char *)vq)
                                + vhost_txport_stat_strings[t].offset);
                }
+               xstats[count].id = count;
                count++;
        }
        return count;
@@ -1032,8 +1034,6 @@ eth_dev_vhost_create(const char *name, char *iface_name, int16_t queues,
        if (vring_state == NULL)
                goto error;
 
-       TAILQ_INIT(&eth_dev->link_intr_cbs);
-
        /* now put it all together
         * - store queue data in internal,
         * - store numa_node info in ethdev data