• Xuan Zhuo's avatar
    virtio_net: add the total stats field · d806e1ff
    Xuan Zhuo authored
    Now, we just show the stats of every queue.
    
    But for the user, the total values of every stat may are valuable.
    
    NIC statistics:
         rx_packets: 373522
         rx_bytes: 85919736
         rx_drops: 0
         rx_xdp_packets: 0
         rx_xdp_tx: 0
         rx_xdp_redirects: 0
         rx_xdp_drops: 0
         rx_kicks: 11125
         rx_hw_notifications: 0
         rx_hw_packets: 1325870
         rx_hw_bytes: 263348963
         rx_hw_interrupts: 0
         rx_hw_drops: 1451
         rx_hw_drop_overruns: 0
         rx_hw_csum_valid: 1325870
         rx_hw_needs_csum: 1325870
         rx_hw_csum_none: 0
         rx_hw_csum_bad: 0
         rx_hw_ratelimit_packets: 0
         rx_hw_ratelimit_bytes: 0
         tx_packets: 10050
         tx_bytes: 1230176
         tx_xdp_tx: 0
         tx_xdp_tx_drops: 0
         tx_kicks: 10050
         tx_timeouts: 0
         tx_hw_notifications: 0
         tx_hw_packets: 32281
         tx_hw_bytes: 4315590
         tx_hw_interrupts: 0
         tx_hw_drops: 0
         tx_hw_drop_malformed: 0
         tx_hw_csum_none: 0
         tx_hw_needs_csum: 32281
         tx_hw_ratelimit_packets: 0
         tx_hw_ratelimit_bytes: 0
         rx0_packets: 373522
         rx0_bytes: 85919736
         rx0_drops: 0
         rx0_xdp_packets: 0
         rx0_xdp_tx: 0
         rx0_xdp_redirects: 0
         rx0_xdp_drops: 0
         rx0_kicks: 11125
         rx0_hw_notifications: 0
         rx0_hw_packets: 1325870
         rx0_hw_bytes: 263348963
         rx0_hw_interrupts: 0
         rx0_hw_drops: 1451
         rx0_hw_drop_overruns: 0
         rx0_hw_csum_valid: 1325870
         rx0_hw_needs_csum: 1325870
         rx0_hw_csum_none: 0
         rx0_hw_csum_bad: 0
         rx0_hw_ratelimit_packets: 0
         rx0_hw_ratelimit_bytes: 0
         tx0_packets: 10050
         tx0_bytes: 1230176
         tx0_xdp_tx: 0
         tx0_xdp_tx_drops: 0
         tx0_kicks: 10050
         tx0_timeouts: 0
         tx0_hw_notifications: 0
         tx0_hw_packets: 32281
         tx0_hw_bytes: 4315590
         tx0_hw_interrupts: 0
         tx0_hw_drops: 0
         tx0_hw_drop_malformed: 0
         tx0_hw_csum_none: 0
         tx0_hw_needs_csum: 32281
         tx0_hw_ratelimit_packets: 0
         tx0_hw_ratelimit_bytes: 0
    Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    d806e1ff
virtio_net.c 147 KB