Hi, We have a SR-IOV guest whose xml looks like shown below: ------ <interface type='hostdev' managed='yes'> <mac address='fa:16:3e:3d:72:18'/> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x01' slot='0x12' function='0x7'/> </source> <vlan> <tag id='2'/> </vlan> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </interface> ---- How to find the network statistics for the virtual function assigned to the VM above from the ethtool -S output shown below: --- ethtool -S eno12409 NIC statistics: rx_unicast: 2890507 tx_unicast: 1279755 rx_multicast: 101903131 tx_multicast: 363832 rx_broadcast: 1496406 tx_broadcast: 1052 rx_bytes: 10084560360 tx_bytes: 225469520 rx_dropped: 0 rx_unknown_protocol: 0 rx_alloc_fail: 0 rx_pg_alloc_fail: 0 tx_errors: 0 tx_linearize: 0 tx_busy: 0 tx_restart: 0 tx_queue_0_packets: 120328 tx_queue_0_bytes: 15218021 tx_queue_1_packets: 185835 tx_queue_1_bytes: 33463904 tx_queue_2_packets: 255145 tx_queue_2_bytes: 62401952 tx_queue_3_packets: 73719 tx_queue_3_bytes: 9766278 tx_queue_4_packets: 75719 tx_queue_4_bytes: 13886665 tx_queue_5_packets: 756632 tx_queue_5_bytes: 64787766 tx_queue_6_packets: 127836 tx_queue_6_bytes: 13422778 tx_queue_7_packets: 49417 tx_queue_7_bytes: 7596442 rx_queue_0_packets: 103727545 rx_queue_0_bytes: 6961254601 rx_queue_1_packets: 326249 rx_queue_1_bytes: 454984714 rx_queue_2_packets: 242553 rx_queue_2_bytes: 339238020 rx_queue_3_packets: 183649 rx_queue_3_bytes: 244280310 rx_queue_4_packets: 405611 rx_queue_4_bytes: 495795368 rx_queue_5_packets: 227854 rx_queue_5_bytes: 236190286 rx_queue_6_packets: 193401 rx_queue_6_bytes: 271337926 rx_queue_7_packets: 982683 rx_queue_7_bytes: 447042416 rx_bytes.nic: 12401182418323 tx_bytes.nic: 74986406490 rx_unicast.nic: 8485232145 tx_unicast.nic: 761643543 rx_multicast.nic: 101957596 tx_multicast.nic: 388091 rx_broadcast.nic: 1495740 tx_broadcast.nic: 1718 tx_errors.nic: 0 tx_timeout.nic: 0 rx_size_64.nic: 167990805 tx_size_64.nic: 244373395 rx_size_127.nic: 240074370 tx_size_127.nic: 466106113 rx_size_255.nic: 39290324 tx_size_255.nic: 29943862 rx_size_511.nic: 6918699 tx_size_511.nic: 4570812 rx_size_1023.nic: 22389241 tx_size_1023.nic: 15207161 rx_size_1522.nic: 8112022042 tx_size_1522.nic: 1832009 rx_size_big.nic: 0 tx_size_big.nic: 0 link_xon_rx.nic: 0 link_xon_tx.nic: 0 link_xoff_rx.nic: 0 link_xoff_tx.nic: 0 tx_dropped_link_down.nic: 0 rx_undersize.nic: 0 rx_fragments.nic: 0 rx_oversize.nic: 0 rx_jabber.nic: 0 rx_csum_bad.nic: 0 rx_length_errors.nic: 0 rx_dropped.nic: 0 rx_crc_errors.nic: 0 illegal_bytes.nic: 0 mac_local_faults.nic: 0 mac_remote_faults.nic: 0 fdir_sb_match.nic: 0 fdir_sb_status.nic: 1 tx_priority_0_xon.nic: 0 tx_priority_0_xoff.nic: 0 tx_priority_1_xon.nic: 0 tx_priority_1_xoff.nic: 0 tx_priority_2_xon.nic: 0 tx_priority_2_xoff.nic: 0 tx_priority_3_xon.nic: 0 tx_priority_3_xoff.nic: 0 tx_priority_4_xon.nic: 0 tx_priority_4_xoff.nic: 0 tx_priority_5_xon.nic: 0 tx_priority_5_xoff.nic: 0 tx_priority_6_xon.nic: 0 tx_priority_6_xoff.nic: 0 tx_priority_7_xon.nic: 0 tx_priority_7_xoff.nic: 0 rx_priority_0_xon.nic: 0 rx_priority_0_xoff.nic: 0 rx_priority_1_xon.nic: 0 rx_priority_1_xoff.nic: 0 rx_priority_2_xon.nic: 0 rx_priority_2_xoff.nic: 0 rx_priority_3_xon.nic: 0 rx_priority_3_xoff.nic: 0 rx_priority_4_xon.nic: 0 rx_priority_4_xoff.nic: 0 rx_priority_5_xon.nic: 0 rx_priority_5_xoff.nic: 0 rx_priority_6_xon.nic: 0 rx_priority_6_xoff.nic: 0 rx_priority_7_xon.nic: 0 rx_priority_7_xoff.nic: 0 ----- Please help Thanks Kumar
This is something I looked at in the past and it wasn't possible. Once a VF/SRIOV is bound, it's outside of the Compute Kernel control. On Mon, Dec 5, 2022 at 9:42 AM Gk Gk <ygk.kmr@gmail.com> wrote:
Hi,
We have a SR-IOV guest whose xml looks like shown below:
------ <interface type='hostdev' managed='yes'> <mac address='fa:16:3e:3d:72:18'/> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x01' slot='0x12' function='0x7'/> </source> <vlan> <tag id='2'/> </vlan> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </interface> ----
How to find the network statistics for the virtual function assigned to the VM above from the ethtool -S output shown below: --- ethtool -S eno12409 NIC statistics: rx_unicast: 2890507 tx_unicast: 1279755 rx_multicast: 101903131 tx_multicast: 363832 rx_broadcast: 1496406 tx_broadcast: 1052 rx_bytes: 10084560360 tx_bytes: 225469520 rx_dropped: 0 rx_unknown_protocol: 0 rx_alloc_fail: 0 rx_pg_alloc_fail: 0 tx_errors: 0 tx_linearize: 0 tx_busy: 0 tx_restart: 0 tx_queue_0_packets: 120328 tx_queue_0_bytes: 15218021 tx_queue_1_packets: 185835 tx_queue_1_bytes: 33463904 tx_queue_2_packets: 255145 tx_queue_2_bytes: 62401952 tx_queue_3_packets: 73719 tx_queue_3_bytes: 9766278 tx_queue_4_packets: 75719 tx_queue_4_bytes: 13886665 tx_queue_5_packets: 756632 tx_queue_5_bytes: 64787766 tx_queue_6_packets: 127836 tx_queue_6_bytes: 13422778 tx_queue_7_packets: 49417 tx_queue_7_bytes: 7596442 rx_queue_0_packets: 103727545 rx_queue_0_bytes: 6961254601 rx_queue_1_packets: 326249 rx_queue_1_bytes: 454984714 rx_queue_2_packets: 242553 rx_queue_2_bytes: 339238020 rx_queue_3_packets: 183649 rx_queue_3_bytes: 244280310 rx_queue_4_packets: 405611 rx_queue_4_bytes: 495795368 rx_queue_5_packets: 227854 rx_queue_5_bytes: 236190286 rx_queue_6_packets: 193401 rx_queue_6_bytes: 271337926 rx_queue_7_packets: 982683 rx_queue_7_bytes: 447042416 rx_bytes.nic: 12401182418323 tx_bytes.nic: 74986406490 rx_unicast.nic: 8485232145 tx_unicast.nic: 761643543 rx_multicast.nic: 101957596 tx_multicast.nic: 388091 rx_broadcast.nic: 1495740 tx_broadcast.nic: 1718 tx_errors.nic: 0 tx_timeout.nic: 0 rx_size_64.nic: 167990805 tx_size_64.nic: 244373395 rx_size_127.nic: 240074370 tx_size_127.nic: 466106113 rx_size_255.nic: 39290324 tx_size_255.nic: 29943862 rx_size_511.nic: 6918699 tx_size_511.nic: 4570812 rx_size_1023.nic: 22389241 tx_size_1023.nic: 15207161 rx_size_1522.nic: 8112022042 tx_size_1522.nic: 1832009 rx_size_big.nic: 0 tx_size_big.nic: 0 link_xon_rx.nic: 0 link_xon_tx.nic: 0 link_xoff_rx.nic: 0 link_xoff_tx.nic: 0 tx_dropped_link_down.nic: 0 rx_undersize.nic: 0 rx_fragments.nic: 0 rx_oversize.nic: 0 rx_jabber.nic: 0 rx_csum_bad.nic: 0 rx_length_errors.nic: 0 rx_dropped.nic: 0 rx_crc_errors.nic: 0 illegal_bytes.nic: 0 mac_local_faults.nic: 0 mac_remote_faults.nic: 0 fdir_sb_match.nic: 0 fdir_sb_status.nic: 1 tx_priority_0_xon.nic: 0 tx_priority_0_xoff.nic: 0 tx_priority_1_xon.nic: 0 tx_priority_1_xoff.nic: 0 tx_priority_2_xon.nic: 0 tx_priority_2_xoff.nic: 0 tx_priority_3_xon.nic: 0 tx_priority_3_xoff.nic: 0 tx_priority_4_xon.nic: 0 tx_priority_4_xoff.nic: 0 tx_priority_5_xon.nic: 0 tx_priority_5_xoff.nic: 0 tx_priority_6_xon.nic: 0 tx_priority_6_xoff.nic: 0 tx_priority_7_xon.nic: 0 tx_priority_7_xoff.nic: 0 rx_priority_0_xon.nic: 0 rx_priority_0_xoff.nic: 0 rx_priority_1_xon.nic: 0 rx_priority_1_xoff.nic: 0 rx_priority_2_xon.nic: 0 rx_priority_2_xoff.nic: 0 rx_priority_3_xon.nic: 0 rx_priority_3_xoff.nic: 0 rx_priority_4_xon.nic: 0 rx_priority_4_xoff.nic: 0 rx_priority_5_xon.nic: 0 rx_priority_5_xoff.nic: 0 rx_priority_6_xon.nic: 0 rx_priority_6_xoff.nic: 0 rx_priority_7_xon.nic: 0 rx_priority_7_xoff.nic: 0 -----
Please help
Thanks Kumar
participants (2)
-
Gk Gk
-
Laurent Dumont