From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73EB91A73C for ; Mon, 2 Oct 2023 17:11:55 +0000 (UTC) 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.