On 12/7/21 21:37, David Marchand wrote:
|Here, we add "driver" specific stats, while netdev_dpdk_sw_stats struct carries OVS "own" stats. This netdev_dpdk_sw_stats struct is converted by netdev_dpdk_get_sw_custom_stats and there is a small framework on adding custom OVS stats (using some macros "trick"). I'd rather leave netdev_dpdk_sw_stats struct untouched for consistency. Pointers to vhost specific stats can be added to the netdev_dpdk struct (we have some spare space after the pointer to netdev_dpdk_sw_stats). |+struct netdev_dpdk_vhost_q_stats { + uint64_t bytes; + uint64_t packets; + uint64_t errors; +}; + /* Custom software stats for dpdk ports */ struct netdev_dpdk_sw_stats { /* No. of retries when unable to transmit. */ @@ -206,6 +213,10 @@ struct netdev_dpdk_sw_stats { uint64_t rx_qos_drops; /* Packet drops in HWOL processing. */ uint64_t tx_invalid_hwol_drops; + /* Per-queue Vhost Tx stats */ + struct netdev_dpdk_vhost_q_stats *txq; + /* Per-queue Vhost Rx stats */ + struct netdev_dpdk_vhost_q_stats *rxq;
I checked with pahole, and the comment stating "/*36 pad bytes here.*/" is outdated. Since it is difficult to maintain it given it needs to be updated when struct netdev_stats is modified, I will just remove it in next revision. Maxime _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
