🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #436

[Bug 300730] rtw89: RTL8852BT high latency with duplicate TX sequence allocation

#436
From: bugzilla-noreply
Date: Thu, 12 Nov 2026 21:48
76 lines
5012 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300730

            Bug ID: 300730
           Summary: rtw89: RTL8852BT high latency with duplicate TX
                    sequence allocation
           Product: Base System
           Version: 15.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: denis@lemire.name

Created attachment 277237
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277237&action=edit
LinuxKPI: defer native TX sequence allocation (one functional line)

On a Realtek RTL8852BT using rtw89_8852bte, TX sequence numbers are
allocated during native net80211 encapsulation and then allocated again
in LinuxKPI TX preparation. This was accompanied by high LAN latency.

Environment:
- FreeBSD 15.2-PRERELEASE (stable/15), amd64.
- PCI 10ec:b520, subsystem 103c:88e9; driver rtw89_8852bte.
- Station mode, same AP, channel 149 and 80 MHz width for both runs.

Observed:
For all 40 identified ICMP requests, the WiFi header sequence advanced
by one between LinuxKPI enqueue and final TX preparation. For example,
probe 0 changed from sequence 3208 to 3209. The earlier value was consumed
without being transmitted for that frame.

net80211 can assign a sequence number during encapsulation when
IEEE80211_FEXT_SEQNO_OFFLOAD is absent. lkpi_80211_txq_tx_one() then calls
ieee80211_output_seqno_assign() again before encryption. LinuxKPI attach
does not set the flag that tells native encapsulation to defer allocation.

Proposed fix in linuxkpi_ieee80211_ifattach():
    ic->ic_flags_ext |= IEEE80211_FEXT_SEQNO_OFFLOAD;

With that ownership change:
                         Before       After
LAN ping mean (ms)       742.532       1.991
LAN ping maximum (ms)   1245.550      13.888
Replies/probes             40/40       40/40

Afterward, allocator tracing recorded one allocation per probe and none
before enqueue, for all 40 probes. Both runs used the same
AP/channel/width and unchanged rtw89 module. The flag was the only
functional A/B change; an allocator trace event was also added for
validation.

Reproduction: associate this adapter, run `ping -c 40 -i 0.1 <wired-peer>`
on the LAN, and trace sequence allocation/header values at native
encapsulation, LinuxKPI enqueue and final TX preparation. Rebuild and
reboot with the flag enabled, then repeat the same probe run.

The attached patch contains only this ownership change and is based on
CURRENT 1555dff3bf5619278c80ba843555ac2c84d671c3. It applies cleanly there;
that exact CURRENT revision has not been runtime-tested with this patch
alone. The before/after measurements above are the stable/15 test.
The AP's internal behavior was not observed directly. No claim is made
for other adapters or fragmented/injected traffic.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <bug-300730-227@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bugzilla-noreply@freebsd.org
Newsgroups: muc.lists.freebsd.bugs
Subject: [Bug 300730] rtw89: RTL8852BT high latency with duplicate TX
 sequence allocation
Date: Thu, 12 Nov 2026 21:48:06 +0000
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-300730-227@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="49275"; mail-complaints-to="news-admin@muc.de"
X-Original-To: bugs@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1794520086;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PxsaInCiiJlr+p70ZDy0Ki0Xjz06sJNtXxjEOuHaqaA=;
	b=P3A0Lecqgax0v7j4xfQHzK9FvwCLywRGkpj0n7PMqF/X6uuOkmWXmpKIZxrdn+loMdFz1Z
	pxaq37PttQoP6RAh3qs2J5jU5lnIcOdAGIymJDPd8ZbTEjPRNOWYI7LcY7OdnaCvK6AVtD
	0a8K+hbAnGx0tFW1Xd8p7791aMkySBZru/YmFCJTuqwkkEwQFFArFY8vYmzHvm/ClIuk1i
	nzvYP6x5iwhKJQuHrl7hg8cH/gGcd4YT6ZeSETAKEr/VbUEF5OX5gzlii1pk8ahwgtna4p
	wV2Zkxl+jCPTiBXQAEkeaS6BqYXZlvt39/8szbFjf9M3VJwUqM/xPMYuWKBxGA==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes