.. SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
.. include:: <isonum.txt>
================
Ethtool counters
================
:Copyright: |copy| 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Contents
========
- `Overview`_
- `Groups`_
- `Types`_
- `Descriptions`_
Overview
========
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
Groups
======
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.
Types
=====
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>
Descriptions
============
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.
Ring / Netdev Counter
----------------------------
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
* - Counter
- Description
- Type
* - `rx[i]_packets`
- The number of packets received on ring i.
- Informative
* - `rx[i]_bytes`
- The number of bytes received on ring i.
- Informative
* - `tx[i]_packets`
- The number of packets transmitted on ring i.
- Informative
* - `tx[i]_bytes`
- The number of bytes transmitted on ring i.
- Informative
* - `tx[i]_recover`
- The number of times the SQ was recovered.
- Error
* - `tx[i]_cqes`
- Number of CQEs events on SQ issued on ring i.
- Informative
* - `tx[i]_cqe_err`
- The number of error CQEs encountered on the SQ for ring i.
- Error
* - `tx[i]_tso_packets`
- The number of TSO packets transmitted on ring i [#accel]_.
- Acceleration
* - `tx[i]_tso_bytes`
- The number of TSO bytes transmitted on ring i [#accel]_.
- Acceleration
* - `tx[i]_tso_inner_packets`
- The number of TSO packets which are indicated to be carry internal
encapsulation trans