From: Randy Dunlap <rdunlap@infradead.org>
To: Mark Bloch <mbloch@nvidia.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>
Cc: Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Jiri Pirko <jiri@resnulli.us>, Simon Horman <horms@kernel.org>,
Sunil Goutham <sgoutham@marvell.com>,
Linu Cherian <lcherian@marvell.com>,
Geetha sowjanya <gakula@marvell.com>,
hariprasad <hkelam@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>,
Bharat Bhushan <bbhushan2@marvell.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Andrew Morton <akpm@linux-foundation.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Thomas Gleixner <tglx@kernel.org>, Petr Mladek <pmladek@suse.com>,
Tejun Heo <tj@kernel.org>, Vlastimil Babka <vbabka@kernel.org>,
Feng Tang <feng.tang@linux.alibaba.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Christian Brauner <brauner@kernel.org>,
Dapeng Mi <dapeng1.mi@linux.intel.com>,
Kees Cook <kees@kernel.org>, Marco Elver <elver@google.com>,
Eric Biggers <ebiggers@kernel.org>,
Li RongQing <lirongqing@baidu.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Ethan Nelson-Moore <enelsonmoore@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next V2 7/7] devlink: Add eswitch mode boot defaults
Date: Thu, 4 Jun 2026 21:02:50 -0700 [thread overview]
Message-ID: <fa19f1d2-832b-4b9c-824d-29ae48e4bc2a@infradead.org> (raw)
In-Reply-To: <91d12ffd-6bd9-4951-8351-655262d44874@nvidia.com>
On 6/4/26 2:49 AM, Mark Bloch wrote:
>
>
> On 04/06/2026 6:53, Randy Dunlap wrote:
>>
>>
>> On 6/3/26 6:16 PM, Mark Bloch wrote:
>>>
>>>
>>> On 03/06/2026 23:06, Randy Dunlap wrote:
>>>> Hi.
>>>>
>>>> On 6/3/26 12:32 PM, Mark Bloch wrote:
>>>>> 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...
>>>>
>>>>> +
>>>>> + <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?
>>
>> Yes, that helps a little bit. Better than nothing.
>>
>> But why are they required at all?
>
> Jiri suggested using the square brackets, and I liked that they made the
> selector look like a grouped argument. But if that is too confusing, I can
> also drop them and use a simpler separator, for example:
>
> devlink_eswitch_mode=
> [NET]
> Format:
> <selector>=<mode>
>
> <selector>:
> * | <handle>[,<handle>...]
>
> <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=switchdev_inactive
>
> Does this look better to you?
Yes, that looks much better to me.
But you should do whatever you think is right.
>>>>> +
>>>>> + <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
>>>>
>>>>
>>>
>>
>
--
~Randy
next prev parent reply other threads:[~2026-06-05 4:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 19:32 [PATCH net-next V2 0/7] devlink: Add boot-time eswitch mode defaults Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 1/7] devlink: Skip health recover notifications before register Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 2/7] netdevsim: Register devlink after device init Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 3/7] net/mlx5: Clear FW reset-in-progress bit before reload Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 4/7] net/mlx5: Register devlink after device init Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 5/7] octeontx2-af: Register devlink after SR-IOV init Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 6/7] octeontx2-pf: Register devlink after SR-IOV state init Mark Bloch
2026-06-03 19:32 ` [PATCH net-next V2 7/7] devlink: Add eswitch mode boot defaults Mark Bloch
2026-06-03 20:06 ` Randy Dunlap
2026-06-04 1:16 ` Mark Bloch
2026-06-04 3:53 ` Randy Dunlap
2026-06-04 9:49 ` Mark Bloch
2026-06-05 4:02 ` Randy Dunlap [this message]
2026-06-05 17:41 ` Mark Bloch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa19f1d2-832b-4b9c-824d-29ae48e4bc2a@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=bp@alien8.de \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=dapeng1.mi@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=ebiggers@kernel.org \
--cc=edumazet@google.com \
--cc=elver@google.com \
--cc=enelsonmoore@gmail.com \
--cc=feng.tang@linux.alibaba.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=saeedm@nvidia.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@nvidia.com \
--cc=tglx@kernel.org \
--cc=tj@kernel.org \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®