Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1771273lqg; Mon, 4 Mar 2024 03:24:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUa13z5V5Jt8aaQ+3ox/txpd/mFp2hlXMvNJeI6/TDtHTGxEmxHLt5Am4xHYtfrG6Cotqd4Xvdi/JDd9AgwnmRgCAFEtxFy/uMFqv/Q/A== X-Google-Smtp-Source: AGHT+IF3CsCsV1YTTEWqYxhqGxuk38pZh97rFWYoHY5zWILN17CEJdvklwsugJnn+kGPM5oWDQam X-Received: by 2002:a17:90b:3115:b0:29a:ea00:9d70 with SMTP id gc21-20020a17090b311500b0029aea009d70mr5472022pjb.32.1709551467212; Mon, 04 Mar 2024 03:24:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709551467; cv=pass; d=google.com; s=arc-20160816; b=q3i5Cm+xwvr/V+5nziPGvWDlHses4xTfezYS56Ti5ooebyzphk+tGkIvu1kEulgoLF kdYLHNBNBED/WjMxikFZ2evMWKNKlC32T4hmPYM9kdkE19tAYlTSGh5Ai/YeW9XmVzkY ukWPTa9vPs/atpZHTIMXablCXQTOfWPvkRJMjfIJhDBGll7d8WisesYBv+jnhAf1pApk yjEl0nQKMUWBF9Hrqa5jtqdiJy4ZandkvHA2XuZNthn44F74Y98DrpmiUrS+046SrO9u BDZP9TVpFKxtfis9emdJ3iIzrR7iKtrm2M3TWQK9v1yWEgvgKXDFKFxSzMvOm6rMmUgg /wFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=BbBNrOU8T19U458T4VJVmpR70/3fIk+koxj6CJaxPcY=; fh=o6ITclX9Fri9gywPbmoUJ7uEEHfI/91t4TBSMqpJbgA=; b=vkDw08kT7dJdB/CIFCA3ejO4/Vkxfqy+95o6eZ68a7jz2zj14fObVj/iYMZXJt+4j6 GdRwPjqsqRfrvxSt+stbrZnzZkljCFjkMjZyyzPopn8e7z1PkUeCHCIA0LfxmUkPRxYu XI7giJy6iL9oTbFuRodTrJvC8HYXvxBQuZVlzVPHMTYWs+obLW3WIxifHy7x99LytCIF wHUz+9rGemp+RsXLULpwJJzRZtsMvsPWWxt8k9/5LStTg1KeIwnYHmTPxY6Pv3yLwQlA 6ZYh+f5wq5rIjq31aqgk1qsYWZY+Xj/j3mJlvSBQJfBOxaRrDpOXg8Iu67cQf6Wsqqzd i0eg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-90506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id oc4-20020a17090b1c0400b0029aacf544c0si8493154pjb.92.2024.03.04.03.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 03:24:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-90506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90506-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DA6F72850D3 for ; Mon, 4 Mar 2024 11:24:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21EC539FCD; Mon, 4 Mar 2024 11:24:05 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07F3F37167; Mon, 4 Mar 2024 11:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709551444; cv=none; b=gp2pLCUg7amMG5KFrZF7fxLbjEeW+v98zCVIgVLDLLe28bjzwEO4VfdVNwmUWDxb4IZh1qg8pp7h/76BSg6nyqAVKEern9AvIk/52fAGD1ySHG4neTQolEYZ0jLcmAyof3exytPKwoanYh7U77mVm5zc/wfmpaLfO9a/hON1u5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709551444; c=relaxed/simple; bh=BbBNrOU8T19U458T4VJVmpR70/3fIk+koxj6CJaxPcY=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=JQ0Zgn2ePRuszfyISv4ItmMGH6uadomC33CiQhPkpiOvatIBnFJtCGdZfwAAiBmnuwkenAUjWbaKRnqst6yiaWgbupljgfhcbWfbCHZNw7iYELfdxWrSTPJaFhaSXeZeAMqUZobz7JVmZ77FxZbtoUGPXrKH+HqjLHrBNu6wceA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TpGVT6ptXz2BfBx; Mon, 4 Mar 2024 19:21:37 +0800 (CST) Received: from kwepemd100003.china.huawei.com (unknown [7.221.188.180]) by mail.maildlp.com (Postfix) with ESMTPS id 586FB1A016C; Mon, 4 Mar 2024 19:23:57 +0800 (CST) Received: from kwepemd200012.china.huawei.com (7.221.188.145) by kwepemd100003.china.huawei.com (7.221.188.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Mon, 4 Mar 2024 19:23:57 +0800 Received: from dggpemm500008.china.huawei.com (7.185.36.136) by kwepemd200012.china.huawei.com (7.221.188.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Mon, 4 Mar 2024 19:23:56 +0800 Received: from dggpemm500008.china.huawei.com ([7.185.36.136]) by dggpemm500008.china.huawei.com ([7.185.36.136]) with mapi id 15.01.2507.035; Mon, 4 Mar 2024 19:23:56 +0800 From: wangyunjian To: Jason Wang CC: "mst@redhat.com" , "willemdebruijn.kernel@gmail.com" , "kuba@kernel.org" , "bjorn@kernel.org" , "magnus.karlsson@intel.com" , "maciej.fijalkowski@intel.com" , "jonathan.lemon@gmail.com" , "davem@davemloft.net" , "bpf@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux.dev" , xudingke , "liwei (DT)" Subject: RE: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support Thread-Topic: [PATCH net-next v2 3/3] tun: AF_XDP Tx zero-copy support Thread-Index: AQHaajYcNkJKJoTBfEqyMPzDlwSi+bEmp3aAgADQ0dA= Date: Mon, 4 Mar 2024 11:23:56 +0000 Message-ID: References: <1709118356-133960-1-git-send-email-wangyunjian@huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSmFzb24gV2FuZyBbbWFp bHRvOmphc293YW5nQHJlZGhhdC5jb21dDQo+IFNlbnQ6IE1vbmRheSwgTWFyY2ggNCwgMjAyNCAy OjU2IFBNDQo+IFRvOiB3YW5neXVuamlhbiA8d2FuZ3l1bmppYW5AaHVhd2VpLmNvbT4NCj4gQ2M6 IG1zdEByZWRoYXQuY29tOyB3aWxsZW1kZWJydWlqbi5rZXJuZWxAZ21haWwuY29tOyBrdWJhQGtl cm5lbC5vcmc7DQo+IGJqb3JuQGtlcm5lbC5vcmc7IG1hZ251cy5rYXJsc3NvbkBpbnRlbC5jb207 IG1hY2llai5maWphbGtvd3NraUBpbnRlbC5jb207DQo+IGpvbmF0aGFuLmxlbW9uQGdtYWlsLmNv bTsgZGF2ZW1AZGF2ZW1sb2Z0Lm5ldDsgYnBmQHZnZXIua2VybmVsLm9yZzsNCj4gbmV0ZGV2QHZn ZXIua2VybmVsLm9yZzsgbGludXgta2VybmVsQHZnZXIua2VybmVsLm9yZzsga3ZtQHZnZXIua2Vy bmVsLm9yZzsNCj4gdmlydHVhbGl6YXRpb25AbGlzdHMubGludXguZGV2OyB4dWRpbmdrZSA8eHVk aW5na2VAaHVhd2VpL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