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 A66AB45675; Sun, 21 Jul 2024 14:11:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A9114068A; Sun, 21 Jul 2024 14:11:04 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2043.outbound.protection.outlook.com [40.107.95.43]) by mails.dpdk.org (Postfix) with ESMTP id 780434029C for ; Sun, 21 Jul 2024 14:11:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k4FAOLqPEkv2A0Td+jt0ZU5VCBJEolfCTTLI/NVVcgv3drNjq6GSPqVJ1WeBXrIRFz/rFOhVcRGuvqKT2CDdUrWRcgS68vwdYC5KdSRHtG2wFdGItjGQYLc5N7HmUyAExlEIxKgNRqlwljUDGccMkxM3Uv5tQUwJkxgrvcG1CYbY6rp11xwW6MvI51ZGbs+W0YD0tuG/NStcDl1T6UgAp3/R6vXKxQGfLNH8yZsnP5JrkmoX6NU5xCfeBvbWakJMDdyaRjkksOFMBWtnyuh8Gnac7BrNIyGDKtTgx2y1ny8ji+VQCUqyph9E3q0QYVuLjTddmZBzGiNeDo37A/5xGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=fs+rYi+q8dji/xUsNomnVEq65Z0lWcolC+wTKz4KalE=; b=bGVpHMkf+L9Wwif8S1sllBGGNOPbAfkddcx4z2cdVfVWDXfILQNgy3NE0v/3P2R37Yu33Bu6RsPJuqBMrEGdoy/ySPKfMGxJaalmDIplWlL7e0lcSDSW6XI86QELmFGxAnn9bJQOwJzF5UUo72ZVQXFwq3k/0pWg0Ngj5tKoyQHS6KnVqQGoSbxFJAZa8ovrc6n2OqYyz30QaOmiBxd2duGX//M8Ll84GbasRprW5MTJkOMtBPwaTmfhE0j3c7/Vpk0B7vgiqE/Ob+s3tM2mY0wXrWZrSOzxxhTABFI6Y42FgFYT3euMA3AypH3JWECEv+YzISKJJnCHgGKRjwOgCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fs+rYi+q8dji/xUsNomnVEq65Z0lWcolC+wTKz4KalE=; b=rSn7mHmbAoOoRxcUTVSiQvgfH2ah+O+fMitfYLHeyZD0/SpQ0ycEfZ3whIWf3t/2WUCjSbGJpsAL+A+/gy58WepXJ9EYQen/QaIGGEunPZLWc518DnltI/tCbq66oI6ZcMUJSKy3xhS8dYc/wYHf+79flvtXPJyWj+6guZICKXHht8in2SeIuBottiuBwcPwVSt9l0UuVgW2QQBUN45jjYr/hjV9Y6/PDHdA9gHnV4g1Td32kELDe5Xn0BGPTjr8Y/OM+zICB/D8RLZE0oZ9cTFf/uVwuOGuyOYg9/6mNBnI0IhcCWUJIs64I51aQdQi9gsaJwDP1+NHGQEE0wPlBw== Received: from MN0PR12MB6056.namprd12.prod.outlook.com (2603:10b6:208:3cc::12) by LV3PR12MB9438.namprd12.prod.outlook.com (2603:10b6:408:212::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Sun, 21 Jul 2024 12:10:59 +0000 Received: from MN0PR12MB6056.namprd12.prod.outlook.com ([fe80::4b75:36f4:f278:fcc0]) by MN0PR12MB6056.namprd12.prod.outlook.com ([fe80::4b75:36f4:f278:fcc0%5]) with mapi id 15.20.7784.017; Sun, 21 Jul 2024 12:10:59 +0000 From: Raslan Darawsheh To: Bing Zhao , Slava Ovsiienko , "dev@dpdk.org" CC: Ori Kam , Dariusz Sosnowski , Suanming Mou , Matan Azrad Subject: Re: [PATCH] net/mlx5: fix end condition of reading xstats Thread-Topic: [PATCH] net/mlx5: fix end condition of reading xstats Thread-Index: AQHa2Gcoexg7xBpZ30+8LZJ1Ek8iMrIBHTQf Date: Sun, 21 Jul 2024 12:10:59 +0000 Message-ID: References: <20240717163337.324741-1-bingz@nvidia.com> In-Reply-To: <20240717163337.324741-1-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR12MB6056:EE_|LV3PR12MB9438:EE_ x-ms-office365-filtering-correlation-id: 9c159212-b437-4b66-2c12-08dca97e2e7f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?YSV2a447G7qSdWXc4WWcMC2FJMcmO0BeyMLEb2AKDjDWvQw9qTGruuY1vr?= =?iso-8859-1?Q?312Ji0K9Oel7cv4YeRcnnMNrIAqknK0VmTeME6KqTvQqQsEgKw9ktQnhPR?= =?iso-8859-1?Q?IKrBIw6jEwq9b7ZoRUcFyHAkIP0Rc/wYQlJLW3CH6M7lfHXNnup7aqFKjM?= =?iso-8859-1?Q?PV318fCdiWwypDh63MSU7I0+/BWh93C7cp51IYHJ/tr5MOf/xf6j34kJn6?= =?iso-8859-1?Q?NJEmg4UKwM07brrkMuBcf3V9YbzsUl7VBkV5mZD89xlhYodksexdBMaXia?= =?iso-8859-1?Q?mJ/ccY5ss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apXkhex3pUx6?= =?iso-8859-1?Q?qvLTTF0Y/yxq9JLGfxMZGznkLBMGjrxoQFf/O9DacWyaQfmw3oj9fkWfJV?= =?iso-8859-1?Q?o9W0CCAvGoNsY9+wyzp8LA5G7QW32QcLIY73kAo9YskKkywXtsJIPU+BOe?= =?iso-8859-1?Q?xDDcs5L8fAdj4a0R7b4W7LdiYfTdONnHdvgVj5JPoZLgkuX7gvdDJGLvg3?= =?iso-8859-1?Q?BaSflDTJA3JbiNNThSYivZIf5YHtYaSmvxyEcvuEKUfAs6t0/LZvHxQR2P?= =?iso-8859-1?Q?5Ul1q1hyBLZRnTkbnszqQcm76UR+9rO3y7R3Jw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR12MB6056.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?VxE0m7JPdb217wdrIQ9CIEDq8z1Onwk7ojEsQ2dPQI4RC4k0aZCUaDZAZv?= =?iso-8859-1?Q?SMVcp9iCYai7Q6uHpGv6nHTvf0nhkTulFHbC1RvvyY+/RVmO9LMWhQde3l?= =?iso-8859-1?Q?C5W6837TaUbW0xSfm9Fn3u6e0AJDdD416MGJH3axV7bXyJ8uaGWk0mAgEl?= =?iso-8859-1?Q?hPj+4GbKXqA5y+jzkaAU6wHPjJrJGVujiJH9zM6EMZTsj5D7LPFuj9TK1o?= =?iso-8859-1?Q?QhBVzeGSDOwKnZo40rIS+mz86EVxxMgP2YaXrzjM2UF7v1XTOG8f+W2+jL?= =?iso-8859-1?Q?VM6X5HZSRi26tC26sZd0QcNG3GnnO5bLZPfmx9g+ZU7W7WL6fHl9cQu+PP?= =?iso-8859-1?Q?mCltjdoyrQqZd8rzzBAgls5nVk7M3FG1FHTo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98sRAaWnGaA8LvU6POKEK1Mo3L2QjSH+fNesizlGUk?= =?iso-8859-1?Q?YnXe7Lbwfaw9FdxGMbh1ujmWpwUe7IV11F6EusoR3a6o516MerGWkDGdRB?= =?iso-8859-1?Q?A0Fs8gzX/AF8Q6Ja8JdBhPijcdA4JDnOfLPRDofGIrVCIp/3rKYtRe/tKQ?= =?iso-8859-1?Q?n+ij+ltaxbNU6rRoqskBv57dnrBFbzKGDlXDe1E549RXdRY9p1vVf5A0Tm?= =?iso-8859-1?Q?19y3gROFZPQctnsB1FAbY1BxsvDTcGx5locucRtFgFvSis7RZ3q+1jJOVb?= =?iso-8859-1?Q?5+VAAxK8v/K7DiiqZnsknjpQ5p3C7LRh2fVigJ89HyOnPCc4b9o3ruuUYu?= =?iso-8859-1?Q?1FHvfLGQD7B/k=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6056.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c159212-b437-4b66-2c12-08dca97e2e7f X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2024 12:10:59.0697 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dZCrFtP4tauh9VaSPX0drdInCASpE5epY+R+pKaDF7QaDyos8Zk816cHn2lS+4+M1x3z1Wcw2YpyetKModZ9Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9438 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 Hi,=0A= =0A= From: Bing Zhao =0A= Sent: Wednesday, July 17, 2024 7:33 PM=0A= To: Slava Ovsiienko; dev@dpdk.org; Raslan Darawsheh=0A= Cc: Ori Kam; Dariusz Sosnowski; Suanming Mou; Matan Azrad=0A= Subject: [PATCH] net/mlx5: fix end condition of reading xstats=0A= =0A= The "mlx5_stats_n" in the "struct mlx5_xstats_ctrl" is the number of=0A= device stats identified by PMD. Right now, the mapping of device=0A= stats to the xstats is not compact. The "input index" of the device=0A= stats would remain UINT16_MAX and be skipped when reading counters.=0A= =0A= If some DPDK stats cannot be identified in the middle of the map, the=0A= end condition should be bigger than the "mlx5_stats_n". Or else, some=0A= counters would not be read and calculated.=0A= =0A= Using the global const "xstats_n" as the end condition to traverse=0A= the whole array in case some counters are missed. The "xstats_o_idx"=0A= should be used instead of the iteration to check if the statistics=0A= is an IB device counter.=0A= =0A= In the meanwhile, adding another field to record the start index of=0A= the IB counters to reduce the redundancy iterations.=0A= =0A= Fixes: a687c3e658c2 ("net/mlx5: fix counters map in bonding mode")=0A= =0A= Signed-off-by: Bing Zhao =0A= Acked-by: Viacheslav Ovsiienko =0A= =0A= =0A= Patch applied to next-net-mlx,=0A= =0A= Kindest regards,=0A= Raslan Darawsheh=0A=