From: Viacheslav Ovsiienko Date: Wed, 18 Nov 2020 07:37:30 +0000 (+0000) Subject: net/mlx5: fix raw encap/decap limit X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=f9210259cac7836f78893dc6b0aede8664c1077e net/mlx5: fix raw encap/decap limit The MLX5_ENCAPSULATION_DECISION_SIZE constant is used to check the raw encap/decap actions for the raw header size. The header is constructed of the rte_xxx_hdr structures instead of rte items. Hence, constant must be defined with rte_xxx_hdr structure sizes. Fixes: 50f576d657d7 ("net/mlx5: fix VLAN actions in meter") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko Acked-by: Ori Kam Acked-by: Suanming Mou --- diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index afddcfc12c..1c3c6abea2 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -345,8 +345,8 @@ enum mlx5_feature_name { #define MLX5_GENEVE_OPT_LEN_0 14 #define MLX5_GENEVE_OPT_LEN_1 63 -#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \ - sizeof(struct rte_flow_item_ipv4)) +#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_ether_hdr) + \ + sizeof(struct rte_ipv4_hdr)) /* IPv4 fragment_offset field contains relevant data in bits 2 to 15. */ #define MLX5_IPV4_FRAG_OFFSET_MASK \