From: Stephen Hemminger <stephen@networkplumber.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 4/5] net/sched: netem: add per-impairment extended statistics
Date: Fri, 10 Apr 2026 22:08:52 -0700 [thread overview]
Message-ID: <20260410220852.1fabffc0@phoenix.local> (raw)
In-Reply-To: <36e86b68-f7d9-4455-a0b5-613f717e670a@redhat.com>
On Thu, 9 Apr 2026 11:30:00 +0200
Paolo Abeni <pabeni@redhat.com> wrote:
> On 4/4/26 12:52 AM, Stephen Hemminger wrote:
> > diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
> > index 66e8072f44df..fada10cb9b7b 100644
> > --- a/include/uapi/linux/pkt_sched.h
> > +++ b/include/uapi/linux/pkt_sched.h
> > @@ -569,6 +569,15 @@ struct tc_netem_gemodel {
> > #define NETEM_DIST_SCALE 8192
> > #define NETEM_DIST_MAX 16384
> >
> > +struct tc_netem_xstats {
> > + __u32 delayed; /* packets delayed */
> > + __u32 dropped; /* packets dropped by loss model */
> > + __u32 corrupted; /* packets with bit errors injected */
> > + __u32 duplicated; /* duplicate packets generated */
> > + __u32 reordered; /* packets sent out of order */
> > + __u32 ecn_marked; /* packets ECN CE-marked (not dropped)*/
> > +};
>
> Sashiko notes that the counters size will be set in stone by the uAPI,
> and u32 can wraparound very quickly (especially for unconditional delay).
>
> I see other qdiscs generally use __u32, but some have __u64 too, so I
> assume there are no architectural blocker to larger counter.
>
> Could you please move use __u64 above?
>
> Thanks,
>
> Paolo
>
Sure larger counters are fine, mostly just following the herd.
I assume don't need to need about 32 bit tearing when reading these?
next prev parent reply other threads:[~2026-04-11 5:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 22:52 [PATCH net-next 0/5] net/sched: netem: cleanups and improvements Stephen Hemminger
2026-04-03 22:52 ` [PATCH net-next 1/5] net/sched: netem: replace pr_info with netlink extack error messages Stephen Hemminger
2026-04-03 22:52 ` [PATCH net-next 2/5] net/sched: netem: remove unused loss model fields Stephen Hemminger
2026-04-03 22:52 ` [PATCH net-next 3/5] net/sched: netem: remove useless VERSION Stephen Hemminger
2026-04-03 22:52 ` [PATCH net-next 4/5] net/sched: netem: add per-impairment extended statistics Stephen Hemminger
2026-04-09 9:30 ` Paolo Abeni
2026-04-11 5:08 ` Stephen Hemminger [this message]
2026-04-03 22:52 ` [PATCH net-next 5/5] net/sched: netem: handle multi-segment skb in corruption Stephen Hemminger
2026-04-08 17:10 ` [PATCH net-next 0/5] net/sched: netem: cleanups and improvements Simon Horman
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=20260410220852.1fabffc0@phoenix.local \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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