From patchwork Thu Apr 28 02:59:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenjun Wu X-Patchwork-Id: 110397 X-Patchwork-Delegate: qi.z.zhang@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 9B309A0503; Thu, 28 Apr 2022 05:22:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BD1142821; Thu, 28 Apr 2022 05:21:35 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3BDCE42810 for ; Thu, 28 Apr 2022 05:21:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651116091; x=1682652091; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=/M019FDNWIGRZ3mNxqCSj/yo7+1eUnpvPcaTXr5vPjw=; b=mWNO5gznYvhluQ1Ni5gJimDBlfCCvcqVsbI+Y9dxSbhhpGZ8F7cYn6kr VCkSp84jzVmippVWQ3quW3hwGPYc52HShg7Zf2A/oDPXsi0iKFOZWh+NB pOXnsQGagerCGb7ZeVLpMuM3Fjmdvh5Uz82iInCXk1S0tGDvp1F8zT0qM b8ZR3H3Bo1TQs6ryyzdnHLA7DXRKz+sRvaHIJEyekn35UgTWDl2yAVlyj 5i11N7vR42UH/hRc8HWwfdPdZeU79uQqLcCd7h0NWhirfkKoubrivge/G Z5y7ilY1Pha7HunUb9PPQccCdhNPThlpIUObezdnhFlhgvI0+gtjGEwO2 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10330"; a="253526057" X-IronPort-AV: E=Sophos;i="5.90,295,1643702400"; d="scan'208";a="253526057" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 20:21:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,295,1643702400"; d="scan'208";a="661534593" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by fmsmga002.fm.intel.com with ESMTP; 27 Apr 2022 20:21:29 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v8 9/9] net/ice: add warning log for unsupported configuration Date: Thu, 28 Apr 2022 10:59:14 +0800 Message-Id: <20220428025914.3475281-10-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220428025914.3475281-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220428025914.3475281-1-wenjun1.wu@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 Priority configuration is enabled in level 3 and level 4. Weight configuration is enabled in level 4. This patch adds warning log for unsupported priority and weight configuration. Signed-off-by: Wenjun Wu --- drivers/net/ice/ice_tm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c index f604523ead..34a0bfcff8 100644 --- a/drivers/net/ice/ice_tm.c +++ b/drivers/net/ice/ice_tm.c @@ -531,6 +531,15 @@ ice_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id, rte_calloc(NULL, 256, (sizeof(struct ice_tm_node *)), 0); tm_node->parent->children[tm_node->parent->reference_count] = tm_node; + if (tm_node->priority != 0 && level_id != ICE_TM_NODE_TYPE_QUEUE && + level_id != ICE_TM_NODE_TYPE_QGROUP) + PMD_DRV_LOG(WARNING, "priority != 0 not supported in level %d", + level_id); + + if (tm_node->weight != 1 && level_id != ICE_TM_NODE_TYPE_QUEUE) + PMD_DRV_LOG(WARNING, "weight != 1 not supported in level %d", + level_id); + rte_memcpy(&tm_node->params, params, sizeof(struct rte_tm_node_params)); if (parent_node_type == ICE_TM_NODE_TYPE_PORT) {