From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D7869A052A; Wed, 23 Dec 2020 09:03:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29B25CA6A; Wed, 23 Dec 2020 09:03:39 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D4B20CA39; Wed, 23 Dec 2020 09:03:35 +0100 (CET) IronPort-SDR: S5/uCy5Te+pxcOVr8a56pixl2J9IiqJDzy9Dew3y/dbLj3/UoPddoDtlicq/WU8ilAnEIvtVDW 5Trn8yaekm4g== X-IronPort-AV: E=McAfee;i="6000,8403,9843"; a="237540598" X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="237540598" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 00:03:32 -0800 IronPort-SDR: ZmO7DhMoVFi93pG6JTmqdjZgCORMyl16fb6tgoy/bcwZ/twx3HHy4zU2hgQI53zCkplpQbmKxk k2bk4mqAPclg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="346139890" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga006.jf.intel.com with ESMTP; 23 Dec 2020 00:03:31 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Dec 2020 00:03:29 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Dec 2020 16:03:27 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Wed, 23 Dec 2020 16:03:27 +0800 From: "Zhang, Qi Z" To: Igor Ryzhov , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix counters Thread-Index: AQHWvL+oR9tSGnUcQUmJzbVWDps3jqoEioUw Date: Wed, 23 Dec 2020 08:03:27 +0000 Message-ID: References: <20201117085639.40307-1-iryzhov@nfware.com> In-Reply-To: <20201117085639.40307-1-iryzhov@nfware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix counters X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > -----Original Message----- > From: dev On Behalf Of Igor Ryzhov > Sent: Tuesday, November 17, 2020 4:57 PM > To: dev@dpdk.org > Cc: stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/i40e: fix counters >=20 > When low and high registers are read separately, this opens the door to a= race > condition: > - low register is read > - NIC updates the registers > - high register is read >=20 > Because of this, we may end up with an incorrect counter value. > Let's read the registers in one shot, as it is done in Linux kernel since= the > introduction of the i40e driver. >=20 > Fixes: 4861cde46116 ("i40e: new poll mode driver") > Cc: stable@dpdk.org > Signed-off-by: Igor Ryzhov Acked-by: Qi Zhang Applied to dpdk-next-net-intel. Thanks Qi