From: Stanislav Fomichev <stfomichev@gmail.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jan Stancek <jstancek@redhat.com>,
Stanislav Fomichev <sdf@fomichev.me>
Subject: Re: [PATCH net] tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing
Date: Thu, 8 May 2025 09:13:49 -0700 [thread overview]
Message-ID: <aBzYPU32tTu8_hXk@mini-arch> (raw)
In-Reply-To: <20250508035414.82974-1-liuhangbin@gmail.com>
On 05/08, Hangbin Liu wrote:
> Fix a crash in the ethtool YNL implementation when Hardware Clock information
> is not present in the response. This ensures graceful handling of devices or
> drivers that do not provide this optional field. e.g.
>
> Traceback (most recent call last):
> File "/net/tools/net/ynl/pyynl/./ethtool.py", line 438, in <module>
> main()
> ~~~~^^
> File "/net/tools/net/ynl/pyynl/./ethtool.py", line 341, in main
> print(f'PTP Hardware Clock: {tsinfo["phc-index"]}')
> ~~~~~~^^^^^^^^^^^^^
> KeyError: 'phc-index'
>
> Fixes: f3d07b02b2b8 ("tools: ynl: ethtool testing tool")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
next prev parent reply other threads:[~2025-05-08 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 3:54 [PATCH net] tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing Hangbin Liu
2025-05-08 16:13 ` Stanislav Fomichev [this message]
2025-05-09 23:30 ` 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=aBzYPU32tTu8_hXk@mini-arch \
--to=stfomichev@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jstancek@redhat.com \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/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).