Skip to contentSkip to conversation

net/mlx5: fix raw encap/decap limit constant

PATCH In review Viacheslav Ovsiienko 2 participants 2 messages Nov 18, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix raw encap/decap limit constant

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")
---
 drivers/net/mlx5/mlx5_flow.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow.h +2 -2
index c7cfbf3..057eeb6 100644
@@ -348,8 +348,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 \
Signature · 1 line
1.8.3.1
#1 lore raw

Hi,

Quoted 18 lines

-----Original Message-----
From: Viacheslav Ovsiienko <[email protected]>
Sent: Wednesday, November 18, 2020 9:38 AM
To: [email protected]
Cc: Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix raw encap/decap limit constant

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")
Quoted 7 lines
---
 drivers/net/mlx5/mlx5_flow.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh