← Documents Documentation/networking/device_drivers/ethernet/meta/fbnic.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Meta Platforms Host Network Interface

fbnic 펌웨어, 큐 메모리, health reporter와 MAC/RXB/RPC/PCIe/XDP 통계를 설명합니다.

Source pathDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

fbnic.rst:1-192

fbnic 진단은 세 층으로 나뉩니다. PLDM과 health reporter로 펌웨어·OTP 상태를 보고, HPQ/PPQ와 RXB/RPC/RDE 카운터로 수신 경로를 따라가며, PCIe transaction과 credit 고갈 카운터로 host 병목을 확인합니다.

fbnic 수신 진단 경로
MACRXB enqueueRXB FIFORPC parserRDEHPQ / PPQRCQhost

패킷이 parser와 buffer를 지나 host queue로 전달되는 순서입니다.

오류 위치 판별
증상카운터우선 확인
프레임 무결성`rxb_integrity_err`, `rxb_mac_err`ECC, FCS와 signaling
파싱`rpc_*`, `rxb_parser_err`EtherType, IPv6 extension, fragment, ESP
호스트 버퍼`rde_*_bdq_drop`, `*_cq_drop`HPQ/PPQ와 RCQ 크기
PCIe 병목`pcie_ob_rd_no_*`tag와 posted/non-posted credit
XDP 길이`rx-length`, `rx-errors`MTU, XDP fragment 지원

대표 카운터를 발생 지점과 연결합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0+
2
3 =====================================
4 Meta Platforms Host Network Interface
5 =====================================
6
7 Firmware Versions
8 -----------------
9
10 fbnic has three components stored on the flash which are provided in one PLDM
11 image:
12
13 1. fw - The control firmware used to view and modify firmware settings, request
14 firmware actions, and retrieve firmware counters outside of the data path.
15 This is the firmware which fbnic_fw.c interacts with.
16 2. bootloader - The firmware which validate firmware security and control basic
17 operations including loading and updating the firmware. This is also known
18 as the cmrt firmware.
19 3. undi - This is the UEFI driver which is based on the Linux driver.
20
21 fbnic stores two copies of these three components on flash. This allows fbnic
22 to fall back to an older version of firmware automatically in case firmware
23 fails to boot. Version information for both is provided as running and stored.
24 The undi is only provided in stored as it is not actively running once the Linux
25 driver takes over.
26
27 devlink dev info provides version information for all three components. In
28 addition to the version the hg commit hash of the build is included as a
29 separate entry.
30
31 Configuration
32 -------------
33
34 Ringparams (ethtool -g / -G)
35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
37 fbnic has two submission (host -> device) rings for every completion
38 (device -> host) ring. The three ring objects together form a single
39 "queue" as used by higher layer software (a Rx, or a Tx queue).
40
41 For Rx the two submission rings are used to pass empty pages to the NIC.
42 Ring 0 is the Header Page Queue (HPQ), NIC will use its pages to place
43 L2-L4 headers (or full frames if frame is not header-data split).
44 Ring 1 is the Payload Page Queue (PPQ) and used for packet payloads.
45 The completion ring is used to receive packet notifications / metadata.
46 ethtool ``rx`` ringparam maps to the size of the completion ring,
47 ``rx-mini`` to the HPQ, and ``rx-jumbo`` to the PPQ.
48
49 For Tx both submission rings can be used to submit packets, the completion
50 ring carries notifications for both. fbnic uses one of the submission
51 rings for normal traffic from the stack and the second one for XDP frames.
52 ethtool ``tx`` ringparam controls both the size of the submission rings
53 and the completion ring.
54
55 Every single entry on the HPQ and PPQ (``rx-mini``, ``rx-jumbo``)
56 corresponds to 4kB of allocated memory, while entries on the remaining
57 rings are in units of descriptors (8B). The ideal ratio of submission
58 and completion ring sizes will depend on the workload, as for small packets
59 multiple packets will fit into a single page.
60
61 Upgrading Firmware
62 ------------------
63
64 fbnic supports updating firmware using signed PLDM images with devlink dev
65 flash. PLDM images are written into the flash. Flashing does not interrupt
66 the operation of the device.
67
68 On host boot the latest UEFI driver is always used, no explicit activation
69 is required. Firmware activation is required to run new control firmware. cmrt
70 firmware can only be activated by power cycling the NIC.
71
72 Health reporters
73 ----------------
74
75 fw reporter
76 ~~~~~~~~~~~
77
78 The ``fw`` health reporter tracks FW crashes. Dumping the reporter will
79 show the core dump of the most recent FW crash, and if no FW crash has
80 happened since power cycle - a snapshot of the FW memory. Diagnose callback
81 shows FW uptime based on the most recently received heartbeat message
82 (the crashes are detected by checking if uptime goes down).
83
84 otp reporter
85 ~~~~~~~~~~~~
86
87 OTP memory ("fuses") are used for secure boot and anti-rollback
88 protection. The OTP memory is ECC protected, ECC errors indicate
89 either manufacturing defect or part deteriorating with age.
90
91 Statistics
92 ----------
93
94 TX MAC Interface
95 ~~~~~~~~~~~~~~~~
96
97 - ``ptp_illegal_req``: packets sent to the NIC with PTP request bit set but routed to BMC/FW
98 - ``ptp_good_ts``: packets successfully routed to MAC with PTP request bit set
99 - ``ptp_bad_ts``: packets destined for MAC with PTP request bit set but aborted because of some error (e.g., DMA read error)
100
101 TX Extension (TEI) Interface (TTI)
102 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103
104 - ``tti_cm_drop``: control messages dropped at the TX Extension (TEI) Interface because of credit starvation
105 - ``tti_frame_drop``: packets dropped at the TX Extension (TEI) Interface because of credit starvation
106 - ``tti_tbi_drop``: packets dropped at the TX BMC Interface (TBI) because of credit starvation
107
108 RXB (RX Buffer) Enqueue
109 ~~~~~~~~~~~~~~~~~~~~~~~
110
111 - ``rxb_integrity_err[i]``: frames enqueued with integrity errors (e.g., multi-bit ECC errors) on RXB input i
112 - ``rxb_mac_err[i]``: frames enqueued with MAC end-of-frame errors (e.g., bad FCS) on RXB input i
113 - ``rxb_parser_err[i]``: frames experienced RPC parser errors
114 - ``rxb_frm_err[i]``: frames experienced signaling errors (e.g., missing end-of-packet/start-of-packet) on RXB input i
115 - ``rxb_drbo[i]_frames``: frames received at RXB input i
116 - ``rxb_drbo[i]_bytes``: bytes received at RXB input i
117
118 RXB (RX Buffer) FIFO
119 ~~~~~~~~~~~~~~~~~~~~
120
121 - ``rxb_fifo[i]_drop``: transitions into the drop state on RXB pool i
122 - ``rxb_fifo[i]_dropped_frames``: frames dropped on RXB pool i
123 - ``rxb_fifo[i]_ecn``: transitions into the ECN mark state on RXB pool i
124 - ``rxb_fifo[i]_level``: current occupancy of RXB pool i
125
126 RXB (RX Buffer) Dequeue
127 ~~~~~~~~~~~~~~~~~~~~~~~
128
129 - ``rxb_intf[i]_frames``: frames sent to the output i
130 - ``rxb_intf[i]_bytes``: bytes sent to the output i
131 - ``rxb_pbuf[i]_frames``: frames sent to output i from the perspective of internal packet buffer
132 - ``rxb_pbuf[i]_bytes``: bytes sent to output i from the perspective of internal packet buffer
133
134 RPC (Rx parser)
135 ~~~~~~~~~~~~~~~
136
137 - ``rpc_unkn_etype``: frames containing unknown EtherType
138 - ``rpc_unkn_ext_hdr``: frames containing unknown IPv6 extension header
139 - ``rpc_ipv4_frag``: frames containing IPv4 fragment
140 - ``rpc_ipv6_frag``: frames containing IPv6 fragment
141 - ``rpc_ipv4_esp``: frames with IPv4 ESP encapsulation
142 - ``rpc_ipv6_esp``: frames with IPv6 ESP encapsulation
143 - ``rpc_tcp_opt_err``: frames which encountered TCP option parsing error
144 - ``rpc_out_of_hdr_err``: frames where header was larger than parsable region
145 - ``ovr_size_err``: oversized frames
146
147 Hardware Queues
148 ~~~~~~~~~~~~~~~
149
150 1. RX DMA Engine:
151
152 - ``rde_[i]_pkt_err``: packets with MAC EOP, RPC parser, RXB truncation, or RDE frame truncation errors. These error are flagged in the packet metadata because of cut-through support but the actual drop happens once PCIE/RDE is reached.
153 - ``rde_[i]_pkt_cq_drop``: packets dropped because RCQ is full
154 - ``rde_[i]_pkt_bdq_drop``: packets dropped because HPQ or PPQ ran out of host buffer
155
156 PCIe
157 ~~~~
158
159 The fbnic driver exposes PCIe hardware performance statistics through debugfs
160 (``pcie_stats``). These statistics provide insights into PCIe transaction
161 behavior and potential performance bottlenecks.
162
163 1. PCIe Transaction Counters:
164
165 These counters track PCIe transaction activity:
166 - ``pcie_ob_rd_tlp``: Outbound read Transaction Layer Packets count
167 - ``pcie_ob_rd_dword``: DWORDs transferred in outbound read transactions
168 - ``pcie_ob_wr_tlp``: Outbound write Transaction Layer Packets count
169 - ``pcie_ob_wr_dword``: DWORDs transferred in outbound write
170 transactions
171 - ``pcie_ob_cpl_tlp``: Outbound completion TLP count
172 - ``pcie_ob_cpl_dword``: DWORDs transferred in outbound completion TLPs
173
174 2. PCIe Resource Monitoring:
175
176 These counters indicate PCIe resource exhaustion events:
177 - ``pcie_ob_rd_no_tag``: Read requests dropped due to tag unavailability
178 - ``pcie_ob_rd_no_cpl_cred``: Read requests dropped due to completion
179 credit exhaustion
180 - ``pcie_ob_rd_no_np_cred``: Read requests dropped due to non-posted
181 credit exhaustion
182
183 XDP Length Error:
184 ~~~~~~~~~~~~~~~~~
185
186 For XDP programs without frags support, fbnic tries to make sure that MTU fits
187 into a single buffer. If an oversized frame is received and gets fragmented,
188 it is dropped and the following netlink counters are updated
189
190 - ``rx-length``: number of frames dropped due to lack of fragmentation
191 support in the attached XDP program
192 - ``rx-errors``: total number of packets with errors received on the interface
193

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

펌웨어 구성 요소와 버전

1-31

이 문서는 `GPL-2.0+` 라이선스를 따릅니다.

Meta Platforms Host Network Interface

펌웨어 버전

fbnic 플래시에는 하나의 PLDM 이미지가 제공하는 세 구성 요소가 저장됩니다.

fbnic 펌웨어 구성 요소
구성 요소역할드라이버 관계
`fw`설정 조회·변경, firmware action 요청과 데이터 경로 밖의 카운터 조회를 담당하는 제어 펌웨어`fbnic_fw.c`가 통신
`bootloader` / `cmrt`펌웨어 보안을 검증하고 로드·업데이트 등 기본 동작을 제어전원 순환으로 활성화
`undi`Linux 드라이버를 바탕으로 만든 UEFI 드라이버Linux 드라이버가 넘겨받은 뒤에는 실행하지 않음

각 구성 요소의 역할과 런타임 상태를 구분합니다.

플래시에는 세 구성 요소의 복사본을 두 세트 저장합니다. 새 펌웨어가 부팅하지 못하면 자동으로 이전 버전으로 되돌아갈 수 있습니다. 두 세트의 버전은 running과 stored로 제공하지만, Linux 드라이버가 제어권을 넘겨받은 뒤 실행하지 않는 `undi`는 stored 버전만 표시합니다.

`devlink dev info`는 세 구성 요소의 버전과 빌드의 hg commit hash를 별도 항목으로 보여 줍니다.

.. SPDX-License-Identifier: GPL-2.0+

=====================================
Meta Platforms Host Network Interface
=====================================

Firmware Versions
-----------------

fbnic has three components stored on the flash which are provided in one PLDM
image:

1. fw - The control firmware used to view and modify firmware settings, request
   firmware actions, and retrieve firmware counters outside of the data path.
   This is the firmware which fbnic_fw.c interacts with.
2. bootloader - The firmware which validate firmware security and control basic
   operations including loading and updating the firmware. This is also known
   as the cmrt firmware.
3. undi - This is the UEFI driver which is based on the Linux driver.

fbnic stores two copies of these three components on flash. This allows fbnic
to fall back to an older version of firmware automatically in case firmware
fails to boot. Version information for both is provided as running and stored.
The undi is only provided in stored as it is not actively running once the Linux
driver takes over.

devlink dev info provides version information for all three components. In
addition to the version the hg commit hash of the build is included as a
separate entry.

Configuration

Ring parameter와 큐 구조

32-61

구성: Ringparams (`ethtool -g` / `-G`)

fbnic의 completion ring 하나마다 host→device submission ring 두 개가 대응합니다. 상위 소프트웨어가 말하는 RX 또는 TX queue 하나는 이 세 ring 객체의 조합입니다.

fbnic RX 큐
HPQ / ring 0L2~L4 header 또는 분리하지 않은 전체 frameRX completion ring
PPQ / ring 1packet payload pageRX completion ring

두 page queue가 버퍼를 공급하고 completion ring이 패킷 알림과 메타데이터를 돌려줍니다.

  • `ethtool rx`는 completion ring 크기에 대응합니다.
  • `rx-mini`는 Header Page Queue(HPQ)에 대응합니다.
  • `rx-jumbo`는 Payload Page Queue(PPQ)에 대응합니다.

TX에서는 submission ring 둘 모두 패킷을 게시할 수 있고 completion ring 하나가 두 ring의 완료를 전달합니다. fbnic은 하나를 일반 stack traffic에, 다른 하나를 XDP frame에 씁니다. `ethtool tx`는 submission ring 둘과 completion ring의 크기를 함께 제어합니다.

HPQ와 PPQ의 각 entry는 4 KiB 메모리 할당 하나에 해당합니다. 나머지 ring entry의 단위는 8바이트 descriptor입니다. 작은 패킷 여러 개가 페이지 하나에 들어갈 수 있으므로 submission/completion ring의 이상적인 비율은 workload에 따라 달라집니다.

-------------

Ringparams (ethtool -g / -G)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

fbnic has two submission (host -> device) rings for every completion
(device -> host) ring. The three ring objects together form a single
"queue" as used by higher layer software (a Rx, or a Tx queue).

For Rx the two submission rings are used to pass empty pages to the NIC.
Ring 0 is the Header Page Queue (HPQ), NIC will use its pages to place
L2-L4 headers (or full frames if frame is not header-data split).
Ring 1 is the Payload Page Queue (PPQ) and used for packet payloads.
The completion ring is used to receive packet notifications / metadata.
ethtool ``rx`` ringparam maps to the size of the completion ring,
``rx-mini`` to the HPQ, and ``rx-jumbo`` to the PPQ.

For Tx both submission rings can be used to submit packets, the completion
ring carries notifications for both. fbnic uses one of the submission
rings for normal traffic from the stack and the second one for XDP frames.
ethtool ``tx`` ringparam controls both the size of the submission rings
and the completion ring.

Every single entry on the HPQ and PPQ (``rx-mini``, ``rx-jumbo``)
corresponds to 4kB of allocated memory, while entries on the remaining
rings are in units of descriptors (8B). The ideal ratio of submission
and completion ring sizes will depend on the workload, as for small packets
multiple packets will fit into a single page.

Upgrading Firmware

펌웨어 업데이트와 health reporter

62-91

펌웨어 업그레이드

fbnic은 서명된 PLDM 이미지를 `devlink dev flash`로 플래시에 기록합니다. 플래시 작업은 장치 동작을 중단하지 않습니다.

호스트 부팅 시 최신 UEFI 드라이버가 자동으로 사용되므로 별도 활성화가 필요 없습니다. 새 제어 펌웨어를 실행하려면 firmware activation이 필요하고, `cmrt` 펌웨어는 NIC 전원을 껐다 켜야 활성화됩니다.

Health reporter

fbnic health reporter
reporter추적 대상dump / diagnose
`fw`FW crash와 heartbeat최근 crash의 core dump, crash가 없으면 FW memory snapshot; heartbeat uptime으로 crash 감지
`otp`secure boot와 anti-rollback용 fuseECC 오류는 제조 결함 또는 노화에 따른 부품 열화를 의미

펌웨어와 OTP 보안 메모리의 상태를 진단합니다.

`fw` diagnose는 최근 heartbeat의 uptime을 보여 주며 uptime이 감소했는지 확인해 crash를 판정합니다. OTP memory는 ECC로 보호됩니다.

------------------

fbnic supports updating firmware using signed PLDM images with devlink dev
flash. PLDM images are written into the flash. Flashing does not interrupt
the operation of the device.

On host boot the latest UEFI driver is always used, no explicit activation
is required. Firmware activation is required to run new control firmware. cmrt
firmware can only be activated by power cycling the NIC.

Health reporters
----------------

fw reporter
~~~~~~~~~~~

The ``fw`` health reporter tracks FW crashes. Dumping the reporter will
show the core dump of the most recent FW crash, and if no FW crash has
happened since power cycle - a snapshot of the FW memory. Diagnose callback
shows FW uptime based on the most recently received heartbeat message
(the crashes are detected by checking if uptime goes down).

otp reporter
~~~~~~~~~~~~

OTP memory ("fuses") are used for secure boot and anti-rollback
protection. The OTP memory is ECC protected, ECC errors indicate
either manufacturing defect or part deteriorating with age.

Statistics

MAC, RX buffer, parser와 DMA 통계

92-156

통계

TX와 RXB 인터페이스 카운터
카운터설명
`ptp_illegal_req`PTP request bit를 켰지만 BMC/FW로 조향된 송신 패킷
`ptp_good_ts`PTP request bit가 켜진 채 MAC으로 정상 조향된 패킷
`ptp_bad_ts`MAC 대상으로 PTP를 요청했지만 DMA read 오류 등으로 중단된 패킷
`tti_cm_drop`credit 부족으로 TX Extension(TEI) interface에서 버린 control message
`tti_frame_drop`credit 부족으로 TEI에서 버린 packet
`tti_tbi_drop`credit 부족으로 TX BMC Interface(TBI)에서 버린 packet
`rxb_integrity_err[i]`RXB input i에서 다중 비트 ECC 같은 integrity 오류와 함께 enqueue된 frame
`rxb_mac_err[i]`RXB input i에서 bad FCS 같은 MAC end-of-frame 오류와 함께 enqueue된 frame
`rxb_parser_err[i]`RPC parser 오류를 겪은 frame
`rxb_frm_err[i]`RXB input i에서 EOP/SOP 누락 같은 signaling 오류를 겪은 frame
`rxb_drbo[i]_frames`RXB input i에서 받은 frame
`rxb_drbo[i]_bytes`RXB input i에서 받은 byte
`rxb_fifo[i]_drop`RXB pool i가 drop 상태로 전환한 횟수
`rxb_fifo[i]_dropped_frames`RXB pool i에서 버린 frame
`rxb_fifo[i]_ecn`RXB pool i가 ECN mark 상태로 전환한 횟수
`rxb_fifo[i]_level`현재 RXB pool i 점유량
`rxb_intf[i]_frames`output i로 보낸 frame
`rxb_intf[i]_bytes`output i로 보낸 byte
`rxb_pbuf[i]_frames`내부 packet buffer 관점에서 output i로 보낸 frame
`rxb_pbuf[i]_bytes`내부 packet buffer 관점에서 output i로 보낸 byte

PTP, credit 부족, RX buffer 입력·FIFO·출력 상태를 원문 순서대로 정리했습니다.

RPC parser와 RX DMA 카운터
카운터설명
`rpc_unkn_etype`알 수 없는 EtherType을 포함한 frame
`rpc_unkn_ext_hdr`알 수 없는 IPv6 extension header를 포함한 frame
`rpc_ipv4_frag`IPv4 fragment를 포함한 frame
`rpc_ipv6_frag`IPv6 fragment를 포함한 frame
`rpc_ipv4_esp`IPv4 ESP 캡슐화 frame
`rpc_ipv6_esp`IPv6 ESP 캡슐화 frame
`rpc_tcp_opt_err`TCP option parsing 오류가 난 frame
`rpc_out_of_hdr_err`header가 파싱 가능 영역보다 큰 frame
`ovr_size_err`허용 크기보다 큰 frame
`rde_[i]_pkt_err`MAC EOP, RPC parser, RXB truncation 또는 RDE frame truncation 오류가 있는 packet; cut-through 때문에 metadata에 표시되고 실제 drop은 PCIe/RDE에서 발생
`rde_[i]_pkt_cq_drop`RCQ가 가득 차 버린 packet
`rde_[i]_pkt_bdq_drop`HPQ 또는 PPQ의 host buffer가 고갈되어 버린 packet

프로토콜 파싱과 실제 host 전달 단계의 오류를 구분합니다.

----------

TX MAC Interface
~~~~~~~~~~~~~~~~

 - ``ptp_illegal_req``: packets sent to the NIC with PTP request bit set but routed to BMC/FW
 - ``ptp_good_ts``: packets successfully routed to MAC with PTP request bit set
 - ``ptp_bad_ts``: packets destined for MAC with PTP request bit set but aborted because of some error (e.g., DMA read error)

TX Extension (TEI) Interface (TTI)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 - ``tti_cm_drop``: control messages dropped at the TX Extension (TEI) Interface because of credit starvation
 - ``tti_frame_drop``: packets dropped at the TX Extension (TEI) Interface because of credit starvation
 - ``tti_tbi_drop``: packets dropped at the TX BMC Interface (TBI) because of credit starvation

RXB (RX Buffer) Enqueue
~~~~~~~~~~~~~~~~~~~~~~~

 - ``rxb_integrity_err[i]``: frames enqueued with integrity errors (e.g., multi-bit ECC errors) on RXB input i
 - ``rxb_mac_err[i]``: frames enqueued with MAC end-of-frame errors (e.g., bad FCS) on RXB input i
 - ``rxb_parser_err[i]``: frames experienced RPC parser errors
 - ``rxb_frm_err[i]``: frames experienced signaling errors (e.g., missing end-of-packet/start-of-packet) on RXB input i
 - ``rxb_drbo[i]_frames``: frames received at RXB input i
 - ``rxb_drbo[i]_bytes``: bytes received at RXB input i

RXB (RX Buffer) FIFO
~~~~~~~~~~~~~~~~~~~~

 - ``rxb_fifo[i]_drop``: transitions into the drop state on RXB pool i
 - ``rxb_fifo[i]_dropped_frames``: frames dropped on RXB pool i
 - ``rxb_fifo[i]_ecn``: transitions into the ECN mark state on RXB pool i
 - ``rxb_fifo[i]_level``: current occupancy of RXB pool i

RXB (RX Buffer) Dequeue
~~~~~~~~~~~~~~~~~~~~~~~

   - ``rxb_intf[i]_frames``: frames sent to the output i
   - ``rxb_intf[i]_bytes``: bytes sent to the output i
   - ``rxb_pbuf[i]_frames``: frames sent to output i from the perspective of internal packet buffer
   - ``rxb_pbuf[i]_bytes``: bytes sent to output i from the perspective of internal packet buffer

RPC (Rx parser)
~~~~~~~~~~~~~~~

 - ``rpc_unkn_etype``: frames containing unknown EtherType
 - ``rpc_unkn_ext_hdr``: frames containing unknown IPv6 extension header
 - ``rpc_ipv4_frag``: frames containing IPv4 fragment
 - ``rpc_ipv6_frag``: frames containing IPv6 fragment
 - ``rpc_ipv4_esp``: frames with IPv4 ESP encapsulation
 - ``rpc_ipv6_esp``: frames with IPv6 ESP encapsulation
 - ``rpc_tcp_opt_err``: frames which encountered TCP option parsing error
 - ``rpc_out_of_hdr_err``: frames where header was larger than parsable region
 - ``ovr_size_err``: oversized frames

Hardware Queues
~~~~~~~~~~~~~~~

1. RX DMA Engine:

 - ``rde_[i]_pkt_err``: packets with MAC EOP, RPC parser, RXB truncation, or RDE frame truncation errors. These error are flagged in the packet metadata because of cut-through support but the actual drop happens once PCIE/RDE is reached.
 - ``rde_[i]_pkt_cq_drop``: packets dropped because RCQ is full
 - ``rde_[i]_pkt_bdq_drop``: packets dropped because HPQ or PPQ ran out of host buffer

PCIe

PCIe 통계와 XDP 길이 오류

157-192

PCIe

fbnic은 debugfs의 `pcie_stats`로 PCIe hardware performance 통계를 노출합니다. transaction 동작과 잠재적 성능 병목을 파악할 수 있습니다.

PCIe transaction과 자원 카운터
카운터설명
`pcie_ob_rd_tlp`outbound read Transaction Layer Packet 수
`pcie_ob_rd_dword`outbound read transaction에서 전송한 DWORD 수
`pcie_ob_wr_tlp`outbound write TLP 수
`pcie_ob_wr_dword`outbound write transaction에서 전송한 DWORD 수
`pcie_ob_cpl_tlp`outbound completion TLP 수
`pcie_ob_cpl_dword`outbound completion TLP에서 전송한 DWORD 수
`pcie_ob_rd_no_tag`tag를 얻지 못해 버린 read request
`pcie_ob_rd_no_cpl_cred`completion credit 고갈로 버린 read request
`pcie_ob_rd_no_np_cred`non-posted credit 고갈로 버린 read request

outbound transaction 양과 tag/credit 고갈을 함께 봅니다.

XDP 길이 오류

fragment를 지원하지 않는 XDP 프로그램에서는 MTU가 버퍼 하나에 들어가도록 fbnic이 확인합니다. 너무 큰 frame이 들어와 조각나면 버리고 다음 netlink 카운터를 갱신합니다.

  • `rx-length`: 연결된 XDP 프로그램이 fragmentation을 지원하지 않아 버린 frame 수
  • `rx-errors`: 인터페이스가 받은 오류 packet의 전체 수
~~~~

The fbnic driver exposes PCIe hardware performance statistics through debugfs
(``pcie_stats``). These statistics provide insights into PCIe transaction
behavior and potential performance bottlenecks.

1. PCIe Transaction Counters:

   These counters track PCIe transaction activity:
        - ``pcie_ob_rd_tlp``: Outbound read Transaction Layer Packets count
        - ``pcie_ob_rd_dword``: DWORDs transferred in outbound read transactions
        - ``pcie_ob_wr_tlp``: Outbound write Transaction Layer Packets count
        - ``pcie_ob_wr_dword``: DWORDs transferred in outbound write
          transactions
        - ``pcie_ob_cpl_tlp``: Outbound completion TLP count
        - ``pcie_ob_cpl_dword``: DWORDs transferred in outbound completion TLPs

2. PCIe Resource Monitoring:

   These counters indicate PCIe resource exhaustion events:
        - ``pcie_ob_rd_no_tag``: Read requests dropped due to tag unavailability
        - ``pcie_ob_rd_no_cpl_cred``: Read requests dropped due to completion
          credit exhaustion
        - ``pcie_ob_rd_no_np_cred``: Read requests dropped due to non-posted
          credit exhaustion

XDP Length Error:
~~~~~~~~~~~~~~~~~

For XDP programs without frags support, fbnic tries to make sure that MTU fits
into a single buffer. If an oversized frame is received and gets fragmented,
it is dropped and the following netlink counters are updated

   - ``rx-length``: number of frames dropped due to lack of fragmentation
     support in the attached XDP program
   - ``rx-errors``: total number of packets with errors received on the interface