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 B514645ADE; Tue, 8 Oct 2024 12:04:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CEFF4025C; Tue, 8 Oct 2024 12:04:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 1EC174021F for ; Tue, 8 Oct 2024 12:04:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728381869; x=1759917869; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=gTZhUWsuk6cWMbtUd0IyyrfX9F3P3ievy+ih1uNvhDk=; b=Jq9rbmt0SyBE9QqlxMdmfOjfcO2E+CroLPnkBmYRKVIKMokRW3N177zq 7VPchXs1lc3Xjs56/CxEEMuOvGbwuTswO8993w8iGUL6wVV6AvQo+D7o+ C3BKXLKdnhxAP4/vpNCgS8j0G4rF6tSMolfkHHUwgli0uWG681MS2IPfr R8iZyXqnKmgLQGHJBvlDNKnE0xhJ/A2wsioktHPrpxv+QzP0YPKoWpUNN AoKuIlcetNNBcBw97e9EBHK9rj1ipFr/shtLFS7wJPekx4sa1m4TGq051 SRPx8Hb+5KIqjJ7hQO+tKVaq5BBXWUA+rdaNe7xQK/VgvtnCQyitgpFYD A==; X-CSE-ConnectionGUID: Cjdqtl4UROiylyezLvrKSg== X-CSE-MsgGUID: kZLuHR/nRzeXzDS7WXIhzg== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27512500" X-IronPort-AV: E=Sophos;i="6.11,186,1725346800"; d="scan'208";a="27512500" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2024 03:04:27 -0700 X-CSE-ConnectionGUID: EcWZvgzMTWSvdR7RpklHhQ== X-CSE-MsgGUID: 5HkgSWTER/uNLnHHaZhfnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,186,1725346800"; d="scan'208";a="75777870" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Oct 2024 03:04:26 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 8 Oct 2024 03:04:25 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 8 Oct 2024 03:04:25 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 8 Oct 2024 03:04:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pkk0+2mMatH3ddHMy+T7LgqOsbzN0a1IXZvfg4Gvod8enqm8HnBv2iumiDc1oCpkjeQYVb9UyrjmXNgNebpdyY5UbC5fdzzCsXVpPZOVMa+be0RFIl0zczhq6oU0g1ckwYlusEaL6tDxQcvYEbeGbKqegthhFg+rD+UXxKXqyUYtXVKamkq6ZOWGkrAavoKM2Lr4EPAwx93FJ/5TxyLYOfY7UBpmu6tha9Gdq6USFqFEaovmm5ELTzkX3RNFI3NBrDP90BZ+KOBMokoLZ8tIcBgA6U7A8D96LH/j2C6YMplAfpkZ8qU6B9bfNf365SudbtGtlqn+0e+YF4uy833W5g== 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=1SHWUFaULprrlEKQqonr2CYGw29MczTKPA/65ePlleo=; b=c7+dQdn6GOJbdmLUfxFGsiJABtx2rEsWjlLlT+h1ZgIx2mKtPplcvTKb/r++5evXEeHv+wiCTUj67f2XEg4zN8xgmoEz4wV2vojbb4+JJwldFOzJWvOncm3Hbn2thFvFm3V9sFalVVTNFM7PfwGDwtcpnGq3QJeX0q5q9h1pi4Ly6++kGTgO3gVf811n91ShIR8YC3S9h06mtAdnylx8in8AQf5jp+HzMOxz59nH6UNROrpAE+JDvwyCHMjS/y51lCIxQGcN8Dh00L/19bmoYU3kAwrIn0F6Ed/e2J0FPptldPqyvQPpIvqjGjsFnDNUYsA6aSSL/C981vlkdjCDyA== 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 CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) by CY8PR11MB7845.namprd11.prod.outlook.com (2603:10b6:930:72::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Tue, 8 Oct 2024 10:04:23 +0000 Received: from CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::2fa:a105:f81e:5971]) by CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::2fa:a105:f81e:5971%5]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 10:04:23 +0000 Date: Tue, 8 Oct 2024 11:04:18 +0100 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: Ferruh Yigit , Stephen Hemminger , dev , Thomas Monjalon Subject: Re: Per queue stats Message-ID: References: <20240904154206.13438-1-stephen@networkplumber.org> <31c8133f-fb10-4e2a-9b25-8a6f7557d87f@amd.com> <20241003192612.3c5055dd@hermes.local> <2782da8e-1de0-467c-8139-874184c470d2@amd.com> <20241004134056.25d9e361@hermes.local> <419d9a04-e733-44ab-b183-96ac7777d5b4@amd.com> <98CBD80474FA8B44BF855DF32C47DC35E9F796@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F796@smartserver.smartshare.dk> X-ClientProxiedBy: DB3PR06CA0018.eurprd06.prod.outlook.com (2603:10a6:8:1::31) To CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR11MB7290:EE_|CY8PR11MB7845:EE_ X-MS-Office365-Filtering-Correlation-Id: 171d5563-99b2-4a42-9a4c-08dce78095c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?2vrmZtN2NQUdo+zBGTi+Ci6Nipl1XVLm7hdhyG81ExBkZRL7jdAQpyZcPx?= =?iso-8859-1?Q?PJaQSOBlX8jFykhcxeV8T87sll7xecCQ7K0ZaokMJ2I69P6CL/ioNRTmzq?= =?iso-8859-1?Q?h1si8Z8XtbhT37qEyPoFzgqubq4kYTUg8/vsIuCahCAXthvSf9vtWcgZ+I?= =?iso-8859-1?Q?MlK2qapK3+ZWpSusLmg2rxAM9dw+/mRf8C6r03Py2mEbyZk9xSEQgthEB/?= =?iso-8859-1?Q?nV96CGSKkN1MD4DpimD68THBCkrXGji1G6fn4Bh4hJwbzXVqkqTeNmf744?= =?iso-8859-1?Q?I15bxWeuWNbSlrhLwtgQUQkff/9XhJvNyza9Miwx5pWFt3E9ay7DZxNPvi?= =?iso-8859-1?Q?Ye9XqvdDLPDXFTr7nKTlXfQZUp8Mu1gn8cjUpI3p5IGzBtR+Js0JhKtKxH?= =?iso-8859-1?Q?pY5WDy84pMbO/OOAgV0i7hc9cGxdLElTJYqY2x4THsvIqj8ee+tRzEfoJ7?= =?iso-8859-1?Q?Pn7KAj4nFEcO2RiopsbQdLJVPFQm3ho98qkQMl8rwG8TPAIB8PSQqucomI?= =?iso-8859-1?Q?oL8nZ9mJ/JhcdMzhrf1YbYKwj2mCLsi0GjsabYFPXBlyn5EfvRLarGNC9W?= =?iso-8859-1?Q?D/uGI06YN0nB7xEppd0A9F6EFvEqn7cOAgbtj6r2yL+KHJQWIDttSjMD1k?= =?iso-8859-1?Q?v/HvTJdqzdIA0pu2Pax7yKMiE2sO4hyawXda0cAFvUDAklaKqyoHl7paC+?= =?iso-8859-1?Q?Anu40odu0NkEwfDyArfrvJDUCU78sLBiqIFOBNzwORAGCei70NUll8LEj1?= =?iso-8859-1?Q?b2MTfG3cevJYnC406SkPPazpOaifY451BDWk1JQq24TN69bIDAHJ7OxOn5?= =?iso-8859-1?Q?cYBYsxW7DR8rljapzSVvRih3EV+5SpcUK588iqXHBwIoB0Vacss7d7BUBC?= =?iso-8859-1?Q?0XUfzYPz8j4roscANKyoXuaO1yZyLCD2g4/D2/GKhi3fRtz55R3BrEfdtA?= =?iso-8859-1?Q?iCbqbTfna+oE9vj/hPl0YlHiYIQsC4jcWVqo9vJTXFLl158dzLn4nLVVG+?= =?iso-8859-1?Q?IimBtyrRHITJ0uFwXVVGHAlFfWVzuSPZepaChn366kWRsfQldIZxptg5xj?= =?iso-8859-1?Q?hMlIuK5+0HYXvBiw1u3AfSw/+/WKBooSTZH7jItpnlKQfe2fpj1zfJHVPD?= =?iso-8859-1?Q?A8YJ63QbAP1cNnzSiLe9x/XXUtjgHM6tCUHd7GQXPS7vuRVIt2PSjox7Ys?= =?iso-8859-1?Q?GI63lY+7PDCY/B9bbA7AL2P24jtb3VqfUjasSgmE235QCiGS31F1Zvlg+B?= =?iso-8859-1?Q?if36hEJa+GqE+Vr1Qq/WoHRS1Sp+DlEzfw8npkxtl9tttGmVgONR42hob6?= =?iso-8859-1?Q?V/zwHNvUbvxAvyKw3trER3hazw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY8PR11MB7290.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?QfCjc6toX1E13onfQQi0ltq7co7l7pbfqnTWZxe6MYHKQMcJ8rlp76QhR+?= =?iso-8859-1?Q?iA2stTDQkm7z8xJDK/DyJeEa0FO9ujdDiFEloaTwm3oQNdsEnsaeHhcjpj?= =?iso-8859-1?Q?NR3Su7LdTKHo8pCEFRYtYRnQNzr3uvSnxNYuO5Bb/SkVa6jX9i0p9GMymU?= =?iso-8859-1?Q?FRC7XFJyBlJ4nRfUPzUcnvB6PK4RK+nBjfw3yCTAR4l52SzIZ6yLQwZmQs?= =?iso-8859-1?Q?7TzTFgIqdMkEUIAGMfai+KAAW2yBDIU7LYzOshJjNhbHqsIeWxjuzJQf2F?= =?iso-8859-1?Q?ZaI9td6nRb9KEmXToKrAvMSRXuALSiC9oKgSi/mXNswspTS/6MgzD4I5Js?= =?iso-8859-1?Q?fpwj9gyLkL9qEvcAoPvmPCVLc7h9QVWOHMfVXHLuCkXnfXyINvY/Cbntl4?= =?iso-8859-1?Q?B0Au3dOTgN7qsqdbWoQPSVrVWv2Uzij81iGN4h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d69nO19jGmKg7/FEU1cGWWPMSF9NHfOSvPvX9jWoAAaHvMVr5Q?= =?iso-8859-1?Q?sihX9GlNES8o4zJo6bu1fL71SP9wLSCvuEwLO7cjb+1v5zoZw1oMWl7Zxl?= =?iso-8859-1?Q?aZxFoZSR07uXZlwXoVG/D8w/r1ZqJZk9HJpmE/Mev/EsEtFqZhkHR6tub9?= =?iso-8859-1?Q?uPnfYHTVRHLVdHZTcbypsw6urILVbB7yqoKlQpLUxhbEFS/Le2xoKLrQnG?= =?iso-8859-1?Q?m1MmxkshnvO75BoLKYi+XOmhrqiVTtndl7ffM/EL3J4umvyz2v0e3CToCo?= =?iso-8859-1?Q?KMQjQkWodFJbm3OdsAl+GMEtLOrq442b6Z+3lITy0rFX5acmygJdMz5g?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 171d5563-99b2-4a42-9a4c-08dce78095c5 X-MS-Exchange-CrossTenant-AuthSource: CY8PR11MB7290.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 10:04:23.6135 (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: FuOrYNTCCdHOAkKMyAqW2fT39hAe4fLzW/1NM0mtNtxf14HXo3fYtlg0Ptvf7d0i7mN/CAb0CGKw66rhDyTv81MZjRp+QGyu3SeCWWmpFmI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7845 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 Tue, Oct 08, 2024 at 11:58:37AM +0200, Morten Brørup wrote: > > From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > > Sent: Sunday, 6 October 2024 22.51 > > > > On 10/4/2024 9:40 PM, Stephen Hemminger wrote: > > > ... > > >>>>> The stats queue mapping was a feature that was hinted at being > > removed. > > >>>>> It only exists because of HW limitations on Intel ixgbe NIC and > > SW > > >>>>> limitations from RTE_ETHDEV_QUEUE_STAT_CNTRS. > > >>>>> > > >>>> > > >>>> > > >>>> We have a plan to remove 'RTE_ETHDEV_QUEUE_STAT_CNTRS', by moving > > queue > > >>>> stats to xstats. > > >>>> > > >>>> But ixgbe limitation is there. > > >>>> > > >>>>> Perhaps there should be a generic SW emulation for this the > > mapping? > > >>>>> > > >>>> > > >>>> Ack, cc'ed Bruce. > > >>>> But I am not sure ROI of the effort at this stage. > > >>> > > >>> Not sure what the specific ask for me is here. :-) Overall, I think > > moving > > >>> queue stats to xstats is the best way to go. > > >>> > > >> > > >> cc'ed because of "generic SW emulation" comment. > > >> > > >> I was thinking if this mapping can be done transparent to the user > > by > > >> driver mapping queue <-> stats_register before reading stats, but > > @Bruce > > >> let me know this won't work because the stats tracking only happens > > >> after the mapping. > > >> > > >> @Stephen, do you have something specific in your mind for SW > > emulation > > >> for mapping? > > > > > > Probably not worth doing mapping tables for SW drivers. > > > > > > My preference would be something like: > > > 1. Introduce new API's rte_ethdev_get_queue_stats() and > > rte_ethdev_reset_queue_stats(). > > > with callbacks in ethdev ops. > > > if driver does not support this, then do a shim in ethdev > > that uses old stats fields. > > > 2. Mark the stats mapping API's as deprecated and always > > return error. > > > Making special case for ixgbe at this point really is not > > worth maintaining. > > > 3. After all drivers converted over, drop the fields in > > ethdev stats for queues. > > > And fix the examples, etc. Yes this would be a big API > > change. > > > > > > Would take a year to get done (ie 25.11). > > > > > > > The problem with existing a API, 'rte_eth_stats_get()', is it has queue > > stats fixed sized array which limits us also for some cases causes > > unnecessary memory consumption. > > > > Our solution for now is move queue stats to xstats, as it is flexible > > this solves the problem, but as you said in other thread xstats is free > > form and may be hard for the application to use it. > > > > One option is we can add some more data to the xstats, to help > > application to consume it easier, like number of queues just before the > > queue stats and define queue stats formatting syntax. > > > > But if we will go with API option, instead of adding new queue stats > > ('rte_ethdev_get_queue_stats()'), we can update the existing > > 'rte_eth_stats_get()' to return dynamic number of queue stats. > > Some users might not care about queue stats, so let's remove them entirely from rte_eth_stats_get(), and put them elsewhere. > +1 for this. I think separate APIs for queue stats would make more sense. /Bruce