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 D5FD1A0A0F; Wed, 30 Jun 2021 08:50:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE97641238; Wed, 30 Jun 2021 08:50:48 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8C65F41228 for ; Wed, 30 Jun 2021 08:50:44 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10030"; a="208247031" X-IronPort-AV: E=Sophos;i="5.83,311,1616482800"; d="scan'208";a="208247031" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2021 23:50:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,311,1616482800"; d="scan'208";a="625911205" Received: from dpdk-xuting-second.sh.intel.com ([10.67.116.193]) by orsmga005.jf.intel.com with ESMTP; 29 Jun 2021 23:50:42 -0700 From: Ting Xu To: dev@dpdk.org Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, qiming.yang@intel.com, Ting Xu Date: Wed, 30 Jun 2021 14:53:39 +0800 Message-Id: <20210630065344.50352-3-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210630065344.50352-1-ting.xu@intel.com> References: <20210601014034.36100-1-ting.xu@intel.com> <20210630065344.50352-1-ting.xu@intel.com> Subject: [dpdk-dev] [PATCH v4 2/7] net/ice/base: support DCF query port ETS adminq 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 Sender: "dev" In the adminq command query port ETS function, the root node teid is needed. However, for DCF, the root node is not initialized, 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. Signed-off-by: Ting Xu --- drivers/net/ice/base/ice_dcb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c index c73fc095ff..9c9675f6ef 100644 --- a/drivers/net/ice/base/ice_dcb.c +++ b/drivers/net/ice/base/ice_dcb.c @@ -1524,7 +1524,8 @@ ice_aq_query_port_ets(struct ice_port_info *pi, return ICE_ERR_PARAM; cmd = &desc.params.port_ets; ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_query_port_ets); - cmd->port_teid = pi->root->info.node_teid; + if (pi->root) + cmd->port_teid = pi->root->info.node_teid; status = ice_aq_send_cmd(pi->hw, &desc, buf, buf_size, cd); return status; -- 2.17.1