[PATCH 24.11] net/mlx5/hws: silence wildcard represented port diagnostic

Bing Zhao bingz at nvidia.com
Tue Nov 17 10:21:44 CET 2026


A represented port item without a specification is valid for broad
matching. In this case the rule direction cannot be restricted using a
port ID, so rule skip keeps both RX and TX enabled.

The NULL specification check correctly prevents a dereference, but its
NOTICE message reports a failure even when rule creation succeeds.
Remove the misleading diagnostic while retaining the NULL check and
the existing fallback to both directions.

Fixes: ae6d577bb656 ("net/mlx5/hws: fix null dereference in rule skip")
Cc: stable at dpdk.org
Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
For stable-24.11 only.

 drivers/net/mlx5/hws/mlx5dr_rule.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 286bf941b0..ff3e5d5e98 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -28,10 +28,9 @@ static void mlx5dr_rule_skip(struct mlx5dr_matcher *matcher,
 
 	if (mt->item_flags & MLX5_FLOW_ITEM_REPRESENTED_PORT) {
 		v = items[mt->vport_item_id].spec;
-		if (unlikely(!v)) {
-			DR_LOG(NOTICE, "Fail to get vport item, ignoring");
+		/* Without a port specification, keep both rule directions. */
+		if (unlikely(v == NULL))
 			return;
-		}
 		vport = flow_hw_conv_port_id(matcher->tbl->ctx, v->port_id);
 		if (unlikely(!vport)) {
 			DR_LOG(ERR, "Fail to map port ID %d, ignoring", v->port_id);
-- 
2.34.1


More information about the stable mailing list