net/mlx5: fix missing ptype for IP-in-IP

Message ID 8b07ad6d289e6b604bfc95f70ded7f78e0cb4489.1565264176.git.jackmin@mellanox.com
State New
Delegated to: Raslan Darawsheh
Headers show
Series
  • net/mlx5: fix missing ptype for IP-in-IP
Related show

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/iol-Compile-Testing success Compile Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Xiaoyu Min Aug. 8, 2019, 11:38 a.m.
The hw ptype information is missed for IP-in-IP tunnel.
It should be RTE_PTYPE_TUNNEL_IP ptype.

Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 8 ++++++++
 drivers/net/mlx5/mlx5_rxtx.h | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 9d2c8c9ec5..67a31473d8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -306,6 +306,14 @@  static struct mlx5_flow_tunnel_info tunnels_info[] = {
 		.tunnel = MLX5_FLOW_LAYER_NVGRE,
 		.ptype = RTE_PTYPE_TUNNEL_NVGRE,
 	},
+	{
+		.tunnel = MLX5_FLOW_LAYER_IPIP,
+		.ptype = RTE_PTYPE_TUNNEL_IP,
+	},
+	{
+		.tunnel = MLX5_FLOW_LAYER_IPV6_ENCAP,
+		.ptype = RTE_PTYPE_TUNNEL_IP,
+	},
 };
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index bad9e9c1f7..4f73d91311 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -40,7 +40,7 @@ 
 #include "mlx5_glue.h"
 
 /* Support tunnel matching. */
-#define MLX5_FLOW_TUNNEL 6
+#define MLX5_FLOW_TUNNEL 8
 
 struct mlx5_rxq_stats {
 #ifdef MLX5_PMD_SOFT_COUNTERS