Re: [PATCH v4 1/4] wifi: ath11k: use queue mapping for WCN6750 ring selection
Tamizh Raja <[email protected]> Fri, 24 Jul 2026 14:34:41 +0530
| Newsgroups | org.infradead.lists.ath11k,org.infradead.lists.ath12k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <CABkEBKaZOEh4OrZTYfFOj8QZHY8Ruxn2rcXL-axWHwK4o6MECA@mail.gmail.com> |
On Fri, Jul 24, 2026 at 11:01=E2=80=AFAM Jose Ignacio Tornos Martinez <[email protected]> wrote: > > 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=3D0, VI=3D1, BE=3D2, BK=3D3), the > mapping becomes: VO and BK share ring 0, VI uses ring 1, and BE > uses ring 2. Combining VO and BK is fine? since VO is a high priority. @baochen any thought on this? > > 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 <[email protected]> > --- > v4: new patch > > 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(s= truct 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 sched= uled > - * on multiple CPUs, there is a chance that packets of the same f= low > - * 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 =3D { > -- > 2.54.0 > > --=20 - Tamizh.