πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.bugs
2 messages
2 total messages Started by bugzilla-noreply Mon, 23 Nov 2026 14:59
[Bug 301043] tcp_lro_condense() can generate false D-SACK blocks during ACK coalescing
#661
Author: bugzilla-noreply
Date: Mon, 23 Nov 2026 14:59
141 lines
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
[Bug 301043] tcp_lro_condense() can generate false D-SACK blocks during ACK coalescing
#664
Author: bugzilla-noreply
Date: Mon, 23 Nov 2026 17:01
17 lines
2578 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301043

Mark Linimon <linimon@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |vendor
           Assignee|bugs@FreeBSD.org            |net@FreeBSD.org

-- 
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads