From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22C8CC5AC80 for ; Fri, 7 Aug 2026 10:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:content-type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2uks6hn8TsE/jS0Ca5ryK/ZPaWu5PXeRNJN2WD99sMs=; b=Tu2mMiu7R8E7jNXYN02fAzC3hm SudgBVKQDaFtX5oqxFB4SRuvA4NzzrGulHvmEfHXJ3DwhdJYgy4paTO8/NEnyCxmP5I5V+nA65uka RRGFZFBpaRl0HCJKq3xzigcrI1BlB11zYgPgaSMW2lZOm4nUxAjSFS00Y2hQ5g+AshedUv5xR0MZW LyBwx5HoyrZ6JPNkjMZn3L4eHrGMhR1RQhoM5eMTFKQt9ZEdgcYN75+KU30WMS6prHjoCeD4GPr4J rBHZdUcE9y2k6Ptn4QM8qD+ekYB7cVkITS/AfxFeSIlfTnoIVB9MYs3K5tDXGXuetAygU3YTE9Hfo FRt7VhfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsII5-00000007mRc-3Hdg; Fri, 07 Aug 2026 10:59:05 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsII3-00000007mPM-3YAq for ath11k@lists.infradead.org; Fri, 07 Aug 2026 10:59:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786100341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2uks6hn8TsE/jS0Ca5ryK/ZPaWu5PXeRNJN2WD99sMs=; b=T51nFpqDwrcEVpgcah/rOG84Ai9vd6zd8/At7A75GUchezWAUSTvnyqtQgXSd5rZvqKpHO nOkLDxEfCNiv63/sFstlpRDenj7OlLxiWtc9perBR3cXb46DJlirIbNSINmGxROMHiVpWu 74UhXbA/m/XHndP1glhVCdb5Snhrvv8= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-380-J2S9uKdlOKGXCG6x2-Iq5g-1; Fri, 07 Aug 2026 06:58:59 -0400 X-MC-Unique: J2S9uKdlOKGXCG6x2-Iq5g-1 X-Mimecast-MFC-AGG-ID: J2S9uKdlOKGXCG6x2-Iq5g_1786100338 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C64961956080; Fri, 7 Aug 2026 10:58:57 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.44.48.52]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 96E32180049F; Fri, 7 Aug 2026 10:58:55 +0000 (UTC) From: Jose Ignacio Tornos Martinez To: jjohnson@kernel.org Cc: ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Jose Ignacio Tornos Martinez Subject: [PATCH v5 1/4] wifi: ath11k: use queue mapping for WCN6750 ring selection Date: Fri, 7 Aug 2026 12:58:40 +0200 Message-ID: <20260807105843.20203-2-jtornosm@redhat.com> In-Reply-To: <20260807105843.20203-1-jtornosm@redhat.com> References: <20260807105843.20203-1-jtornosm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-MFC-PROC-ID: B6iVNTsbhZSgq-9KLmA_QuDrvqIjROuwHh7A7ZaoZ0E_1786100338 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260807_035903_966620_78A02A29 X-CRM114-Status: GOOD ( 14.13 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath11k" Errors-To: ath11k-bounces+ath11k=archiver.kernel.org@lists.infradead.org WCN6750 selects the TCL ring using skb_get_hash() to distribute flows across its 3 TX rings, as introduced in commit 7636c9a6e7d7 ("wifi: ath11k: Add multi TX ring support for WCN6750"). The goal was to prevent out-of-order packet delivery that could occur with smp_processor_id()-based selection, where packets of the same flow could end up on different rings depending on CPU scheduling. Switch to skb_get_queue_mapping() instead, which returns the AC (access category) assigned by mac80211 in ieee80211_select_queue(). This provides the same ordering guarantee: packets of the same TID always map to the same AC and therefore always land on the same ring, preventing reordering. Using queue mapping for ring selection also provides QoS-aware distribution, where each traffic class gets a deterministic ring assignment, rather than the random distribution that flow hashing produces. With 3 rings and 4 ACs (VO=0, VI=1, BE=2, BK=3), the mapping becomes: VO and BK share ring 0, VI uses ring 1, and BE uses ring 2. This matches the approach already used by ath12k for WCN7850, which has the same ring count and uses skb_get_queue_mapping() for its ring selector. This change also removes the dependency on skb_get_hash(), which is relevant for a subsequent patch that removes the skb parameter from the get_ring_selector hw_ops callback entirely, enabling TX flow control in wake_tx_queue without requiring a complex peek to inspect frames before dequeue. Signed-off-by: Jose Ignacio Tornos Martinez --- v5: no modification v4: https://lore.kernel.org/all/20260724053121.15759-2-jtornosm@redhat.com/ drivers/net/wireless/ath/ath11k/hw.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c index 93f9a03c48dc..d679e39dce03 100644 --- a/drivers/net/wireless/ath/ath11k/hw.c +++ b/drivers/net/wireless/ath/ath11k/hw.c @@ -891,13 +891,7 @@ static u32 ath11k_hw_ipq8074_get_tcl_ring_selector(struct sk_buff *skb) static u32 ath11k_hw_wcn6750_get_tcl_ring_selector(struct sk_buff *skb) { - /* Select the TCL ring based on the flow hash of the SKB instead - * of CPU ID. Since applications pumping the traffic can be scheduled - * on multiple CPUs, there is a chance that packets of the same flow - * could end on different TCL rings, this could sometimes results in - * an out of order arrival of the packets at the receiver. - */ - return skb_get_hash(skb); + return skb_get_queue_mapping(skb); } const struct ath11k_hw_ops ipq8074_ops = { -- 2.54.0