Messages in this thread | | | Subject | Re: [PATCH net-next RFC 01/13] devlink: Add reload level option to devlink reload command | From | Moshe Shemesh <> | Date | Thu, 30 Jul 2020 15:30:45 +0300 |
| |
On 7/30/2020 12:07 AM, Jakub Kicinski wrote: > On Wed, 29 Jul 2020 17:54:08 +0300 Moshe Shemesh wrote: >> On 7/28/2020 11:06 PM, Jakub Kicinski wrote: >>> On Tue, 28 Jul 2020 12:18:30 -0700 Jacob Keller wrote: >>>> On 7/28/2020 11:44 AM, Jakub Kicinski wrote: >>>>> From user perspective what's important is what the reset achieves (and >>>>> perhaps how destructive it is). We can define the reset levels as: >>>>> >>>>> $ devlink dev reload pci/0000:82:00.0 net-ns-respawn >>>>> $ devlink dev reload pci/0000:82:00.0 driver-param-init >>>>> $ devlink dev reload pci/0000:82:00.0 fw-activate >>>>> >>>>> combining should be possible when user wants multiple things to happen: >>>>> >>>>> $ devlink dev reload pci/0000:82:00.0 fw-activate driver-param-init >>>> Where today "driver-param-init" is the default behavior. But didn't we >>>> just say that mlxsw also does the equivalent of fw-activate? >>> Actually the default should probably be the combination of >>> driver-param-init and net-ns-respawn. >> What about the support of these combinations, one device needs to reset >> fw to apply the param init, while another device can apply param-init >> without fw reset, but has to reload the driver for fw-reset. >> >> So the support per driver will be a matrix of combinations ? > Note that there is no driver reload in my examples, driver reload is > likely not user's goal. Whatever the driver needs to reset to satisfy > the goal is fair game IMO.
Actually, driver-param-init (cmode driverinit) implicit driver re-initialization.
> It's already the case that some drivers reset FW for param init and some > don't and nobody is complaining.
Right, driver may need more than driver re-initialization for driver-param-init, but I think that driver re-initialization is the minimum for driver-param-init.
> We should treat constraints separate (in this set we have the live > activation which is a constraint on the reload operation). > >>> My expectations would be that the driver must perform the lowest >>> reset level possible that satisfies the requested functional change. >>> IOW driver may do more, in fact it should be acceptable for the >>> driver to always for a full HW reset (unless --live or other >>> constraint is specified). >> OK, but some combinations may still not be valid for specific driver >> even if it tries lowest level possible. > Can you give an example?
For example take the combination of fw-live-patch and param-init.
The fw-live-patch needs no re-initialization, while the param-init requires driver re-initialization.
So the only way to do that is to the one command after the other, not really combining.
Other combination, as fw-atcivate and param-init may not be valid for a specific driver as it doesn't support one of them and so can't even run one after the other.
| |