]> git.droids-corp.org - dpdk.git/commitdiff
net/ice: add warning for unsupported TM configuration
authorWenjun Wu <wenjun1.wu@intel.com>
Tue, 17 May 2022 05:09:32 +0000 (13:09 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 18 May 2022 04:23:11 +0000 (06:23 +0200)
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 <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_tm.c

index f604523eadcb62bb54c0213ac11f8fa3f0353a0c..34a0bfcff875a74cc21b31d9716ee8b3d185e4fd 100644 (file)
@@ -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) {