All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] devlink: Fix error reporting
@ 2018-02-28  9:24 Arkadi Sharshevsky
  2018-03-01  0:11 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Arkadi Sharshevsky @ 2018-02-28  9:24 UTC (permalink / raw)
  To: netdev; +Cc: davem, stephen, dsa, mlxsw, Arkadi Sharshevsky

The current code doesn't set errno in case of extended ack.

Fixes: 049c58539f5d ("devlink: mnlg: Add support for extended ack")
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
---
 devlink/mnlg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/devlink/mnlg.c b/devlink/mnlg.c
index 37c5687..3d28453 100644
--- a/devlink/mnlg.c
+++ b/devlink/mnlg.c
@@ -71,15 +71,15 @@ static int mnlg_cb_error(const struct nlmsghdr *nlh, void *data)
 {
 	const struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh);
 
-	if (nl_dump_ext_ack(nlh, NULL))
-		return MNL_CB_STOP;
-
 	/* Netlink subsystems returns the errno value with different signess */
 	if (err->error < 0)
 		errno = -err->error;
 	else
 		errno = err->error;
 
+	if (nl_dump_ext_ack(nlh, NULL))
+		return MNL_CB_ERROR;
+
 	return err->error == 0 ? MNL_CB_STOP : MNL_CB_ERROR;
 }
 
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2] devlink: Fix error reporting
  2018-02-28  9:24 [PATCH iproute2] devlink: Fix error reporting Arkadi Sharshevsky
@ 2018-03-01  0:11 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-03-01  0:11 UTC (permalink / raw)
  To: Arkadi Sharshevsky; +Cc: netdev, davem, dsa, mlxsw

On Wed, 28 Feb 2018 11:24:22 +0200
Arkadi Sharshevsky <arkadis@mellanox.com> wrote:

> The current code doesn't set errno in case of extended ack.
> 
> Fixes: 049c58539f5d ("devlink: mnlg: Add support for extended ack")
> Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-01  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28  9:24 [PATCH iproute2] devlink: Fix error reporting Arkadi Sharshevsky
2018-03-01  0:11 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.