summaryrefslogtreecommitdiffstats
path: root/include/net/devlink.h
diff options
context:
space:
mode:
authorVasundhara Volam2019-01-28 13:30:25 +0100
committerDavid S. Miller2019-01-30 07:13:09 +0100
commitc1e5786d6771c67fe044c3bcaa23e631e0503261 (patch)
treedee489f045746e24f0abc96ef8d0f9703aa61685 /include/net/devlink.h
parentdevlink: Add support for driverinit set value for devlink_port (diff)
downloadkernel-qcow2-linux-c1e5786d6771c67fe044c3bcaa23e631e0503261.tar.gz
kernel-qcow2-linux-c1e5786d6771c67fe044c3bcaa23e631e0503261.tar.xz
kernel-qcow2-linux-c1e5786d6771c67fe044c3bcaa23e631e0503261.zip
devlink: Add devlink notifications support for port params
Add notification call for devlink port param set, register and unregister functions. Add devlink_port_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. v7->v8: Order devlink_port_param_value_changed() definitions followed by devlink_param_value_changed() 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index ae2ccf297946..ceb5e89d74d6 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -586,6 +586,8 @@ 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_port_param_value_changed(struct devlink_port *devlink_port,
+ u32 param_id);
void devlink_param_value_str_fill(union devlink_param_value *dst_val,
const char *src);
struct devlink_region *devlink_region_create(struct devlink *devlink,
@@ -856,6 +858,12 @@ devlink_param_value_changed(struct devlink *devlink, u32 param_id)
}
static inline void
+devlink_port_param_value_changed(struct devlink_port *devlink_port,
+ u32 param_id)
+{
+}
+
+static inline void
devlink_param_value_str_fill(union devlink_param_value *dst_val,
const char *src)
{