1.. SPDX-License-Identifier: GPL-2.0
2
3===================
4ice devlink support
5===================
6
7This document describes the devlink features implemented by the ``ice``
8device driver.
9
10Info versions
11=============
12
13The ``ice`` driver reports the following versions
14
15.. list-table:: devlink info versions implemented
16    :widths: 5 5 5 90
17
18    * - Name
19      - Type
20      - Example
21      - Description
22    * - ``board.id``
23      - fixed
24      - K65390-000
25      - The Product Board Assembly (PBA) identifier of the board.
26    * - ``fw.mgmt``
27      - running
28      - 2.1.7
29      - 3-digit version number of the management firmware that controls the
30        PHY, link, etc.
31    * - ``fw.mgmt.api``
32      - running
33      - 1.5
34      - 2-digit version number of the API exported over the AdminQ by the
35        management firmware. Used by the driver to identify what commands
36        are supported.
37    * - ``fw.mgmt.build``
38      - running
39      - 0x305d955f
40      - Unique identifier of the source for the management firmware.
41    * - ``fw.undi``
42      - running
43      - 1.2581.0
44      - Version of the Option ROM containing the UEFI driver. The version is
45        reported in ``major.minor.patch`` format. The major version is
46        incremented whenever a major breaking change occurs, or when the
47        minor version would overflow. The minor version is incremented for
48        non-breaking changes and reset to 1 when the major version is
49        incremented. The patch version is normally 0 but is incremented when
50        a fix is delivered as a patch against an older base Option ROM.
51    * - ``fw.psid.api``
52      - running
53      - 0.80
54      - Version defining the format of the flash contents.
55    * - ``fw.bundle_id``
56      - running
57      - 0x80002ec0
58      - Unique identifier of the firmware image file that was loaded onto
59        the device. Also referred to as the EETRACK identifier of the NVM.
60    * - ``fw.app.name``
61      - running
62      - ICE OS Default Package
63      - The name of the DDP package that is active in the device. The DDP
64        package is loaded by the driver during initialization. Each
65        variation of the DDP package has a unique name.
66    * - ``fw.app``
67      - running
68      - 1.3.1.0
69      - The version of the DDP package that is active in the device. Note
70        that both the name (as reported by ``fw.app.name``) and version are
71        required to uniquely identify the package.
72    * - ``fw.netlist``
73      - running
74      - 1.1.2000-6.7.0
75      - The version of the netlist module. This module defines the device's
76        Ethernet capabilities and default settings, and is used by the
77        management firmware as part of managing link and device
78        connectivity.
79    * - ``fw.netlist.build``
80      - running
81      - 0xee16ced7
82      - The first 4 bytes of the hash of the netlist module contents.
83
84Regions
85=======
86
87The ``ice`` driver implements the following regions for accessing internal
88device data.
89
90.. list-table:: regions implemented
91    :widths: 15 85
92
93    * - Name
94      - Description
95    * - ``nvm-flash``
96      - The contents of the entire flash chip, sometimes referred to as
97        the device's Non Volatile Memory.
98    * - ``device-caps``
99      - The contents of the device firmware's capabilities buffer. Useful to
100        determine the current state and configuration of the device.
101
102Users can request an immediate capture of a snapshot via the
103``DEVLINK_CMD_REGION_NEW``
104
105.. code:: shell
106
107    $ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1
108    $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
109
110    $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
111    0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
112    0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8
113    0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc
114    0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5
115
116    $ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0 length 16
117    0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
118
119    $ devlink region delete pci/0000:01:00.0/nvm-flash snapshot 1
120
121    $ devlink region new pci/0000:01:00.0/device-caps snapshot 1
122    $ devlink region dump pci/0000:01:00.0/device-caps snapshot 1
123    0000000000000000 01 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00
124    0000000000000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
125    0000000000000020 02 00 02 01 32 03 00 00 0a 00 00 00 25 00 00 00
126    0000000000000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
127    0000000000000040 04 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
128    0000000000000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
129    0000000000000060 05 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00
130    0000000000000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
131    0000000000000080 06 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
132    0000000000000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
133    00000000000000a0 08 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
134    00000000000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
135    00000000000000c0 12 00 01 00 01 00 00 00 01 00 01 00 00 00 00 00
136    00000000000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
137    00000000000000e0 13 00 01 00 00 01 00 00 00 00 00 00 00 00 00 00
138    00000000000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
139    0000000000000100 14 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
140    0000000000000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
141    0000000000000120 15 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
142    0000000000000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
143    0000000000000140 16 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
144    0000000000000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
145    0000000000000160 17 00 01 00 06 00 00 00 00 00 00 00 00 00 00 00
146    0000000000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
147    0000000000000180 18 00 01 00 01 00 00 00 01 00 00 00 08 00 00 00
148    0000000000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
149    00000000000001a0 22 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
150    00000000000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
151    00000000000001c0 40 00 01 00 00 08 00 00 08 00 00 00 00 00 00 00
152    00000000000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
153    00000000000001e0 41 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00
154    00000000000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
155    0000000000000200 42 00 01 00 00 08 00 00 00 00 00 00 00 00 00 00
156    0000000000000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
157
158    $ devlink region delete pci/0000:01:00.0/device-caps snapshot 1
159