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 E070F45AD5; Mon, 7 Oct 2024 13:04:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9A14402EA; Mon, 7 Oct 2024 13:04:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by mails.dpdk.org (Postfix) with ESMTP id 24EBF4026C for ; Mon, 7 Oct 2024 13:04:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728299086; x=1759835086; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=tzbTMVq0IkAFmEn34+Dh2ScFawSAZKcQ7N/smy+XpGA=; b=f8Ph1PiRNvyBwpNhrR74RaduWiCi8rCVqH2E/ka3FuepgGc1pr6UXCJf 803rXDVQxCkfjVgL8uZKzcQdp/Ljzm9s44urrqpQI5fOOe7Wzmn1VhFnv 2MJ3EIXKd8HDsok1rx/jUVdmZl3/3lnPwcX1tAzfJfi3PetkdEmEm5RP2 EGniB+pENfas7IaPyYdMIN6VMwASJVFUdsstD+eKPNkzhRBIpnoaohYbZ KfTvwrU9sXnQrQ3Ax8aorLoN1vGeZFNWho/WzcWyq/+5ilzdp86ILbd45 xpCtYCXCg7BOJaRUsDXNpTE7zdnajlpeTkr/n9HqoMdQHPKqDOeZtaxXA w==; X-CSE-ConnectionGUID: fb+0VcxgTi+XqmN4cmvJrA== X-CSE-MsgGUID: B1bf9dBiQIyx7p8HRKIdag== X-IronPort-AV: E=McAfee;i="6700,10204,11217"; a="27327319" X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="27327319" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 04:04:45 -0700 X-CSE-ConnectionGUID: 5SCxXA/bQV2tMC/qE7QCXw== X-CSE-MsgGUID: /dmsKHYQQcyDTSlIwBE+Hw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="75111382" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Oct 2024 04:04:45 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 04:04:44 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 04:04:44 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 7 Oct 2024 04:04:44 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 7 Oct 2024 04:04:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I/TcGgAWKhXu5VO9kSjCd0emopNuvK4yWS6qXjEzzUqe2STbkJtDYpMnulK5DqvHnT7uvvmt4w8Jp0z72f1k0wBx+JlRLd+6uatLQR9V6qRKhc2ir58crREIuQ2akH0A+/gVjYw3n7wS3rK1g+unBSehOztbW4fV3uceGI9FnuDYML8J3+hmWxH3lIWaLJDMmudEnDkVTSdMPP/xcUNTj2V6knHVMieS6DMjV4sTNKaitZadJ69n6iZRwxEvXh6iSJPE9+dDudGMNfEYsDUnP2hv2TO4Bb05Oj9Ct9tGdDV6aG0IXuE7mD2Jk6GNiRjY6ey61aSOhRW0Xf904vbJqg== 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=GlVnAmmDpna9BvInhlRbzQVSrhdPZSb6lmzHElXHiF4=; b=KHd1qq+CUhY2Lyxu98nix5PX8y+OX0A1owRvIppxZHJuuGI/vLJ/SQULVDwwq0TL+/2bx17+UUe+Mb3ZzZOJfwiNXOZl+zPLmzNARQhZfJYDCn7DK52vCp9jTTNR0j891Nx21KAVI+nML4QMQl57rzZjZ+iQAsPLmX7YIfzanAmTWLO6uV3yBkOxcS2a/zQDQHACsfFfImybKV4M5miHmVzg7PWdrH0jWbSppPU5+fNmUY9rTKo+s/GLhtm9K43my3SzpJfCsfK9OnjPvllX87FbDmlKgMfoH7jXFajaPkSetA5m5f5YNjB5JvDmCipiWmDKF6L856XmJzDacGptjQ== 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 SA1PR11MB7086.namprd11.prod.outlook.com (2603:10b6:806:2b3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Mon, 7 Oct 2024 11:04:42 +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.8026.020; Mon, 7 Oct 2024 11:04:41 +0000 Date: Mon, 7 Oct 2024 12:04:37 +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: DU7PR01CA0021.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::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_|SA1PR11MB7086:EE_ X-MS-Office365-Filtering-Correlation-Id: bf3507d8-53b9-48bf-b809-08dce6bfd7f5 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?fCo6F3lbGrtyp8CWZBYdFUD8IfdJXNIDEqZ5ncNOZ01+wC2hcKr/L4vemXfd?= =?us-ascii?Q?aXsZRrjxUm7VzgGqHDSFWjsXlxQyRVYI/pe1/hNcA6rtBQfmQWFY/JhFSUo+?= =?us-ascii?Q?87vzEXL/znVOJWlm+QNJruNVc4dMZC1XLWb7vzuS0l6oxcJvOHKy74nsj4Gg?= =?us-ascii?Q?cLU2qKzH40BohN4VLL2y7IO6dP/6Obm0IaQ/5EBr0po5mPf+loR+DJ8ktV5C?= =?us-ascii?Q?HJoI0o2C6qBkbCd0yV4Ft3++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UKk/XjrD?= =?us-ascii?Q?91riJ8s2oKx3TmVnIaDAFkD0+8BV6+SuOKIuxNuc+YPddslNoaEoQk5/1SKs?= =?us-ascii?Q?mEwZzHHafjEq0ZfnhEjZVFUMLDYQmNFyXeOnx/7rSJ2mErYsh6IFp6ULNqbJ?= =?us-ascii?Q?OqCbIp1nSfbEHDLxZ0WxMovTQGEWOOQUJVENr35yaA=3D=3D?= 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)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gJFm71xf9IT+bXQBxj6mG1DqmMZvQDoJqhHyc6cb/xX3roQV3iBJAbb1KUpZ?= =?us-ascii?Q?9FlxAqOkDIVjGdNh5Pf9sLhXpvpRIKPI9ogeP/Zt5PqjLvYUH+c2ivmPhlsx?= =?us-ascii?Q?Ep+wPinGrPKdUwaA5f0jeDeLC0Zg6Y8gZYdz88zfpDh7Bkhp53v6ErpHeqfD?= =?us-ascii?Q?VA3J0pqxLCdWMp2wu9zfR4qD1foRgNgItWmRftmKhrR7J4tbUR1kX/OFOqEm?= =?us-ascii?Q?6a6ETKfpH6gRSG3NGA5fVspDs3ycuZqrqeMfyWDep3k0RlyEEpNWajWfBkNV?= =?us-ascii?Q?EsjjaXeOFNzQqtzc1UBOcFkdzMOwSsd5wpHbIjxyfSBIeZ7+dfKqUrYni+bf?= =?us-ascii?Q?bUqWCvXNFo1FPtqxJDvubACpCOIYKRBHg+bFq8UvrxsP5NgVhHeYbcvfvknv?= =?us-ascii?Q?h9ZyWzuM0ktVbAXB9B83tHicXRD34xigQ0pXnKJPdRnSzSxv7clx1Rm2fSaF?= =?us-ascii?Q?kh+GBoLltXHbohEh2RuJPDN+zz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us-ascii?Q?4dZVgRFpurGPR6O0kgsj4PY2+NksBDQ85CDzM8z/ZEAzti6Yg2ERKc7OH7Mg?= =?us-ascii?Q?l+PNRy3RpqHYhTKZJB2msOnpKYwUqA49CtZlLkSFKwcfeLPkAOsF1AwasWgU?= =?us-ascii?Q?CcO7qf7qUoK7nijiN3PFjghqeIL++Q6qEa0Crdn+ueIO1+U/XD9eskZaBZJ1?= =?us-ascii?Q?XdN8X7HudYraCL1yuraWLlLSTB/JXGowWFjjKoaPFrZ9XdWuh+k2gEs/GYrv?= =?us-ascii?Q?LA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bf3507d8-53b9-48bf-b809-08dce6bfd7f5 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 11:04:41.8296 (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: wRI0pwL9ylx4WQG3cx5k9CKWmPfbiPFqKGPsePfS5ar4Hw4PzwYLfs5Sshqap8oypiFdD2eWyrvVnNOYd50vlOREHGKoRfudOGtNyg7EKqQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB7086 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 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. Regards, /Bruce