[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220822170247.974743-3-jiri@resnulli.us>
Date: Mon, 22 Aug 2022 19:02:45 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, idosch@...dia.com,
pabeni@...hat.com, edumazet@...gle.com, saeedm@...dia.com,
jacob.e.keller@...el.com, vikas.gupta@...adcom.com,
gospo@...adcom.com
Subject: [patch net-next v2 2/4] netdevsim: add version fw.mgmt info info_get() and mark as a component
From: Jiri Pirko <jiri@...dia.com>
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: Jiri Pirko <jiri@...dia.com>
---
v1->v2:
- split from v1 patch "net: devlink: extend info_get() version put to
indicate a flash component", no code changes
---
drivers/net/netdevsim/dev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index e88f783c297e..97fc17ffff93 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -984,7 +984,14 @@ 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;
+
+ return devlink_info_version_running_put_ext(req, "fw.mgmt", "10.20.30",
+ DEVLINK_INFO_VERSION_TYPE_COMPONENT);
}
#define NSIM_DEV_FLASH_SIZE 500000
--
2.37.1
Powered by blists - more mailing lists