diff options
author | Moshe Shemesh <moshe@mellanox.com> | 2018-07-04 14:30:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-05 19:58:35 +0900 |
commit | ea601e17098856ee059f35c2a75659e57df81f25 (patch) | |
tree | e284ad51c121344f1dbf3dde8ed7ca64841b3143 /include/net/devlink.h | |
parent | ec01aeb1803eaaf0d006e7b07b5ddb5e429c38a4 (diff) | |
download | linux-stable-ea601e17098856ee059f35c2a75659e57df81f25.tar.gz linux-stable-ea601e17098856ee059f35c2a75659e57df81f25.tar.bz2 linux-stable-ea601e17098856ee059f35c2a75659e57df81f25.zip |
devlink: Add devlink notifications support for params
Add devlink_param_notify() function to support devlink param notifications.
Add notification call to devlink param set, register and unregister
functions.
Add devlink_param_value_changed() function to enable the driver notify
devlink on value change. Driver should use this function after value was
changed on any configuration mode part to driverinit.
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>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 3302e43b09a4..792edaa996ba 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -507,6 +507,7 @@ 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); +void devlink_param_value_changed(struct devlink *devlink, u32 param_id); #else @@ -729,6 +730,12 @@ devlink_param_driverinit_value_set(struct devlink *devlink, u32 param_id, return -EOPNOTSUPP; } +static inline void +devlink_param_value_changed(struct devlink *devlink, u32 param_id) +{ + return -EOPNOTSUPP; +} + #endif #endif /* _NET_DEVLINK_H_ */ |