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 BF7D64571D; Fri, 2 Aug 2024 19:28:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A04940E22; Fri, 2 Aug 2024 19:28:32 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id E1C2E40E0A for ; Fri, 2 Aug 2024 19:28:30 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id B5D5D2099B; Fri, 2 Aug 2024 19:28:30 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 Subject: RE: [PATCH] netvsc: optimize stats counters performance Date: Fri, 2 Aug 2024 19:28:26 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F5F3@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] netvsc: optimize stats counters performance Thread-Index: AQHa5On7Gn55khEDqUSxonnBGhTFxbIULTMAgAAC8FA= References: <20240802144048.270152-1-mb@smartsharesystems.com> From: =?UTF-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Long Li" , "Wei Hu" , , , Cc: 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 PiBGcm9tOiBMb25nIExpIFttYWlsdG86bG9uZ2xpQG1pY3Jvc29mdC5jb21dDQo+IFNlbnQ6IEZy aWRheSwgMiBBdWd1c3Qg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