xref: /linux/Documentation/networking/device_drivers/ethernet/pensando/ionic.rst (revision 55a42f78ffd386e01a5404419f8c5ded7db70a21)
1.. SPDX-License-Identifier: GPL-2.0+
2
3========================================================
4Linux Driver for the Pensando(R) Ethernet adapter family
5========================================================
6
7Pensando Linux Ethernet driver.
8Copyright(c) 2019 Pensando Systems, Inc
9
10Contents
11========
12
13- Identifying the Adapter
14- Enabling the driver
15- Configuring the driver
16- RDMA Support via Auxiliary Device
17- Statistics
18- Support
19
20Identifying the Adapter
21=======================
22
23To find if one or more Pensando PCI Ethernet devices are installed on the
24host, check for the PCI devices::
25
26  $ lspci -d 1dd8:
27  b5:00.0 Ethernet controller: Device 1dd8:1002
28  b6:00.0 Ethernet controller: Device 1dd8:1002
29
30If such devices are listed as above, then the ionic.ko driver should find
31and configure them for use.  There should be log entries in the kernel
32messages such as these::
33
34  $ dmesg | grep ionic
35  ionic 0000:b5:00.0: 126.016 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x16 link)
36  ionic 0000:b5:00.0 enp181s0: renamed from eth0
37  ionic 0000:b5:00.0 enp181s0: Link up - 100 Gbps
38  ionic 0000:b6:00.0: 126.016 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x16 link)
39  ionic 0000:b6:00.0 enp182s0: renamed from eth0
40  ionic 0000:b6:00.0 enp182s0: Link up - 100 Gbps
41
42Driver and firmware version information can be gathered with either of
43ethtool or devlink tools::
44
45  $ ethtool -i enp181s0
46  driver: ionic
47  version: 5.7.0
48  firmware-version: 1.8.0-28
49  ...
50
51  $ devlink dev info pci/0000:b5:00.0
52  pci/0000:b5:00.0:
53    driver ionic
54    serial_number FLM18420073
55    versions:
56        fixed:
57          asic.id 0x0
58          asic.rev 0x0
59        running:
60          fw 1.8.0-28
61
62See Documentation/networking/devlink/ionic.rst for more information
63on the devlink dev info data.
64
65Enabling the driver
66===================
67
68The driver is enabled via the standard kernel configuration system,
69using the make command::
70
71  make oldconfig/menuconfig/etc.
72
73The driver is located in the menu structure at:
74
75  -> Device Drivers
76    -> Network device support (NETDEVICES [=y])
77      -> Ethernet driver support
78        -> Pensando devices
79          -> Pensando Ethernet IONIC Support
80
81Configuring the Driver
82======================
83
84MTU
85---
86
87Jumbo frame support is available with a maximum size of 9194 bytes.
88
89Interrupt coalescing
90--------------------
91
92Interrupt coalescing can be configured by changing the rx-usecs value with
93the "ethtool -C" command.  The rx-usecs range is 0-190.  The tx-usecs value
94reflects the rx-usecs value as they are tied together on the same interrupt.
95
96SR-IOV
97------
98
99Minimal SR-IOV support is currently offered and can be enabled by setting
100the sysfs 'sriov_numvfs' value, if supported by your particular firmware
101configuration.
102
103XDP
104---
105
106Support for XDP includes the basics, plus Jumbo frames, Redirect and
107ndo_xmit.  There is no current support for zero-copy sockets or HW offload.
108
109RDMA Support via Auxiliary Device
110=================================
111
112The ionic driver supports RDMA (Remote Direct Memory Access) functionality
113through the Linux auxiliary device framework when advertised by the firmware.
114RDMA capability is detected during device initialization, and if supported,
115the ethernet driver will create an auxiliary device that allows the RDMA
116driver to bind and provide InfiniBand/RoCE functionality.
117
118Statistics
119==========
120
121Basic hardware stats
122--------------------
123
124The commands ``netstat -i``, ``ip -s link show``, and ``ifconfig`` show
125a limited set of statistics taken directly from firmware.  For example::
126
127  $ ip -s link show enp181s0
128  7: enp181s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
129      link/ether 00:ae:cd:00:07:68 brd ff:ff:ff:ff:ff:ff
130      RX: bytes  packets  errors  dropped overrun mcast
131      414        5        0       0       0       0
132      TX: bytes  packets  errors  dropped carrier collsns
133      1384       18       0       0       0       0
134
135ethtool -S
136----------
137
138The statistics shown from the ``ethtool -S`` command includes a combination of
139driver counters and firmware counters, including port and queue specific values.
140The driver values are counters computed by the driver, and the firmware values
141are gathered by the firmware from the port hardware and passed through the
142driver with no further interpretation.
143
144Driver port specific::
145
146     tx_packets: 12
147     tx_bytes: 964
148     rx_packets: 5
149     rx_bytes: 414
150     tx_tso: 0
151     tx_tso_bytes: 0
152     tx_csum_none: 12
153     tx_csum: 0
154     rx_csum_none: 0
155     rx_csum_complete: 3
156     rx_csum_error: 0
157     xdp_drop: 0
158     xdp_aborted: 0
159     xdp_pass: 0
160     xdp_tx: 0
161     xdp_redirect: 0
162     xdp_frames: 0
163
164Driver queue specific::
165
166     tx_0_pkts: 3
167     tx_0_bytes: 294
168     tx_0_clean: 3
169     tx_0_dma_map_err: 0
170     tx_0_linearize: 0
171     tx_0_frags: 0
172     tx_0_tso: 0
173     tx_0_tso_bytes: 0
174     tx_0_hwstamp_valid: 0
175     tx_0_hwstamp_invalid: 0
176     tx_0_csum_none: 3
177     tx_0_csum: 0
178     tx_0_vlan_inserted: 0
179     tx_0_xdp_frames: 0
180     rx_0_pkts: 2
181     rx_0_bytes: 120
182     rx_0_dma_map_err: 0
183     rx_0_alloc_err: 0
184     rx_0_csum_none: 0
185     rx_0_csum_complete: 0
186     rx_0_csum_error: 0
187     rx_0_hwstamp_valid: 0
188     rx_0_hwstamp_invalid: 0
189     rx_0_dropped: 0
190     rx_0_vlan_stripped: 0
191     rx_0_xdp_drop: 0
192     rx_0_xdp_aborted: 0
193     rx_0_xdp_pass: 0
194     rx_0_xdp_tx: 0
195     rx_0_xdp_redirect: 0
196
197Firmware port specific::
198
199     hw_tx_dropped: 0
200     hw_rx_dropped: 0
201     hw_rx_over_errors: 0
202     hw_rx_missed_errors: 0
203     hw_tx_aborted_errors: 0
204     frames_rx_ok: 15
205     frames_rx_all: 15
206     frames_rx_bad_fcs: 0
207     frames_rx_bad_all: 0
208     octets_rx_ok: 1290
209     octets_rx_all: 1290
210     frames_rx_unicast: 10
211     frames_rx_multicast: 5
212     frames_rx_broadcast: 0
213     frames_rx_pause: 0
214     frames_rx_bad_length: 0
215     frames_rx_undersized: 0
216     frames_rx_oversized: 0
217     frames_rx_fragments: 0
218     frames_rx_jabber: 0
219     frames_rx_pripause: 0
220     frames_rx_stomped_crc: 0
221     frames_rx_too_long: 0
222     frames_rx_vlan_good: 3
223     frames_rx_dropped: 0
224     frames_rx_less_than_64b: 0
225     frames_rx_64b: 4
226     frames_rx_65b_127b: 11
227     frames_rx_128b_255b: 0
228     frames_rx_256b_511b: 0
229     frames_rx_512b_1023b: 0
230     frames_rx_1024b_1518b: 0
231     frames_rx_1519b_2047b: 0
232     frames_rx_2048b_4095b: 0
233     frames_rx_4096b_8191b: 0
234     frames_rx_8192b_9215b: 0
235     frames_rx_other: 0
236     frames_tx_ok: 31
237     frames_tx_all: 31
238     frames_tx_bad: 0
239     octets_tx_ok: 2614
240     octets_tx_total: 2614
241     frames_tx_unicast: 8
242     frames_tx_multicast: 21
243     frames_tx_broadcast: 2
244     frames_tx_pause: 0
245     frames_tx_pripause: 0
246     frames_tx_vlan: 0
247     frames_tx_less_than_64b: 0
248     frames_tx_64b: 4
249     frames_tx_65b_127b: 27
250     frames_tx_128b_255b: 0
251     frames_tx_256b_511b: 0
252     frames_tx_512b_1023b: 0
253     frames_tx_1024b_1518b: 0
254     frames_tx_1519b_2047b: 0
255     frames_tx_2048b_4095b: 0
256     frames_tx_4096b_8191b: 0
257     frames_tx_8192b_9215b: 0
258     frames_tx_other: 0
259     frames_tx_pri_0: 0
260     frames_tx_pri_1: 0
261     frames_tx_pri_2: 0
262     frames_tx_pri_3: 0
263     frames_tx_pri_4: 0
264     frames_tx_pri_5: 0
265     frames_tx_pri_6: 0
266     frames_tx_pri_7: 0
267     frames_rx_pri_0: 0
268     frames_rx_pri_1: 0
269     frames_rx_pri_2: 0
270     frames_rx_pri_3: 0
271     frames_rx_pri_4: 0
272     frames_rx_pri_5: 0
273     frames_rx_pri_6: 0
274     frames_rx_pri_7: 0
275     tx_pripause_0_1us_count: 0
276     tx_pripause_1_1us_count: 0
277     tx_pripause_2_1us_count: 0
278     tx_pripause_3_1us_count: 0
279     tx_pripause_4_1us_count: 0
280     tx_pripause_5_1us_count: 0
281     tx_pripause_6_1us_count: 0
282     tx_pripause_7_1us_count: 0
283     rx_pripause_0_1us_count: 0
284     rx_pripause_1_1us_count: 0
285     rx_pripause_2_1us_count: 0
286     rx_pripause_3_1us_count: 0
287     rx_pripause_4_1us_count: 0
288     rx_pripause_5_1us_count: 0
289     rx_pripause_6_1us_count: 0
290     rx_pripause_7_1us_count: 0
291     rx_pause_1us_count: 0
292     frames_tx_truncated: 0
293
294
295Support
296=======
297
298For general Linux networking support, please use the netdev mailing
299list, which is monitored by Pensando personnel::
300
301  netdev@vger.kernel.org
302
303For more specific support needs, please use the Pensando driver support
304email::
305
306  drivers@pensando.io
307