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 6321045BC6; Thu, 24 Oct 2024 18:46:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44E1C43507; Thu, 24 Oct 2024 18:46:42 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id BE058434F5 for ; Thu, 24 Oct 2024 18:46:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729788400; x=1761324400; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=ZpV1sxt/Mh574hV+M1nCVSqfFH6lWC3bNr+6Cm032jA=; b=Po/qYW3u0xfy8x3xC2mGYZMkllyyJqBvDIKmDD4VYvneDb2oytoiD9zw UWeI0Q2pnQr05zLcTjUFVzULr7I4Yla0kc8CbElQjG/mKUxAOvVAf0S6b YFEEF2SKPilbgr3egcpyVKa9bqUNlXaZL6wlKrzJJzdhQp6u0dgkBTpVB A07CNfE5cH09cTubcqcZIujn7ToqAi1KZzeo4Kt/J3mj2ucp/0wNnbcrT QyvbJLxl87K08IVhAtNVwKoyLxzd1yDLZloYyiF9eSv0cGN0UGx/eDv7a Vaq6fxLOFQhWPFSn8dkTglDh3QcA+ZTBnwvVUCIjlTbhRogVDSzAYEXD2 g==; X-CSE-ConnectionGUID: S9YMge5RSSCS0sYh/jlhbQ== X-CSE-MsgGUID: D9OmQNXaREOl7Mqa4TqGpA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29296397" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29296397" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2024 09:46:35 -0700 X-CSE-ConnectionGUID: jVQWSHHdTCezPPtd3Y7LRw== X-CSE-MsgGUID: 4DLLWpJ5TEi8zExK1L6+9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,229,1725346800"; d="scan'208";a="80950757" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Oct 2024 09:46:34 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 24 Oct 2024 09:46:33 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 24 Oct 2024 09:46:33 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 24 Oct 2024 09:46:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qMfeJV2P8IJheLsvhzq3PGuZ39mHovh2YGRl3tXdzNzBHRY76j4sXZFSx/heo621EaG023/7MMGyR156XTiuzI/mn2RILrm1tGP3bAk6Vre/0wbs4zim7tLJld+4n4KV2szi6gzsVEbH1tV3M30jcvsRWlQ1umzIDQpW+04nXZS04Th1dLcDGiyL7RDm2LOuNvDinAqCM0jSd8X3TJ0pRWKFhycmkc93UWdqEYo5B43MRYQBgCTxjnJLww1f56X5uhAbpmJos+BgY98aWf65I1SLySo0Ia0XhkG0wFjaszv7je5q5+b5qPNfmLIQ2PCb26+4A/ASA2MsSQm625OHDA== 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=LpV/D35GvR/9vPUPzbzZn0KVLp3OlL7bvRZUB/Jv5+4=; b=xnwGlnrb6VbWxBPR6b7Ouh+NgO0J5svliLiETRFs77dIDj6Z9XiYfkLHEEH3tCNe9xO00VKkC3dFSc7eb24D3hhW6XDlTZ5YUohf18sdpyE+qMK5oMhirSKyDurNLTjHz40HDHmgDlSzxxDEGK/+d9wq7uJo4hGfXVSbSBDKucvWgaNKvFk5/mja6+LeOJBG7H4e7XA98ma/yFSCt1STUrhrMxFfa91nzpTgqdGjn353BzyBMWBHTK0Ly7iMjPJ7P6w2k1+l6Z7PJjZqZWpopFtrcqSyKE9GtZr4RpGWniREhHvwRElWPpGNLBdd7vwpYX0McbJexBqlIxdi5lK6HQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH8PR11MB7023.namprd11.prod.outlook.com (2603:10b6:510:221::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18; Thu, 24 Oct 2024 16:46:31 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Thu, 24 Oct 2024 16:46:31 +0000 Date: Thu, 24 Oct 2024 17:46:25 +0100 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: Anatoly Burakov , Vladimir Medvedkin , Subject: Re: [PATCH] net/ixgbe: fix per-queue stats for less queues Message-ID: References: <20241024111757.791634-1-mb@smartsharesystems.com> <98CBD80474FA8B44BF855DF32C47DC35E9F81C@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35E9F81E@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F81E@smartserver.smartshare.dk> X-ClientProxiedBy: WA1P291CA0012.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:19::9) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH8PR11MB7023:EE_ X-MS-Office365-Filtering-Correlation-Id: e6953e7c-ad4e-4418-5ac8-08dcf44b696f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?KRRWWltVOQVLdV8xomhg+aCJ+onBGQct5GJZE2zqO1EjIMF96EGACereYW?= =?iso-8859-1?Q?RSOO5QlpVRRAtJeldDPtNbrWeIyduGoKntsAP1WF+JlLvaor6tYJrM09uA?= =?iso-8859-1?Q?1NbkxKfsZ4STR+jrqdEorIp2wrKsahsqXEqri81lU1aV6JJKxJXxWvd6GC?= =?iso-8859-1?Q?1PkKTYLCaYAxOtstJwN27rRFChq5GUeA3H2CCnZWb40psTEBJinLD/4qSk?= =?iso-8859-1?Q?N2xvwn5sgpkuMYd+dMPsBkcd+QncOurD2IDT8VghRbr9G/O22svQAXBR3i?= =?iso-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ir6kUU7ln9mmRwVJH0KyDhcaGnnUgvFfnhdJ9e?= =?iso-8859-1?Q?xWMuDQ/nVBqwKLwZwxgUe5D9BmVPY8PHyzAEUilB49SkqgiWurDIx6pqpb?= =?iso-8859-1?Q?eTC3Clrg0+s3/GdKSY9sVywucgR8wog2yCpGvnza43SEaeoVjJaxQoqaaU?= =?iso-8859-1?Q?czKXSGNz7jGo8xfEny6NbuJKQ85OtnjEwMxh29Z8rKlLA3EH22ec0D6oRx?= =?iso-8859-1?Q?Ki3kBtn/1V?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?EKogSg6Acw/sIHfZBo6hcQCH30lev7+FxnTh7rhGr7yJKupQA7U99jdmIm?= =?iso-8859-1?Q?ALicrhx6lwum/lvo8Ds9R7rc63bN0VaHEk1D2PUEHnWGu2iOl523UtrYAe?= =?iso-8859-1?Q?vyMBMFMmj+kT87Xa2BTK8yFqxDEUAGh/g01SubkeRjvwmwe/FwnM6T5cTK?= =?iso-8859-1?Q?Tms8ZRyCck3bznif3I0wOtd8XLUvVoN4K46v0b78fOlSxNlImDC4oxndqY?= =?iso-8859-1?Q?gslvYm3/ZE8iiI4clextzvMm64NVb/GVC+HxTFVvYWhYp3SbyrncTTn2Iz?= =?iso-8859-1?Q?zYRJ2XAejVCQsIcc7W7vG+jsPdKcL4aDdcuuz998qiUEfRozxYyhlFNSdB?= =?iso-8859-1?Q?VOw2k8iuGOtaXBcUZD/W4FuMqGWRlepRzA8QDrMihnIW9TZ5azYAhjpB9E?= =?iso-8859-1?Q?mtEYkio58/6//9+YkZnr0vw2iRY34mw7qGRJ6o0uu96IMP71UMvoiOD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Gr/j79grYvuCUsTehRJCnVLyheRvz7Xmm4FX7S/0P5xYzCa?= =?iso-8859-1?Q?coGWYwnmlVFZt7TgYK/dPSj1bMUG/m4RddbFkzx1lz9akvCtNc3+np6U9o?= =?iso-8859-1?Q?bRqm4lGuK3lWg8qsuR/gLDgn9nKZU+wK1fj5d92k1IxFCn7Yg5HYls2Kct?= =?iso-8859-1?Q?15G7nZ6ho4i1qfOz2kDThnYmkhlmR97EzkiGcPaFP/rakZG/T2R1WQA1o/?= =?iso-8859-1?Q?QAZs65dcUh2j+luNbyw7rStjUd7eNDaPeJFgGcpc3q2utkE9sSNqy1UZTp?= =?iso-8859-1?Q?rFh//an7zz0d/3NrblRVzVmYoT1B8u9RCteMS5m0n4UYn/sxhupXAR4g?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e6953e7c-ad4e-4418-5ac8-08dcf44b696f X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 16:46:31.0187 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: niVD13XuhfyBJ7GOwRTWldlnFBsxDKKesevutZDGYpPV8HoEU0XQY1oA6sMaHcJIaEaYrJyrehn95PIG/tIF261gVbPct9RHdhbfZkwgnIo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB7023 X-OriginatorOrg: intel.com 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 On Thu, Oct 24, 2024 at 06:28:27PM +0200, Morten Brørup wrote: > > > > - for (i = 0; i < IXGBE_QUEUE_STAT_COUNTERS; i++) { > > > > + for (i = 0; i < RTE_MIN(IXGBE_QUEUE_STAT_COUNTERS, > > > > + > > > > (typeof(IXGBE_QUEUE_STAT_COUNTERS))RTE_ETHDEV_QUEUE_STAT_CNTRS); > > > > i++) { > > > > The big cast using "typeof" is awkward-looking but is probably the best > > way > > to do this! > > Yes. It fixes a signed/unsigned comparison warning. > > RTE_ETHDEV_QUEUE_STAT_CNTRS is int, "i" is unsigned, and IXGBE_QUEUE_STAT_COUNTERS is size_t. > > Not easy choosing a good common type without adding an explanation. The typeof() seemed like an acceptable compromise. > If I may suggest it, "typeof(i)" is shorter :-)