Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2604274pxj; Mon, 10 May 2021 06:51:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhmR0/PAl9X9vSRz/60gdPR2w5rAHQjz2AgYQPxVHrvo7fllYtR9YcRS/VdWIarJVs2TFb X-Received: by 2002:a05:6402:124f:: with SMTP id l15mr19974386edw.131.1620654685873; Mon, 10 May 2021 06:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620654685; cv=none; d=google.com; s=arc-20160816; b=PzHX6cY2vnHIcm7rVkwlk+yz9fxVhCbY42c+2IbjyUELP6PudnD5BOFO7oOePzTiOc pfXHKjNLJhUL308C5p4Rdm5r/srRPlkTBjKWWvU/geobap/UhWBXqc2dNDkDuOloEAql JsptUz0QgW2NwaadyYzh1n0b/X31H9b5afrlKiJslswdZ9N3BzAAfZqqsH2JAa1xgSxn u4HCWYbql1kMzpeVWmxkbvJGMlADBeJceM05tnWrApMi0K+vQf/GepkxKNDPi8piy+aU KSVTavPPcuLMaCtsI9IhIIdzc90jwdlOYRRrShsAQq28d6/yfplr3KokEJVT66owmZlm 6o/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XnLqubyFOR9LLpachU5WliqicYmoNsbEP8N7g/v6r6U=; b=NBgXKs/DFqxlQ7+dT9q6zrRU4L/c+lSqi438Qvhayqp68d79MRMthiFHQYbjHL3m+U ZUhaf0+e1oiPrBDErKQJERoA4U8rOHlbxqU9EHI1d+WV0mG00DLwwUl7tUFsqgCTHdJO bCMa1YONav/38Q1vFHLnRWrWl218Wcs0L4LuYlzT1ItX4Cbg8J7Mr3s5f5x9HtuAMtEn oPWVNdsju6Dbt1+bQopqH7lp0uFhhQSQupHMw0yherZaPIYz5PkIf13cSDxtufcz31Dd OhhcWLTSJtkB35fjGmjr+MpgMmsJhUNjRGyqob5UeVCtatdva86YIyl5JWWcM24bzurF Hm+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="k/bfDeWh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x16si14459588edd.495.2021.05.10.06.51.01; Mon, 10 May 2021 06:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="k/bfDeWh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237685AbhEJNtJ (ORCPT + 99 others); Mon, 10 May 2021 09:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353182AbhEJNjp (ORCPT ); Mon, 10 May 2021 09:39:45 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6169CC0611B5 for ; Mon, 10 May 2021 06:27:06 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id zg3so24522173ejb.8 for ; Mon, 10 May 2021 06:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XnLqubyFOR9LLpachU5WliqicYmoNsbEP8N7g/v6r6U=; b=k/bfDeWhlQNeG23nj64PAeOmwKRfvE2ovDxO6X2A1L3YeT5UYbWjRhbwVJPMGptd6Z sH4Y89NMdaZjDLOUhBtTf+rKgJzWHy7HcEyydPkWaP8Z5seKbE2/6TCydWgBdzt2Rtv5 UHJ9Q+w5V7q4/qL2E5Bn8cqBbbCH4wAzHq6kgdHMm6/HmBNQ7piu0+rlSQBnNml9HySx oACdJ9WoZL98kwXnxAv+dQcVxFetvguq1eNonYQp2bhpAc2SlK+/LUfeiNmZjMzAHNWp cTaBJfVirHbCslxUU9nyAE2dDvWRa8NdNE4VsuqKZFKTq+shDGPk7eVoRTNtea38SV61 O/mg== 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=XnLqubyFOR9LLpachU5WliqicYmoNsbEP8N7g/v6r6U=; b=dXA9SdFOpCdB+EtsuVE2gKyLCRgZesK6TOrCs9E9AMwXQH4pjqN21p7UdFBOUyZGJY NPJ56Vf6NAwcR9Lq3wVvMO41n/rxlM+7zMPWnbQN2v3DoUFau7LQyxDKMVRiU+lkdXsF TlQf/c1WiIM8hhOfTIFFS/ggadftnhscJKXpF9BKoXfVtBtVmWi4MaCkkvv6oBA+Gw4w FiMAkSTi2CRTtAWsvGZzT+ovQ2Zp5awlWitA5UDzCD/y4+eRe26smFMcy0meCYVmCR5k UGm5/o3YSOKXuivkb8MIO9tR94m6f17NITbGL4cx43OPcEl5IdpLvvTkSSadj3Y8h7C9 5ZSg== X-Gm-Message-State: AOAM530J7dwt4OIdM9ooKZdoUoKc0bxFSyasH8ap41qcWQzh86R897ot B9rCj+6bMLb3KKP4BP3050aWcvcKVb/kwg== X-Received: by 2002:a17:906:c0c6:: with SMTP id bn6mr25251622ejb.436.1620653224901; Mon, 10 May 2021 06:27:04 -0700 (PDT) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com. [209.85.128.48]) by smtp.gmail.com with ESMTPSA id b9sm11157529edt.2.2021.05.10.06.27.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 May 2021 06:27:04 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id g65so9195311wmg.2 for ; Mon, 10 May 2021 06:27:04 -0700 (PDT) X-Received: by 2002:a1c:c385:: with SMTP id t127mr26715596wmf.169.1620652820784; Mon, 10 May 2021 06:20:20 -0700 (PDT) MIME-Version: 1.0 References: <1619690903-1138-1-git-send-email-dseok.yi@samsung.com> <8c2ea41a-3fc5-d560-16e5-bf706949d857@iogearbox.net> <02bf01d74211$0ff4aed0$2fde0c70$@samsung.com> <02c801d7421f$65287a90$2f796fb0$@samsung.com> <001801d742db$68ab8060$3a028120$@samsung.com> <436dbc62-451b-9b29-178d-9da28f47ef24@huawei.com> <007001d7431a$96281960$c2784c20$@samsung.com> <00c901d74543$57fa3620$07eea260$@samsung.com> In-Reply-To: <00c901d74543$57fa3620$07eea260$@samsung.com> From: Willem de Bruijn Date: Mon, 10 May 2021 09:19:43 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf] bpf: check for data_len before upgrading mss when 6 to 4 To: Dongseok Yi Cc: Willem de Bruijn , Yunsheng Lin , Daniel Borkmann , bpf , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Network Development , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > That generates TCP packets with different MSS within the same stream. > > > > My suggestion remains to just not change MSS at all. But this has to > > be a new flag to avoid changing established behavior. > > I don't understand why the mss size should be kept in GSO step. Will > there be any issue with different mss? This issue has come up before and that has been the feedback from TCP experts at one point. > In general, upgrading mss make sense when 6 to 4. The new flag would be > set by user to not change mss. What happened if user does not set the > flag? I still think we should fix the issue with a general approach. Or > can we remove the skb_increase_gso_size line? Admins that insert such BPF packets should be aware of these issues. And likely be using clamping. This is a known issue. We arrived that the flag approach in bpf_skb_net_shrink. Extending that to bpf_skb_change_proto would be consistent.