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 net: ti: am65-cpsw-nuss: Add devlink support 2021-02-11 17:52:13 -08:00
bnxt.rst bnxt_en: Add devlink support for ENABLE_ROCE nvm parameter 2025-03-18 10:25:22 +01:00
devlink-dpipe.rst devlink: fix typo in documentation 2021-03-13 18:11:24 -08:00
devlink-eswitch-attr.rst devlink: Introduce switchdev_inactive eswitch mode 2025-11-11 13:17:53 +01:00
devlink-flash.rst devlink: introduce flash update overwrite mask 2020-09-25 17:20:57 -07:00
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 Revert "Merge branch 'mlxsw-line-card-model'" 2022-05-05 15:47:23 -07:00
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 docs: networking: devlink: capitalise length value 2024-07-08 13:39:07 +01:00
devlink-reload.rst Documentation: devlink: extend reload-reinit description 2023-11-30 12:31:23 +01:00
devlink-resource.rst mlxsw: Register physical ports as a devlink resource 2021-01-22 20:42:13 -08:00
devlink-selftests.rst devlink: introduce framework for selftests 2022-07-28 21:56:53 -07:00
devlink-trap.rst documentation: networking: devlink: Fix a typo in devlink-trap.rst 2025-05-14 18:51:58 -07:00
etas_es58x.rst Documentation: devlink: add devlink documentation for the etas_es58x driver 2022-12-12 11:39:13 +01:00
hns3.rst net: hns3: add support to query scc version by devlink info 2024-04-12 18:58:46 -07:00
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 devlink: add documentation for ionic device driver 2020-01-10 17:07:00 -08:00
iosm.rst net: wwan: iosm: correct devlink extra params 2021-10-02 16:05:20 +01:00
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 devlink: add a file documenting devlink regions 2020-01-10 17:07:00 -08:00
mlx5.rst net/mlx5: Expose uar access and odp page fault counters 2025-09-27 08:53:50 -07:00
mlxsw.rst mlxsw: core_linecards: Expose device PSID over device info 2022-07-26 13:56:36 -07:00
mv88e6xxx.rst devlink: convert driver-specific files to reStructuredText 2020-01-10 17:06:59 -08:00
netdevsim.rst docs: netdevsim: fixe typo in netdevsim documentation 2025-07-01 17:38:50 -07:00
nfp.rst nfp: update devlink device info output 2024-04-12 11:40:09 +01:00
octeontx2.rst devlink: Add documentation for OcteonTx2 AF 2024-11-11 14:15:58 -08:00
prestera.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
qed.rst devlink: fix typos in qed documentation 2020-01-15 23:14:31 +01:00
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 devlink: convert driver-specific files to reStructuredText 2020-01-10 17:06:59 -08:00
zl3073x.rst dpll: zl3073x: Implement devlink flash callback 2025-09-15 08:08:39 -07:00