diff options
author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2019-01-28 18:00:24 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-29 22:13:09 -0800 |
commit | 5473a7bdad78f2efe8ee508e8c7bbb762896e78f (patch) | |
tree | 1213aa1ddbf38d9565f10fa5c150b50f75872cfd /include/net/devlink.h | |
parent | ffd19b9a490a6b022b58bada054ee130fff06a1c (diff) | |
download | linux-stable-5473a7bdad78f2efe8ee508e8c7bbb762896e78f.tar.gz linux-stable-5473a7bdad78f2efe8ee508e8c7bbb762896e78f.tar.bz2 linux-stable-5473a7bdad78f2efe8ee508e8c7bbb762896e78f.zip |
devlink: Add support for driverinit set value for devlink_port
Add support for "driverinit" configuration mode value for devlink_port
configuration parameters. Add devlink_port_param_driverinit_value_set()
function to help the driver set the value to devlink_port.
Also, move the common code to __devlink_param_driverinit_value_set()
to be used by both device and port params.
v7->v8:
Re-order the definitions as follows:
__devlink_param_driverinit_value_get
__devlink_param_driverinit_value_set
devlink_param_driverinit_value_get
devlink_param_driverinit_value_set
devlink_port_param_driverinit_value_get
devlink_port_param_driverinit_value_set
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 3943072d3552..ae2ccf297946 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -582,6 +582,9 @@ int devlink_port_param_driverinit_value_get(struct devlink_port *devlink_port, u32 param_id, union devlink_param_value *init_val); +int devlink_port_param_driverinit_value_set(struct devlink_port *devlink_port, + u32 param_id, + union devlink_param_value init_val); void devlink_param_value_changed(struct devlink *devlink, u32 param_id); void devlink_param_value_str_fill(union devlink_param_value *dst_val, const char *src); @@ -839,6 +842,14 @@ devlink_port_param_driverinit_value_get(struct devlink_port *devlink_port, return -EOPNOTSUPP; } +static inline int +devlink_port_param_driverinit_value_set(struct devlink_port *devlink_port, + u32 param_id, + union devlink_param_value init_val) +{ + return -EOPNOTSUPP; +} + static inline void devlink_param_value_changed(struct devlink *devlink, u32 param_id) { |