From: Stephen Hemminger <stephen@networkplumber.org>
To: Alexander Zubkov <green@qrator.net>
Cc: netdev@vger.kernel.org, Petr Machata <me@pmachata.org>,
Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH iproute2 v3 2/2] ip: ipstats: Do not hide HW statistics when hw_stats_info is missing
Date: Mon, 21 Sep 2026 11:22:01 -0700 [thread overview]
Message-ID: <20260921112201.28213661@phoenix.local> (raw)
In-Reply-To: <20260910092057.3980-3-green@qrator.net>
On Thu, 10 Sep 2026 11:20:57 +0200
Alexander Zubkov <green@qrator.net> wrote:
> ipstats_show_hw_stats() returns as soon as IFLA_OFFLOAD_XSTATS_HW_S_INFO
> is absent, dropping the counters that the message does carry.
> __ipstats_show_hw_stats() already copes with a NULL info attribute, so
> let it, and skip the record only when neither attribute is present.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Alexander Zubkov <green@qrator.net>
> ---
Ok to check for bugs, but this is not that much of a problem.
After patch 1 this is unreachable with a sane kernel.
rtnl_offload_xstats_fill() emits HW_S_INFO unconditionally whenever
its filter bit is set, and ipstats packs that bit together with
L3_STATS. The only way to get L3_STATS without HW_S_INFO is the
resumed message with prividx at L3_STATS, which patch 1 now merges.
GET is not NLM_F_MULTI so it cannot split, the monitor notification
carries HW_S_INFO only, and both attributes landed in the same kernel
series, so there is no version skew either.
The commit message still describes the v1 symptom. It is not dropping
any counters once patch 1 is in. If you want to keep it, reword it as
a consistency cleanup: __ipstats_show_hw_stats() already tolerates a
NULL at_hwsi, the wrapper does not. Otherwise drop it. Not going to
add a validator higher up for a message the kernel never sends.
prev parent reply other threads:[~2026-09-21 18:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 9:20 [PATCH iproute2 v3 0/2] ip: ipstats: Fix statistics split across netlink messages Alexander Zubkov
2026-09-10 9:20 ` [PATCH iproute2 v3 1/2] ip: ipstats: Merge statistics split across several " Alexander Zubkov
2026-09-21 18:23 ` Stephen Hemminger
2026-09-10 9:20 ` [PATCH iproute2 v3 2/2] ip: ipstats: Do not hide HW statistics when hw_stats_info is missing Alexander Zubkov
2026-09-21 18:22 ` Stephen Hemminger [this message]
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=20260921112201.28213661@phoenix.local \
--to=stephen@networkplumber.org \
--cc=green@qrator.net \
--cc=idosch@nvidia.com \
--cc=me@pmachata.org \
--cc=netdev@vger.kernel.org \
/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