Skip to content

Commit f2b18ba

Browse files
committed
mac80211: use more bits for ack_frame_id
It turns out that this wasn't a good idea, I hit a test failure in hwsim due to this. That particular failure was easily worked around, but it raised questions: if an AP needs to, for example, send action frames to each connected station, the current limit is nowhere near enough (especially if those stations are sleeping and the frames are queued for a while.) Shuffle around some bits to make more room for ack_frame_id to allow up to 8192 queued up frames, that's enough for queueing 4 frames to each connected station, even at the maximum of 2007 stations on a single AP. We take the bits from band (which currently only 2 but I leave 3 in case we add another band) and from the hw_queue, which can only need 4 since it has a limit of 16 queues. Fixes: 6912dae ("mac80211: Shrink the size of ack_frame_id to make room for tx_time_est") Signed-off-by: Johannes Berg <[email protected]> Acked-by: Toke Høiland-Jørgensen <[email protected]> Link: https://lore.kernel.org/r/20200115122549.b9a4ef9f4980.Ied52ed90150220b83a280009c590b65d125d087c@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent df37370 commit f2b18ba

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

include/net/mac80211.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,12 +1004,11 @@ ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate)
10041004
struct ieee80211_tx_info {
10051005
/* common information */
10061006
u32 flags;
1007-
u8 band;
1008-
1009-
u8 hw_queue;
1010-
1011-
u16 ack_frame_id:6;
1012-
u16 tx_time_est:10;
1007+
u32 band:3,
1008+
ack_frame_id:13,
1009+
hw_queue:4,
1010+
tx_time_est:10;
1011+
/* 2 free bits */
10131012

10141013
union {
10151014
struct {

net/mac80211/cfg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3450,7 +3450,7 @@ int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
34503450

34513451
spin_lock_irqsave(&local->ack_status_lock, spin_flags);
34523452
id = idr_alloc(&local->ack_status_frames, ack_skb,
3453-
1, 0x40, GFP_ATOMIC);
3453+
1, 0x2000, GFP_ATOMIC);
34543454
spin_unlock_irqrestore(&local->ack_status_lock, spin_flags);
34553455

34563456
if (id < 0) {

net/mac80211/tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2442,7 +2442,7 @@ static int ieee80211_store_ack_skb(struct ieee80211_local *local,
24422442

24432443
spin_lock_irqsave(&local->ack_status_lock, flags);
24442444
id = idr_alloc(&local->ack_status_frames, ack_skb,
2445-
1, 0x40, GFP_ATOMIC);
2445+
1, 0x2000, GFP_ATOMIC);
24462446
spin_unlock_irqrestore(&local->ack_status_lock, flags);
24472447

24482448
if (id >= 0) {

0 commit comments

Comments
 (0)