From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.17 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796042767; b=cSDOtZAPp03BbsUMVf94h9Xwy5N42upMfA5tq7jN4EuVeEybcCDpd99m4IeRRGku3K+n k3YPKdXls+YRxg+gA6ldmtYppBEkIfEjKqKVefRLnKQ+5bhOlsxJ1vkTHc1vkSqHKXbpy JUv48KH3SaS665iEtXWe1i5mR0kSx/VNvE22OU7wRludIPyivxYXb3V2R9zsyWYwW3HcR J1XRgtP1cSP0ISp5TqZaQTkZQnBzb9mshxO2gYSDj4UNynU/EcruOXrQZxYG1Vzm72Wom JLUy7ZYOpSjj4uEULwOsB6vO8Agst7XRCjPEMaXvvqqWBEve9c6r9c8km7BFSfII3Vw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796042767; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=5xlscE8pCQAWvP22Mw2ajnVczjJEBY+NXL2oaqV+nqY=; b=L5hPLMw7W38GAW/V+OMHaESW5xgXgNUlXIexJGs4f7EvolVzACF/saT1xm0JEErZ8nVQ ipgBVl6peoh3AA1TVjRqvJjkffyBQ9A7dVYaKcLRAd24NgSNi/XdaHN/9SCRjwL96VP5Y BSD71O5gbGuldXEEbOcMivr96cDZyyCObXoCFC66A7zAS5CJWpxg2MYB9p8di8ul+bTx/ CIobqsH7/a0j7IZ2KJZztenCAwB06bCEKCmJSHQbd7+zHMi7Fb9yT7r+yYf18mDC/BHw8 XA4XtbRnMNnuXreO7qtq0JRan6cfU3fzAG1vR63kr0zn6vhSktA4tndH/GDjty+wFCw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Z3FJMmvy; arc=none smtp.remote-ip=198.175.65.17 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1BEA606A31C; Mon, 30 Nov 2026 12:46:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C1BEA606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Z3FJMmvy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796042767; x=1827578767; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=5xlscE8pCQAWvP22Mw2ajnVczjJEBY+NXL2oaqV+nqY=; b=Z3FJMmvyliV0Bpzmij/vyEwFyHiYU6GQz/lv8c8oE0vYK7hv8NoT+woi Q6uLS4w9QweP8kNaVOH+wqzTgFZ24g8DPm5FloUAYA20iW3i6cAExCoYJ 9OsRja0RI99yrTqjH6LEpJpK3JdkfWMI15nduByLyhZUAjiW/XBpI6LVj eNyMlsW/lYoBlWNVhophbpvcdllma5dkzZXgTcsO+cTmpmLtFZ/zdiar8 Tab/5bYiMy5ScfQKYu7Wswvl6ZcopJYXSYeo6OlLRIlcIQJ+bKqVog+jJ G+Aw1NXndv5DZmFZR8n/YKFOoKyNxs4SfoVjMAMFoDUPzETbdKPMwCD8a Q==; X-CSE-ConnectionGUID: DQrMYBksROSNEdg4KHBM8Q== X-CSE-MsgGUID: r0XIpGxATaK6WeA+r9Zj/Q== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4869173" X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="4869173" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 04:46:06 -0800 X-CSE-ConnectionGUID: XyRggHkyQpWa8RZAudICkg== X-CSE-MsgGUID: FbZ2HVcvRx6AHWFGYjkk0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="13249743" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa007.fm.intel.com with ESMTP; 30 Nov 2026 04:46:04 -0800 Received: by black.igk.intel.com (Postfix, from userid 1001) id BB5A999; Mon, 30 Nov 2026 13:46:02 +0100 (CET) Date: Mon, 30 Nov 2026 13:46:02 +0100 From: Mika Westerberg To: Karl Fussmann CFO Cc: Mika Westerberg , Yehezkel Bernat , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Andreas Noever , Sanath S , Basavaraj Natikar , Mario Limonciello Subject: Re: thunderbolt_net: packets with IP total length 227-230 are dropped (rx_crc_errors) on host-to-host USB4 links Message-ID: <20261130124602.GK953667@black.igk.intel.com> References: X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi, On Mon, Nov 30, 2026 at 11:48:19AM +0100, Karl Fussmann CFO wrote: > Hi, > > on thunderbolt_net host-to-host (XDomain) links we see packets with an > IP total length of 227 to 230 bytes being dropped. All other lengths > we tested are delivered without loss. TCP, UDP and ICMP are affected > alike. The drops show up as rx_crc_errors on the receiving interface; > the kernel log stays silent. > > It is easy to reproduce with ping between two directly connected > hosts: > >   for s in $(seq 194 206); do >       ping -n -q -c 400 -i 0.01 -W 1 -M do -s $s | tail -2 >   done > > Result on one link, both directions, 400 echoes per size and run: > >   ping -s    IP length   7.3.6 (1st)   7.0.14-30     7.3.6 (2nd) >   194-198    222-226     0 lost        0 lost        0 lost >   199-202    227-230     1599/1600,    1600/1600,    1599/1600, >                          1598/1600     1600/1600     1599/1600 >   203-206    231-234     0 lost        0 lost        0 lost > > For 7.0.14-30 both ends of the link were booted into that kernel, so > this does not look like a regression between 7.0 and 7.3. The two > kernels also come from different bases (see Setup): the 7.0 kernel is > Ubuntu-based, the 7.3 kernel is built from the upstream stable > branch. > > The practical impact: TCP segments of these lengths need > retransmissions, and a lost segment is often lost again on > retransmit, so connections stall for seconds to minutes while the RTO > backs off. In our case this breaks the Ceph monitor quorum, because > the monitors regularly exchange 176-byte TCP payloads (IP length 228). > > Setup > ----- > - 7 identical hosts: GMKtec NucBox K11, AMD Ryzen 9 8945HS, >   BIOS 1.04 (2026-05-14). > - Both USB4 host routers per host are used: AMD "Pink Sardine" >   USB4/Thunderbolt NHI #1/#2 [1022:1668] and [1022:1669] (PCI c9:00.5, >   c9:00.6), generation 4, retimer 0x7fea:0x1032. > - The hosts are cabled as a ring of 7 host-to-host USB4 links >   (thunderbolt_net, MTU 65520, IPv4 forwarding, OSPF via FRR). > - Kernels: Proxmox VE 7.3.6-1-pve (also seen on 7.3.5-1-pve), which >   according to Proxmox is built directly from the upstream stable >   branch on kernel.org rather than from the Ubuntu kernel, and >   7.0.14-30-pve, which is still Ubuntu-based. We have not tested a >   plain kernel.org build or current mainline ourselves. > - Module parameters are the defaults: thunderbolt asym_threshold=45000, >   bw_alloc_mode=Y, clx=Y, dma_credits=14, dprx_timeout=12000, >   host_reset=Y, start_icm=N, xdomain=Y; thunderbolt_net e2e=Y. > - Default qdisc fq_codel, no tc filters. > > Single-segment test > ------------------- > We also used a small test tool (Python, standard library only; we can > send it): a TCP client with TCP_NODELAY sends one message of N bytes > and waits for a 1-byte reply before the next one, and records per > message whether tcpi_total_retrans increased. A UDP sender with DF > sends datagrams that the receiver verifies. Packet captures confirmed > one segment per message with the intended length. Results on 7.3.6-1, > 6 paths (4 direct links in both directions, 2 forwarded via one > intermediate host), 100 messages per size, payload pattern > (random/fixed) and path: > >   TCP payload   IP length          affected (retransmit or no >                                    reply within 3 s) >   168-174       220-226            0 / 8400 >   175           227                116 / 1200 >   176           228                150 / 1200 >   177           229                158 / 1200 >   178           230                152 / 1200 >   179-184, 96, 512                 0 / 9600 > >   UDP, IP length 227-230: 254 of 4800 datagrams lost (5.3 %) >   UDP, IP length 222-226 and 231-234: 0 of 10800 lost >   No datagram arrived corrupted. > > 281 of the 576 affected TCP messages got no reply within 3 s; the > capture shows up to 10 transmissions of the same segment. > > With both ends on 7.0.14-30 the same test on one link gave, for IP > length 227-230: TCP 116/800 and 104/800 affected (7.3.6: 66/800 and > 80/800), UDP 19/800 and 34/800 lost (7.3.6: 37/800 and 38/800); > all other lengths 0. > > An earlier UDP sweep over IP total lengths 44-9028 bytes (one > datagram per size, 14 link directions) showed losses only at 227 and > 229. We found no second affected length range up to about 9000 bytes. > > Observations > ------------ > - All links and both directions are affected, on both host routers. > - Random and fixed payload behave the same in the single-segment test >   (274/2400 vs. 302/2400 affected TCP messages). > - Echoes of the same size sent back to back (ping) are lost almost >   every time. Datagrams of the affected sizes interleaved with other >   sizes at 5 ms spacing are lost in about 5 % of cases, and an >   already lost TCP segment is lost again much more often than a first >   transmission. So the sequence of frames seems to matter, not only >   the length. We do not know why. > - On 5 of 6 paths the loss times of the affected UDP datagrams cluster >   with a period of about 200 ms. > - Disabling TSO, GSO, tx-checksumming and scatter-gather at runtime on >   all interfaces did not change the loss (52-minute A/B/A run). > - CLx should not be involved, since tb_port_clx_supported() returns >   false for XDomain ports. > - With the 14-byte Ethernet header and the 12-byte thunderbolt_net >   frame header the affected frames are 253 to 256 bytes long. We do >   not know whether this is related to 256-byte boundaries in the >   USB4 transport; we only mention it as an observation. > > We are happy to run more tests: a current mainline kernel, e2e=N, > debug options, or patches. I tried to reproduce on my Intel hardware following your steps on v7.4-rc5 but no packets were dropped. This suggest to me that it may be related to AMD hardware so I'm adding the AMD experts here to comment.