From: Wisam Jaddo Date: Wed, 28 Apr 2021 10:29:07 +0000 (+0300) Subject: net/mlx5: fix TCP flags size for modify actions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f5c66d0be98d1ba52087b1b6808a206a3b99e765;p=dpdk.git net/mlx5: fix TCP flags size for modify actions From RFC the size of the TCP flags is 9, while the defined current size is 6. Fixes: 641dbe4fb053 ("net/mlx5: support modify field flow action") Cc: stable@dpdk.org Signed-off-by: Wisam Jaddo Reviewed-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 24d1352d90..f93191a33c 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1391,7 +1391,7 @@ mlx5_flow_item_field_width(enum rte_flow_field_id field) case RTE_FLOW_FIELD_TCP_ACK_NUM: return 32; case RTE_FLOW_FIELD_TCP_FLAGS: - return 6; + return 9; case RTE_FLOW_FIELD_UDP_PORT_SRC: case RTE_FLOW_FIELD_UDP_PORT_DST: return 16; @@ -1713,10 +1713,10 @@ mlx5_flow_field_id_to_modify_info (32 - width)); break; case RTE_FLOW_FIELD_TCP_FLAGS: - info[idx] = (struct field_modify_info){1, 0, + info[idx] = (struct field_modify_info){2, 0, MLX5_MODI_OUT_TCP_FLAGS}; if (mask) - mask[idx] = 0x3f >> (6 - width); + mask[idx] = rte_cpu_to_be_16(0x1ff >> (9 - width)); break; case RTE_FLOW_FIELD_UDP_PORT_SRC: info[idx] = (struct field_modify_info){2, 0,