Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1470952rdb; Mon, 2 Oct 2023 10:24:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJaztSwOKnQUfdVtcNRGnu5m0VyifTW4h2yokK3cO1PSLZHmH98Y6WhvF+cq8AhP7X2gSP X-Received: by 2002:a05:6358:91a1:b0:143:5826:dece with SMTP id j33-20020a05635891a100b001435826decemr16020790rwa.25.1696267452613; Mon, 02 Oct 2023 10:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696267452; cv=none; d=google.com; s=arc-20160816; b=jGK71JTsn1bGSt9HAPOgZQMvFPWhcrowVvlQCfIaNt+A0lHgI6seTUlOSRhzWISV5h EhitWU2EKmYIT239DkPruhJm/sjFVcw515rufw8Vo2XMyFXX7rFkLX5lgea5abrwp/xr jeHytHZu7c2aLcizqEZnGhq+Sqq6toyfDwmOkvtjaoxyLdbARfFBp7jtz8a3IyACbPoU lEzanPlyWVl/4sDBeECSXia74J8LCTz0bE8VR0Ei50CSeak/7B6CyeW4icCo0VHOUhMM 8cMALiMMfOoIlQxQTGiZb8Zq6nLJVJlhM3+YVoj4ZvL3LYSZrHS50kugXoxRMMFiO+Qs 5X3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XKPlPkQZAf/uKYBnTLCdaYyXw1EVwpAleQ2u1hIi524=; fh=q7uCAPMfdsVC808STz1llcNW+EmjT5GgKzQ2iSDDncE=; b=SjDuC76xspKEEyhuQ7B8rpGuk2FpSKT4+6uDUIlZ7zsbE1dT03DDsiBahyWRVPR38h 9zd3IILedb/iKLQ0Msrh4aiTXE5XevjhibtPMNoi59XqfDkuHZ5m72WcR/cxw9BwDfhM wREZ9lFLjgOm2toXW9k5CMzgU/plclHFtg3MzuVUbOV6acGCQ8sybPaNV2JGNYpqlUAS VKgvyzPv3pu/pgfSw9Ga/V64/W8FRvOw9uwLGv+TB5Y1MZ67rH1Hy0nrJywpwq7Q6CfK penRMaIv8j6t8whbj5+w07nxuFL1hevb9r/WcY0p8GYonKcevXwRxNgV68ogxjiUgCEh vvdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q83-20020a632a56000000b005702257f32esi26631659pgq.185.2023.10.02.10.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 325CF806237F; Mon, 2 Oct 2023 10:12:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238673AbjJBRL5 (ORCPT + 99 others); Mon, 2 Oct 2023 13:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjJBRL4 (ORCPT ); Mon, 2 Oct 2023 13:11:56 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:237:300::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE016AB; Mon, 2 Oct 2023 10:11:53 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1qnMSQ-00039e-DV; Mon, 02 Oct 2023 19:11:46 +0200 Date: Mon, 2 Oct 2023 19:11:46 +0200 From: Florian Westphal To: Yan Zhai Cc: Florian Westphal , netdev@vger.kernel.org, "David S. Miller" , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Aya Levin , Tariq Toukan , linux-kernel@vger.kernel.org, kernel-team@cloudflare.com Subject: Re: [PATCH net] ipv6: avoid atomic fragment on GSO packets Message-ID: <20231002171146.GB9274@breakpoint.cc> References: <20230930110854.GA13787@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 10:12:04 -0700 (PDT) Yan Zhai wrote: > On Sat, Sep 30, 2023 at 6:09 AM Florian Westphal wrote: > > > > This helper is also called for skbs where IP6CB(skb)->frag_max_size > > exceeds the MTU, so this check looks wrong to me. > > > > Same remark for dst_allfrag() check in __ip6_finish_output(), > > after this patch, it would be ignored. > > > Thanks for covering my carelessness. I was just considering the GSO > case so frag_max_size was overlooked. dst_allfrag is indeed a case > based on the code logic. But just out of curiosity, do we still see > any use of this feature? From commit messages it is set when PMTU > values signals smaller than min IPv6 MTU. But such PMTU values are > just dropped in __ip6_rt_update_pmtu now. Iproute2 code also does not > provide this route feature anymore. So it might be actually a dead > check? I don't think iproute2 ever exposed it, I think we can axe dst_allfrag(). > > I think you should consider to first refactor __ip6_finish_output to make > > the existing checks more readable (e.g. handle gso vs. non-gso in separate > > branches) and then add the check to last seg in > > ip6_finish_output_gso_slowpath_drop(). > > > Agree with refactoring to mirror what IPv4 code is doing. It might not > hurt if we check every segments in this case, since it is already the > slowpath and it will make code more compact. No objections from my side.