X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvhost%2Fmain.h;h=c4591b475e113e72c61827f9e5e07108add9768f;hb=913154efa7ffb9f71bcf51d16b2043ccba6c5be7;hp=6a06441a32a7ad2053fd39e8ac02ed0b597433e4;hpb=45657a5c6861a7bea4041eb2d0e7d7179904336c;p=dpdk.git diff --git a/examples/vhost/main.h b/examples/vhost/main.h index 6a06441a32..c4591b475e 100644 --- a/examples/vhost/main.h +++ b/examples/vhost/main.h @@ -41,9 +41,13 @@ #define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER2 #define RTE_LOGTYPE_VHOST_PORT RTE_LOGTYPE_USER3 -/* - * Device linked list structure for data path. - */ +struct device_statistics { + uint64_t tx; + uint64_t tx_total; + rte_atomic64_t rx_atomic; + rte_atomic64_t rx_total_atomic; +}; + struct vhost_dev { /**< Pointer to device created by vhost lib. */ struct virtio_net *dev; @@ -62,6 +66,7 @@ struct vhost_dev { /**< Device is marked for removal from the data core. */ volatile uint8_t remove; + struct device_statistics stats; TAILQ_ENTRY(vhost_dev) next; } __rte_cache_aligned;