From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0599C00A89 for ; Thu, 5 Nov 2020 04:41:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4314F2083B for ; Thu, 5 Nov 2020 04:41:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mj7WaTYL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730241AbgKEEl4 (ORCPT ); Wed, 4 Nov 2020 23:41:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728784AbgKEElz (ORCPT ); Wed, 4 Nov 2020 23:41:55 -0500 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB8A4C0613D1 for ; Wed, 4 Nov 2020 20:41:55 -0800 (PST) Received: by mail-io1-xd44.google.com with SMTP id r12so492579iot.4 for ; Wed, 04 Nov 2020 20:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Duq9dQW5Jzdb3ujMdT0fiNUQPULoX6VzrLszCWfIuRA=; b=mj7WaTYLQl8Z8R2+cxErwAk6QYCYtuk0BSwcy4Vo6G0ibhWEaIHAlS9ZYRLPxt+FCx Ehwxe3anN94g13po/UTX3cYHwWT4ZbCnWjCnCH9k2rHZXv4p+2T1zSd7KTQhEGsiNqDL z/BB4MVSBP/8yJStYTBVtCP72D+noVuyGO1qFuFka+VAnKVKL7lF5R7BrKeFDZdfiZOn sHHoU8m7LaCUdbERPUlYZ0YudsrKxdNhNthytEuK4SJiXAsU99bI537BL0UE9YN0cWNy sDTdTQWAMMIEftHdjNxEL+SE6RyqW9gln7MNiTb2LiXaDtzkU65EEilv3cmgskHuQ5vN JKmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Duq9dQW5Jzdb3ujMdT0fiNUQPULoX6VzrLszCWfIuRA=; b=SE4BSiXgCTcDIrSSh8mLFPNSCBiuGrA3CZfa8di0QFLUcgDH2oU04ereFX36eEUyO8 r7xB6hv8S0nwY+UM/k8YN9j105OyDf+8whprA5jpX7ONKnyrRBnfq2/PT9d32NpGFGcS LyenUNNQpEJD4bAA/wuY8f78ZSUdzvXXaYm6AgYwXahbXMIrTYVudpyo1yR164mGHe1R jrLzo7dY9zt9OMTGAdWkb/G0bgkYVOdtTjbL44JbOFPJUAnetG/YZvMoHz5NqeVE2egi bj6VxIh8d8mozO5orR6U4Mxbth3i2v0CJa4N2ID9fBkRorallLjq4alX29/JWSeUs236 xCog== X-Gm-Message-State: AOAM532nJDCWipVh/U8GkUkRw0aGOsc+qVqXt3Gts4MlGziVcOIf9dGL O/qtL92OW3ptUyfSJvSUlx6m4/pe9nH4KOQQhAidh9YGG/U= X-Google-Smtp-Source: ABdhPJx1PyyQdfrnX4KUFq0a8rT1VNgnT1Ph8zJ9ue/a9y+4slW5/MkhfLkG8nrxOVPwFfwBEqkdYaKGgzycLmiPxEY= X-Received: by 2002:a02:cc77:: with SMTP id j23mr722712jaq.20.1604551314784; Wed, 04 Nov 2020 20:41:54 -0800 (PST) MIME-Version: 1.0 References: <20200909062613.18604-1-lina.wang@mediatek.com> <20200915073006.GR20687@gauss3.secunet.de> <1600160722.5295.15.camel@mbjsdccf07> <20200915093230.GS20687@gauss3.secunet.de> <1600172260.2494.2.camel@mbjsdccf07> <20200917074637.GV20687@gauss3.secunet.de> <1600341549.32639.5.camel@mbjsdccf07> <1604547381.23648.14.camel@mbjsdccf07> In-Reply-To: <1604547381.23648.14.camel@mbjsdccf07> From: =?UTF-8?Q?Maciej_=C5=BBenczykowski?= Date: Wed, 4 Nov 2020 20:41:43 -0800 Message-ID: Subject: Re: [PATCH] xfrm:fragmented ipv4 tunnel packets in inner interface To: "lina.wang" Cc: Steffen Klassert , "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski , Herbert Xu , Matthias Brugger , Linux NetDev , Kernel hackers , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Lorenzo Colitti , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 4, 2020 at 7:53 PM lina.wang wrote: > > Besides several operators donot fragment packets even DF bit is not set, > and instead just drop packets which they think big, maybe they have a > consideration--- fragmentation is expensive for both the router that > fragments and for the host that reassembles. > > BTW, ipv6 has the different behaviour when it meets such scenary, which > is what we expected,ipv4 should follow the same thing. otherwise, > packets are drop, it is a serious thing, and there is no hints. What we > do is just fragmenting smaller packets, or is it possible to give us > some flag or a sysctl to allow us to change the behaviour? > > On Thu, 2020-09-17 at 19:19 +0800, lina.wang wrote: > > But it is not just one operator's broken router or misconfigured > > router.In the whole network, it is common to meet that router will drop > > bigger packet silently.I think we should make code more compatible.and > > the scenary is wifi calling, which mostly used udp,you know, udp > > wouldnot retransmit.It is serious when packet is dropped > > > > On Thu, 2020-09-17 at 09:46 +0200, Steffen Klassert wrote: > > > On Tue, Sep 15, 2020 at 08:17:40PM +0800, lina.wang wrote: > > > > We didnot get the router's log, which is some operator's.Actually, after > > > > we patched, there is no such issue. Sometimes,router will return > > > > packet-too-big, most of times nothing returned,dropped silently > > > > > > This looks like a broken router, we can't fix that in the code. > > > > > > > On Tue, 2020-09-15 at 11:32 +0200, Steffen Klassert wrote: > > > > > On Tue, Sep 15, 2020 at 05:05:22PM +0800, lina.wang wrote: > > > > > > > > > > > > Yes, DF bit is not set. > > > > > > > > > > ... > > > > > > > > > > > Those two packets are fragmented to one big udp packet, which payload is 1516B. > > > > > > After getting rid of tunnel header, it is also a udp packet, which payload is > > > > > > 1466 bytes.It didnot get any response for this packet.We guess it is dropped > > > > > > by router. Because if we reduced the length, it got response. > > > > > > > > > > If the DF bit is not set, the router should fragment the packet. If it > > > > > does not do so, it is misconfigured. Do you have access to that router? I'm afraid I don't really understand the exact scenario from the description of the patch. However... a few questions come to mind. (a) why not set the DF flag, does the protocol require > mtu udp frames (b) what is the mtu of the inner tunnel device, and what is the mtu on the route through the device? - shouldn't we be udp fragmenting to the route/device mtu? maybe stuff is simply misconfigured...