From patchwork Mon Aug 12 15:28:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 143090 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02EE7457A1; Mon, 12 Aug 2024 17:29:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC68140E0F; Mon, 12 Aug 2024 17:28:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id DC28B40BA6 for ; Mon, 12 Aug 2024 17:28:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723476517; x=1755012517; 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=d+Fco1hdsHZcZr/RMxPmX4jEsMC5ZmGQ25uOJHAEhrfozNn1bphbvhLH Y5ChUZF/QrOu9OpvBnh9LqCV3jKxvGp5sBdWDN7YG4sG7YXhueDWael8V yNfCRpmsWUf0tsIa6oWw8dqrLYNIDCsTIukd05vmv4Yr8Hvd3PwHIWcDN 5ygZh6HMtIVMhQ2LcxtVSY8QbWsMvjVEVvpV6tRVi/2e/H82tASiGA4w9 V3aqyV8bEVzzEpz0leNeZWpdpvK1SpxCgKrdb6yc2kANkOK6EYLnirVjw qaliEdNg9HXgCzjKSGDYveJiMEoZk0Ij8HkGNuqL58CevZA5CCzWkEZiQ w==; X-CSE-ConnectionGUID: ex+z5yNMQQWzXeAcFbo1OQ== X-CSE-MsgGUID: LDy6AhteT6Kq+O930KqTmQ== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="21743047" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="21743047" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:28:36 -0700 X-CSE-ConnectionGUID: 8OXe/FniQVChZK3DP8qq6Q== X-CSE-MsgGUID: npFPWb31T3iTNqCoucUEdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="63222568" Received: from silpixa00400562.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.39]) by orviesa004.jf.intel.com with ESMTP; 12 Aug 2024 08:28:36 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v3 08/16] net/ice/base: read VSI layer info from VSI Date: Mon, 12 Aug 2024 16:28:07 +0100 Message-ID: <20240812152815.1132697-9-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812152815.1132697-1-bruce.richardson@intel.com> References: <20240807093407.452784-1-bruce.richardson@intel.com> <20240812152815.1132697-1-bruce.richardson@intel.com> MIME-Version: 1.0 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