From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
edumazet@google.com, pabeni@redhat.com, jiri@resnulli.us,
sdf@google.com
Subject: Re: [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages
Date: Mon, 22 Apr 2024 13:08:20 +0100 [thread overview]
Message-ID: <m21q6xha6j.fsf@gmail.com> (raw)
In-Reply-To: <20240420020827.3288615-1-kuba@kernel.org> (Jakub Kicinski's message of "Fri, 19 Apr 2024 19:08:26 -0700")
Jakub Kicinski <kuba@kernel.org> writes:
> NLMSG_DONE contains an error code, it has to be extracted.
> Prior to this change all dumps will end in success,
> and in case of failure the result is silently truncated.
>
> Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
> ---
> CC: donald.hunter@gmail.com
> CC: jiri@resnulli.us
> CC: sdf@google.com
> ---
> tools/net/ynl/lib/ynl.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
> index a67f7b6fef92..a9e4d588baf6 100644
> --- a/tools/net/ynl/lib/ynl.py
> +++ b/tools/net/ynl/lib/ynl.py
> @@ -203,6 +203,7 @@ from .nlspec import SpecFamily
> self.done = 1
> extack_off = 20
> elif self.nl_type == Netlink.NLMSG_DONE:
> + self.error = struct.unpack("i", self.raw[0:4])[0]
> self.done = 1
> extack_off = 4
next prev parent reply other threads:[~2024-04-22 12:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 2:08 [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages Jakub Kicinski
2024-04-22 12:08 ` Donald Hunter [this message]
2024-04-23 13:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m21q6xha6j.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).