Commit 0c198975 authored by Jiri Pirko's avatar Jiri Pirko Committed by Jakub Kicinski
Browse files

netdevsim: add version fw.mgmt info info_get() and mark as a component



Fix the only component user which is netdevsim. It uses component named
"fw.mgmt" in selftests. So add this version to info_get() output with
version type component.

Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bb670123
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -984,7 +984,17 @@ static int nsim_dev_info_get(struct devlink *devlink,
			     struct devlink_info_req *req,
			     struct netlink_ext_ack *extack)
{
	return devlink_info_driver_name_put(req, DRV_NAME);
	int err;

	err = devlink_info_driver_name_put(req, DRV_NAME);
	if (err)
		return err;
	err = devlink_info_version_stored_put_ext(req, "fw.mgmt", "10.20.30",
						  DEVLINK_INFO_VERSION_TYPE_COMPONENT);
	if (err)
		return err;
	return devlink_info_version_running_put_ext(req, "fw.mgmt", "10.20.30",
						    DEVLINK_INFO_VERSION_TYPE_COMPONENT);
}

#define NSIM_DEV_FLASH_SIZE 500000