mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cristian Papa <pcristian292@gmail.com>
To: nbd@nbd.name
Cc: lorenzo@kernel.org, ryder.lee@mediatek.com,
	shayne.chen@mediatek.com, sean.wang@mediatek.com,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: mt76: mt7603: discard power-save loopbacks after wakeup
Date: Tue, 20 Oct 2026 15:03:45 -0300	[thread overview]
Message-ID: <20261020180345.13263-1-pcristian292@gmail.com> (raw)
In-Reply-To: <8e57a7f2-6495-4535-af99-9abf5bcaa1f9@nbd.name>

On 20.10.26 18:44, Felix Fietkau wrote:
> It all depends on whether the receiver has moved on and considers the
> frame lost, or if there is value in sending it to avoid the reorder
> timeout (which would cause some jitter). Either way, we should likely
> only allow immediate-tx if aggregation is enabled.
>
> If you have some time, could you test, which variant works better?

I tried, but I could not get the late case to happen here.

Setup: MT7603E AP (EcoNet EN751221 board, OpenWrt, 6.18), channel 11,
HT20, one Android phone (Galaxy A56) as the only client, screen off,
about -35 dBm. I added a debugfs knob for a loopback that arrives after
the wakeup drained psq: 0 drops it (this patch), 1 sends it right away
only if its TID has an active TX aggregation session, 2 always sends it.
Counters record every loopback, whether it arrived before or after the
wakeup, and how long after the wakeup.

Traffic was ICMP echo from the AP to the phone, 1000 bytes:

- One every 50 ms, modes 0/1/2/0/1/2 for 3 minutes each: 4-21 wakeups
  per phase and no late loopback in any of them, so all three modes ran
  the same code. Loss and RTT matched across modes (0.03-0.06% loss,
  p99 10-15 ms).

- Bursts so the phone dozes between them (30 every 400 ms, 10 every
  250 ms, 60 every 1 s, one minute each), repeated three times: about
  1,000 sleep/wake transitions in total and no late loopback. In the
  runs that also counted on-time loopbacks (about 690 transitions) there
  was exactly one, and it arrived while the station was still asleep.

So with this client the hardware almost never holds a frame for the
station when it starts to doze, and none came back after a wakeup. I
can't say which variant works better, since neither path ran. This is
one client on one AP, though; a client that dozes while traffic is
still flowing could behave differently.

Given that, I'd keep the drop as in this patch, since it is the simpler
path and costs at most an occasional frame. If you'd prefer immediate
TX gated on aggregation, I can send a v2 with that instead, and if you
know a client or traffic pattern that triggers late loopbacks more
often, I'm happy to rerun the test with it.

Cristian

      reply	other threads:[~2026-10-20 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  6:22 Cristian Papa
2026-10-20  9:48 ` Felix Fietkau
2026-10-20 16:15   ` Cristian Papa
2026-10-20 16:44     ` Felix Fietkau
2026-10-20 18:03       ` Cristian Papa [this message]

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=20261020180345.13263-1-pcristian292@gmail.com \
    --to=pcristian292@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®