From: Ori Kam Date: Thu, 7 Jan 2021 16:57:10 +0000 (+0200) Subject: regex/mlx5: support priority match X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=88e2a46d6234114379002f28ca6858f387e677f4;p=dpdk.git regex/mlx5: support priority match The high priority match request flags means that the RegEx engine should stop on the first match. This commit add this flag check to the RegEx engine. Signed-off-by: Ori Kam --- diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c index 35ebcd9408..beaea7b63f 100644 --- a/drivers/regex/mlx5/mlx5_regex_fastpath.c +++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c @@ -113,6 +113,8 @@ prep_one(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp, op->group_id2 : 0; uint16_t group3 = op->req_flags & RTE_REGEX_OPS_REQ_GROUP_ID3_VALID_F ? op->group_id3 : 0; + uint8_t control = op->req_flags & + RTE_REGEX_OPS_REQ_MATCH_HIGH_PRIORITY_F ? 1 : 0; /* For backward compatibility. */ if (!(op->req_flags & (RTE_REGEX_OPS_REQ_GROUP_ID0_VALID_F | @@ -131,7 +133,7 @@ prep_one(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp, MLX5_OPCODE_MMO, MLX5_OPC_MOD_MMO_REGEX, sq->sq_obj.sq->id, 0, ds, 0, 0); set_regex_ctrl_seg(wqe + 12, 0, group0, group1, group2, group3, - 0); + control); struct mlx5_wqe_data_seg *input_seg = (struct mlx5_wqe_data_seg *)(wqe + MLX5_REGEX_WQE_GATHER_OFFSET);