Documentation/networking/devlink/mlx5.rst

Source file repositories/reference/linux-study-clean/Documentation/networking/devlink/mlx5.rst

File Facts

System
Linux kernel
Corpus path
Documentation/networking/devlink/mlx5.rst
Extension
.rst
Size
15746 bytes
Lines
422
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GPL-2.0

====================
mlx5 devlink support
====================

This document describes the devlink features implemented by the ``mlx5``
device driver.

Parameters
==========

.. list-table:: Generic parameters implemented

   * - Name
     - Mode
     - Validation
     - Notes
   * - ``enable_roce``
     - driverinit
     - Boolean
     - If the device supports RoCE disablement, RoCE enablement state controls
       device support for RoCE capability. Otherwise, the control occurs in the
       driver stack. When RoCE is disabled at the driver level, only raw
       ethernet QPs are supported.
   * - ``io_eq_size``
     - driverinit
     - The range is between 64 and 4096.
     -
   * - ``event_eq_size``
     - driverinit
     - The range is between 64 and 4096.
     -
   * - ``max_macs``
     - driverinit
     - The range is between 1 and 2^31. Only power of 2 values are supported.
     -
   * - ``enable_sriov``
     - permanent
     - Boolean
     - Applies to each physical function (PF) independently, if the device
       supports it. Otherwise, it applies symmetrically to all PFs.
   * - ``total_vfs``
     - permanent
     - The range is between 1 and a device-specific max.
     - Applies to each physical function (PF) independently, if the device
       supports it. Otherwise, it applies symmetrically to all PFs.

Note: permanent parameters such as ``enable_sriov`` and ``total_vfs`` require FW reset to take effect

.. code-block:: bash

   # setup parameters
   devlink dev param set pci/0000:01:00.0 name enable_sriov value true cmode permanent
   devlink dev param set pci/0000:01:00.0 name total_vfs value 8 cmode permanent

   # Fw reset
   devlink dev reload pci/0000:01:00.0 action fw_activate

   # for PCI related config such as sriov PCI reset/rescan is required:
   echo 1 >/sys/bus/pci/devices/0000:01:00.0/remove
   echo 1 >/sys/bus/pci/rescan
   grep ^ /sys/bus/pci/devices/0000:01:00.0/sriov_*

   * - ``num_doorbells``
     - driverinit
     - This controls the number of channel doorbells used by the netdev. In all
       cases, an additional doorbell is allocated and used for non-channel
       communication (e.g. for PTP, HWS, etc.). Supported values are:

Annotation

Implementation Notes