[v3,1/2] net/mlx5/hws: definer, update pattern validations

Message ID 20240212135911.529237-2-getelson@nvidia.com (mailing list archive)
State New
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: update pattern validations |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning apply patch failure

Commit Message

Gregory Etelson Feb. 12, 2024, 1:59 p.m. UTC
  The patch updates HWS code for upcoming extended PMD pattern template
verification:
Support VOID flow item type.
Return E2BIG error code when pattern is too large for definer.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 0b60479406..05b53e622a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -2537,6 +2537,8 @@  mlx5dr_definer_conv_items_to_hl(struct mlx5dr_context *ctx,
 			ret = mlx5dr_definer_conv_item_ptype(&cd, items, i);
 			item_flags |= MLX5_FLOW_ITEM_PTYPE;
 			break;
+		case RTE_FLOW_ITEM_TYPE_VOID:
+			break;
 		default:
 			DR_LOG(ERR, "Unsupported item type %d", items->type);
 			rte_errno = ENOTSUP;
@@ -2843,7 +2845,7 @@  mlx5dr_definer_find_best_match_fit(struct mlx5dr_context *ctx,
 	}
 
 	DR_LOG(ERR, "Unable to find supporting match/jumbo definer combination");
-	rte_errno = ENOTSUP;
+	rte_errno = E2BIG;
 	return rte_errno;
 }