From: Jakub Kicinski <kuba@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: traceability of wifi packet drops
Date: Wed, 29 Mar 2023 12:09:59 -0700 [thread overview]
Message-ID: <20230329120959.5f9eef1c@kernel.org> (raw)
In-Reply-To: <37311ab0f31d719a65858de31cec7a840cf8fe40.camel@sipsolutions.net>
On Wed, 29 Mar 2023 20:57:26 +0200 Johannes Berg wrote:
> On Wed, 2023-03-29 at 11:02 -0700, Jakub Kicinski wrote:
> > But it's just a thought, all of the approaches seem acceptable.
>
> I _think_ I like the one I prototyped this morning better, I'm not sure
> I like the subsystem == existing reason part _that_ much. It ultimately
> doesn't matter much, it just feels odd that you'd be allowed to have a,
> I don't know picking a random example, SKB_DROP_REASON_DUP_FRAG with a
> fine-grained higher bits value?
>
> Not that we'll ever be starved for space ...
Ack, for most drop_reasons having higher order bits would make no sense.
> > Quick code change perhaps illustrates it best:
> >
>
> Yeah, that ends up really looking very similar :-)
>
> Then again thinking about the implementation, we'd not be able to use a
> simple array for the sub-reasons, or at least that'd waste a bunch of
> space, since there are already quite a few 'main' reasons and we'd
> want/need to add the mac80211 ones (with sub-reason) at the end. So that
> makes a big array for the sub-reasons that's very sparsely populated (*)
> Extending with a high 'subsystem' like I did this morning is more
> compact here.
>
> (*) or put the sub-reasons pointer/num with the 'main' reasons into the
> drop_reasons[] array but that would take the same additional space
Yup, the only difference is that the collector side is simpler if the
subsystem is a valid drop reason. For those who don't expect to care
about subsystem drop details the aggregate stats are still (bpftrace
notation):
@stats[reason & 0xffff] = count();
With the higher bits we have to add a layer of stats to the collection?
$grp = reason >> 24;
if ($grp != 0)
@groups[$grp] = count();
else
@stats[reason] = count();
That said, I'm probably over-thinking because most will do:
@stats[reason] = count();
... which works the same regardless.
> So ... which one do _you_ like better? I think I somewhat prefer the one
> with adding a high bits subsystem, but I can relatively easily rejigger
> my changes from this morning to implement the semantics you had here
> too.
No preference. You're coding it up so you're in the best position
to pick :)
prev parent reply other threads:[~2023-03-29 19:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 14:19 traceability of wifi packet drops Johannes Berg
2023-03-27 14:31 ` Johannes Berg
2023-03-28 1:09 ` Jakub Kicinski
2023-03-28 2:27 ` Dave Taht
2023-03-28 7:37 ` Johannes Berg
2023-03-28 8:16 ` Eric Dumazet
2023-03-28 8:18 ` Johannes Berg
2023-03-28 22:58 ` Jakub Kicinski
2023-03-29 8:35 ` Johannes Berg
2023-03-29 18:02 ` Jakub Kicinski
2023-03-29 18:57 ` Johannes Berg
2023-03-29 19:09 ` Jakub Kicinski [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=20230329120959.5f9eef1c@kernel.org \
--to=kuba@kernel.org \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).