1.. SPDX-License-Identifier: GPL-2.0
2
3====================
4mlx5 devlink support
5====================
6
7This document describes the devlink features implemented by the ``mlx5``
8device driver.
9
10Parameters
11==========
12
13.. list-table:: Generic parameters implemented
14
15   * - Name
16     - Mode
17     - Validation
18   * - ``enable_roce``
19     - driverinit
20     - Type: Boolean
21   * - ``io_eq_size``
22     - driverinit
23     - The range is between 64 and 4096.
24   * - ``event_eq_size``
25     - driverinit
26     - The range is between 64 and 4096.
27   * - ``max_macs``
28     - driverinit
29     - The range is between 1 and 2^31. Only power of 2 values are supported.
30
31The ``mlx5`` driver also implements the following driver-specific
32parameters.
33
34.. list-table:: Driver-specific parameters implemented
35   :widths: 5 5 5 85
36
37   * - Name
38     - Type
39     - Mode
40     - Description
41   * - ``flow_steering_mode``
42     - string
43     - runtime
44     - Controls the flow steering mode of the driver
45
46       * ``dmfs`` Device managed flow steering. In DMFS mode, the HW
47         steering entities are created and managed through firmware.
48       * ``smfs`` Software managed flow steering. In SMFS mode, the HW
49         steering entities are created and manage through the driver without
50         firmware intervention.
51   * - ``fdb_large_groups``
52     - u32
53     - driverinit
54     - Control the number of large groups (size > 1) in the FDB table.
55
56       * The default value is 15, and the range is between 1 and 1024.
57   * - ``esw_multiport``
58     - Boolean
59     - runtime
60     - Control MultiPort E-Switch shared fdb mode.
61
62       An experimental mode where a single E-Switch is used and all the vports
63       and physical ports on the NIC are connected to it.
64
65       An example is to send traffic from a VF that is created on PF0 to an
66       uplink that is natively associated with the uplink of PF1
67
68       Note: Future devices, ConnectX-8 and onward, will eventually have this
69       as the default to allow forwarding between all NIC ports in a single
70       E-switch environment and the dual E-switch mode will likely get
71       deprecated.
72
73       Default: disabled
74
75   * - ``hairpin_num_queues``
76     - u32
77     - driverinit
78     - We refer to a TC NIC rule that involves forwarding as "hairpin".
79       Hairpin queues are mlx5 hardware specific implementation for hardware
80       forwarding of such packets.
81
82       Control the number of hairpin queues.
83   * - ``hairpin_queue_size``
84     - u32
85     - driverinit
86     - Control the size (in packets) of the hairpin queues.
87
88The ``mlx5`` driver supports reloading via ``DEVLINK_CMD_RELOAD``
89
90Info versions
91=============
92
93The ``mlx5`` driver reports the following versions
94
95.. list-table:: devlink info versions implemented
96   :widths: 5 5 90
97
98   * - Name
99     - Type
100     - Description
101   * - ``fw.psid``
102     - fixed
103     - Used to represent the board id of the device.
104   * - ``fw.version``
105     - stored, running
106     - Three digit major.minor.subminor firmware version number.
107