[dpdk-stable] [PATCH] net/mlx5: fix silent error for unsupported flow items

Nelio Laranjeiro nelio.laranjeiro at 6wind.com
Wed Jul 18 10:37:53 CEST 2018


Not supported items are causing a silent error which does not stops the
conversion of the flow rule.  This silent error ends in case of a flow
create by segmentation fault.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>

---

The commit impacts the following stable branches:
v17.02, v17.05, v17.08, v17.11, v18.02, v18.05
---
 drivers/net/mlx5/mlx5_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index f48b68945..8ebc0928b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -801,8 +801,10 @@ mlx5_flow_convert_items_validate(const struct rte_flow_item items[],
 				break;
 			}
 		}
-		if (!token)
+		if (!token) {
+			ret = -ENOTSUP;
 			goto exit_item_not_supported;
+		}
 		cur_item = token;
 		ret = mlx5_flow_item_validate(items,
 					      (const uint8_t *)cur_item->mask,
-- 
2.18.0



More information about the stable mailing list