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 7052BA0093; Fri, 22 Apr 2022 03:20:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75DF34281D; Fri, 22 Apr 2022 03:19:48 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 0CB5442818 for ; Fri, 22 Apr 2022 03:19:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650590385; x=1682126385; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=2eCpgJ8HfvMgvb9b/1hnsamUsWJENbAsnnAQ1v6zLss=; b=NTaM0Oj90wuEeL6Lvn2TUXOQnfn+3sv4NWfphvGTba8IWOQ3g0bNGpdw xOXzNQPa1FLn9yxvLxBgsSyVVBJE6XX0DVmM+NiA9Zc5zw9njadsGeNsg 5w0C3IBI7lUoD2sjcBQgl4ozkNKacOyhX4JcUh+24dAbMXm0L6F7MZNZ2 HAGS/Mgb/PjKFfxEccGGg1iEZmeUndh8dyc4OrTfxkCQrbm8DAptXoGxs C+imtdBdhGfKLMjrtBnyhGgqXZ8PC9YruYmrVFHPsjLyiuAjYnZYtesXk 2UQWUmXCaunjuqfYNzYZGOxoyqiIaohCbQ7HNuaHnBuBSqp/NYWK+jgl3 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="350972744" X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="350972744" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 18:19:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,280,1643702400"; d="scan'208";a="533816460" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2022 18:19:43 -0700 From: Wenjun Wu To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Subject: [PATCH v7 9/9] net/ice: add warning log for unsupported configuration Date: Fri, 22 Apr 2022 08:57:46 +0800 Message-Id: <20220422005746.2300736-10-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422005746.2300736-1-wenjun1.wu@intel.com> References: <20220329014813.1092054-1-wenjun1.wu@intel.com> <20220422005746.2300736-1-wenjun1.wu@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 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 17f369994b..3e98c2f01e 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) { -- 2.25.1