Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1265952rwl; Thu, 10 Aug 2023 08:42:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqfTKuBuaDwW2FBmev7Dty4ESQKQ3Jiv9WTSCJKuclV8SGUd3cqQyoMC6PcuWpcJ5C72J7 X-Received: by 2002:a05:6402:3508:b0:51e:4218:b91b with SMTP id b8-20020a056402350800b0051e4218b91bmr3091994edd.1.1691682133771; Thu, 10 Aug 2023 08:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691682133; cv=none; d=google.com; s=arc-20160816; b=PnoMPZ24/CjpLZv4lwmm5pHTC7jnaYNI0GF+1bZmJSS2XnIEwKYRh0BdGZFKpGBkq3 xsp42PMaRhPZB6IOtFrmmKN9PjYds3L/i9L47hd9eifNT+kRFAOKx4B3DER/exXrGPNg TqwW5iHJqd/ksBzH/CkQa/tdFogaN/Xlr2Dbf7pdeUijvSCJHA3TIrDFPY+dsY5Mh91m szPU143g19xAGx3APsRcaDDwrFwa1Wcug6VrV2K531CvFiM1YAY+S2JRsfzwipc/M4TP ZRsjIW4PrkabWIF3rQ4w0D8MVjMZ7Mo8+pJGOlRQLcga9HXNUJiiZ0ntEEVSU2vaGUWO rwmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=Bvw8YvdgNBQrpsheEQ2rQUvV3iq1U97lLZrULuXMDMs=; fh=Rq8yanoRDhrcJhpeHHvaOZ1I7XdZTnlAbldfs1n0yhg=; b=irfK3YAEtKo/OQT1uLJB2Uz7jZ/x7CmRB5WUeqLvoZlarvzA3eHjSy0TVupwEOkLIQ elxyXI15nkFYSBo4DEjuY1K6TZM09RaxXkLlNypLyzRgZPWHg5n8cyujLxblETgBNrto 1fXn5jeXiPB1bIIKLHvblb+RwlG1ObG2uLMACr4CCNhMgWe6Srl0AwIGrV6YatXLWMgE EVflsrJimIVweN+wa7C3i8O6ttITLnET+MtQ7oj1r9vANL7aNKulZpBMDgiJF4nPCqP4 7qq91moZeTxn0HX+zWlNytERlWH+ItlGFIooV8/nZMX+eGGwfgADmpeQZjk7qeNS1pJ9 Q/fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=MT6tgtna; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo12-20020a0564020b2c00b0052314d7364csi1688009edb.142.2023.08.10.08.41.48; Thu, 10 Aug 2023 08:42:13 -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=@gmail.com header.s=20221208 header.b=MT6tgtna; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235508AbjHJOEX (ORCPT + 99 others); Thu, 10 Aug 2023 10:04:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235311AbjHJOEV (ORCPT ); Thu, 10 Aug 2023 10:04:21 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5910426A9; Thu, 10 Aug 2023 07:04:21 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-63d30554eefso5881376d6.3; Thu, 10 Aug 2023 07:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691676260; x=1692281060; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=Bvw8YvdgNBQrpsheEQ2rQUvV3iq1U97lLZrULuXMDMs=; b=MT6tgtnaPVBnDX1/jqNuZTikjkdy/v7dbMQcgYVXfQDEneiPJDdbLoAi6RSDSyYZLe Yz5fdQuOkXLbFf+CREPHQBav9P9kC/lwhAANwrnpV0ROj/Sl2shYVSPsQ+/3XXM1Ng6b 5yg+GrasWSnc5Kcx1QWDEPNf/OpoFcqEGwfp6eUN8FxEy7KLdP5mq1JxTfl46p3X+wTx HV421oyUX6EPdNboTTA3tCFOFsJb3pTOlITfzEJoMolSkV/Wiyqw6tX6H2G0knKW9dD9 we2RbbGuYvti3h0t3Yoxcdx3TjBi8m7cZl8idxX0lCVctcK21cBote/q1c5mmgRvcw6f /kgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691676260; x=1692281060; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Bvw8YvdgNBQrpsheEQ2rQUvV3iq1U97lLZrULuXMDMs=; b=b2xtVHdI4n5m4lmDdh1AWvbNcKBNE1wvnt0L558lryVfZTzmMWTMXRe3E++YcH2kbL SWIeHMqrEYixGKkF98Kyk/lxhcBYozdQocF39Kcdj2huBTWgmlnfURiYTz7y+23JSjS4 QCBi9fAgi30LyLW9JqjFmx6Me2WP5jisgWChb4/63L7mX4aIDfLguN9g2qve+RYCk5QO +dwm5wWOuSy5vA3R6qCidmP5ASDhQOQYjriqLLskSYSzmiwY9UTZYPOMrjl5SnDUQsiv EoxeT0iLXd8MRiA81ml8I5lfKhMmawrgvyRj0B2DKER/c1fxE9FwfHw5101ck0LZHb1r Q0+w== X-Gm-Message-State: AOJu0Yxlvc4v0WrN4J50UNeZcj6jc1e+VocgKJkE0WdKO9+SqPOFxi3N vRl4ZfTbqbWOt4GORCf4LSg= X-Received: by 2002:a05:6214:5283:b0:639:91ad:64d6 with SMTP id kj3-20020a056214528300b0063991ad64d6mr2357058qvb.61.1691676260347; Thu, 10 Aug 2023 07:04:20 -0700 (PDT) Received: from localhost (172.174.245.35.bc.googleusercontent.com. [35.245.174.172]) by smtp.gmail.com with ESMTPSA id d5-20020a0cdb05000000b0062b76c29978sm504864qvk.6.2023.08.10.07.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 07:04:19 -0700 (PDT) Date: Thu, 10 Aug 2023 10:04:19 -0400 From: Willem de Bruijn To: Tahsin Erdogan , Willem de Bruijn , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Herbert Xu Cc: Tahsin Erdogan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <64d4ee63a11e9_8e54c294a9@willemb.c.googlers.com.notmuch> In-Reply-To: <20230809164753.2247594-1-trdgn@amazon.com> References: <20230809164753.2247594-1-trdgn@amazon.com> Subject: Re: [PATCH v4] tun: avoid high-order page allocation for packet header Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tahsin Erdogan wrote: > When gso.hdr_len is zero and a packet is transmitted via write() or > writev(), all payload is treated as header which requires a contiguous > memory allocation. 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 change > makes write()/writev() and sendmsg() paths more consistent. > > Signed-off-by: Tahsin Erdogan Reviewed-by: Willem de Bruijn