Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp629763rwl; Wed, 9 Aug 2023 21:56:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHon1qsArIfZnW1yRONMAg0jCV+Fu+4+fr9garzDmweAD9ovFYbTDZMGuZkdYL+V5cETgSv X-Received: by 2002:a17:907:77c4:b0:992:a80e:e5bd with SMTP id kz4-20020a17090777c400b00992a80ee5bdmr1183379ejc.48.1691643413679; Wed, 09 Aug 2023 21:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691643413; cv=none; d=google.com; s=arc-20160816; b=VlTND07gzEPQpyQS73XtBRlB0GjcWeFF4mNLoH8AwehYQnfQbo45OO1GvljKsncUtb 0/kEr11EIxaLLgm3PLvKAtwn5ZnjVfO30SBesrOSMFmV2rJv5+tTzoxJ/xasve4QN6Rj qYC5gYeEPoXazXAEycvEsu0xiLXMRf8RiesIpu23KikPMTHDERIBDPeLZ9cSL6/XZnjI mZeR0advLIU9wpFQs0RwxdM28ga1ojcs56tEzu+eEazKTA7zpW9/Lk+YVYrA+Luuq6EM VsKMGtFoBd0jXLQdU5Sr57GaSH40ih0ETQoZyXhzwpkr2WQzv+PI+jftP0jtw9d2nKpv CFLA== 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=FSXOWT6dcdztqmjZzbfXKd/Gq/opxoDLOcxehy7PRw0=; fh=K4tpQeoT4QTWoD3uq3GuIo8zRHA3/cjYLW1ULplVX2M=; b=R+CWJ/5OnuCJtVf5GWGwviT7vgtiCxQPyFjpzYJxZj859eu/P4Lq4YOxS6TQJlS+Gz BeCbR5FYIwR6fuzldMjsQLXBIlQhwby+GDN+fBe5tvYj31GLkkkLdAcW5c/qYDLfyXuK RJE4xT5V0tDWHik/npfO9UaiGAPajYhDjpTVPHKOOCu4INkg6W+cb1Mr0xvsVEPVvYkd geDMXZ4RGJR0wbmC0BvLKe07LtTV8H+xegeUuVYzyUl6kijFCcZHSk/6xqXaRGLbcX2A weVyOrxVoZWtC6QQCeQ3EELOht69NGW0s3WK6tXtArctNcpzOqlrtg4GYXDuT50vTtTA wToA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UucR7XVt; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a1709061c8b00b0099bd5bedfcbsi758167ejh.422.2023.08.09.21.56.29; Wed, 09 Aug 2023 21:56:53 -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=@redhat.com header.s=mimecast20190719 header.b=UucR7XVt; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbjHJDii (ORCPT + 99 others); Wed, 9 Aug 2023 23:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjHJDif (ORCPT ); Wed, 9 Aug 2023 23:38:35 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 689AD2100 for ; Wed, 9 Aug 2023 20:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691638669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FSXOWT6dcdztqmjZzbfXKd/Gq/opxoDLOcxehy7PRw0=; b=UucR7XVtWug/HHaJE6SoV1x5jRRfVrCiRGLiGv7/oBV3uRlccqgrL2T7LgJZ1HgutpgmFV JZLFeNcjxtcrbRuWeoWZftPsV8ROtaxj+awbqjVqBx/u4gxU4WwEyttKH3pHuS36aeBA69 u0DY1LysGaXUCAq8GmwCj4t0G6T/IB8= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-336-Glc78wEDNv-kE6O4U5McxA-1; Wed, 09 Aug 2023 23:37:48 -0400 X-MC-Unique: Glc78wEDNv-kE6O4U5McxA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2ba077dcbbcso4924231fa.2 for ; Wed, 09 Aug 2023 20:37:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691638666; x=1692243466; 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=FSXOWT6dcdztqmjZzbfXKd/Gq/opxoDLOcxehy7PRw0=; b=iP9joVKYYoV2NE7CAiIU7DIFS40Y3IuKq2sZMxJrlrGVxVorOSXs0XDL8/O07GCj5d XsoTWw/q/+ESJjA59yXcRMScI3xSep8QMT08ZwEKm5e/72xKOSWvp5btAaaKrf5JW75L FgorpXF/gbKmZu9RICZviHS3bYvAv2qBPDeB8siNS+bwmPfFXy3E+DMvjlvCChr+TtCI Ffzo1EYT7KcEjGIBuqycqVNUO2aDcv1l6+nktRyfRweuJ6AMDYhDxuoA9RocCh4s4d2L JcfY53BkL3OX74zQvFQdThw15yWkFAU9V2rvy5alozmkU+SqviuE/jVvKx75RLxfZaZ9 YQ0A== X-Gm-Message-State: AOJu0YyRvoYDQKW7tEUO9zI8UH7MNzv2HOvD7EfEemQAmbgZrV5+fLFM Cw31XC2kFsOZoDb57c0cLaVZmRsaBBN6pbtCxjMM1etkgp1XZ0Dt3NUrkLi1nisYiqHY8smZIlS o0MXmdAEU0HPvcrOEr2QWzybJMAxCobcITehAjVaP X-Received: by 2002:a2e:9447:0:b0:2b6:cd6a:17f7 with SMTP id o7-20020a2e9447000000b002b6cd6a17f7mr782542ljh.20.1691638666802; Wed, 09 Aug 2023 20:37:46 -0700 (PDT) X-Received: by 2002:a2e:9447:0:b0:2b6:cd6a:17f7 with SMTP id o7-20020a2e9447000000b002b6cd6a17f7mr782529ljh.20.1691638666517; Wed, 09 Aug 2023 20:37:46 -0700 (PDT) MIME-Version: 1.0 References: <20230809164753.2247594-1-trdgn@amazon.com> In-Reply-To: <20230809164753.2247594-1-trdgn@amazon.com> From: Jason Wang Date: Thu, 10 Aug 2023 11:37:35 +0800 Message-ID: Subject: Re: [PATCH v4] tun: avoid high-order page allocation for packet header To: Tahsin Erdogan Cc: Willem de Bruijn , "David S. Miller" , Eric Dumazet , 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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Thu, Aug 10, 2023 at 12:48=E2=80=AFAM 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 chan= ge > makes write()/writev() and sendmsg() paths more consistent. > > Signed-off-by: Tahsin Erdogan > --- > v4: updated commit message address comments from Willem > v3: rebase to latest net-next > v2: replace linear =3D=3D 0 with !linear > v1: https://lore.kernel.org/all/20230726030936.1587269-1-trdgn@amazon.com= / Acked-by: Jason Wang Thanks