linux/Documentation/networking/devlink
Saeed Mahameed 0e535824d0 devlink: Introduce switchdev_inactive eswitch mode
Adds DEVLINK_ESWITCH_MODE_SWITCHDEV_INACTIVE attribute to UAPI and
documentation.

Before having traffic flow through an eswitch, a user may want to have the
ability to block traffic towards the FDB until FDB is fully programmed and
the user is ready to send traffic to it. For example: when two eswitches
are present for vports in a multi-PF setup, one eswitch may take over the
traffic from the other when the user chooses.
Before this take over, a user may want to first program the inactive
eswitch and then once ready redirect traffic to this new eswitch.

switchdev modes transition semantics:

legacy->switchdev_inactive: Create switchdev mode normally, traffic not
  allowed to flow yet.

switchdev_inactive->switchdev: Enable traffic to flow.

switchdev->switchdev_inactive: Block traffic on the FDB, FDB and
  representros state and content is preserved.

When eswitch is configured to this mode, traffic is ignored/dropped on
this eswitch FDB, while current configuration is kept, e.g FDB rules and
netdev representros are kept available, FDB programming is allowed.

Example:
 # start inactive switchdev
devlink dev eswitch set pci/0000:08:00.1 mode switchdev_inactive
 # setup TC rules, representors etc ..
 # activate
devlink dev eswitch set pci/0000:08:00.1 mode switchdev

Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20251108070404.1551708-2-saeed@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-11-11 13:17:53 +01:00
..
am65-nuss-cpsw-switch.rst
bnxt.rst bnxt_en: Add devlink support for ENABLE_ROCE nvm parameter 2025-03-18 10:25:22 +01:00
devlink-dpipe.rst
devlink-eswitch-attr.rst devlink: Introduce switchdev_inactive eswitch mode 2025-11-11 13:17:53 +01:00
devlink-flash.rst
devlink-health.rst devlink: Make health reporter burst period configurable 2025-08-26 17:24:16 -07:00
devlink-info.rst ixgbe: add .info_get extension specific for E610 devices 2025-04-15 07:36:32 -07:00
devlink-linecard.rst
devlink-params.rst devlink: Add new "max_mac_per_vf" generic device param 2025-11-06 12:57:31 -08:00
devlink-port.rst devlink: Extend devlink rate API with traffic classes bandwidth management 2025-07-02 15:39:05 -07:00
devlink-region.rst
devlink-reload.rst
devlink-resource.rst
devlink-selftests.rst
devlink-trap.rst documentation: networking: devlink: Fix a typo in devlink-trap.rst 2025-05-14 18:51:58 -07:00
etas_es58x.rst
hns3.rst
i40e.rst i40e: support generic devlink param "max_mac_per_vf" 2025-11-06 12:57:31 -08:00
ice.rst ice: devlink PF MSI-X max and min parameter 2025-02-05 09:02:44 -08:00
index.rst net: stmmac: Add a devlink attribute to control timestamping mode 2025-10-28 15:34:35 +01:00
ionic.rst
iosm.rst
ixgbe.rst ixgbe: devlink: add devlink region support for E610 2025-04-29 15:13:44 -07:00
kvaser_pciefd.rst Documentation: devlink: add devlink documentation for the kvaser_pciefd driver 2025-07-25 17:55:46 +02:00
kvaser_usb.rst Documentation: devlink: add devlink documentation for the kvaser_usb driver 2025-07-25 18:01:22 +02:00
mlx4.rst
mlx5.rst net/mlx5: Expose uar access and odp page fault counters 2025-09-27 08:53:50 -07:00
mlxsw.rst
mv88e6xxx.rst
netdevsim.rst docs: netdevsim: fixe typo in netdevsim documentation 2025-07-01 17:38:50 -07:00
nfp.rst
octeontx2.rst devlink: Add documentation for OcteonTx2 AF 2024-11-11 14:15:58 -08:00
prestera.rst
qed.rst
sfc.rst sfc: document devlink flash support 2025-02-11 17:12:17 -08:00
stmmac.rst net: stmmac: rename devlink parameter ts_coarse into phc_coarse_adj 2025-11-03 17:05:36 -08:00
ti-cpsw-switch.rst
zl3073x.rst dpll: zl3073x: Implement devlink flash callback 2025-09-15 08:08:39 -07:00