Subject: Re: [RFC net-next 0/4] devlink: Add boot-time defaults

From: Jiri Pirko <[email-masked]>
Date: Tue, 12 May 2026 20:35:09 +0200

Tue, May 12, 2026 at 05:25:21PM CEST, [email-masked] wrote:
>
>
>> From: Jiri Pirko <[email-masked]>
>> Sent: 12 May 2026 07:37 PM
>> 
>> Tue, May 12, 2026 at 03:48:32PM CEST, [email-masked] wrote:
>> >
>> >> From: Jiri Pirko <[email-masked]>
>> >> Sent: 12 May 2026 02:16 PM
>> >>
>> >> Mon, May 11, 2026 at 08:21:37PM +0200, [email-masked] wrote:
>> >> >
>> >> >> From: Mark Bloch <[email-masked]>
>> >> >> Sent: 10 May 2026 06:02 PM
>> >> >>
>> >> >
>> >> >[..]
>> >> >
>> >> >> > I look at it from the perspective that from some CX generation,
>> >> >> > switchdev mode should be default. So that is a device-based decision.
>> >> >> > I believe as such it can optionally be permanenty configured (nv config)
>> >> >> > on older device. Why not?
>> >> >>
>> >> >Because sometimes switchdev_inactive is needed and sometimes not.
>> >> >Such knob is not device decision.
>> >>
>> >> That is what I would call corner case. In that, user can use userspace
>> >> configuration to change the mode in runtime.
>> >>
>> >Corner vs common depends on users one talks to. :)
>> >If fw has switchdev(active) as default, and then
>> >And user needs to run switchdev_inactive, it will actually break their switching applications.
>> 
>> Can you describe the actutal breakage please?
>> 
>Driver default was switchdev so all the traffic is forwarded to the switch,
>and user didn't have chance to setup the fdb rules.
>So packets are dropped but user didn't expect the traffic to be forwarded.

User may switch mode to switchdev_inactive early on, before any of the
representors are created. What's the issue then?

>
>With this RFC, the device would start in the switchdev_inactive.
>And user's goal is achieved.
>
>> >
>> >So, one needs to invent switchdev_inactive in the FW.
>> >
>> >Jakub's suggestion in this RFC is covering both the scenarios uniformly without above problems.
>> >Single uapi for all the cases, so looks good to me.
>> >
>> >Moreover, do not understand how alternative solves such problems.
>> >i.e. user is unable to configure the fw because driver is not yet loaded/up.
>> 
>> See my other reply in this thread. I don't think there is a need to
>> configure anything in FW. If we fix the behaviour in switchdev mode for
>> non-sriov user and change the default, no fw knob needed. What am I
>> missing?
>> 
>If I understood your suggestion right, is it the devlinkd based solution?

The suggestion is to use "switchdev" as default with user configuration
no matter if it is devlinkd or something else.

>
>If yes, then Mark explained that it has the issue of all drivers to be loaded, followed by user space to start.