Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6208909ybv; Tue, 18 Feb 2020 12:04:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwTz9UwxJoNl4g+X/cAPKyyVbNXgiOEvOL1wLOOAtUDXhSRwX3AaZRiPsKq58hOr7vKaE1i X-Received: by 2002:a9d:6c8d:: with SMTP id c13mr17328758otr.277.1582056250261; Tue, 18 Feb 2020 12:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582056250; cv=none; d=google.com; s=arc-20160816; b=KJfSwwxq0lVD8v9J0thesK140lUdQJ/G77hl85h3gIGiubL45UhLlWv9voYonfzn5/ Mj/vBKHxE3DL3JZQ+JYdR9onCyzSZjTEjTEp4NXavOfFJu8cRkZ9lXgAwqTmi8DWVm44 G5lGULHR4thzoJTUucDT784WGkr6Uscjaqn8Nh60xHI5FZNc67zJkZtN4oONj14AWe6q a8MkMbwAWXabbgtwXcIkjJXETekhIV6KAVe9x5pi9SpQ0RQ/R971Tne6luf1KRQTpS/K XYMBBtM7O/p2Z2KdU+3yq18UuTJxJhjaRTFCVs+sEV6OdMbjIKm2dCEORQ4WC67SJLaJ MMAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L6MSh7X+08EyRo0prwKY5mcx+/lcEX1xflMrXUzRhA8=; b=aBKHqsfJgCGOgz1p9fnpEnbvJwzp6i/Z6AkAWkAOFMCXz3903JJ22Y13F9CqLb18jE DnvKAXz+cQBLJP0ioAK+CLH/3K/UYfWGMIHWC4VyI59DP6C41vuaBmoZyamYxZNMW+E+ GAQ2PQZ3usWb9v9lihlbK7mmB39qcdKN+o2GzI+5XpnmHnflbB+rm2wpGX2Yg+j4/CVy rulKPgRCt9mQ5fF1b8ugKVmQ47QKZtKdDTzg9+fp2neSyL/fuVocJJpgB9X0ReOQoMh0 1KwnDIfayR/NIRfVuUTVA3VaFYmi52qt1oFiM4vAEA8qXQF0+uSovuo0IpzdsdZqgjIl rJcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SSUEIdEs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si8930126oih.172.2020.02.18.12.03.58; Tue, 18 Feb 2020 12:04:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SSUEIdEs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729019AbgBRUCx (ORCPT + 99 others); Tue, 18 Feb 2020 15:02:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:43614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728273AbgBRUCu (ORCPT ); Tue, 18 Feb 2020 15:02:50 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C2A421D56; Tue, 18 Feb 2020 20:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582056169; bh=6M0+NYh2dsJFvJERXW7FFln+BxQTlcXI9TLiM82kJmU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SSUEIdEsK53W0v5WVGIWU2T7VF3BwOajNcqD6cno4SIUKUYwXhqNacIjBTDTXApET 9ATqs50yTd1/RGCLcN53x+4Dfsr+jQoyTa72UQHOhPQFpyaqxAgt8F89S5NaEh19W8 YJZs0h+szVHobZ/d0yJx/G2iTuft1hvGgBHEzk0E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Subject: [PATCH 5.5 61/80] mac80211: use more bits for ack_frame_id Date: Tue, 18 Feb 2020 20:55:22 +0100 Message-Id: <20200218190437.913785931@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200218190432.043414522@linuxfoundation.org> References: <20200218190432.043414522@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg commit f2b18baca9539c6a3116d48b70972c7a2ba5d766 upstream. 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: 6912daed05e1 ("mac80211: Shrink the size of ack_frame_id to make room for tx_time_est") Signed-off-by: Johannes Berg Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200115122549.b9a4ef9f4980.Ied52ed90150220b83a280009c590b65d125d087c@changeid Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- include/net/mac80211.h | 11 +++++------ net/mac80211/cfg.c | 2 +- net/mac80211/tx.c | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1004,12 +1004,11 @@ ieee80211_rate_get_vht_nss(const struct struct ieee80211_tx_info { /* common information */ u32 flags; - u8 band; - - u8 hw_queue; - - u16 ack_frame_id:6; - u16 tx_time_est:10; + u32 band:3, + ack_frame_id:13, + hw_queue:4, + tx_time_est:10; + /* 2 free bits */ union { struct { --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3450,7 +3450,7 @@ int ieee80211_attach_ack_skb(struct ieee spin_lock_irqsave(&local->ack_status_lock, spin_flags); id = idr_alloc(&local->ack_status_frames, ack_skb, - 1, 0x40, GFP_ATOMIC); + 1, 0x2000, GFP_ATOMIC); spin_unlock_irqrestore(&local->ack_status_lock, spin_flags); if (id < 0) { --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2442,7 +2442,7 @@ static int ieee80211_store_ack_skb(struc spin_lock_irqsave(&local->ack_status_lock, flags); id = idr_alloc(&local->ack_status_frames, ack_skb, - 1, 0x40, GFP_ATOMIC); + 1, 0x2000, GFP_ATOMIC); spin_unlock_irqrestore(&local->ack_status_lock, flags); if (id >= 0) {