Thread (14 messages) 14 messages, 2 authors, 2026-06-05

Re: [PATCH net-next V2 7/7] devlink: Add eswitch mode boot defaults

From: Mark Bloch <mbloch@nvidia.com>
Date: 2026-06-04 01:16:17
Also in: linux-doc, linux-rdma, lkml


On 03/06/2026 23:06, Randy Dunlap wrote:
Hi.

On 6/3/26 12:32 PM, Mark Bloch wrote:
quoted
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 063c11ca33e5..7af9f2898d92 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1264,6 +1264,31 @@ Kernel parameters
 	dell_smm_hwmon.fan_max=
 			[HW] Maximum configurable fan speed.
 
+	devlink_eswitch_mode=
+			[NET]
+			Format:
+			[<selector>]:<mode>
It appears (please correct me if I am mistaken) that the '[' and ']'
above don't mean "optional" but instead they are required characters...
quoted
+
+			<selector>:
+			* | <handle>[,<handle>...]
while here they mean "optional".

That is confusing (inconsistent). Also, if the square brackets are
always required around the <selector>, what purpose do they serve?
Yes, you are right, this is confusing. The outer square brackets are part of
the syntax and are required, while the brackets in "[,<handle>...]" mean that
additional handles are optional.

I couldn't find a better way to describe this. What I want to say is that the
selector is always wrapped in square brackets. Inside the brackets it can either
be "*" to match all devices, or a comma separated list of handles. If "*" is
not used, then at least one handle has to be provided.

Maybe it would be clearer to spell it out explicitly, something like:

Format:
  [<selector>]:<mode>

The '[' and ']' characters are literal and required.

<selector>:
  * | <handle>[,<handle>...]

If '*' is not used, <selector> must contain at least one <handle>.

Does that sound like a reasonable way to document it?

Mark
quoted
+
+			<handle>:
+			<bus-name>/<dev-name>
+
+			Configure default devlink eswitch mode for matching
+			devlink instances during device initialization.
+
+			<mode>:
+			legacy | switchdev | switchdev_inactive
+
+			Examples:
+			devlink_eswitch_mode=[*]:switchdev
+			devlink_eswitch_mode=[pci/0000:08:00.0]:switchdev
+			devlink_eswitch_mode=[pci/0000:08:00.0,pci/0000:09:00.1]:legacy
+
+			See Documentation/networking/devlink/devlink-defaults.rst
+			for the full syntax.
+
 	dfltcc=		[HW,S390]
 			Format: { on | off | def_only | inf_only | always }
 			on:       s390 zlib hardware support for compression on
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help