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 8659D4575B; Wed, 7 Aug 2024 11:35:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42D7240E4F; Wed, 7 Aug 2024 11:34:27 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 2FF8240DF8 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=1723023261; x=1754559261; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GkONx/JTr0Ryhfm3YU25ux0z6dB+IFvsn9qzX1Ek7Sc=; b=YP8WwEo0Nt55vLz1cumGyROCwG2jN/+C8z/p9aXFDucJynMf3N/cnjBL hkhitJ+FVjO7Ga1YuZ4g4G7mSvcbVRGkTrX6tk8my6UZdjCNFd+BVg5LY QsfiGXBFJCT9QR+QtT3FIXT5os0M0F9ZG6klHaAGWBZ5pQBIQTeXhg7HG T+bHW061Y0UWUVg6DelapFvbpHnObxrvvPRTeY3KgEL7NXXmuc1+R9XNa QqKp9JYZAxSDk0RIHqPW22frc3dztK4XkN/9DFynypjHsMeXpaYRz3NAX zL/QN7OaUK5Xo8/qLZHY2nxlwFaALboP+Ze1xI/5o8DfIjr+TPG0tsPfh A==; X-CSE-ConnectionGUID: VZ+VigHTQyCmzViiWXq7WA== X-CSE-MsgGUID: NdhdOpYiQSOtGmZ4CHqcmA== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="12897956" X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="12897956" 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:21 -0700 X-CSE-ConnectionGUID: S/S2qa81Qd6sd+W6uFvOcg== X-CSE-MsgGUID: p65tQOyLT+KXnKrn8bcVeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,269,1716274800"; d="scan'208";a="87730998" 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:20 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 07/15] net/ice/base: set VSI index on newly created nodes Date: Wed, 7 Aug 2024 10:33:59 +0100 Message-ID: <20240807093407.452784-8-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 The ice_sched_node type has got a field for the vsi to which the node belongs. This field was not getting set in "ice_sched_add_node", so add a line configuring this field for each node from its parent node. Similarly, when searching for a qgroup node, we can check for each node that the VSI information is correct. Signed-off-by: Bruce Richardson --- drivers/net/ice/base/ice_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index f75e5ae599..f6dc5ae173 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -200,6 +200,7 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer, node->in_use = true; node->parent = parent; node->tx_sched_layer = layer; + node->vsi_handle = parent->vsi_handle; parent->children[parent->num_children++] = node; node->info = elem; return 0; @@ -1581,7 +1582,7 @@ ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc, /* make sure the qgroup node is part of the VSI subtree */ if (ice_sched_find_node_in_subtree(pi->hw, vsi_node, qgrp_node)) if (qgrp_node->num_children < max_children && - qgrp_node->owner == owner) + qgrp_node->owner == owner && qgrp_node->vsi_handle == vsi_handle) break; qgrp_node = qgrp_node->sibling; } -- 2.43.0