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 6651E45BCB; Fri, 25 Oct 2024 19:02:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 576A640273; Fri, 25 Oct 2024 19:02:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mails.dpdk.org (Postfix) with ESMTP id A437240264 for ; Fri, 25 Oct 2024 19:02:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729875738; x=1761411738; h=message-id:date:subject:to:references:from:in-reply-to: content-transfer-encoding:mime-version; bh=Q1hfMYIGq3oCsB7Cu4K6sQqfwANnwugrYrx3VNVZhy4=; b=LHWzGcXawd8AfhlCEYXhw8r7UUioN6x1zlksf0yWa2oqyOLXkcdENTLb U0EJhVS6LLcr39cFpPaXj0IAJyxiOoxyNg/FK28QNGdtNHMqlxcfSWeGe dfrLUW3T4ymxfUu78F06ZRSECzuuIOMCn8MIwReW629tutar6iww401T3 evcFIMToz72309MHOoDH4/RI2ZKQLhlT2Ez4cfamvhlpIRd4kyXDTDlxH tUsE33+4ws3bL+00R8OmNFQPl/2J7DMH3ktATZRqmhrqAHHdnN9VHYzZl G84pOZtcyX1yzsLbuBoyIwXQVbEaZxm5QCM3AeW+wHKoYkBd7G4prPpaS w==; X-CSE-ConnectionGUID: WFA6VDJWTfauCITialyyrA== X-CSE-MsgGUID: HPZHb1LEQ1So2t70Ou2QDw== X-IronPort-AV: E=McAfee;i="6700,10204,11236"; a="33355027" X-IronPort-AV: E=Sophos;i="6.11,232,1725346800"; d="scan'208";a="33355027" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2024 10:02:17 -0700 X-CSE-ConnectionGUID: Z+SVjfu8ShWuSBeE8mQsmQ== X-CSE-MsgGUID: rxqodjIcRSu5jDP2svdW+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,232,1725346800"; d="scan'208";a="118420267" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 25 Oct 2024 10:02:18 -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; Fri, 25 Oct 2024 10:02:16 -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; Fri, 25 Oct 2024 10:02:16 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) 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; Fri, 25 Oct 2024 10:02:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=roqoYVJcuEeHl74nIAYh6DD3MyYb2F6luFGNg8cWc4BQYmOY/jkKcUYTOyiDNvl46U5DENyV0bZ2Oix1LJhEaNcYIrh/u4bNerpwAGo3xuMYN0Ys070NMkI48C0vwcGrBNgpMv5EVDNft40xUQ5XrQ1YvMZYw4BjLNdynZm5+fOOmFOM3G8oYtlJ79ufibUmCcza2hbthXdouwkviRYFAUr+VW0WX8QhVhk+spXYgH79qFvRlcKWlz8i2fkGkVOJqjdHws4IyvUCzPiK7nNLNikrozjXHEh3gzA8Wfpt7vbFXP48/khRCX+l/nOFOwZl+Qf56OceUAQ1zt0s2fvpLg== 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=CAJEnVcX+iYaJnqdsZ/1+idk+K8ty9p4dioG14J8Pvs=; b=BuXIKOGRDMjV18f71El5HXe0qP5wmKOk/azH9bOIk6t3XiOO2mlLdjcSUSpcUIHyncKuCS6ga9O7CWH9Nf4ABJMe9zK+B8q3SXrTHOYvOgmSLkvpKUSDbVUfw4hLPrwmdQxFTPV2wKkqyXK8chVqIzmdjyF+qNKEh59VgWlT7ijbkcFDXamVV6AOSGHmV2q/n6yRH5sVzVI/3RpdN+wavqYdxxlmFKvOxDgMMGjfn9HXiOj5Il0B7PmCUSDfq351sTmOPoyiXnGmMNQuj/P4hoemMd7I7OYhIdExfD79i6YxNrDX2fSw8+GUGcdwVHXeOxotfcOyLRNXreb0nA2+ag== 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 SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by SN7PR11MB7565.namprd11.prod.outlook.com (2603:10b6:806:344::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18; Fri, 25 Oct 2024 17:02:13 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%4]) with mapi id 15.20.8093.018; Fri, 25 Oct 2024 17:02:13 +0000 Message-ID: Date: Fri, 25 Oct 2024 18:02:09 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/5] net/ice: enhance Tx scheduler hierarchy support To: Bruce Richardson , References: <20240807093407.452784-1-bruce.richardson@intel.com> <20241023165540.893269-1-bruce.richardson@intel.com> <20241023165540.893269-4-bruce.richardson@intel.com> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <20241023165540.893269-4-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: ZR0P278CA0016.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::26) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|SN7PR11MB7565:EE_ X-MS-Office365-Filtering-Correlation-Id: d8db3e36-3164-4631-3046-08dcf516c533 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: =?utf-8?B?dE5HVVc1OVFDMkZDOWFxSWVLbGErcnhFczZmQlVXTVNIbWF2aitiYXF0d3RK?= =?utf-8?B?eWhMai8ycXduQkJEbWlSQzB3SGpTaEZYemdFQTYwb2NNcndxZm5GMGpwamNy?= =?utf-8?B?WnhlSWJKMVRybmljT3ZnN2hHbWQxbkZxVlIreEEwbWc0S0k4ZGdNa2Zjbmtr?= =?utf-8?B?RlhPNW1EdHNBSDF5dWlaU0p5Y2VQRjVraUtCdTdZVlFMQjVGcGF2TjQyZHBB?= =?utf-8?B?bjU0M0hXaHVnSDd0NDB1a1JxY1NCUDdyRmlmRUxOYmcvTit4bVM1eXFBYmJw?= =?utf-8?B?Y09XU2dvaE1rOCtlTjlQQ2hudHBBUHF6Ly9DQ2t6dUNZU3FwZkh4UnNvSlhT?= =?utf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NGaEpZaHpHVnU1MWJIbWpXend2S1Ra?= =?utf-8?B?cEpjb3A5SVREcDU2MS92cFd0RjA5dWpMbTZ3cm1Zekl5SHJXYUZyK0NyeXNw?= =?utf-8?B?OGQxYzU4elFDMnc1UDZlek9BbEVsQk1taVVnYVk4Y0VWeEt0U0dYNXJYZVVl?= =?utf-8?B?VCtsSTdSNGFxbExLZ3dneXVBUG5iV2JDRlYxRTJCOGlTS0xIajM3TmI0MUtU?= =?utf-8?B?VndZdEUyOHM0aWxhM3NialNWRVdkTkp0LzZvcHlsYm5LMHZSSzVYME9GQ0tj?= =?utf-8?B?TFhWWHdweXMyelFBcmErZnVqMHlzYXQxUXFaNU0xUjFlcE1QbytYVXJDQmE4?= =?utf-8?B?Y0Z2RzNVcmxTblZMN1AwQjZWREZiMzNnd21pcVZMRGFiWGgwcGtOQzNtUlVH?= =?utf-8?B?cHl3OHBJZVZZS1pYazM4TlBTRjVNWGIvNWZBVmowSGdpd0tXMFBtcGd0ekhM?= =?utf-8?B?VldLNFlGeG0yN1BvZVBISDhuMHVDQjFlbXE4RmpGV3RVR2k1aER6ckFTa2Fz?= =?utf-8?Q?bEE5HSDhZSM7Hn7irzQ7PeNKfSOSI/phQbef3Gs?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.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: =?utf-8?B?SGFLUzZwSXYrK2M4K2MzUnFtTWJzY2JETi82UC8xOHFVcjBQbCtHdEtWQUQr?= =?utf-8?B?Yis3YTdvMXQ5emxGdFZCR1M4aTA3bjFQZ0E1a210VE92WVh4dUcrci9BbHJW?= =?utf-8?B?ZU9ubk9Xd09sbmNaeGhxS25Ndk9yRGc0eVNEQ2dWY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sK0ZJaWF4SXBZZjlVWDVocFVjMEJMeEJNbi9ITFRLSmo0SjVKV2ZB?= =?utf-8?B?dVA1ZWRlMXhDY3RGdzBtUURzYUozOFdxU3l3TUJ6cFNzYVdoSkFhejBHeXow?= =?utf-8?B?Y0t4dklNT0R0SUs2dVpIRE4rME9OeTJNL0J4b2pvVDdVcllUUU4ydHJRQVNM?= =?utf-8?B?dndRY3FGdCt6OVlLSlJ1YWFyMWFGV1puQXZQbDdPc284NnhFd1B2SWVXT2Vk?= =?utf-8?B?M3c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: d8db3e36-3164-4631-3046-08dcf516c533 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2024 17:02:12.9561 (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: RInQGe0VbgUv8NfHLsK1RrNrBgHJ4CJgpetLCAFySAj+S/aJJ6fM3c9KR8PPsHO76DrJjlR9WAEf5dROXry1OWngaCF/mWZy30RHNXpVDzc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7565 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 Hi Bruce, On 23/10/2024 17:55, Bruce Richardson wrote: > Increase the flexibility of the Tx scheduler hierarchy support in the > driver. If the HW/firmware allows it, allow creating up to 2k child > nodes per scheduler node. Also expand the number of supported layers to > the max available, rather than always just having 3 layers. One > restriction on this change is that the topology needs to be configured > and enabled before port queue setup, in many cases, and before port > start in all cases. > > Signed-off-by: Bruce Richardson > --- > doc/guides/nics/ice.rst | 31 +-- > drivers/net/ice/ice_ethdev.c | 9 - > drivers/net/ice/ice_ethdev.h | 15 +- > drivers/net/ice/ice_rxtx.c | 10 + > drivers/net/ice/ice_tm.c | 496 ++++++++++++++--------------------- > 5 files changed, 224 insertions(+), 337 deletions(-) > > @@ -393,16 +406,35 @@ ice_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id, > struct rte_tm_error *error) > { > struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > + struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_tm_shaper_profile *shaper_profile = NULL; > struct ice_tm_node *tm_node; > - struct ice_tm_node *parent_node; > + struct ice_tm_node *parent_node = NULL; > int ret; > > if (!params || !error) > return -EINVAL; > > - ret = ice_node_param_check(pf, node_id, priority, weight, > - params, error); > + if (parent_node_id != RTE_TM_NODE_ID_NULL) { > + parent_node = find_node(pf->tm_conf.root, parent_node_id); > + if (!parent_node) { > + error->type = RTE_TM_ERROR_TYPE_NODE_PARENT_NODE_ID; > + error->message = "parent not exist"; > + return -EINVAL; > + } > + } > + if (level_id == RTE_TM_NODE_LEVEL_ID_ANY && parent_node != NULL) > + level_id = parent_node->level + 1; > + > + /* check level */ > + if (parent_node != NULL && level_id != parent_node->level + 1) { > + error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS; > + error->message = "Wrong level"; > + return -EINVAL; > + } > + > + ret = ice_node_param_check(node_id, priority, weight, > + params, level_id == ice_get_leaf_level(hw), error); As a suggestion, move the following section: /* root node if not have a parent */     if (parent_node_id == RTE_TM_NODE_ID_NULL) {     ... } before those checks and simplify if statements > if (ret) > return ret; > > > > @@ -573,7 +574,7 @@ ice_tm_node_delete(struct rte_eth_dev *dev, uint32_t node_id, > } > > /* root node */ > - if (tm_node->level == ICE_TM_NODE_TYPE_PORT) { > + if (tm_node->level == 0) { > rte_free(tm_node); > pf->tm_conf.root = NULL; > return 0; > @@ -593,53 +594,6 @@ ice_tm_node_delete(struct rte_eth_dev *dev, uint32_t node_id, > return 0; > } > > +int > +ice_tm_setup_txq_node(struct ice_pf *pf, struct ice_hw *hw, uint16_t qid, uint32_t teid) > { > - struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > - struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > - struct ice_sched_node *vsi_node = ice_get_vsi_node(hw); > - struct ice_tm_node *root = pf->tm_conf.root; > - uint32_t i; > - int ret; > - > - /* reset vsi_node */ > - ret = ice_set_node_rate(hw, NULL, vsi_node); > - if (ret) { > - PMD_DRV_LOG(ERR, "reset vsi node failed"); > - return ret; > - } > + struct ice_sched_node *hw_node = ice_sched_find_node_by_teid(hw->port_info->root, teid); > + struct ice_tm_node *sw_node = find_node(pf->tm_conf.root, qid); > > - if (root == NULL) > + /* not configured in hierarchy */ > + if (sw_node == NULL) > return 0; > > - for (i = 0; i < root->reference_count; i++) { > - struct ice_tm_node *tm_node = root->children[i]; > + sw_node->sched_node = hw_node; > > - if (tm_node->sched_node == NULL) > - continue; > + /* if the queue node has been put in the wrong place in hierarchy */ > + if (hw_node->parent != sw_node->parent->sched_node) { need to check hw_node for NULL > + struct ice_aqc_move_txqs_data *buf; > + uint8_t txqs_moved = 0; > + uint16_t buf_size = ice_struct_size(buf, txqs, 1); > + > > -static int ice_hierarchy_commit(struct rte_eth_dev *dev, > +static int > +commit_new_hierarchy(struct rte_eth_dev *dev) > +{ > + struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > + struct ice_port_info *pi = hw->port_info; > + struct ice_tm_node *sw_root = pf->tm_conf.root; > + struct ice_sched_node *new_vsi_root = (pi->has_tc) ? pi->root->children[0] : pi->root; > + uint16_t nodes_created_per_level[10] = {0}; /* counted per hw level, not per logical */ I think it is worth to to change "10" with something meaningful. Also it is probably would be good to add an extra check against this value into: ice_sched:ice_sched_query_res_alloc():     ...     hw->num_tx_sched_layers =         (u8)LE16_TO_CPU(buf->sched_props.logical_levels); > + uint8_t q_lvl = ice_get_leaf_level(hw); > + uint8_t qg_lvl = q_lvl - 1; -- Regards, Vladimir