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 978A3454EF; Tue, 25 Jun 2024 13:29:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDF7242EDF; Tue, 25 Jun 2024 13:20:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 1F68942F65 for ; Tue, 25 Jun 2024 13:18:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314289; x=1750850289; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0pgVNLBpH4IY7tfOSjxQuLnTMOHBzsKyOHploV7E05I=; b=SkMK/UyH8ROaTH1Bf4ZOno7B5r6Tqa/QKHTgwPk8ZQZiqUNEY4unOC1C ZY08IvTScRtG//FiZA7FekgNlUW1i5zVFxdT1Q/xJUnkVwbRe6+aHxP85 wz+Bxqi1n/CAma4BXNPkPLaavDqeh17uc+7wXyfqQfQ8suAbmqCDCHnpR Q3dxexVQe2VdgEPpysURkTDQf3f9TbICqeEYfD1peTyI+ywnAwwoZ03Sc CZFK7NrjMmCt3T7rGfK6s8GJLxPqyO53ntLtWLEWVh9KxFS3BQaU7Kjza nDo6CnNGWFTgjZy5f1FbtCqpapq/srP9CsxGjydY/kBcflv2kXpC5BhZD A==; X-CSE-ConnectionGUID: HA/RrZylQGu0ZyEB1CNe9g== X-CSE-MsgGUID: 58NqGbaxSDGe+Dw3tT+bxw== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080643" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080643" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:18:08 -0700 X-CSE-ConnectionGUID: riFTxzm/SJivMw3vBkxCNA== X-CSE-MsgGUID: eGL0Pk7vScKXYYZCX1UiIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719760" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:18:08 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ting Xu , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 117/129] net/ice/base: support DCF query port ETS adminq Date: Tue, 25 Jun 2024 12:14:02 +0100 Message-ID: <543a906766e5b457fdc2acaf00956f2dbc06e988.1719313664.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 From: Ting Xu In the adminq command query port ETS function, the root node teid is needed. However, for DCF, the root node is not initialized at parent HW init stage, which will cause error when we refer to the variable. In this patch, we will check whether the root node is available or not first. If not available in DCF case, after receiving virtchnl message, PF will add the root node info before sending adminq command to FW. Signed-off-by: Ting Xu Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_dcb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c index 4ef54613b1..81ce11343d 100644 --- a/drivers/net/ice/base/ice_dcb.c +++ b/drivers/net/ice/base/ice_dcb.c @@ -1559,12 +1559,11 @@ ice_aq_query_port_ets(struct ice_port_info *pi, struct ice_aq_desc desc; int status; - if (!pi) + if (!pi || !pi->root) return ICE_ERR_PARAM; cmd = &desc.params.port_ets; ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_query_port_ets); - if (pi->root) - cmd->port_teid = pi->root->info.node_teid; + cmd->port_teid = pi->root->info.node_teid; status = ice_aq_send_cmd(pi->hw, &desc, buf, buf_size, cd); return status; -- 2.43.0