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 E5151A00BE; Tue, 3 May 2022 20:18:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9563640C35; Tue, 3 May 2022 20:18:28 +0200 (CEST) Received: from na01-obe.outbound.protection.outlook.com (unknown [52.101.57.16]) by mails.dpdk.org (Postfix) with ESMTP id 5E7E040691; Tue, 3 May 2022 20:18:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YAbSH+I1WwMXy98LQUfb0/t+EI3PT5VBUUyowbPp+gthCvbYByowcwmFgwzUYdlozDVgcTaNBfP4CzMragFrhKZ+PlaSqhXFWZuuZxitGNtb4bk1liUkAVhHAB5vT6yMKzY7CIRRka03XJJbcQ9cX/iRTFrya6X0z3pkFeDBLEO7/gb3KGyV3Mh6LrcJF9okwzYDMmGLebgRaJPH88vqjwlpgQCsSYo0Z4DvMhpzUj5HFIWEu04bldcZ6WwsbIpnQvI7aajb00qbGpp57vvlJwawjRESfz0urLDBbt1o6Hn4ygFhEOt8lfeKIHMSM7NaKfDDbW4g8KrjGkS2KKhjSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c2ScALPGtDv9iNNIY7ZTNPzSeLQK2Jk7G9Ct/vHjoWQ=; b=io5f9Gq78i/8GYROXBVifDF7PM2CjMNZuH7+wcCO2qRVXvIqn9EEkzpBbN5MpUCYVUCFlkGWEspP5mD3ntxcRJ9tV5572JC9sIZPndaimD6DUS4malUT1OqGR3R98InfOSseScB5tyudp3m+7rdfGwr9+LH/n+CehVFK6eXVf2VzkQZ4X8dijlQi44TzgJPK3N6anjGQSFv5Igr/xhwdCJZU0JA+F8t0zDGXjUV876Ws9Q5HJO+/t+toXgv9TJtYr2Dhs14ha7rzrCJKYJaVh4xjBuX1KenRmXQSLrMLv1IdOy4DtfWcbvtotexMX0BhEXg0laUYGc9O9SAAxpHs9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c2ScALPGtDv9iNNIY7ZTNPzSeLQK2Jk7G9Ct/vHjoWQ=; b=FmcW/UigiORdm1C6YNfC720NSJJFNdNTjcaoQDex2pitvuC1QbZ9A9K+iP4LAt9Q5kI0HjZM7H95Lhxypxssswx4z6+2FoNqjvQn/PDrsc9sW5QUE5cd/nwJfJPxXt7K7VNE5mJ9ApWnm2sCxWLSAB4wZV5fDwhH5f61wSwdHMU= Received: from PH7PR21MB3263.namprd21.prod.outlook.com (2603:10b6:510:1db::16) by MN0PR21MB3218.namprd21.prod.outlook.com (2603:10b6:208:37b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.4; Tue, 3 May 2022 18:18:24 +0000 Received: from PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::ddf3:2951:518d:34a5]) by PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::ddf3:2951:518d:34a5%7]) with mapi id 15.20.5250.004; Tue, 3 May 2022 18:18:24 +0000 From: Long Li To: Stephen Hemminger , Ferruh Yigit CC: "longli@linuxonhyperv.com" , "dev@dpdk.org" , Stephen Hemminger , "stable@dpdk.org" Subject: RE: [Patch v2] net/netvsc: report correct stats values Thread-Topic: [Patch v2] net/netvsc: report correct stats values Thread-Index: AQHYP6cEkQRXn4D8yUClXpvX3Nw0c60C8ZcAgAANvACACrUn4A== Date: Tue, 3 May 2022 18:18:24 +0000 Message-ID: References: <1648143948-17821-1-git-send-email-longli@linuxonhyperv.com> <7f51e773-6ded-b736-fb02-5e3b391353b9@xilinx.com> <20220426154524.49502217@hermes.local> In-Reply-To: <20220426154524.49502217@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=962cc7e6-f9e8-4d97-b205-21bbcdb9f2d1; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-05-03T18:16:21Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 11b2f102-c98d-4086-48d4-08da2d31502e x-ms-traffictypediagnostic: MN0PR21MB3218:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /r9/a8VcIp6Xso3+prQdHCPUiG+Y12nE3SZuJGFnHh3Qu5b7NGHeKBnsviuGvRO8iu9tWBNal/mjXeFgXagXpRAzbeI/nyqTxoItXo8QNW06zeiXtgnCkVng1AIY3MEa91icxQNLjdV9N2R+zcHG1lLFu51ZLF7VL7+/pgam30aUHUqrQnBRhAgpDqXdprY+JvCFSlhDUpxJT1wCXaKARq+ZVpj+U+/dBrtY96JhHCx4IIV+cHxX4rBqppvez2XT/qnHg3XQ3d1PgwQ7A7S2RxnrSduL0g3bd3YN5VunEvWTEcFxX/BNb+tNE7V5AsvwsUzRBx3K2JDpt02lcf4QtGJaDzUH0N62f+QS68AXGDZeZ6ruMDTUnDDv27Ivp220nPXiFC9FU+6ur+9ulffN2I8b664qmqJeAS/jlTfTPhiWCd5EdHi6UmG5vrtvd6oGUDDIDlUp6y5Nd8XNf0+0wz/6AjkhpzUeW4deD28bS1bA/dG2exLEfo+9HXym1L+8yu8cmZ1KowyghxQZg5AnEZHNA8hEoHCum9R9Tmsut51tnSC3dca/XhKAo1zucaPxWUtoUJ7yMgXC1mrNOx5SEVlavbEEicLLBUGuKPLbp9xPtqcxmYjU6wmlLWAefBN/yiXKf+mhS51PWwAwGcrpYmMf5kv5jEyi+v7j2Hg86fYzgYWrwHBFfqQFQ8nSu3ASY5LgST64GcYoRoNjsAYPFpM4EzEuOUIcoc0m8H3fBaH5iG8hJxpDpRdif/GJYSMu x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR21MB3263.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(451199009)(6506007)(316002)(4326008)(26005)(2906002)(9686003)(33656002)(110136005)(186003)(4744005)(83380400001)(5660300002)(508600001)(54906003)(38070700005)(52536014)(55016003)(38100700002)(82960400001)(82950400001)(122000001)(8990500004)(10290500003)(71200400001)(7696005)(8936002)(66446008)(66556008)(66476007)(86362001)(76116006)(8676002)(64756008)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Q9QFFNYe2qe5sagaAcemNeyG3LpPG0gI6cvbgFefQfZJ2xL0+1oSwKhrz79a?= =?us-ascii?Q?nZeFH+aUDIJLHfVWw8K1RxO8Z6iXnExXQhFukc0Ey/z//Elok2b1n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5UbvSuZekowPxjASN9VHkI3gA7o5MuTBSVC?= =?us-ascii?Q?LanDMx0MaCAQW2ZF8JhKD9NHwsXPhbUYkUZ9lIMeYRW+guTrkCPUHUChzJ0+?= =?us-ascii?Q?w1oqPn2X7B80LWB/z6IAmwDO1LPs+7uE9CXJiWbQaXCXEYOAF0cLBdkgvx+u?= =?us-ascii?Q?wTd/cdR+ZJ0bMXvSWDCbl0IuXKF2LOGxZGfA71lpKBMVCDE4rdXoLT4movZd?= =?us-ascii?Q?qGl2U5t6hdOWrx+fvYXWIqyRYMtRh/gRAB9Jn3bFe40INtO5oj2CLKz803ji?= =?us-ascii?Q?tRuDAF25SjJ//qiJVTXCnqrpmpmT79fBbvVmFFKLlFAhwRnoCcH5fxcVPTXN?= =?us-ascii?Q?/IddqRb36UCPTeFUH/Ugpo6aZiGg/U6ugwdNhnnC1ueBP8v1pJ/Kp9/3VC/8?= =?us-ascii?Q?JWX99DEXD4vBoigTUC+exYUNfr0V+HluNxll8P1t9nxpp05XGErOjCtiXfBo?= =?us-ascii?Q?b0u4EpQGC2pK5Fjt/II4NIrRPBjx8kbZdho7/2twuTwoGi6Xhoz487qFwWvy?= =?us-ascii?Q?p125im+7+JKHDIcPzB4bFUDb/JcewtfgMGAq9sKAZWBNkfVoBviKiI9nNC59?= =?us-ascii?Q?acCxUBh2Y0B5zfvvC2ofQY/kYtcCtK2gWBZbMg3cjSwIW5kAVRBnpYhoITx/?= =?us-ascii?Q?cgIYItspFPv0QT6J65jH6PuGdoBm5K245Ip3JsD8Z9DC1DX9LN0HD/PTI7T7?= =?us-ascii?Q?VacA9TgFJ8GECgpyM3GMlzvABCrrTZhfXa/yHnJD/iGhQFH1u8fHHelf9nhR?= =?us-ascii?Q?kkQ2YajgjA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR21MB3263.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11b2f102-c98d-4086-48d4-08da2d31502e X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2022 18:18:24.7904 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Yq6M2adlu+hVXspUswINYFjJ7o3EduLnxofbfRT/HjCahCAr7f4kw06gLlrp1TV7+xmZFI7d6BCkfqSYvsqdng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR21MB3218 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 > Subject: Re: [Patch v2] net/netvsc: report correct stats values >=20 > On Tue, 26 Apr 2022 22:56:14 +0100 > Ferruh Yigit wrote: >=20 > > > if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > > > - stats->q_opackets[i] =3D txq->stats.packets; > > > - stats->q_obytes[i] =3D txq->stats.bytes; > > > + stats->q_opackets[i] +=3D txq->stats.packets; > > > + stats->q_obytes[i] +=3D txq->stats.bytes; > > > > This is per queue stats, 'stats->q_opackets[i]', in next iteration of > > the loop, 'i' will be increased and 'txq' will be updated, so as far > > as I can see the above change has no affect. >=20 > Agree, that is why it was just assignment originally. The condition here is a little different. NETVSC is a master device with an= other PMD running as a slave. When reporting stats values, it needs to add = the values from the slave PMD. The original code just overwrites the values= from its slave PMD.