Files
linux/include/uapi/linux
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
..
2024-04-15 13:42:38 +02:00
2025-10-16 12:04:47 -07:00
2025-02-05 13:22:04 +09:00
2023-01-20 09:33:22 +00:00
2024-06-11 12:57:49 -05:00
2025-02-12 02:29:30 +00:00
2025-10-28 22:59:19 +01:00
2025-09-19 14:26:16 +02:00
2023-03-16 21:20:32 -07:00
2025-08-29 15:08:07 +02:00
2025-09-05 09:11:28 +02:00
2025-05-03 12:02:09 +02:00
2024-05-07 01:35:57 +02:00
2025-07-14 09:15:58 +02:00
2024-04-01 10:49:28 +01:00
2024-08-26 09:37:23 -07:00
2025-09-15 14:32:54 +02:00
2024-06-01 07:28:21 +02:00
2024-09-01 20:26:05 -07:00
2025-04-17 11:09:10 +02:00
2024-08-19 22:36:26 -04:00
2025-07-08 12:39:24 +02:00
2023-12-15 17:01:30 +01:00
2024-09-06 08:31:40 -06:00
2024-08-12 17:50:34 -07:00
2023-11-28 19:05:16 +00:00
2025-01-08 13:18:11 +01:00
2025-04-17 12:30:02 +02:00
2025-06-24 15:50:06 +02:00
2023-12-20 19:26:31 -05:00
2025-02-25 18:14:03 -08:00
2025-07-14 18:41:42 -07:00
2022-11-17 11:04:23 -08:00
2025-09-15 17:34:06 +02:00
2025-06-19 14:28:22 +02:00
2025-05-21 13:41:03 +02:00
2025-04-17 12:30:02 +02:00
2023-12-29 11:58:24 -08:00
2023-03-23 17:25:46 +01:00
2025-09-21 17:44:20 -04:00
2025-09-22 09:29:28 +01:00
2025-05-27 10:27:54 -04:00
2025-09-22 09:29:29 +01:00