[iproute2-next] devlink: add 'reset_dev_on_drv_probe' devlink param
diff mbox series

Message ID 20190911130517.21986-1-simon.horman@netronome.com
State Accepted
Delegated to: David Ahern
Headers show
Series
  • [iproute2-next] devlink: add 'reset_dev_on_drv_probe' devlink param
Related show

Commit Message

Simon Horman Sept. 11, 2019, 1:05 p.m. UTC
From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>

Add support for the new devlink parameter along with string to uint
conversion.

Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
Depends on devlink.h changes present in net-next commit
5bbd21df5a07 ("devlink: add 'reset_dev_on_drv_probe' param")
---
 devlink/devlink.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

David Ahern Sept. 15, 2019, 5:50 p.m. UTC | #1
On 9/11/19 7:05 AM, Simon Horman wrote:
> From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
> 
> Add support for the new devlink parameter along with string to uint
> conversion.
> 
> Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
> Signed-off-by: Simon Horman <simon.horman@netronome.com>
> ---
> Depends on devlink.h changes present in net-next commit
> 5bbd21df5a07 ("devlink: add 'reset_dev_on_drv_probe' param")
> ---
>  devlink/devlink.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 

applied to iproute2-next. Thanks

Patch
diff mbox series

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 2f084c020765..15877a04f5d6 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -2253,6 +2253,26 @@  static const struct param_val_conv param_val_conv[] = {
 		.vstr = "flash",
 		.vuint = DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
 	},
+	{
+		.name = "reset_dev_on_drv_probe",
+		.vstr = "unknown",
+		.vuint = DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN,
+	},
+	{
+		.name = "reset_dev_on_drv_probe",
+		.vstr = "always",
+		.vuint = DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS,
+	},
+	{
+		.name = "reset_dev_on_drv_probe",
+		.vstr = "never",
+		.vuint = DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER,
+	},
+	{
+		.name = "reset_dev_on_drv_probe",
+		.vstr = "disk",
+		.vuint = DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK,
+	},
 };
 
 #define PARAM_VAL_CONV_LEN ARRAY_SIZE(param_val_conv)