Messages in this thread |  | | Date | Wed, 6 May 2026 17:22:03 +0200 | | From | Jiri Pirko <> | | Subject | Re: [RFC net-next 0/4] devlink: Add boot-time defaults |
| |
Wed, May 06, 2026 at 02:37:35PM +0200, mbloch@nvidia.com wrote: >This series adds a devlink= kernel command line parameter for applying >selected devlink settings during device initialization. > >Following a discussion with Jakub[1], I am sending this RFC to get the >conversation moving. I started from Jakub's example/request and extended >it to cover requirements from production systems and configurations that >customers use. > >One important caveat is that the parsing logic in this RFC was written >with AI assistance. I am also not sure whether the resulting syntax and >parser are too complex for a kernel command line interface. This is part >of why I am sending it as an RFC: to understand what direction and level >of complexity would be acceptable to people. > >The implementation is intended to support the following properties: > >- A system may have multiple devlink devices that usually need the same > configuration. For a configuration such as eswitch mode switchdev, a > user should be able to specify multiple devices to which that > configuration applies. > >- There may be ordering dependencies between options. For example, in > mlx5, flow_steering_mode should be set before moving to switchdev. > With this in mind, defaults are applied per device in the left-to-right > order in which they appear on the command line. > >The intent is to let deployments set devlink defaults before normal >userspace orchestration runs, while still using devlink concepts and
"defaults before normal userspace orchestrarion". I read it as config before config, which eventually could be skipped.
>driver callbacks rather than adding driver-specific module parameters. >A default is scoped to one or more devlink handles, for example: > > devlink=[pci/0000:08:00.0]:esw:mode:switchdev > devlink=[pci/0000:08:00.0]:param:flow_steering_mode:smfs > devlink=[pci/0000:08:00.0,pci/0000:08:00.1]:param:flow_steering_mode:hmfs,[pci/0000:08:00.0,pci/0000:08:00.1]:esw:mode:switchdev
I don't like this. What you do, you are basically introducing user configuration tool on kernel cmdline.
The same you would achieve with a proper userspace tool/daemon. I did try to come up with it and push it here: https://github.com/systemd/systemd/pull/37393 That didn't get merged for unknown reason, but the idea is sound. You provide configuration files for devlink object and systemd-devlinkd will apply when they appear. Wouldn't this help your case?
[..]
|  |