devlink: Add support for get/set driverinit value
"driverinit" configuration mode value is held by devlink to enable the driver query the value after reload. Two additional functions added to help the driver get/set the value from/to devlink: devlink_param_driverinit_value_set() and devlink_param_driverinit_value_get(). Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e3b7ca18ad
commit
ec01aeb180
@@ -503,6 +503,10 @@ int devlink_params_register(struct devlink *devlink,
|
||||
void devlink_params_unregister(struct devlink *devlink,
|
||||
const struct devlink_param *params,
|
||||
size_t params_count);
|
||||
int devlink_param_driverinit_value_get(struct devlink *devlink, u32 param_id,
|
||||
union devlink_param_value *init_val);
|
||||
int devlink_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
|
||||
union devlink_param_value init_val);
|
||||
|
||||
#else
|
||||
|
||||
@@ -711,6 +715,20 @@ devlink_params_unregister(struct devlink *devlink,
|
||||
|
||||
}
|
||||
|
||||
static inline int
|
||||
devlink_param_driverinit_value_get(struct devlink *devlink, u32 param_id,
|
||||
union devlink_param_value *init_val)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int
|
||||
devlink_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
|
||||
union devlink_param_value init_val)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _NET_DEVLINK_H_ */
|
||||
|
||||
Reference in New Issue
Block a user