From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795884475; b=jgccx6nxQh+TMDU6FQRG7QQD+5iVGZOcr8conB8vBwlXlVyc82FcPNUB/MMlUBG1GnFX 6TkFV0PkDoie5jWkTAmcn5d7OzTH0RN12KfcRWEQ/UOPqscAKnPajADcHRDJF24e6V5tq cxS425njkXgxzebBvEbrn3c1AhXk6wmuWSTFcpy72gRmZ67Eqs/LMD6SuQIwe65r2MkIr QNjw5Xg3XuAPjddEKRwyE+SawaVoqE8vIBHmg5andgnE47I7OQ36YC5kOXjvE7LZ2G4RP buFeLeUo+cDoIbFkhWZmWIrVYx7gnk8hjhQqKyzmVtfsFDF4WrXmlDVqG7BE+yzZvFw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795884475; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=BngSjGIeJGAIvkbEHYkZruK4t35H++ZDzdxb2APypi8=; b=OUJg2S4rC2z7cGLK9xjAt74riWJOaIUEDFERLQIiTmc0V151kbzgAHtFb1eHz2vbmA7p GzmeiFHqdug4dR+JtU1T7PPemCwGsxwQiUROPe2pMnEvWHlFD+Xcdzu7InFm3THFVAXxD AhKHnJyuPN9d8IWEYCRiCVenR4V9NvL5J+KgqbrXLyzkYD3ovA82nk8Odq21GKuYT9I9Q 27w+/+X29YScbD4YaW0im50sA1VXJoEaqieHMmcEupT9+t4fiEe7AHNIRkEkL9s3DQfOj g5gl5TbLxpTYIYQheQJtb/EcXiQL/jzsG5GlDJBFEIp9Jtg8qoXFSHbSQBGFyCUl78w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=vFIiTcqT; arc=none smtp.remote-ip=209.85.208.51 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F9A9606A321 for ; Sat, 28 Nov 2026 16:47:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7F9A9606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=vFIiTcqT Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-6b8815693e2so10316818a12.0 for ; Sat, 28 Nov 2026 08:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1795884474; x=1796489274; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=BngSjGIeJGAIvkbEHYkZruK4t35H++ZDzdxb2APypi8=; b=vFIiTcqToQeJhfwMHGgJMjUTSAGtgiRGCHLpCav57rstTHMs8I2c9ipl0PN8ZLb9Ik 5N1+rchLAAErgXs0WwJyv0BWyJiTGQ0LR/wj4+9ljg1a3KiyEOdXjbE6X7T3xJ5CmXwY fsFpcZkaepT0Sqz5sOx1+K+zxe1qt7deQI0c5/FEJDDrim8aLwARWgpRLOaFm1ACvieV ezKIRdyi/xMn0Bq5E7qQdJp//Oiz+vu68hYXcFF7AWv0ar6nbh0MfVqufsfkBfYDwZpw ygXA1Xa3ifZ5ZP84l0TgdoMtf7jueB//QOUT52vCrK+DRExmIy5c6Y0qzjlPLTUYN6DS rPwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795884474; x=1796489274; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BngSjGIeJGAIvkbEHYkZruK4t35H++ZDzdxb2APypi8=; b=l+KyV8VSbE+VAL2jAiv2WruN7PPxwFu0weddcKeLCyeLlN29p1SVkQQrqrbi4fSfGl xwMGEjgYgDXtWdNlfzkJuYWKcVvq7wk+E3VGIa0QGeVt9dbI+fplkA3JiqXndaozwSqD xT8KhOotG9vOBQB/EBAj4Acmco26MLrfyFJAgSA/2EYxze3zWCFzC8rdkx500T2sLIg9 WZHP9uppLdahXBVLhqGfmUsaC/W7fatC10gd8Ou470hIXz9iPbe/raUUIAoHRlENHEG2 sLlgt8BCnYtvPSPIGLlEjvHJhoXtyWWNQjspgxuekVc9bleJRNDP8n5kKsEJE+6VfAN+ DksA== X-Gm-Message-State: APuU4Z9Q0OretLvC48pKofT2RORYRHjDn+rEe6x/w9k0nCtW2mfEDf/s oSlIQfJEnuWe2TaX64dnNcXPL5SzPzGaQxhh47X1BB3sQfplN3rZqiZJhwcjUDzuiLwwYjmOoo0 h3KbEJZr1 X-Gm-Gg: AZFdTZdunVIAL8A4WpO3I1wQEGNzXrrHt49mlKbxNVxLYtjhpLFX25ECf2gMhlIQ/aw GAaZ4kB5T43x5LJ+8isctgYA5Src475BiGusIMqjoDJPDkx71gmjLNSloUhjyPRWFBTPd/jeO0R PiJPmRYkIbThvXYjReQfK6Aere8AcC/eukkVABsBP9afdhjOLFok0nTF9Is8ZED5d9D0mbkTZCy X+r2uOeOWNjNQ8XXhK8G6xNN/ug5ThiB/NKsOuM9/A9VE88VsnAJ0lhp5LxzMjtDcQyy7LX8kYz yk6MZgmuDcdegmN1fyjkIs17FyJOhcYBNp+IDygFcaRQW2x39arY0iy4voPuwDwFiip0Ya+ioyM QvrJ/cwnyKAKSTL3d/uHPkzx9i5rWfyoYJPvUp8JBNxGfAQI7AZe0jLQApjzETCNlZkQhkpGnhj jwA1loDza0PRWJT73VhWwNksXunqUgNvSj+HHOeBjlSWT9yohoIJt3momRfoNV1QFac3mq29raM ebfroAsA6U2XoDVBqvZil2+PJSVxHdiQSw7gYI2CYTNqC6Ig59pTz0xeWKxAG6n6R8FT+2Wam0g 4mqUjcHYjSd9OQmapo61SyKiGi6dakwEIA7kcUAWSQsunR2hK/m+4tlultcpZWeb1NFG1H0EhAY l9c8q+M47+MXhU+eMQMwm7deaVUJgExrO1HmymrI4vBOQUTsNaGsnDzCYJRj05o0zB2D+C8+6p/ UqctrH0J1WBKcFnIpGZklzvBViCCi3ZDB+vPHaH7lyP6jD8cen/m8Krr5PiPAefzK3aEeWXShDv H7rI9/rNgURMCHGnBBijf8AzIqS3D62KfVXCJsBzoBFCArtFW/P3jd419++Ev6+eYTINRHlp2qu 4G2S5tpg7nzQfQ== X-Received: by 2002:a05:6402:10c5:b0:6b8:6d68:23dd with SMTP id 4fb4d7f45d1cf-6ba37c7b98emr16380091a12.3.1795884473926; Sat, 28 Nov 2026 08:47:53 -0800 (PST) Received: from Desktop.tail070c67.ts.net ([185.152.145.248]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6ba9b131d3bsm9488979a12.34.2026.11.28.08.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 08:47:52 -0800 (PST) From: Julius Bairaktaris To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, dsahern@kernel.org, idosch@nvidia.com, willemb@google.com, willemdebruijn.kernel@gmail.com, kuniyu@google.com, steffen.klassert@secunet.com Subject: [PATCH net v7 0/2] ipmr: forward GSO multicast packets Date: Sat, 28 Nov 2026 17:47:54 +0100 Message-ID: X-Mailer: git-send-email 2.53.0 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-Transfer-Encoding: 8bit With fraglist GRO or UDP GRO forwarding on, a routed IPv4 multicast stream arrives as GSO packets. ipmr_prepare_xmit() drops every DF aggregate larger than the MTU, and ip_encap() sets no tunnel GSO state, so a GSO packet sent to a VIFF_TUNNEL vif is dropped during segmentation. Patch 1 sets up IPXIP4 GSO state, outer IP IDs and length in ip_encap(), segments an already encapsulated GSO packet in software before it, as an ipip device does, and completes the pending checksum of an encapsulated packet that is not GSO. Patch 2 lets DF GSO packets pass when their segments fit the MTU. Per issue: - Trigger: a multicast stream from the network, routed by a multicast routing daemon (igmpproxy, smcroute, pimd; configured with CAP_NET_ADMIN) while the ingress has rx-gro-list or rx-udp-gro-forwarding on. Patch 1 needs a VIFF_TUNNEL vif, patch 2 DF set on the stream. - Impact: the aggregated packets are dropped, patch 1 after counting them as sent; no memory safety issue. CVSS 3.1: 3.7 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L). - Until the fix lands: ethtool -K rx-gro-list off rx-udp-gro-forwarding off. - Found: patch 1 by a Sashiko review of v1, patch 2 as packet loss on an IPQ8074 router. For UDP GSO packets that patch 1 encapsulates, and for encapsulated ones that patch 2 lets pass, the MTU check of ip_finish_output_gso() counts the inner UDP header with "net: gso: count the inner UDP header of encapsulated UDP GSO packets" from the series "net: gso: segment length of encapsulated GSO packets", posted beside this one; each applies to net on its own. Tested in QEMU (KVM) with network namespaces, on net (28a371228d4e), with this series alone and together with the series above: - FOU carrying SIT or IPIP, IPIP, GRE and VXLAN aggregates routed to a plain and a tunnel vif, underlay segmenting in software or offering segmentation, 1000 datagrams per case: net delivers every datagram to both vifs in 2 of 10 cases (2 runs), v6 in 2 of 10 and hands the underlay 39 to 73 GSO packets with three IP headers per offload case (2 runs); with this series all 10, with valid checksums and distinct outer IP IDs, no GSO packet with three IP headers on the underlay (5 runs, one with KASAN). - SCTP INIT chunks encapsulated in IPIP by tc BPF, routed to a tunnel vif: 50 of 50 arrive with a wrong CRC32c with v6 (2 runs), all valid on net (1 run) and with this series (5 runs). - IPIP aggregates built by GRO (fraglist, UDP GRO forwarding, none) routed to a plain and a tunnel vif: 1000 of 1000 on both, distinct outer IDs (4 runs, one with KASAN, in which 37 datagrams of one case were lost before the router and missed on both vifs alike). - An MFC entry to a plain and a tunnel vif, 4000 datagrams per arm, UDP_SEGMENT, fraglist GRO and UDP GRO forwarding, DF set and clear, software and device segmentation: all 4000 on the plain vif, and 4000 IPIP packets with unique outer IDs or the 100 GSO packets whole on the tunnel vif, all 12 arms (5 runs, one with KASAN). - tools/testing/selftests/net/forwarding/ipmr: the same 14 of 22 cases pass as on net (3 runs and 1 run; the IPv6 cases need CONFIG_IPV6_MROUTE, which is not set here). Changes in v7: - Split: v6 patches 1 and 3 and a new SCTP case go to "net: gso: segment length of encapsulated GSO packets" (Willem de Bruijn). - Drop v6 patch 2: Willem's ab5b219a7340 ("net: gso: fall back to skb_segment when fraglist cannot satisfy checksum") in net covers it; the two Sashiko findings on it (SKB_GSO_TUNNEL_REMCSUM predicate, UDP linearization) go with it. - Patch 1: segment an encapsulated GSO packet with skb_gso_segment() before ip_encap() on a tunnel vif, in ipmr_queue_fwd_xmit() and ipmr_queue_output_xmit(), instead of dropping those without SKB_GSO_IPXIP4 (Willem de Bruijn). This removes FOU/GUE aggregates carrying IPIP or SIT being segmented with ip_encap()'s inner protocol (Willem, Sashiko) and IPXIP4 aggregates with three IP headers reaching a device that segments them (Willem), and GRE and UDP tunnel aggregates are forwarded instead of dropped, so the commit message no longer claims they were lost before (Sashiko). - Patch 1: complete the pending checksum with skb_csum_hwoffload_help() instead of skb_checksum_help(), which overwrote an SCTP CRC32c (Willem de Bruijn, Sashiko). - Patch 1: read the vif flags once per packet. - Patch 1: name the fixed-ID case every iptunnel_handle_offloads() caller shares and the net-next series that fixes it (Sashiko). - Rebase onto net. - v6: https://lore.kernel.org/netdev/cover.1795295554.git.julius@bairaktaris.de/ I used Claude (Anthropic) to help write these patches. Julius Bairaktaris (2): ipmr: set up GSO state for tunnel vifs ipmr: do not drop GSO packets that fit the MTU after segmentation net/ipv4/ipmr.c | 84 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 9 deletions(-) base-commit: 28a371228d4eb4857cc31eeb1a0d7d01e9c3ea2f -- 2.53.0