From: Johannes Berg <johannes@sipsolutions.net>
To: Jakub Kicinski <kuba@kernel.org>
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 20:57:26 +0200 [thread overview]
Message-ID: <37311ab0f31d719a65858de31cec7a840cf8fe40.camel@sipsolutions.net> (raw)
In-Reply-To: <20230329110205.1202eb60@kernel.org>
On Wed, 2023-03-29 at 11:02 -0700, Jakub Kicinski wrote:
>
> No, no what I was trying to say is that instead of using the upper bits
> to identify the space (with 0 being the current enum skb_drop_reason)
> we could use entries in enum skb_drop_reason. In hope that it'd make
> the fine grained subsystem reason seem more like additional information
> than a completely parallel system.
Ah! Looking at your code example ... right, so you'd see "mac80211 drop
unusable" or "mac80211 drop to monitor", and fine-grained in the higher
bits.
> 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 ...
> 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
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.
Anyone else have an opinion? :)
johannes
next prev parent reply other threads:[~2023-03-29 18:57 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 [this message]
2023-03-29 19:09 ` Jakub Kicinski
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=37311ab0f31d719a65858de31cec7a840cf8fe40.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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).