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 1AA794575B; Wed, 7 Aug 2024 11:48:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E25D427C2; Wed, 7 Aug 2024 11:47:26 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mails.dpdk.org (Postfix) with ESMTP id 552EE4114B for ; Wed, 7 Aug 2024 11:47: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=1723024041; x=1754560041; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/gS/eRyLGXBm/1l9JuK0a7+h9+9V8DKp+JWxmwnYhqE=; b=kShcjEkA/bbXFRDxtDi181F0RgG0OFqPjX6tp8M77gDq5JDs0/QITK4x X0To5M/WYKDEAlDK5JAVA/O0W1Um/6p2SkX2zXNqQrQRLvNXxKXwHBJtF Pa/q2zz79POhFJwE4akWHL8/5Dz6OjeNmn+7Rfv7kA9RyFYx6tQToYJdx zb1CBtKkcEWZjHQCfhnWER6eTm652F8QbA5yGMJeGMFB1IN9d6OAXtu80 KUWEGceCAVXgoC5w3pf3d1LYdL2eBN1iayK2xvRge24XxmwtWPt0fITAg KIcdSB+GBEAO71QxHgYCeQIughk7Avt9A3nTDCHAWDS0KuHg4STnXwcAC g==; X-CSE-ConnectionGUID: en8tRU6BQxanR8HZ88Zx1w== X-CSE-MsgGUID: nIi3StOWSXOz9PqwB8xexw== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="21257940" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="21257940" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2024 02:47:20 -0700 X-CSE-ConnectionGUID: xcIosOg5SWuuD5k01/0/Fw== X-CSE-MsgGUID: SNWXJBfOTcuMnC2hzto+GA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="87467386" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by orviesa002.jf.intel.com with ESMTP; 07 Aug 2024 02:47:19 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 08/15] net/ice/base: read VSI layer info from VSI Date: Wed, 7 Aug 2024 10:46:59 +0100 Message-ID: <20240807094706.459822-9-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240807094706.459822-1-bruce.richardson@intel.com> References: <20240807093407.452784-1-bruce.richardson@intel.com> <20240807094706.459822-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Rather than computing from the number of HW layers the layer of the VSI, we can instead just read that info from the VSI node itself. This allows the layer to be changed at runtime. Signed-off-by: Bruce Richardson --- drivers/net/ice/base/ice_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index f6dc5ae173..e398984bf2 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -1559,7 +1559,6 @@ ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 max_children; qgrp_layer = ice_sched_get_qgrp_layer(pi->hw); - vsi_layer = ice_sched_get_vsi_layer(pi->hw); max_children = pi->hw->max_children[qgrp_layer]; vsi_ctx = ice_get_vsi_ctx(pi->hw, vsi_handle); @@ -1569,6 +1568,7 @@ ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc, /* validate invalid VSI ID */ if (!vsi_node) return NULL; + vsi_layer = vsi_node->tx_sched_layer; /* If the queue group and vsi layer are same then queues * are all attached directly to VSI -- 2.43.0