Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5463929rwb; Tue, 1 Aug 2023 03:04:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlGE9zcx8pvsySfh+3QH25N7tQ2LS0l+kXwPZLn/jeT5PfkIOohHEyvHUrKDjHi4NWT1PZ0C X-Received: by 2002:a17:902:e542:b0:1b8:90bd:d157 with SMTP id n2-20020a170902e54200b001b890bdd157mr15879540plf.26.1690884294885; Tue, 01 Aug 2023 03:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690884294; cv=none; d=google.com; s=arc-20160816; b=Y2pzM1AcnYXLM6DWJ07M4BdtWlRAUq0agANdhj8as+zRDj6fkECm4F2Ysdtg11fE5c 8QGCS0e26pYCa+T22ESfk1eFpNTYzAThjKRgj3BgJb1+P0rI1S+UL+zZ5+lOK/xmOYZi y5SEhD4ejtFbW2AWsTZwZInxdjvexlCydIPll0k2EwAqe/YothP3YiuAWrrbL6dXUTlG pKRagTG8NT3eRgbUFElTqNMEdDeDRL6fbn+nVN6D72to19fDAjn41lqJFOUrccWQC8Bf 3KGe+W0EOcRliltZLRGIil21cUi4AbRF/zaSbFodILB8HIRGAvjP/CzQAzaHvIMnXotq HXlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3M62lzMT5M72GxSXvEGzGefCfJz1y5FFBC42WxQiRug=; fh=3eCxjHY3jgUPaVV+HWwy9e53oqVE+n2Vvy1KPTBRUQY=; b=tCtfDiN2fYcDtsdz7i9oll8DFAEro2mnwrseK12bGNVySk3na0tUDbrLeCtxEl94BV gL9nVCMfVxuUe9K+NmrbgW2K+imIpyP/jyTTHPBvKef2oAvS9YWStvmKWNTbtJfLiK6m Opu5jfR9xskoxQKDDCe1PqnNrpH1JzhcEKfkFYLRdsKoohWSOaiqC/H39pqwBYAiQh+U ZeqCA6Inf0WYrlveFKOXih76TQsFuhEomqQvq4GwbjfOIPw4fWeVlJwMZywbmlIMWUEb 0dkEeFfC/a8IOMS5sUSfJPWxbKHMTsg9+2+fCV/8yfQQ9IVni5Tfl1FrcryVfH+jJl/B SlYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Vb8cFPoJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a170902ca0d00b001b864e1a02asi5822987pld.393.2023.08.01.03.04.33; Tue, 01 Aug 2023 03:04:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Vb8cFPoJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbjHAJkQ (ORCPT + 99 others); Tue, 1 Aug 2023 05:40:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232312AbjHAJjy (ORCPT ); Tue, 1 Aug 2023 05:39:54 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3059319BD for ; Tue, 1 Aug 2023 02:37:41 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbd33a1819so48505e9.1 for ; Tue, 01 Aug 2023 02:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690882659; x=1691487459; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3M62lzMT5M72GxSXvEGzGefCfJz1y5FFBC42WxQiRug=; b=Vb8cFPoJb2P0ZwPLqiNLSgQaAng02a45/GY4JR1Pxif45PUI+o75l36LyoVfmsACr7 Ka2pa1g2ANFFVJ1g1nbyNcVuo1VXmwhCrC5n9y7/PpD10hn/VwNgY4/Bta3E+ioc8sUD rb/O6ElNeClwTaU6dhtthc29U+Y+xlZbokIoeoOhNiQ16FJ/QgUuIqGmqAJEvxXfD8Go lW9x26DElmw/Yu1UJWK3yjYPczwlvFH0LxvpvlnYkBRtRy0/pe4Y41uDlnhU67dyPI7C HVZFDlduORA2AAJevm8Vb+nhwFP0kMfG8X+BfVjJzFDGJa4a3oeYvHZjOhwX385/Hasx Jggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690882659; x=1691487459; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3M62lzMT5M72GxSXvEGzGefCfJz1y5FFBC42WxQiRug=; b=BPpwZzDr7z7yqpkzK+hCdIqxS9w0NVpiERt/QlQ62sghNEB9Jigk0sYjxHP9VG8Q// kUWLsWikHXIu1+s2Je4d9c2IIDUnxxpodc25A5YvQs3tlarV7FHaFQBggjtfO1SqJq8f vmGyI/dv4CFAgHfHgr1TQ83AXc3EbGy2oqVeVk6H/wnSi1ZLOdPoW6MJgXGjAvTefAxh NxlzXEMtcANAT3ATUcAmLZ/OUMfzz2Xaco7TS5E2AZFuBU9P9YLE5yt6wQTRu+vbIz4z NTJPz0xYHChi/GU5tRHDnZsAudKxmONerBrGWuq68wcm/9OWA9gXyIYoidSCAPG8M6oL ScVw== X-Gm-Message-State: ABy/qLZJrYVQ4cmD4q7ZTTcRTT85TwIxJRN/IardFx2pUI55dHPGN42v Dwou+7qgrJm6sDBilpg6aetp5Pp0CBgPOJwT7COclg== X-Received: by 2002:a05:600c:1c90:b0:3f1:6fe9:4a95 with SMTP id k16-20020a05600c1c9000b003f16fe94a95mr239758wms.4.1690882659519; Tue, 01 Aug 2023 02:37:39 -0700 (PDT) MIME-Version: 1.0 References: <20230731230736.109216-1-trdgn@amazon.com> In-Reply-To: <20230731230736.109216-1-trdgn@amazon.com> From: Eric Dumazet Date: Tue, 1 Aug 2023 11:37:27 +0200 Message-ID: Subject: Re: [PATCH v2] tun: avoid high-order page allocation for packet header To: Tahsin Erdogan Cc: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Herbert Xu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 1, 2023 at 1:07=E2=80=AFAM Tahsin Erdogan wr= ote: > > When GSO is not enabled and a packet is transmitted via writev(), all > payload is treated as header which requires a contiguous memory allocatio= n. > This allocation request is harder to satisfy, and may even fail if there = is > enough fragmentation. > > Note that sendmsg() code path limits the linear copy length, so this chan= ge > makes writev() and sendmsg() more consistent. > > Signed-off-by: Tahsin Erdogan > --- I will have to tweak one existing packetdrill test, nothing major. Tested-by: Eric Dumazet Reviewed-by: Eric Dumazet Thanks.