diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-08-24 14:20:09 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-25 13:22:52 -0700 |
commit | bb67012331f7f07ff325877fbbb430bc515d371e (patch) | |
tree | 18e717d4be27604a81d7ef3b5cde162153869d95 /include/net/devlink.h | |
parent | 88e500affe72fb704c4f201974b5199ca6f51e6c (diff) | |
download | linux-stable-bb67012331f7f07ff325877fbbb430bc515d371e.tar.gz linux-stable-bb67012331f7f07ff325877fbbb430bc515d371e.tar.bz2 linux-stable-bb67012331f7f07ff325877fbbb430bc515d371e.zip |
net: devlink: extend info_get() version put to indicate a flash component
Whenever the driver is called by his info_get() op, it may put multiple
version names and values to the netlink message. Extend by additional
helper devlink_info_version_running/stored_put_ext() that allows to
specify a version type that indicates when particular version name
represents a flash component.
This is going to be used in follow-up patch calling info_get() during
flash update command checking if version with this the version type
exists.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 119ed1ffb988..f50a002e5023 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1714,15 +1714,31 @@ int devlink_info_driver_name_put(struct devlink_info_req *req, const char *name); int devlink_info_board_serial_number_put(struct devlink_info_req *req, const char *bsn); + +enum devlink_info_version_type { + DEVLINK_INFO_VERSION_TYPE_NONE, + DEVLINK_INFO_VERSION_TYPE_COMPONENT, /* May be used as flash update + * component by name. + */ +}; + int devlink_info_version_fixed_put(struct devlink_info_req *req, const char *version_name, const char *version_value); int devlink_info_version_stored_put(struct devlink_info_req *req, const char *version_name, const char *version_value); +int devlink_info_version_stored_put_ext(struct devlink_info_req *req, + const char *version_name, + const char *version_value, + enum devlink_info_version_type version_type); int devlink_info_version_running_put(struct devlink_info_req *req, const char *version_name, const char *version_value); +int devlink_info_version_running_put_ext(struct devlink_info_req *req, + const char *version_name, + const char *version_value, + enum devlink_info_version_type version_type); int devlink_fmsg_obj_nest_start(struct devlink_fmsg *fmsg); int devlink_fmsg_obj_nest_end(struct devlink_fmsg *fmsg); |