From: Johannes Berg <johannes@sipsolutions.net>
To: Rosen Penev <rosenp@gmail.com>, linux-wireless@vger.kernel.org
Cc: open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH wireless-next] wifi: mac80211: fold tid_ampdu_rx allocations into a flexible array
Date: Thu, 04 Jun 2026 14:20:25 +0200 [thread overview]
Message-ID: <64823ef6ba20312cf81eae281740873f5ae6e6f5.camel@sipsolutions.net> (raw)
In-Reply-To: <20260604001427.16466-1-rosenp@gmail.com>
On Wed, 2026-06-03 at 17:14 -0700, Rosen Penev wrote:
> Convert the separately-allocated reorder_buf pointer to a C99 flexible
> array member at the end of struct tid_ampdu_rx, and place reorder_time
> in the same allocation immediately after it. This collapses three
> allocations into one and removes the corresponding kfree() pairs from
> the error and free paths.
As I pointed out before, I'm not a huge fan of these "doing a minor
improvement for the sake of it" contributions ...
> @@ -241,7 +241,6 @@ struct tid_ampdu_rx {
> struct rcu_head rcu_head;
> spinlock_t reorder_lock;
> u64 reorder_buf_filtered;
> - struct sk_buff_head *reorder_buf;
> unsigned long *reorder_time;
> struct sta_info *sta;
> struct timer_list session_timer;
> @@ -256,6 +255,7 @@ struct tid_ampdu_rx {
> u8 auto_seq:1,
> removed:1,
> started:1;
> + struct sk_buff_head reorder_buf[];
Given that sizeof(unsigned long) == sizeof(void *), that would probably
be far simpler as
struct {
struct sk_buf_head buf;
unsigned long time;
} reorder[];
or so.
johannes
next prev parent reply other threads:[~2026-06-04 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 0:14 Rosen Penev
2026-06-04 12:20 ` Johannes Berg [this message]
2026-06-05 0:47 ` Rosen Penev
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=64823ef6ba20312cf81eae281740873f5ae6e6f5.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rosenp@gmail.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
all inboxes | Powered by JetHome®