Article View: muc.lists.freebsd.bugs
Article #661[Bug 301043] tcp_lro_condense() can generate false D-SACK blocks during ACK coalescing
From: bugzilla-noreply
Date: Mon, 23 Nov 2026 14:59
Date: Mon, 23 Nov 2026 14:59
141 lines
6914 bytes
6914 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301043
Bug ID: 301043
Summary: tcp_lro_condense() can generate false D-SACK blocks
during ACK coalescing
Product: Base System
Version: 15.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: wetang@qnx.com
Tested target:
FreeBSD 15.0-Release as a QEMU VM
Problem:
False D-SACK is observed when LRO is enabled in the vtnet0.
Specifically, when I sent TCP data from the FreeBSD VM to the Ubuntu host, I
could see that a SACK packet and a immediate zero-length ACK sent by the Ubuntu
host were merged into a single D-SACK packet.
For example:
FreeBSD VM IP: 172.31.1.31
Ubuntu Host IP: 172.31.1.1
Send TCP data from FreeBSD and Ubuntu ACKed.
Captured on Ubuntu:
```sh
1199 0.503043 172.31.1.1 172.31.1.31 64 TCP
3785808658 [TCP Dup ACK 1195#1] 5201 β 20729 [ACK] Seq=3785808658
Ack=3692672884 Win=1152256 [TCP CHECKSUM INCORRECT] Len=0 TSval=525151699
TSecr=4208826805 SLE=3692677228 SRE=3692752524
```
```sh
1203 0.503087 172.31.1.1 172.31.1.31 52 TCP
3785808658 5201 β 20729 [ACK] Seq=3785808658 Ack=3692817684
Win=1107968 [TCP CHECKSUM INCORRECT] Len=0 TSval=525151699 TSecr=4208826805
```
Captured on Freebsd:
```sh
1050 0.503002 172.31.1.1 172.31.1.31 64 TCP
3785808658 5201 β 20729 [ACK] Seq=3785808658 Ack=3692817684
Win=1107968 Len=0 TSval=525151699 TSecr=4208826805 SLE=3692677228
SRE=3692752524
```
The LRO synthetic packet had the SLE/SRE range falls within the cumulative ACK,
so it's a D-SACK. However, it was not the intention of Ubuntu host.
Looking into the tcp_lro_condense(), I wonder if it's really checking the
m_head of the LRO entry:
```c
ββββββ/*
ββββββ * First we must check the lead (m_head)
ββββββ * we must make sure that it is *not*
ββββββ * something that should be sent up
ββββββ * right away (sack etc).
ββββββ */
again:
ββββββm = le->m_head->m_nextpkt;
ββββββif (m == NULL) {
ββββββββββββ/* Just one left. */
ββββββββββββreturn;
ββββββ}
ββββββth = tcp_lro_get_th(m); <=== It's intended to check the m_head, but m
already points to m_head->m_nextpkt
ββββββtcp_opt_len = (th->th_off << 2);
ββββββtcp_opt_len -= sizeof(*th);
ββββββts_ptr = (uint32_t *)(th + 1);
```
Network configuration:
```sh
root@freebsd:~ # uname -a
FreeBSD freebsd 15.0-RELEASE FreeBSD 15.0-RELEASE
releng/15.0-n280995-7aedc8de6446 GENERIC amd64
root@freebsd:~ # ifconfig
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
options=ec07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS>
ether 52:54:00:26:d3:82
inet 172.31.1.31 netmask 0xffffff00 broadcast 172.31.1.255
inet6 fe80::5054:ff:fe26:d382%vtnet0 prefixlen 64 scopeid 0x1
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
groups: lo
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
root@freebsd:~ # cat /boot/loader.conf | grep vtnet
hw.vtnet.0.fixup_needs_csum="1"
root@freebsd:~ # kenv hw.vtnet.0.fixup_needs_csum
1
```
--
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-301043-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!srv.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-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.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 301043] tcp_lro_condense() can generate false D-SACK blocks during ACK coalescing Date: Mon, 23 Nov 2026 14:59:16 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-301043-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="33429"; 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=1795445956; 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=ufppK9MA3Du5q503K8Qp65esqexwwb5aGjCreJ+GlIs=; b=mjRyhDewDLE0iqg2sXrsbnwgEHu93cAiD0arBPAc2WWyiv2fhuLvJigXd3KOfpronW+FhL 0cLWSyjRXEB9uAfAIrGZkYE1Bivm9ZQAyqxFlpHA44HTnDHQWlwWzpCQufk0Ct/vTdNs92 WTB9k4vd0D/6NFnOXLrQobDjGvAhkaOrxwCWkcmtx9VYp/XyQkynWImTmGqFBHh/1+HGLH u1cUFZT+t42OAyIdPIdgqB57qfG+TNsIh9KFltkBeaeD+pU2mIX24BAVpdH0hPxUlnRl7j qrsLfFtN3Bbzk/MGUasEN+yc6fkUrSOuMH+3l5KDT7gTFQ+ycVWQ79jPfO0v4A== 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