From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Ho Jie Feng <hjf3108@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH wireless-next v2 7/7] wifi: rt2x00usb: use a threaded NAPI with GRO for RX
Date: Thu, 5 Nov 2026 09:20:05 +0100 [thread overview]
Message-ID: <20261105082005.GG64923@wp.pl> (raw)
In-Reply-To: <20261031165117.2868671-8-hjf3108@gmail.com>
On Sun, Nov 01, 2026 at 12:51:14AM +0800, Ho Jie Feng wrote:
> GRO makes sense now that RX aggregation is enabled, since multiple
> frames arrive at once.
>
> This code is referenced from commit 5323d3e50c20
> ("wifi: mt76: mt76u: use a threaded NAPI for the RX path")
>
> Test results:
> before after
> TX 30.5 30.5
> RX 80.9 161.7
What is the explanation for this gain?
I tested on my devices and do not see RX performance gain.
I would expect some benefits, but I don't see any and wonder why.
Maybe on your setup CPU get saturated on single thread ?
Or maybe I'm not testing traffic that benefits from this?
> Signed-off-by: Ho Jie Feng <hjf3108@gmail.com>
> ---
> drivers/net/wireless/ralink/rt2x00/rt2x00.h | 7 ++-
> .../net/wireless/ralink/rt2x00/rt2x00dev.c | 6 ++-
> .../net/wireless/ralink/rt2x00/rt2x00usb.c | 49 ++++++++++++++++---
> 3 files changed, 52 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
> index 4c83168e9c169..25262b96c6941 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
> @@ -955,9 +955,14 @@ struct rt2x00_dev {
> /**
> * Scheduled work for TX/RX done handling (USB devices)
> */
> - struct work_struct rxdone_work;
> struct work_struct txdone_work;
>
> + /*
> + * NAPI context for RX done handling (USB devices).
> + */
> + struct net_device *napi_dev;
> + struct napi_struct napi;
> +
> /*
> * Powersaving work
> */
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> index 8f02b62cecdf6..6226bcbf24e5b 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
> @@ -847,7 +847,11 @@ static void rt2x00lib_rxdone_skb(struct queue_entry *entry)
> rx_status->bw = rxdesc.bw;
> rx_status->antenna = rt2x00dev->link.ant.active.rx;
>
> - ieee80211_rx_ni(rt2x00dev->hw, entry->skb);
> + if (rt2x00dev->napi_dev)
> + ieee80211_rx_napi(rt2x00dev->hw, NULL, entry->skb,
> + &rt2x00dev->napi);
The docs for ieee80211_rx_napi() states:
"Must not run concurrently with
ieee80211_tx_status_skb() or ieee80211_tx_status_ni()."
So we would need to either introduce lock similar like mt76 or
assure ieee80211_ts_status() and ieee80211_rx_napi() are done
in the same thread.
Regards
Stanislaw
next prev parent reply other threads:[~2026-11-05 8:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 16:51 [PATCH wireless-next v2 0/7] wifi: rt2x00: improve the throughput of rt2800usb Ho Jie Feng
2026-10-31 16:51 ` [PATCH wireless-next v2 1/7] wifi: rt2x00: start the link tuner when an interface is added Ho Jie Feng
2026-11-05 7:41 ` Stanislaw Gruszka
2026-10-31 16:51 ` [PATCH wireless-next v2 2/7] wifi: rt2800: calibrate the crystal of RT3593 with the beacons Ho Jie Feng
2026-11-05 7:50 ` Stanislaw Gruszka
2026-10-31 16:51 ` [PATCH wireless-next v2 3/7] wifi: rt2800: make MCS 16 fall back to MCS 8 on devices with 3 TX chains Ho Jie Feng
2026-11-05 7:54 ` Stanislaw Gruszka
2026-10-31 16:51 ` [PATCH wireless-next v2 4/7] wifi: rt2800: don't report an A-MPDU length to minstrel_ht Ho Jie Feng
2026-11-05 7:54 ` Stanislaw Gruszka
2026-10-31 16:51 ` [PATCH wireless-next v2 5/7] wifi: rt2800: support A-MSDU in A-MPDU Ho Jie Feng
2026-11-05 7:55 ` Stanislaw Gruszka
2026-11-10 13:33 ` Jie Feng
2026-10-31 16:51 ` [PATCH wireless-next v2 6/7] wifi: rt2800usb: enable RX bulk aggregation Ho Jie Feng
2026-11-05 8:10 ` Stanislaw Gruszka
2026-11-06 5:18 ` Jie Feng
2026-11-06 9:53 ` Stanislaw Gruszka
2026-10-31 16:51 ` [PATCH wireless-next v2 7/7] wifi: rt2x00usb: use a threaded NAPI with GRO for RX Ho Jie Feng
2026-11-05 8:20 ` Stanislaw Gruszka [this message]
2026-11-06 7:38 ` Jie Feng
2026-10-31 16:55 ` [PATCH wireless-next v2 0/7] wifi: rt2x00: improve the throughput of rt2800usb Jie Feng
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=20261105082005.GG64923@wp.pl \
--to=stf_xl@wp.pl \
--cc=hjf3108@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.