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 1D7D44404F; Wed, 12 Jun 2024 17:26:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6164743262; Wed, 12 Jun 2024 17:07:15 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 9202F432E6 for ; Wed, 12 Jun 2024 17:07:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204827; x=1749740827; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/Jv3Ypt0sDi2iAZJpeZD+C8m240bzPE19yF6yK/9Z7E=; b=gpsK5NDiUDWOPO+NB52ifzan3vru+aZa/Z6R6ECIw8xX++BjUDBML8OU 7lL0MkgS4nPNwUQbk+AFdLgr1bARxSv7/j5coEgkciT2Xwzzjbyw6eDeb ogeIEsX4+jWHh3AXHs6imQO1WWv0WdkfD4y3Kbmw/1YqFWn9DIsDzeXte eI6Mt6Z9P1uGbSoRd2itsh0z+RsUt+JZO4KbeaKnqYF1t9Hi0YHTOBqrM gfNH+Ec4LNPfcWoQgMuIkGjxbzsIUo+3tfottCJGMe9yHalZuiJQsODpx z/QkwtnWGLFXV//wPHrQ4CcV54VTIRGGX2O+17JXlJ2Y8rjK5YWw7E+Yg w==; X-CSE-ConnectionGUID: lYu0zCvLSAWPVkc4o0Mdzg== X-CSE-MsgGUID: MJv3O7TCSbyh3k/KuOh/8A== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32460143" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32460143" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:07:06 -0700 X-CSE-ConnectionGUID: w3wW0b7LSWyELJ2dc7I38g== X-CSE-MsgGUID: j7S91+RDQ42NUbiGPYQRtQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39926037" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:07:05 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Ting Xu Subject: [PATCH v2 137/148] net/ice/base: support DCF query port ETS adminq Date: Wed, 12 Jun 2024 16:02:11 +0100 Message-ID: <0c6f3f7cafed8268037cec33e1eb50c4d8986131.1718204529.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@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 From: Ian Stokes 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