Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1926239rda; Tue, 24 Oct 2023 07:27:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDOevKF+jN1SM8qohuYPfB+NIUZ2Af2JamIdMJ0A4AaQ3WTotEl7bnlVTO4H0k24zXCBNN X-Received: by 2002:a05:6a20:e128:b0:14c:c511:387d with SMTP id kr40-20020a056a20e12800b0014cc511387dmr3506863pzb.9.1698157629553; Tue, 24 Oct 2023 07:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698157629; cv=none; d=google.com; s=arc-20160816; b=JLgubu/OaST/7LJ+/KGCDNeD8wjaPi98AoJZjKIsU6WCwRVxIg1TUPDQurGPUwI+as 4qcVZ+t5W5P7UREGvVdy0MphG+0wGYuX7BYwOD3r2Pl3mLRy+GxQwlw6cxqWjVNVM5Mj +JkyoGRQIzILF+ZGO79oUdw5vsUAv3SW7N/eB0UGXJLn5J+jfYnIDPCSyikEXSR1rt4a cmiABQmIDM2W7GPArRT6HZ1yKf2jmdpM4kgdRqCqhqin/VTFHDL2TqlYk+peLKHjD3Y2 NCzH90mps2rr77RUXCe/5IPiY0bLJXxDPy7GUD9sGazcCyzZqpgD+bU2gpGI9mPkaQTi jowg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=HSkD7qLJMOj3J00NGcykYcTjPHnf3wlBQzh0/FoSFS4=; fh=pcqFZQYW2ZOvrJzL6iYbdBSsYjMBR+cDRZVlzaRzt/k=; b=BdSYKy7YHMFgG3okaNmHETD2atX8veCNpNCFl+xL3dK4uqYJDMbXuGVrSr42I++eXj liLxdusRAUrwqjicmGDz5ADyqt/9sBMPjqwiGRGwaUj0fywUGQouLgk/tPAOjg0QcQeM Z7fWvebqnYzmNVMooLTQ1ZT7/AE62zneNJrzy9n0ITOZC2UkUQ5J1Ykjg3ZoXRR8Qf69 NNYBCO9a42d8bijP7OG5yFF5leGKr4UgA2Pd4p7qDytPATVXeWv6Fdlh5xnKetn72/YS bh8niy5QL8w5mgO3I5EM5CS1Nsi4TlHs9+AzUA6jkmEg1zbtvQl/ZdL3whC3G34MTdWx InAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=FonKB+pa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id gx7-20020a17090b124700b00274e2ba0ca6si10987514pjb.134.2023.10.24.07.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google09082023 header.b=FonKB+pa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 96786802DCEC; Tue, 24 Oct 2023 07:27:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343732AbjJXO0h (ORCPT + 99 others); Tue, 24 Oct 2023 10:26:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343524AbjJXO0f (ORCPT ); Tue, 24 Oct 2023 10:26:35 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C26D98F for ; Tue, 24 Oct 2023 07:26:33 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-66d13ac2796so28109846d6.2 for ; Tue, 24 Oct 2023 07:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1698157593; x=1698762393; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=HSkD7qLJMOj3J00NGcykYcTjPHnf3wlBQzh0/FoSFS4=; b=FonKB+paqvcJd3aVuqUZ+DevZ/ju7KgsAyiFti5qWAKKk+pIspKJHAt+VmB9+TR+e3 b3PpYYT+SeXQzIkU81+kDj62AQt3o320/Y2tYt8AsChGLQ8gMBB3U2Q4Rx2zY9HY0vM7 qSupfNWy5VBNU0ydV9brylYzcOL/rULFNdIXs/1Eda4n/asAKTypg4cA0J96uw1A89Kd 1mycTcY/dX5c+xNytOcYy/OmZ42s5vi5HYt0SnWGnx2guiTFCmgqG4tQVnx7ri508m+7 Dzkv0imnofKK1jCFF2KEIdx1X/vgKy+PV96B1zZYeZXoQObuNiz6UcI33NBaevNUG7yP vZrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698157593; x=1698762393; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HSkD7qLJMOj3J00NGcykYcTjPHnf3wlBQzh0/FoSFS4=; b=F9BtJyjkS5VdbRIS5/7XY1YgIjVbssEX78XKP3lGpWNEPm3IW9AluihC0m7b6Svz7Z vdbDuRtlOd9UWHcR8wJug1JGdBM5wgOfskVy5R1XNjV08FtNey8SOhPhpYEXkbuWPd5k pehgc+E6Ek5NV/0uhffO0VFgoiUjBS7y2aodik8GekOnQXFpExi5Kqchm6XOEEh2eQTQ H6Zb/NbRyGMGGoF+FN4eEAHrdhLtDqz4O95mN4hE3jcF37BjRY+OrHaCfrkaQsomfjxx NReSvptujIIaL72xxB+OvuqRuMDFggSaPYvH8jxcj7sLHSHsoN57nqIwa/rA90xWEsrR NhBw== X-Gm-Message-State: AOJu0YyugP2EIFPKzdi3QvWZ1Y5DqSGQtPaicIRqbGJCiDLiyttfLEeG RFDof6zX7KTzA2kd87gQ5UXSDg== X-Received: by 2002:a05:6214:230f:b0:66d:62b7:53f4 with SMTP id gc15-20020a056214230f00b0066d62b753f4mr14290057qvb.45.1698157592853; Tue, 24 Oct 2023 07:26:32 -0700 (PDT) Received: from debian.debian ([140.141.197.139]) by smtp.gmail.com with ESMTPSA id e20-20020ad442b4000000b0065d1380dd17sm3598217qvr.61.2023.10.24.07.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:26:32 -0700 (PDT) Date: Tue, 24 Oct 2023 07:26:28 -0700 From: Yan Zhai To: netdev@vger.kernel.org Cc: "David S. Miller" , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Aya Levin , Tariq Toukan , linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Florian Westphal , Willem de Bruijn , Alexander H Duyck Subject: [PATCH v5 net-next 0/3] ipv6: avoid atomic fragment on GSO output Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 07:27:06 -0700 (PDT) When the ipv6 stack output a GSO packet, if its gso_size is larger than dst MTU, then all segments would be fragmented. However, it is possible for a GSO packet to have a trailing segment with smaller actual size than both gso_size as well as the MTU, which leads to an "atomic fragment". Atomic fragments are considered harmful in RFC-8021. An Existing report from APNIC also shows that atomic fragments are more likely to be dropped even it is equivalent to a no-op [1]. The series contains following changes: * drop feature RTAX_FEATURE_ALLFRAG, which has been broken. This helps simplifying other changes in this set. * refactor __ip6_finish_output code to separate GSO and non-GSO packet processing, mirroring IPv4 side logic. * avoid generating atomic fragment on GSO packets. Link: https://www.potaroo.net/presentations/2022-03-01-ipv6-frag.pdf [1] change log: V4 -> V5: minor fixup V3 -> V4: cleaned up all RTAX_FEATURE_ALLFRAG code, rather than just drop the check at IPv6 output. V2 -> V3: split the changes to separate commits as Willem de Bruijn suggested V1 is incorrect and omitted V4: https://lore.kernel.org/netdev/cover.1698114636.git.yan@cloudflare.com/ V3: https://lore.kernel.org/netdev/cover.1697779681.git.yan@cloudflare.com/ V2: https://lore.kernel.org/netdev/ZS1%2Fqtr0dZJ35VII@debian.debian/ Yan Zhai (3): ipv6: drop feature RTAX_FEATURE_ALLFRAG ipv6: refactor ip6_finish_output for GSO handling ipv6: avoid atomic fragment on GSO packets include/net/dst.h | 7 ----- include/net/inet_connection_sock.h | 1 - include/net/inet_sock.h | 1 - include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/tcp_output.c | 20 +------------ net/ipv6/ip6_output.c | 45 ++++++++++++++++-------------- net/ipv6/tcp_ipv6.c | 1 - net/ipv6/xfrm6_output.c | 2 +- net/mptcp/subflow.c | 1 - 9 files changed, 27 insertions(+), 53 deletions(-) -- 2.30.2