1.. SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
2.. include:: <isonum.txt>
3
4================
5Ethtool counters
6================
7
8:Copyright: |copy| 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
9
10Contents
11========
12
13- `Overview`_
14- `Groups`_
15- `Types`_
16- `Descriptions`_
17
18Overview
19========
20
21There are several counter groups based on where the counter is being counted. In
22addition, each group of counters may have different counter types.
23
24These counter groups are based on which component in a networking setup,
25illustrated below, that they describe::
26
27                                                  ----------------------------------------
28                                                  |                                      |
29    ----------------------------------------    ---------------------------------------- |
30    |              Hypervisor              |    |                  VM                  | |
31    |                                      |    |                                      | |
32    | -------------------  --------------- |    | -------------------  --------------- | |
33    | | Ethernet driver |  | RDMA driver | |    | | Ethernet driver |  | RDMA driver | | |
34    | -------------------  --------------- |    | -------------------  --------------- | |
35    |           |                 |        |    |           |                 |        | |
36    |           -------------------        |    |           -------------------        | |
37    |                   |                  |    |                   |                  |--
38    ----------------------------------------    ----------------------------------------
39                        |                                           |
40            -------------               -----------------------------
41            |                           |
42         ------                      ------ ------ ------         ------      ------      ------
43    -----| PF |----------------------| VF |-| VF |-| VF |-----  --| PF |--- --| PF |--- --| PF |---
44    |    ------                      ------ ------ ------    |  | ------  | | ------  | | ------  |
45    |                                                        |  |         | |         | |         |
46    |                                                        |  |         | |         | |         |
47    |                                                        |  |         | |         | |         |
48    | eSwitch                                                |  | eSwitch | | eSwitch | | eSwitch |
49    ----------------------------------------------------------  ----------- ----------- -----------
50               -------------------------------------------------------------------------------
51               |                                                                             |
52               |                                                                             |
53               | Uplink (no counters)                                                        |
54               -------------------------------------------------------------------------------
55                       ---------------------------------------------------------------
56                       |                                                             |
57                       |                                                             |
58                       | MPFS (no counters)                                          |
59                       ---------------------------------------------------------------
60                                                     |
61                                                     |
62                                                     | Port
63
64Groups
65======
66
67Ring
68  Software counters populated by the driver stack.
69
70Netdev
71  An aggregation of software ring counters.
72
73vPort counters
74  Traffic counters and drops due to steering or no buffers. May indicate issues
75  with NIC. These counters include Ethernet traffic counters (including Raw
76  Ethernet) and RDMA/RoCE traffic counters.
77
78Physical port counters
79  Counters that collect statistics about the PFs and VFs. May indicate issues
80  with NIC, link, or network. This measuring point holds information on
81  standardized counters like IEEE 802.3, RFC2863, RFC 2819, RFC 3635 and
82  additional counters like flow control, FEC and more. Physical port counters
83  are not exposed to virtual machines.
84
85Priority Port Counters
86  A set of the physical port counters, per priority per port.
87
88Types
89=====
90
91Counters are divided into three types.
92
93Traffic Informative Counters
94  Counters which count traffic. These counters can be used for load estimation
95  or for general debug.
96
97Traffic Acceleration Counters
98  Counters which count traffic that was accelerated by Mellanox driver or by
99  hardware. The counters are an additional layer to the informative counter set,
100  and the same traffic is counted in both informative and acceleration counters.
101
102.. [#accel] Traffic acceleration counter.
103
104Error Counters
105  Increment of these counters might indicate a problem. Each of these counters
106  has an explanation and correction action.
107
108Statistic can be fetched via the `ip link` or `ethtool` commands. `ethtool`
109provides more detailed information.::
110
111    ip –s link show <if-name>
112    ethtool -S <if-name>
113
114Descriptions
115============
116
117XSK, PTP, and QoS counters that are similar to counters defined previously will
118not be separately listed. For example, `ptp_tx[i]_packets` will not be
119explicitly documented since `tx[i]_packets` describes the behavior of both
120counters, except `ptp_tx[i]_packets` is only counted when precision time
121protocol is used.
122
123Ring / Netdev Counter
124----------------------------
125The following counters are available per ring or software port.
126
127These counters provide information on the amount of traffic that was accelerated
128by the NIC. The counters are counting the accelerated traffic in addition to the
129standard counters which counts it (i.e. accelerated traffic is counted twice).
130
131The counter names in the table below refers to both ring and port counters. The
132notation for ring counters includes the [i] index without the braces. The
133notation for port counters doesn't include the [i]. A counter name
134`rx[i]_packets` will be printed as `rx0_packets` for ring 0 and `rx_packets` for
135the software port.
136
137.. flat-table:: Ring / Software Port Counter Table
138   :widths: 2 3 1
139
140   * - Counter
141     - Description
142     - Type
143
144   * - `rx[i]_packets`
145     - The number of packets received on ring i.
146     - Informative
147
148   * - `rx[i]_bytes`
149     - The number of bytes received on ring i.
150     - Informative
151
152   * - `tx[i]_packets`
153     - The number of packets transmitted on ring i.
154     - Informative
155
156   * - `tx[i]_bytes`
157     - The number of bytes transmitted on ring i.
158     - Informative
159
160   * - `tx[i]_recover`
161     - The number of times the SQ was recovered.
162     - Error
163
164   * - `tx[i]_cqes`
165     - Number of CQEs events on SQ issued on ring i.
166     - Informative
167
168   * - `tx[i]_cqe_err`
169     - The number of error CQEs encountered on the SQ for ring i.
170     - Error
171
172   * - `tx[i]_tso_packets`
173     - The number of TSO packets transmitted on ring i [#accel]_.
174     - Acceleration
175
176   * - `tx[i]_tso_bytes`
177     - The number of TSO bytes transmitted on ring i [#accel]_.
178     - Acceleration
179
180   * - `tx[i]_tso_inner_packets`
181     - The number of TSO packets which are indicated to be carry internal
182       encapsulation transmitted on ring i [#accel]_.
183     - Acceleration
184
185   * - `tx[i]_tso_inner_bytes`
186     - The number of TSO bytes which are indicated to be carry internal
187       encapsulation transmitted on ring i [#accel]_.
188     - Acceleration
189
190   * - `rx[i]_gro_packets`
191     - Number of received packets processed using hardware-accelerated GRO. The
192       number of hardware GRO offloaded packets received on ring i.
193     - Acceleration
194
195   * - `rx[i]_gro_bytes`
196     - Number of received bytes processed using hardware-accelerated GRO. The
197       number of hardware GRO offloaded bytes received on ring i.
198     - Acceleration
199
200   * - `rx[i]_gro_skbs`
201     - The number of receive SKBs constructed while performing
202       hardware-accelerated GRO.
203     - Informative
204
205   * - `rx[i]_gro_match_packets`
206     - Number of received packets processed using hardware-accelerated GRO that
207       met the flow table match criteria.
208     - Informative
209
210   * - `rx[i]_gro_large_hds`
211     - Number of receive packets using hardware-accelerated GRO that have large
212       headers that require additional memory to be allocated.
213     - Informative
214
215   * - `rx[i]_lro_packets`
216     - The number of LRO packets received on ring i [#accel]_.
217     - Acceleration
218
219   * - `rx[i]_lro_bytes`
220     - The number of LRO bytes received on ring i [#accel]_.
221     - Acceleration
222
223   * - `rx[i]_ecn_mark`
224     - The number of received packets where the ECN mark was turned on.
225     - Informative
226
227   * - `rx_oversize_pkts_buffer`
228     - The number of dropped received packets due to length which arrived to RQ
229       and exceed software buffer size allocated by the device for incoming
230       traffic. It might imply that the device MTU is larger than the software
231       buffers size.
232     - Error
233
234   * - `rx_oversize_pkts_sw_drop`
235     - Number of received packets dropped in software because the CQE data is
236       larger than the MTU size.
237     - Error
238
239   * - `rx[i]_csum_unnecessary`
240     - Packets received with a `CHECKSUM_UNNECESSARY` on ring i [#accel]_.
241     - Acceleration
242
243   * - `rx[i]_csum_unnecessary_inner`
244     - Packets received with inner encapsulation with a `CHECKSUM_UNNECESSARY`
245       on ring i [#accel]_.
246     - Acceleration
247
248   * - `rx[i]_csum_none`
249     - Packets received with a `CHECKSUM_NONE` on ring i [#accel]_.
250     - Acceleration
251
252   * - `rx[i]_csum_complete`
253     - Packets received with a `CHECKSUM_COMPLETE` on ring i [#accel]_.
254     - Acceleration
255
256   * - `rx[i]_csum_complete_tail`
257     - Number of received packets that had checksum calculation computed,
258       potentially needed padding, and were able to do so with
259       `CHECKSUM_PARTIAL`.
260     - Informative
261
262   * - `rx[i]_csum_complete_tail_slow`
263     - Number of received packets that need padding larger than eight bytes for
264       the checksum.
265     - Informative
266
267   * - `tx[i]_csum_partial`
268     - Packets transmitted with a `CHECKSUM_PARTIAL` on ring i [#accel]_.
269     - Acceleration
270
271   * - `tx[i]_csum_partial_inner`
272     - Packets transmitted with inner encapsulation with a `CHECKSUM_PARTIAL` on
273       ring i [#accel]_.
274     - Acceleration
275
276   * - `tx[i]_csum_none`
277     - Packets transmitted with no hardware checksum acceleration on ring i.
278     - Informative
279
280   * - `tx[i]_stopped` / `tx_queue_stopped` [#ring_global]_
281     - Events where SQ was full on ring i. If this counter is increased, check
282       the amount of buffers allocated for transmission.
283     - Informative
284
285   * - `tx[i]_wake` / `tx_queue_wake` [#ring_global]_
286     - Events where SQ was full and has become not full on ring i.
287     - Informative
288
289   * - `tx[i]_dropped` / `tx_queue_dropped` [#ring_global]_
290     - Packets transmitted that were dropped due to DMA mapping failure on
291       ring i. If this counter is increased, check the amount of buffers
292       allocated for transmission.
293     - Error
294
295   * - `tx[i]_nop`
296     - The number of nop WQEs (empty WQEs) inserted to the SQ (related to
297       ring i) due to the reach of the end of the cyclic buffer. When reaching
298       near to the end of cyclic buffer the driver may add those empty WQEs to
299       avoid handling a state the a WQE start in the end of the queue and ends
300       in the beginning of the queue. This is a normal condition.
301     - Informative
302
303   * - `tx[i]_added_vlan_packets`
304     - The number of packets sent where vlan tag insertion was offloaded to the
305       hardware.
306     - Acceleration
307
308   * - `rx[i]_removed_vlan_packets`
309     - The number of packets received where vlan tag stripping was offloaded to
310       the hardware.
311     - Acceleration
312
313   * - `rx[i]_wqe_err`
314     - The number of wrong opcodes received on ring i.
315     - Error
316
317   * - `rx[i]_mpwqe_frag`
318     - The number of WQEs that failed to allocate compound page and hence
319       fragmented MPWQE’s (Multi Packet WQEs) were used on ring i. If this
320       counter raise, it may suggest that there is no enough memory for large
321       pages, the driver allocated fragmented pages. This is not abnormal
322       condition.
323     - Informative
324
325   * - `rx[i]_mpwqe_filler_cqes`
326     - The number of filler CQEs events that were issued on ring i.
327     - Informative
328
329   * - `rx[i]_mpwqe_filler_strides`
330     - The number of strides consumed by filler CQEs on ring i.
331     - Informative
332
333   * - `tx[i]_mpwqe_blks`
334     - The number of send blocks processed from Multi-Packet WQEs (mpwqe).
335     - Informative
336
337   * - `tx[i]_mpwqe_pkts`
338     - The number of send packets processed from Multi-Packet WQEs (mpwqe).
339     - Informative
340
341   * - `rx[i]_cqe_compress_blks`
342     - The number of receive blocks with CQE compression on ring i [#accel]_.
343     - Acceleration
344
345   * - `rx[i]_cqe_compress_pkts`
346     - The number of receive packets with CQE compression on ring i [#accel]_.
347     - Acceleration
348
349   * - `rx[i]_arfs_add`
350     - The number of aRFS flow rules added to the device for direct RQ steering
351       on ring i [#accel]_.
352     - Acceleration
353
354   * - `rx[i]_arfs_request_in`
355     - Number of flow rules that have been requested to move into ring i for
356       direct RQ steering [#accel]_.
357     - Acceleration
358
359   * - `rx[i]_arfs_request_out`
360     - Number of flow rules that have been requested to move out of ring i [#accel]_.
361     - Acceleration
362
363   * - `rx[i]_arfs_expired`
364     - Number of flow rules that have been expired and removed [#accel]_.
365     - Acceleration
366
367   * - `rx[i]_arfs_err`
368     - Number of flow rules that failed to be added to the flow table.
369     - Error
370
371   * - `rx[i]_recover`
372     - The number of times the RQ was recovered.
373     - Error
374
375   * - `tx[i]_xmit_more`
376     - The number of packets sent with `xmit_more` indication set on the skbuff
377       (no doorbell).
378     - Acceleration
379
380   * - `ch[i]_poll`
381     - The number of invocations of NAPI poll of channel i.
382     - Informative
383
384   * - `ch[i]_arm`
385     - The number of times the NAPI poll function completed and armed the
386       completion queues on channel i.
387     - Informative
388
389   * - `ch[i]_aff_change`
390     - The number of times the NAPI poll function explicitly stopped execution
391       on a CPU due to a change in affinity, on channel i.
392     - Informative
393
394   * - `ch[i]_events`
395     - The number of hard interrupt events on the completion queues of channel i.
396     - Informative
397
398   * - `ch[i]_eq_rearm`
399     - The number of times the EQ was recovered.
400     - Error
401
402   * - `ch[i]_force_irq`
403     - Number of times NAPI is triggered by XSK wakeups by posting a NOP to
404       ICOSQ.
405     - Acceleration
406
407   * - `rx[i]_congst_umr`
408     - The number of times an outstanding UMR request is delayed due to
409       congestion, on ring i.
410     - Informative
411
412   * - `rx_pp_alloc_fast`
413     - Number of successful fast path allocations.
414     - Informative
415
416   * - `rx_pp_alloc_slow`
417     - Number of slow path order-0 allocations.
418     - Informative
419
420   * - `rx_pp_alloc_slow_high_order`
421     - Number of slow path high order allocations.
422     - Informative
423
424   * - `rx_pp_alloc_empty`
425     - Counter is incremented when ptr ring is empty, so a slow path allocation
426       was forced.
427     - Informative
428
429   * - `rx_pp_alloc_refill`
430     - Counter is incremented when an allocation which triggered a refill of the
431       cache.
432     - Informative
433
434   * - `rx_pp_alloc_waive`
435     - Counter is incremented when pages obtained from the ptr ring that cannot
436       be added to the cache due to a NUMA mismatch.
437     - Informative
438
439   * - `rx_pp_recycle_cached`
440     - Counter is incremented when recycling placed page in the page pool cache.
441     - Informative
442
443   * - `rx_pp_recycle_cache_full`
444     - Counter is incremented when page pool cache was full.
445     - Informative
446
447   * - `rx_pp_recycle_ring`
448     - Counter is incremented when page placed into the ptr ring.
449     - Informative
450
451   * - `rx_pp_recycle_ring_full`
452     - Counter is incremented when page released from page pool because the ptr
453       ring was full.
454     - Informative
455
456   * - `rx_pp_recycle_released_ref`
457     - Counter is incremented when page released (and not recycled) because
458       refcnt > 1.
459     - Informative
460
461   * - `rx[i]_xsk_buff_alloc_err`
462     - The number of times allocating an skb or XSK buffer failed in the XSK RQ
463       context.
464     - Error
465
466   * - `rx[i]_xdp_tx_xmit`
467     - The number of packets forwarded back to the port due to XDP program
468       `XDP_TX` action (bouncing). these packets are not counted by other
469       software counters. These packets are counted by physical port and vPort
470       counters.
471     - Informative
472
473   * - `rx[i]_xdp_tx_mpwqe`
474     - Number of multi-packet WQEs transmitted by the netdev and `XDP_TX`-ed by
475       the netdev during the RQ context.
476     - Acceleration
477
478   * - `rx[i]_xdp_tx_inlnw`
479     - Number of WQE data segments transmitted where the data could be inlined
480       in the WQE and then `XDP_TX`-ed during the RQ context.
481     - Acceleration
482
483   * - `rx[i]_xdp_tx_nops`
484     - Number of NOP WQEBBs (WQE building blocks) received posted to the XDP SQ.
485     - Acceleration
486
487   * - `rx[i]_xdp_tx_full`
488     - The number of packets that should have been forwarded back to the port
489       due to `XDP_TX` action but were dropped due to full tx queue. These packets
490       are not counted by other software counters. These packets are counted by
491       physical port and vPort counters. You may open more rx queues and spread
492       traffic rx over all queues and/or increase rx ring size.
493     - Error
494
495   * - `rx[i]_xdp_tx_err`
496     - The number of times an `XDP_TX` error such as frame too long and frame
497       too short occurred on `XDP_TX` ring of RX ring.
498     - Error
499
500   * - `rx[i]_xdp_tx_cqes` / `rx_xdp_tx_cqe` [#ring_global]_
501     - The number of completions received on the CQ of the `XDP_TX` ring.
502     - Informative
503
504   * - `rx[i]_xdp_drop`
505     - The number of packets dropped due to XDP program `XDP_DROP` action. these
506       packets are not counted by other software counters. These packets are
507       counted by physical port and vPort counters.
508     - Informative
509
510   * - `rx[i]_xdp_redirect`
511     - The number of times an XDP redirect action was triggered on ring i.
512     - Acceleration
513
514   * - `tx[i]_xdp_xmit`
515     - The number of packets redirected to the interface(due to XDP redirect).
516       These packets are not counted by other software counters. These packets
517       are counted by physical port and vPort counters.
518     - Informative
519
520   * - `tx[i]_xdp_full`
521     - The number of packets redirected to the interface(due to XDP redirect),
522       but were dropped due to full tx queue. these packets are not counted by
523       other software counters. you may enlarge tx queues.
524     - Informative
525
526   * - `tx[i]_xdp_mpwqe`
527     - Number of multi-packet WQEs offloaded onto the NIC that were
528       `XDP_REDIRECT`-ed from other netdevs.
529     - Acceleration
530
531   * - `tx[i]_xdp_inlnw`
532     - Number of WQE data segments where the data could be inlined in the WQE
533       where the data segments were `XDP_REDIRECT`-ed from other netdevs.
534     - Acceleration
535
536   * - `tx[i]_xdp_nops`
537     - Number of NOP WQEBBs (WQE building blocks) posted to the SQ that were
538       `XDP_REDIRECT`-ed from other netdevs.
539     - Acceleration
540
541   * - `tx[i]_xdp_err`
542     - The number of packets redirected to the interface(due to XDP redirect)
543       but were dropped due to error such as frame too long and frame too short.
544     - Error
545
546   * - `tx[i]_xdp_cqes`
547     - The number of completions received for packets redirected to the
548       interface(due to XDP redirect) on the CQ.
549     - Informative
550
551   * - `tx[i]_xsk_xmit`
552     - The number of packets transmitted using XSK zerocopy functionality.
553     - Acceleration
554
555   * - `tx[i]_xsk_mpwqe`
556     - Number of multi-packet WQEs offloaded onto the NIC that were
557       `XDP_REDIRECT`-ed from other netdevs.
558     - Acceleration
559
560   * - `tx[i]_xsk_inlnw`
561     - Number of WQE data segments where the data could be inlined in the WQE
562       that are transmitted using XSK zerocopy.
563     - Acceleration
564
565   * - `tx[i]_xsk_full`
566     - Number of times doorbell is rung in XSK zerocopy mode when SQ is full.
567     - Error
568
569   * - `tx[i]_xsk_err`
570     - Number of errors that occurred in XSK zerocopy mode such as if the data
571       size is larger than the MTU size.
572     - Error
573
574   * - `tx[i]_xsk_cqes`
575     - Number of CQEs processed in XSK zerocopy mode.
576     - Acceleration
577
578   * - `tx_tls_ctx`
579     - Number of TLS TX HW offload contexts added to device for encryption.
580     - Acceleration
581
582   * - `tx_tls_del`
583     - Number of TLS TX HW offload contexts removed from device (connection
584       closed).
585     - Acceleration
586
587   * - `tx_tls_pool_alloc`
588     - Number of times a unit of work is successfully allocated in the TLS HW
589       offload pool.
590     - Acceleration
591
592   * - `tx_tls_pool_free`
593     - Number of times a unit of work is freed in the TLS HW offload pool.
594     - Acceleration
595
596   * - `rx_tls_ctx`
597     - Number of TLS RX HW offload contexts added to device for decryption.
598     - Acceleration
599
600   * - `rx_tls_del`
601     - Number of TLS RX HW offload contexts deleted from device (connection has
602       finished).
603     - Acceleration
604
605   * - `rx[i]_tls_decrypted_packets`
606     - Number of successfully decrypted RX packets which were part of a TLS
607       stream.
608     - Acceleration
609
610   * - `rx[i]_tls_decrypted_bytes`
611     - Number of TLS payload bytes in RX packets which were successfully
612       decrypted.
613     - Acceleration
614
615   * - `rx[i]_tls_resync_req_pkt`
616     - Number of received TLS packets with a resync request.
617     - Acceleration
618
619   * - `rx[i]_tls_resync_req_start`
620     - Number of times the TLS async resync request was started.
621     - Acceleration
622
623   * - `rx[i]_tls_resync_req_end`
624     - Number of times the TLS async resync request properly ended with
625       providing the HW tracked tcp-seq.
626     - Acceleration
627
628   * - `rx[i]_tls_resync_req_skip`
629     - Number of times the TLS async resync request procedure was started but
630       not properly ended.
631     - Error
632
633   * - `rx[i]_tls_resync_res_ok`
634     - Number of times the TLS resync response call to the driver was
635       successfully handled.
636     - Acceleration
637
638   * - `rx[i]_tls_resync_res_retry`
639     - Number of times the TLS resync response call to the driver was
640       reattempted when ICOSQ is full.
641     - Error
642
643   * - `rx[i]_tls_resync_res_skip`
644     - Number of times the TLS resync response call to the driver was terminated
645       unsuccessfully.
646     - Error
647
648   * - `rx[i]_tls_err`
649     - Number of times when CQE TLS offload was problematic.
650     - Error
651
652   * - `tx[i]_tls_encrypted_packets`
653     - The number of send packets that are TLS encrypted by the kernel.
654     - Acceleration
655
656   * - `tx[i]_tls_encrypted_bytes`
657     - The number of send bytes that are TLS encrypted by the kernel.
658     - Acceleration
659
660   * - `tx[i]_tls_ooo`
661     - Number of times out of order TLS SQE fragments were handled on ring i.
662     - Acceleration
663
664   * - `tx[i]_tls_dump_packets`
665     - Number of TLS decrypted packets copied over from NIC over DMA.
666     - Acceleration
667
668   * - `tx[i]_tls_dump_bytes`
669     - Number of TLS decrypted bytes copied over from NIC over DMA.
670     - Acceleration
671
672   * - `tx[i]_tls_resync_bytes`
673     - Number of TLS bytes requested to be resynchronized in order to be
674       decrypted.
675     - Acceleration
676
677   * - `tx[i]_tls_skip_no_sync_data`
678     - Number of TLS send data that can safely be skipped / do not need to be
679       decrypted.
680     - Acceleration
681
682   * - `tx[i]_tls_drop_no_sync_data`
683     - Number of TLS send data that were dropped due to retransmission of TLS
684       data.
685     - Acceleration
686
687   * - `ptp_cq[i]_abort`
688     - Number of times a CQE has to be skipped in precision time protocol due to
689       a skew between the port timestamp and CQE timestamp being greater than
690       128 seconds.
691     - Error
692
693   * - `ptp_cq[i]_abort_abs_diff_ns`
694     - Accumulation of time differences between the port timestamp and CQE
695       timestamp when the difference is greater than 128 seconds in precision
696       time protocol.
697     - Error
698
699   * - `ptp_cq[i]_late_cqe`
700     - Number of times a CQE has been delivered on the PTP timestamping CQ when
701       the CQE was not expected since a certain amount of time had elapsed where
702       the device typically ensures not posting the CQE.
703     - Error
704
705.. [#ring_global] The corresponding ring and global counters do not share the
706                  same name (i.e. do not follow the common naming scheme).
707
708vPort Counters
709--------------
710Counters on the NIC port that is connected to a eSwitch.
711
712.. flat-table:: vPort Counter Table
713   :widths: 2 3 1
714
715   * - Counter
716     - Description
717     - Type
718
719   * - `rx_vport_unicast_packets`
720     - Unicast packets received, steered to a port including Raw Ethernet
721       QP/DPDK traffic, excluding RDMA traffic.
722     - Informative
723
724   * - `rx_vport_unicast_bytes`
725     - Unicast bytes received, steered to a port including Raw Ethernet QP/DPDK
726       traffic, excluding RDMA traffic.
727     - Informative
728
729   * - `tx_vport_unicast_packets`
730     - Unicast packets transmitted, steered from a port including Raw Ethernet
731       QP/DPDK traffic, excluding RDMA traffic.
732     - Informative
733
734   * - `tx_vport_unicast_bytes`
735     - Unicast bytes transmitted, steered from a port including Raw Ethernet
736       QP/DPDK traffic, excluding RDMA traffic.
737     - Informative
738
739   * - `rx_vport_multicast_packets`
740     - Multicast packets received, steered to a port including Raw Ethernet
741       QP/DPDK traffic, excluding RDMA traffic.
742     - Informative
743
744   * - `rx_vport_multicast_bytes`
745     - Multicast bytes received, steered to a port including Raw Ethernet
746       QP/DPDK traffic, excluding RDMA traffic.
747     - Informative
748
749   * - `tx_vport_multicast_packets`
750     - Multicast packets transmitted, steered from a port including Raw Ethernet
751       QP/DPDK traffic, excluding RDMA traffic.
752     - Informative
753
754   * - `tx_vport_multicast_bytes`
755     - Multicast bytes transmitted, steered from a port including Raw Ethernet
756       QP/DPDK traffic, excluding RDMA traffic.
757     - Informative
758
759   * - `rx_vport_broadcast_packets`
760     - Broadcast packets received, steered to a port including Raw Ethernet
761       QP/DPDK traffic, excluding RDMA traffic.
762     - Informative
763
764   * - `rx_vport_broadcast_bytes`
765     - Broadcast bytes received, steered to a port including Raw Ethernet
766       QP/DPDK traffic, excluding RDMA traffic.
767     - Informative
768
769   * - `tx_vport_broadcast_packets`
770     - Broadcast packets transmitted, steered from a port including Raw Ethernet
771       QP/DPDK traffic, excluding RDMA traffic.
772     - Informative
773
774   * - `tx_vport_broadcast_bytes`
775     - Broadcast bytes transmitted, steered from a port including Raw Ethernet
776       QP/DPDK traffic, excluding RDMA traffic.
777     - Informative
778
779   * - `rx_vport_rdma_unicast_packets`
780     - RDMA unicast packets received, steered to a port (counters counts
781       RoCE/UD/RC traffic) [#accel]_.
782     - Acceleration
783
784   * - `rx_vport_rdma_unicast_bytes`
785     - RDMA unicast bytes received, steered to a port (counters counts
786       RoCE/UD/RC traffic) [#accel]_.
787     - Acceleration
788
789   * - `tx_vport_rdma_unicast_packets`
790     - RDMA unicast packets transmitted, steered from a port (counters counts
791       RoCE/UD/RC traffic) [#accel]_.
792     - Acceleration
793
794   * - `tx_vport_rdma_unicast_bytes`
795     - RDMA unicast bytes transmitted, steered from a port (counters counts
796       RoCE/UD/RC traffic) [#accel]_.
797     - Acceleration
798
799   * - `rx_vport_rdma_multicast_packets`
800     - RDMA multicast packets received, steered to a port (counters counts
801       RoCE/UD/RC traffic) [#accel]_.
802     - Acceleration
803
804   * - `rx_vport_rdma_multicast_bytes`
805     - RDMA multicast bytes received, steered to a port (counters counts
806       RoCE/UD/RC traffic) [#accel]_.
807     - Acceleration
808
809   * - `tx_vport_rdma_multicast_packets`
810     - RDMA multicast packets transmitted, steered from a port (counters counts
811       RoCE/UD/RC traffic) [#accel]_.
812     - Acceleration
813
814   * - `tx_vport_rdma_multicast_bytes`
815     - RDMA multicast bytes transmitted, steered from a port (counters counts
816       RoCE/UD/RC traffic) [#accel]_.
817     - Acceleration
818
819   * - `vport_loopback_packets`
820     - Unicast, multicast and broadcast packets that were loop-back (received
821       and transmitted), IB/Eth  [#accel]_.
822     - Acceleration
823
824   * - `vport_loopback_bytes`
825     - Unicast, multicast and broadcast bytes that were loop-back (received
826       and transmitted), IB/Eth  [#accel]_.
827     - Acceleration
828
829   * - `rx_steer_missed_packets`
830     - Number of packets that was received by the NIC, however was discarded
831       because it did not match any flow in the NIC flow table.
832     - Error
833
834   * - `rx_packets`
835     - Representor only: packets received, that were handled by the hypervisor.
836     - Informative
837
838   * - `rx_bytes`
839     - Representor only: bytes received, that were handled by the hypervisor.
840     - Informative
841
842   * - `tx_packets`
843     - Representor only: packets transmitted, that were handled by the
844       hypervisor.
845     - Informative
846
847   * - `tx_bytes`
848     - Representor only: bytes transmitted, that were handled by the hypervisor.
849     - Informative
850
851   * - `dev_internal_queue_oob`
852     - The number of dropped packets due to lack of receive WQEs for an internal
853       device RQ.
854     - Error
855
856Physical Port Counters
857----------------------
858The physical port counters are the counters on the external port connecting the
859adapter to the network. This measuring point holds information on standardized
860counters like IEEE 802.3, RFC2863, RFC 2819, RFC 3635 and additional counters
861like flow control, FEC and more.
862
863.. flat-table:: Physical Port Counter Table
864   :widths: 2 3 1
865
866   * - Counter
867     - Description
868     - Type
869
870   * - `rx_packets_phy`
871     - The number of packets received on the physical port. This counter doesn’t
872       include packets that were discarded due to FCS, frame size and similar
873       errors.
874     - Informative
875
876   * - `tx_packets_phy`
877     - The number of packets transmitted on the physical port.
878     - Informative
879
880   * - `rx_bytes_phy`
881     - The number of bytes received on the physical port, including Ethernet
882       header and FCS.
883     - Informative
884
885   * - `tx_bytes_phy`
886     - The number of bytes transmitted on the physical port.
887     - Informative
888
889   * - `rx_multicast_phy`
890     - The number of multicast packets received on the physical port.
891     - Informative
892
893   * - `tx_multicast_phy`
894     - The number of multicast packets transmitted on the physical port.
895     - Informative
896
897   * - `rx_broadcast_phy`
898     - The number of broadcast packets received on the physical port.
899     - Informative
900
901   * - `tx_broadcast_phy`
902     - The number of broadcast packets transmitted on the physical port.
903     - Informative
904
905   * - `rx_crc_errors_phy`
906     - The number of dropped received packets due to FCS (Frame Check Sequence)
907       error on the physical port. If this counter is increased in high rate,
908       check the link quality using `rx_symbol_error_phy` and
909       `rx_corrected_bits_phy` counters below.
910     - Error
911
912   * - `rx_in_range_len_errors_phy`
913     - The number of received packets dropped due to length/type errors on a
914       physical port.
915     - Error
916
917   * - `rx_out_of_range_len_phy`
918     - The number of received packets dropped due to length greater than allowed
919       on a physical port. If this counter is increasing, it implies that the
920       peer connected to the adapter has a larger MTU configured. Using same MTU
921       configuration shall resolve this issue.
922     - Error
923
924   * - `rx_oversize_pkts_phy`
925     - The number of dropped received packets due to length which exceed MTU
926       size on a physical port. If this counter is increasing, it implies that
927       the peer connected to the adapter has a larger MTU configured. Using same
928       MTU configuration shall resolve this issue.
929     - Error
930
931   * - `rx_symbol_err_phy`
932     - The number of received packets dropped due to physical coding errors
933       (symbol errors) on a physical port.
934     - Error
935
936   * - `rx_mac_control_phy`
937     - The number of MAC control packets received on the physical port.
938     - Informative
939
940   * - `tx_mac_control_phy`
941     - The number of MAC control packets transmitted on the physical port.
942     - Informative
943
944   * - `rx_pause_ctrl_phy`
945     - The number of link layer pause packets received on a physical port. If
946       this counter is increasing, it implies that the network is congested and
947       cannot absorb the traffic coming from to the adapter.
948     - Informative
949
950   * - `tx_pause_ctrl_phy`
951     - The number of link layer pause packets transmitted on a physical port. If
952       this counter is increasing, it implies that the NIC is congested and
953       cannot absorb the traffic coming from the network.
954     - Informative
955
956   * - `rx_unsupported_op_phy`
957     - The number of MAC control packets received with unsupported opcode on a
958       physical port.
959     - Error
960
961   * - `rx_discards_phy`
962     - The number of received packets dropped due to lack of buffers on a
963       physical port. If this counter is increasing, it implies that the adapter
964       is congested and cannot absorb the traffic coming from the network.
965     - Error
966
967   * - `tx_discards_phy`
968     - The number of packets which were discarded on transmission, even no
969       errors were detected. the drop might occur due to link in down state,
970       head of line drop, pause from the network, etc.
971     - Error
972
973   * - `tx_errors_phy`
974     - The number of transmitted packets dropped due to a length which exceed
975       MTU size on a physical port.
976     - Error
977
978   * - `rx_undersize_pkts_phy`
979     - The number of received packets dropped due to length which is shorter
980       than 64 bytes on a physical port. If this counter is increasing, it
981       implies that the peer connected to the adapter has a non-standard MTU
982       configured or malformed packet had arrived.
983     - Error
984
985   * - `rx_fragments_phy`
986     - The number of received packets dropped due to a length which is shorter
987       than 64 bytes and has FCS error on a physical port. If this counter is
988       increasing, it implies that the peer connected to the adapter has a
989       non-standard MTU configured.
990     - Error
991
992   * - `rx_jabbers_phy`
993     - The number of received packets d due to a length which is longer than 64
994       bytes and had FCS error on a physical port.
995     - Error
996
997   * - `rx_64_bytes_phy`
998     - The number of packets received on the physical port with size of 64 bytes.
999     - Informative
1000
1001   * - `rx_65_to_127_bytes_phy`
1002     - The number of packets received on the physical port with size of 65 to
1003       127 bytes.
1004     - Informative
1005
1006   * - `rx_128_to_255_bytes_phy`
1007     - The number of packets received on the physical port with size of 128 to
1008       255 bytes.
1009     - Informative
1010
1011   * - `rx_256_to_511_bytes_phy`
1012     - The number of packets received on the physical port with size of 256 to
1013       512 bytes.
1014     - Informative
1015
1016   * - `rx_512_to_1023_bytes_phy`
1017     - The number of packets received on the physical port with size of 512 to
1018       1023 bytes.
1019     - Informative
1020
1021   * - `rx_1024_to_1518_bytes_phy`
1022     - The number of packets received on the physical port with size of 1024 to
1023       1518 bytes.
1024     - Informative
1025
1026   * - `rx_1519_to_2047_bytes_phy`
1027     - The number of packets received on the physical port with size of 1519 to
1028       2047 bytes.
1029     - Informative
1030
1031   * - `rx_2048_to_4095_bytes_phy`
1032     - The number of packets received on the physical port with size of 2048 to
1033       4095 bytes.
1034     - Informative
1035
1036   * - `rx_4096_to_8191_bytes_phy`
1037     - The number of packets received on the physical port with size of 4096 to
1038       8191 bytes.
1039     - Informative
1040
1041   * - `rx_8192_to_10239_bytes_phy`
1042     - The number of packets received on the physical port with size of 8192 to
1043       10239 bytes.
1044     - Informative
1045
1046   * - `link_down_events_phy`
1047     - The number of times where the link operative state changed to down. In
1048       case this counter is increasing it may imply on port flapping. You may
1049       need to replace the cable/transceiver.
1050     - Error
1051
1052   * - `rx_out_of_buffer`
1053     - Number of times receive queue had no software buffers allocated for the
1054       adapter's incoming traffic.
1055     - Error
1056
1057   * - `module_bus_stuck`
1058     - The number of times that module's I\ :sup:`2`\C bus (data or clock)
1059       short-wire was detected. You may need to replace the cable/transceiver.
1060     - Error
1061
1062   * - `module_high_temp`
1063     - The number of times that the module temperature was too high. If this
1064       issue persist, you may need to check the ambient temperature or replace
1065       the cable/transceiver module.
1066     - Error
1067
1068   * - `module_bad_shorted`
1069     - The number of times that the module cables were shorted. You may need to
1070       replace the cable/transceiver module.
1071     - Error
1072
1073   * - `module_unplug`
1074     - The number of times that module was ejected.
1075     - Informative
1076
1077   * - `rx_buffer_passed_thres_phy`
1078     - The number of events where the port receive buffer was over 85% full.
1079     - Informative
1080
1081   * - `tx_pause_storm_warning_events`
1082     - The number of times the device was sending pauses for a long period of
1083       time.
1084     - Informative
1085
1086   * - `tx_pause_storm_error_events`
1087     - The number of times the device was sending pauses for a long period of
1088       time, reaching time out and disabling transmission of pause frames. on
1089       the period where pause frames were disabled, drop could have been
1090       occurred.
1091     - Error
1092
1093   * - `rx[i]_buff_alloc_err`
1094     - Failed to allocate a buffer to received packet (or SKB) on ring i.
1095     - Error
1096
1097   * - `rx_bits_phy`
1098     - This counter provides information on the total amount of traffic that
1099       could have been received and can be used as a guideline to measure the
1100       ratio of errored traffic in `rx_pcs_symbol_err_phy` and
1101       `rx_corrected_bits_phy`.
1102     - Informative
1103
1104   * - `rx_pcs_symbol_err_phy`
1105     - This counter counts the number of symbol errors that wasn’t corrected by
1106       FEC correction algorithm or that FEC algorithm was not active on this
1107       interface. If this counter is increasing, it implies that the link
1108       between the NIC and the network is suffering from high BER, and that
1109       traffic is lost. You may need to replace the cable/transceiver. The error
1110       rate is the number of `rx_pcs_symbol_err_phy` divided by the number of
1111       `rx_bits_phy` on a specific time frame.
1112     - Error
1113
1114   * - `rx_corrected_bits_phy`
1115     - The number of corrected bits on this port according to active FEC
1116       (RS/FC). If this counter is increasing, it implies that the link between
1117       the NIC and the network is suffering from high BER. The corrected bit
1118       rate is the number of `rx_corrected_bits_phy` divided by the number of
1119       `rx_bits_phy` on a specific time frame.
1120     - Error
1121
1122   * - `rx_err_lane_[l]_phy`
1123     - This counter counts the number of physical raw errors per lane l index.
1124       The counter counts errors before FEC corrections. If this counter is
1125       increasing, it implies that the link between the NIC and the network is
1126       suffering from high BER, and that traffic might be lost. You may need to
1127       replace the cable/transceiver. Please check in accordance with
1128       `rx_corrected_bits_phy`.
1129     - Error
1130
1131   * - `rx_global_pause`
1132     - The number of pause packets received on the physical port. If this
1133       counter is increasing, it implies that the network is congested and
1134       cannot absorb the traffic coming from the adapter. Note: This counter is
1135       only enabled when global pause mode is enabled.
1136     - Informative
1137
1138   * - `rx_global_pause_duration`
1139     - The duration of pause received (in microSec) on the physical port. The
1140       counter represents the time the port did not send any traffic. If this
1141       counter is increasing, it implies that the network is congested and
1142       cannot absorb the traffic coming from the adapter. Note: This counter is
1143       only enabled when global pause mode is enabled.
1144     - Informative
1145
1146   * - `tx_global_pause`
1147     - The number of pause packets transmitted on a physical port. If this
1148       counter is increasing, it implies that the adapter is congested and
1149       cannot absorb the traffic coming from the network. Note: This counter is
1150       only enabled when global pause mode is enabled.
1151     - Informative
1152
1153   * - `tx_global_pause_duration`
1154     - The duration of pause transmitter (in microSec) on the physical port.
1155       Note: This counter is only enabled when global pause mode is enabled.
1156     - Informative
1157
1158   * - `rx_global_pause_transition`
1159     - The number of times a transition from Xoff to Xon on the physical port
1160       has occurred. Note: This counter is only enabled when global pause mode
1161       is enabled.
1162     - Informative
1163
1164   * - `rx_if_down_packets`
1165     - The number of received packets that were dropped due to interface down.
1166     - Informative
1167
1168Priority Port Counters
1169----------------------
1170The following counters are physical port counters that are counted per L2
1171priority (0-7).
1172
1173**Note:** `p` in the counter name represents the priority.
1174
1175.. flat-table:: Priority Port Counter Table
1176   :widths: 2 3 1
1177
1178   * - Counter
1179     - Description
1180     - Type
1181
1182   * - `rx_prio[p]_bytes`
1183     - The number of bytes received with priority p on the physical port.
1184     - Informative
1185
1186   * - `rx_prio[p]_packets`
1187     - The number of packets received with priority p on the physical port.
1188     - Informative
1189
1190   * - `tx_prio[p]_bytes`
1191     - The number of bytes transmitted on priority p on the physical port.
1192     - Informative
1193
1194   * - `tx_prio[p]_packets`
1195     - The number of packets transmitted on priority p on the physical port.
1196     - Informative
1197
1198   * - `rx_prio[p]_pause`
1199     - The number of pause packets received with priority p on a physical port.
1200       If this counter is increasing, it implies that the network is congested
1201       and cannot absorb the traffic coming from the adapter. Note: This counter
1202       is available only if PFC was enabled on priority p.
1203     - Informative
1204
1205   * - `rx_prio[p]_pause_duration`
1206     - The duration of pause received (in microSec) on priority p on the
1207       physical port. The counter represents the time the port did not send any
1208       traffic on this priority. If this counter is increasing, it implies that
1209       the network is congested and cannot absorb the traffic coming from the
1210       adapter. Note: This counter is available only if PFC was enabled on
1211       priority p.
1212     - Informative
1213
1214   * - `rx_prio[p]_pause_transition`
1215     - The number of times a transition from Xoff to Xon on priority p on the
1216       physical port has occurred. Note: This counter is available only if PFC
1217       was enabled on priority p.
1218     - Informative
1219
1220   * - `tx_prio[p]_pause`
1221     - The number of pause packets transmitted on priority p on a physical port.
1222       If this counter is increasing, it implies that the adapter is congested
1223       and cannot absorb the traffic coming from the network. Note: This counter
1224       is available only if PFC was enabled on priority p.
1225     - Informative
1226
1227   * - `tx_prio[p]_pause_duration`
1228     - The duration of pause transmitter (in microSec) on priority p on the
1229       physical port. Note: This counter is available only if PFC was enabled on
1230       priority p.
1231     - Informative
1232
1233   * - `rx_prio[p]_buf_discard`
1234     - The number of packets discarded by device due to lack of per host receive
1235       buffers.
1236     - Informative
1237
1238   * - `rx_prio[p]_cong_discard`
1239     - The number of packets discarded by device due to per host congestion.
1240     - Informative
1241
1242   * - `rx_prio[p]_marked`
1243     - The number of packets ecn marked by device due to per host congestion.
1244     - Informative
1245
1246   * - `rx_prio[p]_discards`
1247     - The number of packets discarded by device due to lack of receive buffers.
1248     - Informative
1249
1250Device Counters
1251---------------
1252.. flat-table:: Device Counter Table
1253   :widths: 2 3 1
1254
1255   * - Counter
1256     - Description
1257     - Type
1258
1259   * - `rx_pci_signal_integrity`
1260     - Counts physical layer PCIe signal integrity errors, the number of
1261       transitions to recovery due to Framing errors and CRC (dlp and tlp). If
1262       this counter is raising, try moving the adapter card to a different slot
1263       to rule out a bad PCI slot. Validate that you are running with the latest
1264       firmware available and latest server BIOS version.
1265     - Error
1266
1267   * - `tx_pci_signal_integrity`
1268     - Counts physical layer PCIe signal integrity errors, the number of
1269       transition to recovery initiated by the other side (moving to recovery
1270       due to getting TS/EIEOS). If this counter is raising, try moving the
1271       adapter card to a different slot to rule out a bad PCI slot. Validate
1272       that you are running with the latest firmware available and latest server
1273       BIOS version.
1274     - Error
1275
1276   * - `outbound_pci_buffer_overflow`
1277     - The number of packets dropped due to pci buffer overflow. If this counter
1278       is raising in high rate, it might indicate that the receive traffic rate
1279       for a host is larger than the PCIe bus and therefore a congestion occurs.
1280     - Informative
1281
1282   * - `outbound_pci_stalled_rd`
1283     - The percentage (in the range 0...100) of time within the last second that
1284       the NIC had outbound non-posted reads requests but could not perform the
1285       operation due to insufficient posted credits.
1286     - Informative
1287
1288   * - `outbound_pci_stalled_wr`
1289     - The percentage (in the range 0...100) of time within the last second that
1290       the NIC had outbound posted writes requests but could not perform the
1291       operation due to insufficient posted credits.
1292     - Informative
1293
1294   * - `outbound_pci_stalled_rd_events`
1295     - The number of seconds where `outbound_pci_stalled_rd` was above 30%.
1296     - Informative
1297
1298   * - `outbound_pci_stalled_wr_events`
1299     - The number of seconds where `outbound_pci_stalled_wr` was above 30%.
1300     - Informative
1301
1302   * - `dev_out_of_buffer`
1303     - The number of times the device owned queue had not enough buffers
1304       allocated.
1305     - Error
1306