[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220825080420.1282569-3-jiri@resnulli.us>
Date: Thu, 25 Aug 2022 10:04:20 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: sthemmin@...rosoft.com, dsahern@...il.com,
vikas.gupta@...adcom.com, jacob.e.keller@...el.com,
kuba@...nel.org, moshe@...dia.com, saeedm@...dia.com
Subject: [patch iproute2-next 2/2] devlink: fix parallel flash notifications processing
From: Jiri Pirko <jiri@...dia.com>
Now that it is possible to flash multiple devlink instances in parallel,
the notification processing callback needs to count in the fact that it
receives message that belongs to different devlink instance. So handle
the it gracefully and don't error out.
Reported-by: Vikas Gupta <vikas.gupta@...adcom.com>
Signed-off-by: Jiri Pirko <jiri@...dia.com>
---
devlink/devlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index b2439aef4d10..4f77e42f2d48 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -3812,12 +3812,12 @@ static int cmd_dev_flash_status_cb(const struct nlmsghdr *nlh, void *data)
mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
if (!tb[DEVLINK_ATTR_BUS_NAME] || !tb[DEVLINK_ATTR_DEV_NAME])
- return MNL_CB_ERROR;
+ return MNL_CB_STOP;
bus_name = mnl_attr_get_str(tb[DEVLINK_ATTR_BUS_NAME]);
dev_name = mnl_attr_get_str(tb[DEVLINK_ATTR_DEV_NAME]);
if (strcmp(bus_name, opts->bus_name) ||
strcmp(dev_name, opts->dev_name))
- return MNL_CB_ERROR;
+ return MNL_CB_STOP;
if (genl->cmd == DEVLINK_CMD_FLASH_UPDATE_END) {
pr_out("\n");
--
2.37.1
Powered by blists - more mailing lists