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 AEA2BA0C41; Wed, 6 Oct 2021 12:42:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E29E410F2; Wed, 6 Oct 2021 12:42:31 +0200 (CEST) Received: from m13193.mail.163.com (m13193.mail.163.com [220.181.13.193]) by mails.dpdk.org (Postfix) with ESMTP id 59F1240696 for ; Wed, 6 Oct 2021 12:42:28 +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=c8zZR v05RaJilt5Se0LB89lKEerSfSeRoz5CzhYOXds=; b=CNYOC7qfMV9mVk9NzrSBg VVilNgDcbI97ty/jMvwnOAtxReo0uwVJ6nrSpn8E2r7TZTS61x9LufoF/hCjZTVV WQyt9zqwlxVHzeuH84P33Pu8NXd6gK4bNX8k86cIL5DsLPoC5i0QJszWJ8ZgJV5R r9kPKomOaAotMtKWnlU3gs= Received: from gaoxiangliu0$163.com ( [2409:8928:444:6c76:e846:367a:26fd:17fe] ) by ajax-webmail-wmsvr193 (Coremail) ; Wed, 6 Oct 2021 18:42:22 +0800 (GMT+08:00) X-Originating-IP: [2409:8928:444:6c76:e846:367a:26fd:17fe] Date: Wed, 6 Oct 2021 18:42:22 +0800 (GMT+08:00) From: "Gaoxiang Liu" To: "maxime.coquelin@redhat.com" , "chenbo.xia@intel.com" Cc: "dev@dpdk.org" , "liugaoxiang@huawei.com" , "Gaoxiang Liu" 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: <20210928014348.1747-1-gaoxiangliu0@163.com> References: <20210927013022.131-1-gaoxiangliu0@163.com> <20210928014348.1747-1-gaoxiangliu0@163.com> X-CM-CTRLMSGS: azmQjg== MIME-Version: 1.0 Message-ID: <43c4ef7.66d5.17c553275da.Coremail.gaoxiangliu0@163.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: wcGowADXdx6QfV1hMKMBAQ--.51101W X-CM-SenderInfo: xjdr5xxdqjzxjxq6il2tof0z/xtbB3QEkOmBHKlmxIAADsE X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=GBK 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" SGksIE1heGltZSwgQ2hlbmJvClBsZWFzZSBoZWxwIHRvIHJldmlldyB0aGUgcGF0Y2guCgpUaGFu a3MuCkdhb3hpYW5nCgoKCgoKCk9uIDA5LzI4LzIwMjEgMDk6NDMsIEdhb3hpYW5nIExpdSB3cm90 ZToKVG8gaW1wcm92ZSBwZXJmb3JtYW5jZSBpbiB2aG9zdCBUeC9SeCwgbWVyZ2Ugdmhvc3Qgc3Rh dHMgbG9vcC4KZXRoX3Zob3N0X3R4IGhhcyAyIGxvb3Agb2Ygc2VuZCBudW0gaXRlcmFpb24uCkl0 IGNhbiBiZSBtZXJnZSBpbnRvIG9uZS4KZXRoX3Zob3N0X3J4IGhhcyB0aGUgc2FtZSBpc3N1ZSBh cyBUeC4KCkZpeGVzOiA0ZDZjZjJhYzkzZGMgKCJuZXQvdmhvc3Q6IGFkZCBleHRlbmRlZCBzdGF0 aXN0aWNzIikKClNpZ25lZC1vZmYtYnk6IEdhb3hpYW5nIExpdSA8Z2FveGlhbmdsaXUwQDE2My5j b20+Ci0tLQoKdjI6CiogRml4IGNvZGluZyBz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Bwc3RhdHMtPnhzdGF0c1tWSE9TVF9CWVRFXSAr PSBuYl9ieXRlczsKLSAgICAgcHN0YXRzLT54c3RhdHNbVkhPU1RfTUlTU0VEX1BLVF0gKz0gbmJf bWlzc2VkOwotICAgICBwc3RhdHMtPnhzdGF0c1tWSE9TVF9VTklDQVNUX1BLVF0gKz0gbmJfbWlz c2VkOwotCi0gICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudCA7IGkrKykgewotICAgICAgICAgIHBz dGF0cy0+eHN0YXRzW1ZIT1NUX1BLVF0rKzsKLSAgICAgICAgICBwa3RfbGVuID0gYnVmc1tpXS0+ cGt0X2xlbjsKLSAgICAgICAgICBpZiAocGt0X2xlbiA9PSA2NCkgewotICAgICAgICAgICAgICAg cHN0YXRzLT54c3RhdHNbVkhPU1RfNjRfUEtUXSsrOwotICAgICAgICAgIH0gZWxzZSBpZiAocGt0 X2xlbiA+IDY0ICYmIHBrdF9sZW4gPCAxMDI0KSB7Ci0gICAgICAgICAgICAgICBpbmRleCA9IChz aXplb2YocGt0X2xlbikgKiA4KQotICAgICAgICAgICAgICAgICAgICAtIF9fYnVpbHRpbl9jbHoo cGt0X2xlbikgLSA1OwotICAgICAgICAgICAgICAgcHN0YXRzLT54c3RhdHNbaW5kZXhdKys7Ci0g ICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgIGlmIChwa3RfbGVuIDwgNjQpCi0gICAg ICAgICAgICAgICAgICAgIHBzdGF0cy0+eHN0YXRzW1ZIT1NUX1VOREVSU0laRV9QS1RdKys7Ci0g ICAgICAgICAgICAgICBlbHNlIGlmIChwa3RfbGVuIDw9IDE1MjIpCi0gICAgICAgICAgICAgICAg ICAgIHBzdGF0cy0+eHN0YXRzW1ZIT1NUXzEwMjRfVE9fMTUyMl9QS1RdKys7Ci0gICAgICAgICAg ICAgICBlbHNlIGlmIChwa3RfbGVuID4gMTUyMikKLSAgICAgICAgICAgICAgICAgICAgcHN0YXRz LT54c3RhdHNbVkhPU1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