Re: [PATCH net-next] netdevsim: Register and unregister devlink traps on probe/remove device

Jakub Kicinski
2021-10-25T18:24:58Z

On Mon, 25 Oct 2021 11:08:00 +0300 Ido Schimmel wrote:
> No, it's not correct. After your patch, trap properties like action are
> not set back to the default. Regardless of what you think is the "right
> design", you cannot introduce such regressions.
>
> Calling devlink_*_unregister() in reload_down() and devlink_*_register()
> in reload_up() is not new. It is done for multiple objects (e.g., ports,
> regions, shared buffer, etc). After your patch, netdevsim is still doing
> it.

If we want to push forward in the direction that Leon advocates we'd
have to unregister the devlink instance before reload_down(), right?

Otherwise it seems fundamentally incompatible with the idea of reload
for reconfig. And we'd be trading one partially correct model for
another partially correct model :/

> Again, please revert the two commits I mentioned. If you think they are
> necessary, you can re-submit them in the future, after proper review and
> testing of the affected code paths.