]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: Add devlink reload limit option
authorMoshe Shemesh <moshe@mellanox.com>
Wed, 7 Oct 2020 06:00:44 +0000 (09:00 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Oct 2020 19:06:52 +0000 (12:06 -0700)
commit25e9014a23a6a6965780939d3bf17b094c4103cf
treed90ecfdcffb0549c9a0b9df16c743f7b2cb0aeec
parentfeba97d940a83705b2273ff300486f5a5ae98f5e
devlink: Add devlink reload limit option

Add reload limit to demand restrictions on reload actions.
Reload limits supported:
no_reset: No reset allowed, no down time allowed, no link flap and no
          configuration is lost.

By default reload limit is unspecified and so no constraints on reload
actions are required.

Some combinations of action and limit are invalid. For example, driver
can not reinitialize its entities without any downtime.

The no_reset reload limit will have usecase in this patchset to
implement restricted fw_activate on mlx5.

Have the uapi parameter of reload limit ready for future support of
multiselection.

Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/netdevsim/dev.c
include/net/devlink.h
include/uapi/linux/devlink.h
net/core/devlink.c