From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25F19A034F; Sat, 16 Oct 2021 10:59:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABDA840141; Sat, 16 Oct 2021 10:59:15 +0200 (CEST) Received: from m13193.mail.163.com (m13193.mail.163.com [220.181.13.193]) by mails.dpdk.org (Postfix) with ESMTP id 972E94003F for ; Sat, 16 Oct 2021 10:59:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=OMxGA pnSwzWpqwkUlWfFqkzeAUm4DeazLCpcABc9dqg=; b=bzVbwcbB6BDQ9OCMQ6Mvv gqictgbqBZTM0natTLG17gXTaI0+5Wph17tagXSNMW+S1uGWcmPQD+mqby7YzNYD rXgHfH+r4P5rFN4sIHinJc04p8mpC2oG+j+8jNCeEdDu3ZoknQx833UKJSOO0YdP MW4nEvhOE7qdQBrZCMCWZo= Received: from gaoxiangliu0$163.com ( [2409:8928:418:1b3a:b50b:7635:a975:f720] ) by ajax-webmail-wmsvr193 (Coremail) ; Sat, 16 Oct 2021 16:59:08 +0800 (GMT+08:00) X-Originating-IP: [2409:8928:418:1b3a:b50b:7635:a975:f720] Date: Sat, 16 Oct 2021 16:59:08 +0800 (GMT+08:00) From: "Gaoxiang Liu" To: "maxime.coquelin" Cc: "Xia, Chenbo" , dev , liugaoxiang X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20210622(1d4788a8) Copyright (c) 2002-2021 www.mailtech.cn 163com In-Reply-To: <6bd35937-2042-ad51-5c17-f75621f0e837@redhat.com> References: <20210927013022.131-1-gaoxiangliu0@163.com> <20210928014348.1747-1-gaoxiangliu0@163.com> <6bd35937-2042-ad51-5c17-f75621f0e837@redhat.com> MIME-Version: 1.0 Message-ID: <19420500.1a7f.17c88538950.Coremail.gaoxiangliu0@163.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: wcGowAC3Vx5dlGphO3YHAQ--.42774W X-CM-SenderInfo: xjdr5xxdqjzxjxq6il2tof0z/1tbi6wEuOlXlx2aEGgABsw X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v2] net/vhost: merge vhost stats loop in vhost Tx/Rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SGksIE1heGltZQpJIGFncmVlIHdpdGggeW91LlRoZSBpbmxpbmUgc2hvdWxkIGJlIGFkZGVkIHRv IHZob3N0X3VwZGF0ZV9zaW5nbGVfcGFja2V0X3hzdGF0cyBmdW5jdGlvbi4KSSB3aWxsIGZpeCBp dCBpbiBbUEFUQ0ggdjNdLgoKVGhhbmtzLApHYW94aWFuZwoKCgrlj5Hoh6og572R5piT6YKu566x 5aSn5biICgoKCgotLS0tIOWbnuWkjeeahOWOn+mCruS7tiAtLS0tCnwg5Y+R5Lu25Lq6IHwgTWF4 aW1lIENvcXVlbGluPG1heGltZS5jb3F1ZWxpbkByZWRoYXQuY29tPiB8Cnwg5pel5pyfIHwgMjAy MeW5tDEw5pyIMTXml6UgMjA6MTYgfAp8IOaUtuS7tuS6uiB8IEdhb3hpYW5nIExpdTxnYW94aWFu Z2xpdTBAMTYzLmNvbT7jgIFjaGVuYm8ueGlhQGludGVsLmNvbTxjaGVuYm8ueGlhQGludGVsLmNv bT4gfAp8IOaKhOmAgeiHsyB8IGRldkBkcGRrLm9yZzxkZXZAZHBkay5vcmc+44CBbGl1Z2FveGlh bmdAa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