Documentation/networking/device_drivers/ethernet/mellanox/mlx5/counters.rst
.. SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB .. include:: <isonum.txt>
:Copyright: |copy| 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Overview_Groups_Types_Descriptions_There are several counter groups based on where the counter is being counted. In addition, each group of counters may have different counter types.
These counter groups are based on which component in a networking setup, illustrated below, that they describe::
----------------------------------------
| |
---------------------------------------- ---------------------------------------- |
| Hypervisor | | VM | |
| | | | |
| ------------------- --------------- | | ------------------- --------------- | |
| | Ethernet driver | | RDMA driver | | | | Ethernet driver | | RDMA driver | | |
| ------------------- --------------- | | ------------------- --------------- | |
| | | | | | | | |
| ------------------- | | ------------------- | |
| | | | | |--
---------------------------------------- ----------------------------------------
| |
------------- -----------------------------
| |
------ ------ ------ ------ ------ ------ ------
-----| PF |----------------------| VF |-| VF |-| VF |----- --| PF |--- --| PF |--- --| PF |---
| ------ ------ ------ ------ | | ------ | | ------ | | ------ |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| eSwitch | | eSwitch | | eSwitch | | eSwitch |
---------------------------------------------------------- ----------- ----------- -----------
-------------------------------------------------------------------------------
| |
| |
| Uplink (no counters) |
-------------------------------------------------------------------------------
---------------------------------------------------------------
| |
| |
| MPFS (no counters) |
---------------------------------------------------------------
|
|
| Port
Ring Software counters populated by the driver stack.
Netdev An aggregation of software ring counters.
vPort counters Traffic counters and drops due to steering or no buffers. May indicate issues with NIC. These counters include Ethernet traffic counters (including Raw Ethernet) and RDMA/RoCE traffic counters.
Physical port counters Counters that collect statistics about the PFs and VFs. May indicate issues with NIC, link, or network. This measuring point holds information on standardized counters like IEEE 802.3, RFC2863, RFC 2819, RFC 3635 and additional counters like flow control, FEC and more. Physical port counters are not exposed to virtual machines.
Priority Port Counters A set of the physical port counters, per priority per port.
Counters are divided into three types.
Traffic Informative Counters Counters which count traffic. These counters can be used for load estimation or for general debug.
Traffic Acceleration Counters Counters which count traffic that was accelerated by Mellanox driver or by hardware. The counters are an additional layer to the informative counter set, and the same traffic is counted in both informative and acceleration counters.
.. [#accel] Traffic acceleration counter.
Error Counters Increment of these counters might indicate a problem. Each of these counters has an explanation and correction action.
Statistic can be fetched via the ip link or ethtool commands. ethtool
provides more detailed information.::
ip –s link show <if-name>
ethtool -S <if-name>
XSK, PTP, and QoS counters that are similar to counters defined previously will
not be separately listed. For example, ptp_tx[i]_packets will not be
explicitly documented since tx[i]_packets describes the behavior of both
counters, except ptp_tx[i]_packets is only counted when precision time
protocol is used.
The following counters are available per ring or software port.
These counters provide information on the amount of traffic that was accelerated by the NIC. The counters are counting the accelerated traffic in addition to the standard counters which counts it (i.e. accelerated traffic is counted twice).
The counter names in the table below refers to both ring and port counters. The
notation for ring counters includes the [i] index without the braces. The
notation for port counters doesn't include the [i]. A counter name
rx[i]_packets will be printed as rx0_packets for ring 0 and rx_packets for
the software port.
.. flat-table:: Ring / Software Port Counter Table :widths: 2 3 1
rx[i]_packetsrx[i]_bytestx[i]_packetstx[i]_bytestx[i]_recovertx[i]_cqestx[i]_cqe_errtx[i]_tso_packetstx[i]_tso_bytestx[i]_tso_inner_packetstx[i]_tso_inner_bytesrx[i]_gro_packetsrx[i]_gro_bytesrx[i]_gro_skbsrx[i]_gro_match_packetsrx[i]_gro_large_hdsrx[i]_lro_packetsrx[i]_lro_bytesrx[i]_ecn_markrx_oversize_pkts_bufferrx_oversize_pkts_sw_droprx[i]_csum_unnecessaryCHECKSUM_UNNECESSARY on ring i [#accel]_.rx[i]_csum_unnecessary_innerCHECKSUM_UNNECESSARY
on ring i [#accel]_.rx[i]_csum_noneCHECKSUM_NONE on ring i [#accel]_.rx[i]_csum_completeCHECKSUM_COMPLETE on ring i [#accel]_.rx[i]_csum_complete_tailCHECKSUM_PARTIAL.rx[i]_csum_complete_tail_slowtx[i]_csum_partialCHECKSUM_PARTIAL on ring i [#accel]_.tx[i]_csum_partial_innerCHECKSUM_PARTIAL on
ring i [#accel]_.tx[i]_csum_nonetx[i]_stopped / tx_queue_stopped [#ring_global]_tx[i]_wake / tx_queue_wake [#ring_global]_tx[i]_dropped / tx_queue_dropped [#ring_global]_tx[i]_noptx[i]_added_vlan_packetsrx[i]_removed_vlan_packetsrx[i]_wqe_errrx[i]_mpwqe_fragrx[i]_mpwqe_filler_cqesrx[i]_mpwqe_filler_stridestx[i]_mpwqe_blkstx[i]_mpwqe_pktsrx[i]_cqe_compress_blksrx[i]_cqe_compress_pktsrx[i]_arfs_addrx[i]_arfs_request_inrx[i]_arfs_request_outrx[i]_arfs_expiredrx[i]_arfs_errrx[i]_recovertx[i]_xmit_morexmit_more indication set on the skbuff
(no doorbell).ch[i]_pollch[i]_armch[i]_aff_changech[i]_eventsch[i]_eq_rearmch[i]_force_irqrx[i]_congst_umrrx_pp_alloc_fastrx_pp_alloc_slowrx_pp_alloc_slow_high_orderrx_pp_alloc_emptyrx_pp_alloc_refillrx_pp_alloc_waiverx_pp_recycle_cachedrx_pp_recycle_cache_fullrx_pp_recycle_ringrx_pp_recycle_ring_fullrx_pp_recycle_released_refrx[i]_xsk_buff_alloc_errrx[i]_xdp_tx_xmitXDP_TX action (bouncing). these packets are not counted by other
software counters. These packets are counted by physical port and vPort
counters.rx[i]_xdp_tx_mpwqeXDP_TX-ed by
the netdev during the RQ context.rx[i]_xdp_tx_inlnwXDP_TX-ed during the RQ context.rx[i]_xdp_tx_nopsrx[i]_xdp_tx_fullXDP_TX action but were dropped due to full tx queue. These packets
are not counted by other software counters. These packets are counted by
physical port and vPort counters. You may open more rx queues and spread
traffic rx over all queues and/or increase rx ring size.rx[i]_xdp_tx_errXDP_TX error such as frame too long and frame
too short occurred on XDP_TX ring of RX ring.rx[i]_xdp_tx_cqes / rx_xdp_tx_cqe [#ring_global]_XDP_TX ring.rx[i]_xdp_dropXDP_DROP action. these
packets are not counted by other software counters. These packets are
counted by physical port and vPort counters.rx[i]_xdp_redirecttx[i]_xdp_xmittx[i]_xdp_fulltx[i]_xdp_mpwqeXDP_REDIRECT-ed from other netdevs.tx[i]_xdp_inlnwXDP_REDIRECT-ed from other netdevs.tx[i]_xdp_nopsXDP_REDIRECT-ed from other netdevs.tx[i]_xdp_errtx[i]_xdp_cqestx[i]_xsk_xmittx[i]_xsk_mpwqeXDP_REDIRECT-ed from other netdevs.tx[i]_xsk_inlnwtx[i]_xsk_fulltx[i]_xsk_errtx[i]_xsk_cqestx_tls_ctxtx_tls_deltx_tls_pool_alloctx_tls_pool_freerx_tls_ctxrx_tls_delrx[i]_tls_decrypted_packetsrx[i]_tls_decrypted_bytesrx[i]_tls_resync_req_pktrx[i]_tls_resync_req_startrx[i]_tls_resync_req_endrx[i]_tls_resync_req_skiprx[i]_tls_resync_res_okrx[i]_tls_resync_res_retryrx[i]_tls_resync_res_skiprx[i]_tls_errtx[i]_tls_encrypted_packetstx[i]_tls_encrypted_bytestx[i]_tls_oootx[i]_tls_dump_packetstx[i]_tls_dump_bytestx[i]_tls_resync_bytestx[i]_tls_skip_no_sync_datatx[i]_tls_drop_no_sync_dataptp_cq[i]_abortptp_cq[i]_abort_abs_diff_nsptp_cq[i]_late_cqe.. [#ring_global] The corresponding ring and global counters do not share the same name (i.e. do not follow the common naming scheme).
Counters on the NIC port that is connected to a eSwitch.
.. flat-table:: vPort Counter Table :widths: 2 3 1
rx_vport_unicast_packetsrx_vport_unicast_bytestx_vport_unicast_packetstx_vport_unicast_bytesrx_vport_multicast_packetsrx_vport_multicast_bytestx_vport_multicast_packetstx_vport_multicast_bytesrx_vport_broadcast_packetsrx_vport_broadcast_bytestx_vport_broadcast_packetstx_vport_broadcast_bytesrx_vport_rdma_unicast_packetsrx_vport_rdma_unicast_bytestx_vport_rdma_unicast_packetstx_vport_rdma_unicast_bytesrx_vport_rdma_multicast_packetsrx_vport_rdma_multicast_bytestx_vport_rdma_multicast_packetstx_vport_rdma_multicast_bytesvport_loopback_packetsvport_loopback_bytesrx_steer_missed_packetsrx_packetsrx_bytestx_packetstx_bytesdev_internal_queue_oobThe physical port counters are the counters on the external port connecting the adapter to the network. This measuring point holds information on standardized counters like IEEE 802.3, RFC2863, RFC 2819, RFC 3635 and additional counters like flow control, FEC and more.
.. flat-table:: Physical Port Counter Table :widths: 2 3 1
rx_packets_phytx_packets_phyrx_bytes_phytx_bytes_phyrx_multicast_phytx_multicast_phyrx_broadcast_phytx_broadcast_phyrx_crc_errors_phyrx_symbol_error_phy and
rx_corrected_bits_phy counters below.rx_in_range_len_errors_phyrx_out_of_range_len_phyrx_oversize_pkts_phyrx_symbol_err_phyrx_mac_control_phytx_mac_control_phyrx_pause_ctrl_phytx_pause_ctrl_phyrx_unsupported_op_phyrx_discards_phytx_discards_phytx_errors_phyrx_undersize_pkts_phyrx_fragments_phyrx_jabbers_phyrx_64_bytes_phyrx_65_to_127_bytes_phyrx_128_to_255_bytes_phyrx_256_to_511_bytes_phyrx_512_to_1023_bytes_phyrx_1024_to_1518_bytes_phyrx_1519_to_2047_bytes_phyrx_2048_to_4095_bytes_phyrx_4096_to_8191_bytes_phyrx_8192_to_10239_bytes_phylink_down_events_phyrx_out_of_buffermodule_bus_stuck2\C bus (data or clock)
short-wire was detected. You may need to replace the cable/transceiver.module_high_tempmodule_bad_shortedmodule_unplugrx_buffer_passed_thres_phytx_pause_storm_warning_eventstx_pause_storm_error_eventsrx[i]_buff_alloc_errrx_bits_phyrx_pcs_symbol_err_phy and
rx_corrected_bits_phy.rx_pcs_symbol_err_phyrx_pcs_symbol_err_phy divided by the number of
rx_bits_phy on a specific time frame.rx_corrected_bits_phyrx_corrected_bits_phy divided by the number of
rx_bits_phy on a specific time frame.rx_err_lane_[l]_phyrx_corrected_bits_phy.rx_global_pauserx_global_pause_durationtx_global_pausetx_global_pause_durationrx_global_pause_transitionrx_if_down_packetsThe following counters are physical port counters that are counted per L2 priority (0-7).
Note: p in the counter name represents the priority.
.. flat-table:: Priority Port Counter Table :widths: 2 3 1
rx_prio[p]_bytesrx_prio[p]_packetstx_prio[p]_bytestx_prio[p]_packetsrx_prio[p]_pauserx_prio[p]_pause_durationrx_prio[p]_pause_transitiontx_prio[p]_pausetx_prio[p]_pause_durationrx_prio[p]_buf_discardrx_prio[p]_cong_discardrx_prio[p]_markedrx_prio[p]_discards.. flat-table:: Device Counter Table :widths: 2 3 1
rx_pci_signal_integritytx_pci_signal_integrityoutbound_pci_buffer_overflowoutbound_pci_stalled_rdoutbound_pci_stalled_wroutbound_pci_stalled_rd_eventsoutbound_pci_stalled_rd was above 30%.outbound_pci_stalled_wr_eventsoutbound_pci_stalled_wr was above 30%.dev_out_of_buffer