Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88FC2C433F5 for ; Thu, 26 May 2022 06:51:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242684AbiEZGv2 (ORCPT ); Thu, 26 May 2022 02:51:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238937AbiEZGv1 (ORCPT ); Thu, 26 May 2022 02:51:27 -0400 Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7919D19FBF for ; Wed, 25 May 2022 23:51:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 0A758200AC; Thu, 26 May 2022 08:51:22 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PCm6zqDonW0V; Thu, 26 May 2022 08:51:21 +0200 (CEST) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 3B62220096; Thu, 26 May 2022 08:51:21 +0200 (CEST) Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) by mailout1.secunet.com (Postfix) with ESMTP id 33F5380004A; Thu, 26 May 2022 08:51:21 +0200 (CEST) Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 26 May 2022 08:51:15 +0200 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 26 May 2022 08:51:15 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 4A77C3183D71; Thu, 26 May 2022 08:51:15 +0200 (CEST) Date: Thu, 26 May 2022 08:51:15 +0200 From: Steffen Klassert To: Maciej =?utf-8?Q?=C5=BBenczykowski?= CC: Maciej =?utf-8?Q?=C5=BBenczykowski?= , "Linux Network Development Mailing List" , Lorenzo Colitti , Eric Dumazet , Lina Wang Subject: Re: [PATCH] xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames <= 1280 bytes. Message-ID: <20220526065115.GA680067@gauss3.secunet.de> References: <20220518210548.2296546-1-zenczykowski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220518210548.2296546-1-zenczykowski@gmail.com> X-ClientProxiedBy: cas-essen-01.secunet.de (10.53.40.201) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, May 18, 2022 at 02:05:48PM -0700, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > One may want to have DF set on large packets to support discovering > path mtu and limiting the size of generated packets (hence not > setting the XFRM_STATE_NOPMTUDISC tunnel flag), while still > supporting networks that are incapable of carrying even minimal > sized IPv6 frames (post encapsulation). > > Having IPv4 Don't Frag bit set on encapsulated IPv6 frames that > are not larger than the minimum IPv6 mtu of 1280 isn't useful, > because the resulting ICMP Fragmentation Required error isn't > actionable (even assuming you receive it) because IPv6 will not > drop it's path mtu below 1280 anyway. While the IPv4 stack > could prefrag the packets post encap, this requires the ICMP > error to be successfully delivered and causes a loss of the > original IPv6 frame (thus requiring a retransmit and latency > hit). Luckily with IPv4 if we simply don't set the DF flag, > we'll just make further fragmenting the packets some other > router's problems. > > We'll still learn the correct IPv4 path mtu through encapsulation > of larger IPv6 frames. > > I'm still not convinced this patch is entirely sufficient to make > everything happy... but I don't see how it could possibly > make things worse. > > See also recent: > 4ff2980b6bd2 'xfrm: fix tunnel model fragmentation behavior' > and friends > > Bug: 203183943 > Cc: Lorenzo Colitti > Cc: Eric Dumazet > Cc: Lina Wang > Cc: Steffen Klassert > Signed-off-by: Maciej Zenczykowski Applied, thanks a lot!