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 27CF54575B; Wed, 7 Aug 2024 11:35:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EE9640EA5; Wed, 7 Aug 2024 11:34:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 0DD1E40E31 for ; Wed, 7 Aug 2024 11:34:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723023262; x=1754559262; 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=Nz6gqUwTkr4cDlPhwsbkmtswVu9jHS+mAQNo8+xkQTHMQNImWlx+fXW5 xUGLstPbwJi0rp2gkjtXL290fXnpVmhuGyujmvq1QbvTJWhPNiwzc832F KBlTKYapBOaf/1WPOqmqg7bvGGtzn6N3T4XPrHV1x6asFOjTdrCaels3j OAISNEKZt02KzRoX4mH470lz0TsKWJimANtKR/XB3JkEmWZ33CK/mLZSF Tg7LJ7Q71EJKc2cMtdsiyNmeWTXsXWUyJTQ+f6o3pWtKScAkoUVnBZ6cJ 5OBwu1JDRtGpRUfYQjrJpup68fFRLVL6T9WbgRsQOCeCs6D442fvXdgt/ A==; X-CSE-ConnectionGUID: 5gWMIcArRbaDRjlaLxYtTg== X-CSE-MsgGUID: kqZexhMKTmOm5xYlyLB9VQ== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="12897957" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="12897957" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2024 02:34:22 -0700 X-CSE-ConnectionGUID: ryo/CtmsSC+1FpUC1omKgQ== X-CSE-MsgGUID: iaxhY5m4SKaNx9LAOwrt9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="87731011" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by fmviesa001.fm.intel.com with ESMTP; 07 Aug 2024 02:34:21 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 08/15] net/ice/base: read VSI layer info from VSI Date: Wed, 7 Aug 2024 10:34:00 +0100 Message-ID: <20240807093407.452784-9-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240807093407.452784-1-bruce.richardson@intel.com> References: <20240807093407.452784-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