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 F0C6645ADE; Tue, 8 Oct 2024 12:56:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF77A40650; Tue, 8 Oct 2024 12:56:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 4165C402A9 for ; Tue, 8 Oct 2024 12:56:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728384980; x=1759920980; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=PBouhKIBWR/J2tneJyvue5sDQR6ZFD2bRu8FxXt2Y50=; b=hDAw1N7KKJXjoV3VoCExe+kfv+ckGfXm/FxZPvoONlb22btG4sVoM8O4 rG9JLwFis0AV1BKwnYj1LwlyADB5mI52Aq6YXOgSSeV3cnKu5lesJX5S6 hwkHnO+5pMHCIH8TTyswDQJpVX/srKnZkn+9SCar/z6u65Z9YTNqUXl0e 71zTWmRymKpu1DTxIvTLS5MZpOCb71UM/sR0e8kKicliz+BEJQjaQCdZC QRmzRI/oPW8ISTCLyzj93z5bMvDJF/VlsRKyXUbMu2vNGpoa7cde3Cm7N 4tn0tVYGPu+CAy2B3QXehFWO0YkceRrXIDc2e2nUVgaf3QsFAmADlTJqe g==; X-CSE-ConnectionGUID: XE1cpYLmQH6XAtLlElFZDg== X-CSE-MsgGUID: 7Zu6Q2rtTJu69gELC8bF4Q== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="45035109" X-IronPort-AV: E=Sophos;i="6.11,186,1725346800"; d="scan'208";a="45035109" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2024 03:56:19 -0700 X-CSE-ConnectionGUID: Dr7MBfh9RWyw8cvXFG9JaA== X-CSE-MsgGUID: FAL85/PBQPigwv5qxxPX2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,186,1725346800"; d="scan'208";a="80580846" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Oct 2024 03:56:19 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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:56:18 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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:56:18 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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:56:18 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (192.55.55.71) 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:56:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aKF52SH4U2U4LgpjTq5dOJayPvYSLGaFplNkOufsw1fALylPks0F10PqDJrfGOOGxBQTwb3kJf8CFofkXpFbjQoABHOXf2T1ue7/23SA/jJ4IamcRbn4XaRP9ojIryox5XoCv6KmEOsuTGuGzEfYc9yowphf6ganE5sQJTR1i60IUmgztA+oWGujGAa6sawUZA33BrmOExF9KnNwM9/edSMrwBlkWUeeCwSTMWdSAUV6R+JlKK4UziUV2fTzRJlUAqoucLz4q1wGtqAzHcXNaGSdRGMpzHqSzMu/TqAiF5cy6LLGdXWDcywGjNgaIDTVSGHaETSk5etQYy7NZaHEJw== 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=j7wGrmfW50M8e/GUOv1pDECbESgJW4xMRJfENPUECVI=; b=tzr/ditYZaZEP90ad4w9NhYbBN2xGeN0yDxgcpSDwC1YGKUrjLPsPPo48w1Z2AIA3rWqdtavcs+Z0KpGqRWL9agNuANGWI2UoS996RHddhpS5E0AbPlQJMlbXloupYEgRMPvR3IyUipmX4lPYdnBjl4wxdpOB0XgDfDk2DHUjf7oyB3pVNUt5QFEFA1WIG0m42e222/gfST231Aikh4HcCxtbgVVPFhZ5AKoA46/SYuOQ7ew6nZX+2+9u7haCKYskVLAeNQg+6IFrH7MV1drgGaDax0bRGGk6zbgauqeG3/g45dR3JY7H8L+qKTpgbszqBV06YD/t7t0j3GragxXjQ== 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 IA1PR11MB6148.namprd11.prod.outlook.com (2603:10b6:208:3ec::20) 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:56:15 +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:56:15 +0000 Date: Tue, 8 Oct 2024 11:56:10 +0100 From: Bruce Richardson To: Ferruh Yigit CC: , Thomas Monjalon , Andrew Rybchenko , Cristian Dumitrescu Subject: Re: [PATCH 4/4] ethdev: add traffic manager query function Message-ID: References: <20240806152417.3649745-1-bruce.richardson@intel.com> <20240806152417.3649745-5-bruce.richardson@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DB8PR09CA0029.eurprd09.prod.outlook.com (2603:10a6:10:a0::42) To CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR11MB7290:EE_|IA1PR11MB6148:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b3bf8f1-b131-40b0-da7e-08dce787d455 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?euVDodSde8RrVJq13IfTVuN2DOKsly82EqBJsHHIrdFbspJJMl2kZshbEUr2?= =?us-ascii?Q?eD1k20hy3cyR0XsFENF+mHfiXzP9vEBcb3TCSZqYbzwmVXKaLLYRYIth7zMB?= =?us-ascii?Q?0ObbqswYE/s9qbMTpgn0C/9rh8Ag2zjxkPFY7qgA69/I5pytMtozFrSRyBVa?= =?us-ascii?Q?4ZBzT0okofDjTBQld2VRVVXJ63vnb1Y3Awlyu4+JPgkB/IE5g+AYYfKjfbHR?= =?us-ascii?Q?xid04muGIigY55jeKdU6rk0AvbL3S7f7HYQjN4Cdqd7ZK8m87UbfNq5YLtd/?= =?us-ascii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0akSMq+gSmxWsk4?= =?us-ascii?Q?5OaxNrRbmdHmuIEk5YBePqAKVetMULffUkT8laLuNfpHUXG1EK0xWG+14VaK?= =?us-ascii?Q?4eNuBJQWLbxhUpPT5O0EMfVKDPb0Pp5RjXnqQzm7OMuiAfwGlkoMbEJHnuSc?= =?us-ascii?Q?6VY=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)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?YaqTiJVwWkhHzfoxGDuc9MtUCCF2sipQ9c8Sy/4fc8zmPkCi/yshbyEWCzTd?= =?us-ascii?Q?T2ry5oNjixMuc3sOxAU2Fd030ZRRpVLsQLUb2Zy0+iMPWNs4NPrbjDXRJ5GV?= =?us-ascii?Q?ArSN7Mw8gpTndPpKptnW2OcX0G1dcSmvSybL7EhkzAra6a170Ot5CTOZnoLg?= =?us-ascii?Q?OGeWKuXCl6u6wOiBNhAOMHWvMQu1iZmfJs/fnGpc+/FwYxPF8JGYrKlz1EHV?= =?us-ascii?Q?XkTztuRF5/hxfKjf4fZzxoT9aM7F+4ybDmOmOYk3l2GZoXgEJnaEeRw8l5k2?= =?us-ascii?Q?8dWunH0nsRqVnnZkjChTBNYI0/USVV6KWqejOTIn4O6Kxr3M1CcyCstzNm3O?= =?us-ascii?Q?e5bGuVW9LfKOiKkcNquAFvfjY8KOq2572t7S4VC97UkB26qVUgiSRwmdTT1U?= =?us-ascii?Q?36+xyN8ZDjuKIQaR3awdbAYxlcSrvgk2VUnvRaN/VHDED40L9B+ApqA+4yvi?= =?us-ascii?Q?lj6FtOSnIvxC66Gu0JFNzc7iUKonWQbQcOrZuCsTne9L/cY3KVO4kFC75yKR?= =?us-ascii?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ug5pDleB7?= =?us-ascii?Q?HEg6YJsKDRGvSMUtf0toDBI8xh5C/BzRxcwOlIa5fgM3aNLadlRwLjETw9rE?= =?us-ascii?Q?JbnQnzsWlTCZ6yhu1pTi15JBI5G8u6fGtFcn2bzcRrktfW/h8DYdFDH8xxfv?= =?us-ascii?Q?33vlB/VZgkUbxj4ufhjxhd2GNVtZV4kKsPF8oFTCLv9rKM7qxRgMLNtM8M6t?= =?us-ascii?Q?lg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2b3bf8f1-b131-40b0-da7e-08dce787d455 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:56:15.0611 (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: X9vvyBza+iXqLJwe18Y9fBujvzHUaliVXS84oj3koQvlWrLaJyIjn+kQ5ToTdAd4FNVWJ68tjTs9n0M7q08B+yD5tsEbCxE+R419Gpg1gvQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6148 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 Mon, Oct 07, 2024 at 12:04:37PM +0100, Bruce Richardson wrote: > On Sun, Sep 22, 2024 at 05:26:30PM +0100, Ferruh Yigit wrote: > > On 8/6/2024 4:24 PM, Bruce Richardson wrote: > > > +/** > > > + * Return information about a traffic management node > > > + * > > > + * Return information about a hierarchy node, using the same format of parameters > > > + * as was passed to the rte_rm_node_add() function. > > > + * Each of the "out" parameters pointers (except error) may be passed as NULL if the > > > + * information is not needed by the caller. For example, to one may check if a node id > > > + * is in use by: > > > + * > > > + * struct rte_tm_error error; > > > + * int ret = rte_tm_node_query(port, node_id, NULL, NULL, NULL, NULL, NULL, &error); > > > + * if (ret == ENOENT) ... > > > + * > > > + * @param[in] port_id > > > + * The port identifier of the Ethernet device. > > > + * @param[in] node_id > > > + * Node ID. Should be a valid node id. > > > + * @param[out] parent_node_id > > > + * Parent node ID. > > > + * @param[out] priority > > > + * Node priority. The highest node priority is zero. Used by the SP algorithm > > > + * running on the parent of the current node for scheduling this child node. > > > + * @param[out] weight > > > + * Node weight. The node weight is relative to the weight sum of all siblings > > > + * that have the same priority. The lowest weight is one. Used by the WFQ > > > + * algorithm running on the parent of the current node for scheduling this > > > + * child node. > > > + * @param[out] level_id > > > + * The node level in the scheduler hierarchy. > > > + * @param[out] params > > > + * Node parameters, as would be used when creating the node. > > > + * @param[out] error > > > + * Error details. Filled in only on error, when not NULL. > > > + * @return > > > + * 0 on success, non-zero error code otherwise. > > > + * -EINVAL - port or node id value is invalid > > > + * -ENOENT - no node exists with the provided id > > > + */ > > > +int > > > +rte_tm_node_query(uint16_t port_id, > > > + uint32_t node_id, > > > + uint32_t *parent_node_id, > > > + uint32_t *priority, > > > + uint32_t *weight, > > > + uint32_t *level_id, > > > + struct rte_tm_node_params *params, > > > + struct rte_tm_error *error); > > > + > > > > > > > No objection to get an TM node query API overall, but it would be good > > to get more comment on the what correct API should be, we are missing it. > > Both because it is not discussed much, and it is first release, better > > to add this API as experimental. > > > > Yes, good point, it should be added to version.map file and marked as > experimental. Happy to take any feedback on what the API should be. > > > Also we should have an implementation in driver and a sample application > > usage (testpmd?) with new API. Are these planned separately for this > > release, or can it be available part of next version of this patch? > > > I have an implemented for ice driver in [1]. On testpmd side, I never > thought to do so, because it was more for me when writing test code around > the APIs than for actual end-users. [As I explain, this API should save app > developers the work of storing a copy of the TM hierarchy in the app code > too]. However, I think it may be no harm to do a testpmd call for it, it > may be useful for debugging. > > [1] https://patches.dpdk.org/project/dpdk/patch/20240812152815.1132697-2-bruce.richardson@intel.com/ > > > Finally, does it worth documenting this in release notes, as just a > > query API I am not sure if this a notable feature, but just a reminder. > > > > Don't think it requires an RN item. > > Will perhaps do a new revision of this patchset without this final patch, > and then submit this patch as a separate one for tracking. I don't think > the other patches to mark things const should be blocked by discussion on > this. > This patch is now split off into separate series including driver update and testpmd command: https://patches.dpdk.org/project/dpdk/list/?series=33342 Regards, /Bruce