[v1,9/9] net/ice: add warning log for unsupported configuration

Message ID 20220329014813.1092054-10-wenjun1.wu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series Enable ETS-based TX QoS on PF |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Wenjun Wu March 29, 2022, 1:48 a.m. UTC
  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>
---
 drivers/net/ice/ice_tm.c | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Patch

diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c
index fdbb415eda..d214b6bc91 100644
--- a/drivers/net/ice/ice_tm.c
+++ b/drivers/net/ice/ice_tm.c
@@ -515,6 +515,15 @@  ice_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id,
 		}
 	}
 
+	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);
+
 	/* add the TC or VSI or queue group or queue node */
 	tm_node = rte_zmalloc("ice_tm_node",
 			      sizeof(struct ice_tm_node),