Files
linux/Documentation/networking/devlink/i40e.rst
Mohammad Heib 2c031d4c77 i40e: support generic devlink param "max_mac_per_vf"
Currently the i40e driver enforces its own internally calculated per-VF MAC
filter limit, derived from the number of allocated VFs and available
hardware resources. This limit is not configurable by the administrator,
which makes it difficult to control how many MAC addresses each VF may
use.

This patch adds support for the new generic devlink runtime parameter
"max_mac_per_vf" which provides administrators with a way to cap the
number of MAC addresses a VF can use:

- When the parameter is set to 0 (default), the driver continues to use
  its internally calculated limit.

- When set to a non-zero value, the driver applies this value as a strict
  cap for VFs, overriding the internal calculation.

Important notes:

- The configured value is a theoretical maximum. Hardware limits may
  still prevent additional MAC addresses from being added, even if the
  parameter allows it.

- Since MAC filters are a shared hardware resource across all VFs,
  setting a high value may cause resource contention and starve other
  VFs.

- This change gives administrators predictable and flexible control over
  VF resource allocation, while still respecting hardware limitations.

- Previous discussion about this change:
  https://lore.kernel.org/netdev/20250805134042.2604897-2-dhill@redhat.com
  https://lore.kernel.org/netdev/20250823094952.182181-1-mheib@redhat.com

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-11-06 12:57:31 -08:00

94 lines
3.0 KiB
ReStructuredText

.. SPDX-License-Identifier: GPL-2.0
====================
i40e devlink support
====================
This document describes the devlink features implemented by the ``i40e``
device driver.
Parameters
==========
.. list-table:: Generic parameters implemented
:widths: 5 5 90
* - Name
- Mode
- Notes
* - ``max_mac_per_vf``
- runtime
- Controls the maximum number of MAC addresses a VF can use
on i40e devices.
By default (``0``), the driver enforces its internally calculated per-VF
MAC filter limit, which is based on the number of allocated VFS.
If set to a non-zero value, this parameter acts as a strict cap:
the driver will use the user-provided value instead of its internal
calculation.
**Important notes:**
- This value **must be set before enabling SR-IOV**.
Attempting to change it while SR-IOV is enabled will return an error.
- MAC filters are a **shared hardware resource** across all VFs.
Setting a high value may cause other VFs to be starved of filters.
- This value is a **Administrative policy**. The hardware may return
errors when its absolute limit is reached, regardless of the value
set here.
The default value is ``0`` (internal calculation is used).
Info versions
=============
The ``i40e`` driver reports the following versions
.. list-table:: devlink info versions implemented
:widths: 5 5 5 90
* - Name
- Type
- Example
- Description
* - ``board.id``
- fixed
- K15190-000
- The Product Board Assembly (PBA) identifier of the board.
* - ``fw.mgmt``
- running
- 9.130
- 2-digit version number of the management firmware that controls the
PHY, link, etc.
* - ``fw.mgmt.api``
- running
- 1.15
- 2-digit version number of the API exported over the AdminQ by the
management firmware. Used by the driver to identify what commands
are supported.
* - ``fw.mgmt.build``
- running
- 73618
- Build number of the source for the management firmware.
* - ``fw.undi``
- running
- 1.3429.0
- Version of the Option ROM containing the UEFI driver. The version is
reported in ``major.minor.patch`` format. The major version is
incremented whenever a major breaking change occurs, or when the
minor version would overflow. The minor version is incremented for
non-breaking changes and reset to 1 when the major version is
incremented. The patch version is normally 0 but is incremented when
a fix is delivered as a patch against an older base Option ROM.
* - ``fw.psid.api``
- running
- 9.30
- Version defining the format of the flash contents.
* - ``fw.bundle_id``
- running
- 0x8000e5f3
- Unique identifier of the firmware image file that was loaded onto
the device. Also referred to as the EETRACK identifier of the NVM.