DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
@ 2017-05-31 23:30 Qi Zhang
  2017-06-04 23:04 ` Ananyev, Konstantin
  2017-06-06 15:45 ` Olivier Matz
  0 siblings, 2 replies; 5+ messages in thread
From: Qi Zhang @ 2017-05-31 23:30 UTC (permalink / raw)
  To: konstantin.ananyev, helin.zhang; +Cc: wenzhuo.lu, ray.kinsella, dev, Qi Zhang

Hardware PTYPE in Rx desc will be parsed to fill
mbuf's packet_type.

Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---

v2:
- replace large macro that parse packet type with inline function
- fix couple check patch issues.

 drivers/net/ixgbe/ixgbe_ethdev.c       |   8 +
 drivers/net/ixgbe/ixgbe_rxtx.c         | 623 ++++++++++++++-------------------
 drivers/net/ixgbe/ixgbe_rxtx.h         |  92 +++++
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c |  65 ++++
 4 files changed, 434 insertions(+), 354 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2083cde..3e39648 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3717,6 +3717,14 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 	    dev->rx_pkt_burst == ixgbe_recv_pkts_lro_bulk_alloc ||
 	    dev->rx_pkt_burst == ixgbe_recv_pkts_bulk_alloc)
 		return ptypes;
+
+#if defined(RTE_ARCH_X86_64) || \
+	defined(RTE_ARCH_X86_X32) || \
+	defined(RTE_ARCH_I686)
+	if (dev->rx_pkt_burst == ixgbe_recv_pkts_vec ||
+	    dev->rx_pkt_burst == ixgbe_recv_scattered_pkts_vec)
+		return ptypes;
+#endif
 	return NULL;
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 1e07895..5281612 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1002,364 +1002,279 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  *
  **********************************************************************/
 
-#define IXGBE_PACKET_TYPE_ETHER				0X00
-#define IXGBE_PACKET_TYPE_IPV4				0X01
-#define IXGBE_PACKET_TYPE_IPV4_TCP			0X11
-#define IXGBE_PACKET_TYPE_IPV4_UDP			0X21
-#define IXGBE_PACKET_TYPE_IPV4_SCTP			0X41
-#define IXGBE_PACKET_TYPE_IPV4_EXT			0X03
-#define IXGBE_PACKET_TYPE_IPV4_EXT_TCP			0X13
-#define IXGBE_PACKET_TYPE_IPV4_EXT_UDP			0X23
-#define IXGBE_PACKET_TYPE_IPV4_EXT_SCTP			0X43
-#define IXGBE_PACKET_TYPE_IPV6				0X04
-#define IXGBE_PACKET_TYPE_IPV6_TCP			0X14
-#define IXGBE_PACKET_TYPE_IPV6_UDP			0X24
-#define IXGBE_PACKET_TYPE_IPV6_SCTP			0X44
-#define IXGBE_PACKET_TYPE_IPV6_EXT			0X0C
-#define IXGBE_PACKET_TYPE_IPV6_EXT_TCP			0X1C
-#define IXGBE_PACKET_TYPE_IPV6_EXT_UDP			0X2C
-#define IXGBE_PACKET_TYPE_IPV6_EXT_SCTP			0X4C
-#define IXGBE_PACKET_TYPE_IPV4_IPV6			0X05
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_TCP			0X15
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_UDP			0X25
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP		0X45
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6			0X07
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP		0X17
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP		0X27
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP		0X47
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT			0X0D
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP		0X1D
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP		0X2D
-#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP		0X4D
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT		0X0F
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP		0X1F
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP		0X2F
-#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP	0X4F
-
-#define IXGBE_PACKET_TYPE_NVGRE                   0X00
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4              0X01
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP          0X11
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP          0X21
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP         0X41
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT          0X03
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP      0X13
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP      0X23
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP     0X43
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6              0X04
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP          0X14
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP          0X24
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP         0X44
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT          0X0C
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP      0X1C
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP      0X2C
-#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP     0X4C
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6         0X05
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP     0X15
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP     0X25
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT     0X0D
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP 0X1D
-#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP 0X2D
-
-#define IXGBE_PACKET_TYPE_VXLAN                   0X80
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4              0X81
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP          0x91
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP          0xA1
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP         0xC1
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT          0x83
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP      0X93
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP      0XA3
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP     0XC3
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6              0X84
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP          0X94
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP          0XA4
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP         0XC4
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT          0X8C
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP      0X9C
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP      0XAC
-#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP     0XCC
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6         0X85
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP     0X95
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP     0XA5
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT     0X8D
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP 0X9D
-#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP 0XAD
-
-#define IXGBE_PACKET_TYPE_MAX               0X80
-#define IXGBE_PACKET_TYPE_TN_MAX            0X100
-#define IXGBE_PACKET_TYPE_SHIFT             0X04
+/**
+ * Use 2 different table for normal packet and tunnel packet
+ * to save the space.
+ */
+const uint32_t
+	ptype_table[IXGBE_PACKET_TYPE_MAX] __rte_cache_aligned = {
+	[IXGBE_PACKET_TYPE_ETHER] = RTE_PTYPE_L2_ETHER,
+	[IXGBE_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4,
+	[IXGBE_PACKET_TYPE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6,
+	[IXGBE_PACKET_TYPE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6_EXT,
+	[IXGBE_PACKET_TYPE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+	RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP] =
+		RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
+};
+
+const uint32_t
+	ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX] __rte_cache_aligned = {
+	[IXGBE_PACKET_TYPE_NVGRE] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
+		RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
+		RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
+		RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP] =
+		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+		RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
+		RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
+		RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
+		RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
+		RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
+		RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP] =
+		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+		RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
+		RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
+		RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
+		RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
+		RTE_PTYPE_INNER_L4_UDP,
+
+	[IXGBE_PACKET_TYPE_VXLAN] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4_EXT,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6_EXT,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP] =
+		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+		RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP] =
+		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+		RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
+		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_SCTP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_TCP,
+	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
+		RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_UDP,
+};
 
 /* @note: fix ixgbe_dev_supported_ptypes_get() if any change here. */
-static inline uint32_t
+inline uint32_t
 ixgbe_rxd_pkt_info_to_pkt_type(uint32_t pkt_info, uint16_t ptype_mask)
 {
-	/**
-	 * Use 2 different table for normal packet and tunnel packet
-	 * to save the space.
-	 */
-	static const uint32_t
-		ptype_table[IXGBE_PACKET_TYPE_MAX] __rte_cache_aligned = {
-		[IXGBE_PACKET_TYPE_ETHER] = RTE_PTYPE_L2_ETHER,
-		[IXGBE_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4,
-		[IXGBE_PACKET_TYPE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6,
-		[IXGBE_PACKET_TYPE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6_EXT,
-		[IXGBE_PACKET_TYPE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP] =
-			RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
-	};
-
-	static const uint32_t
-		ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX] __rte_cache_aligned = {
-		[IXGBE_PACKET_TYPE_NVGRE] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
-			RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
-			RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
-			RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP] =
-			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
-			RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
-			RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
-			RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
-			RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
-			RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP] =
-			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
-			RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
-			RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
-			RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
-			RTE_PTYPE_INNER_L4_UDP,
-
-		[IXGBE_PACKET_TYPE_VXLAN] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4_EXT,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6_EXT,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP] =
-			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP] =
-			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
-			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_SCTP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_TCP,
-		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
-			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
-			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
-			RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_UDP,
-	};
 
 	if (unlikely(pkt_info & IXGBE_RXDADV_PKTTYPE_ETQF))
 		return RTE_PTYPE_UNKNOWN;
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 1ffab4c..cfd0e6a 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -87,6 +87,92 @@
 #define IXGBE_PACKET_TYPE_MASK_TUNNEL       0XFF
 #define IXGBE_PACKET_TYPE_TUNNEL_BIT        0X1000
 
+#define IXGBE_PACKET_TYPE_ETHER                        0X00
+#define IXGBE_PACKET_TYPE_IPV4                         0X01
+#define IXGBE_PACKET_TYPE_IPV4_TCP                     0X11
+#define IXGBE_PACKET_TYPE_IPV4_UDP                     0X21
+#define IXGBE_PACKET_TYPE_IPV4_SCTP                    0X41
+#define IXGBE_PACKET_TYPE_IPV4_EXT                     0X03
+#define IXGBE_PACKET_TYPE_IPV4_EXT_TCP                 0X13
+#define IXGBE_PACKET_TYPE_IPV4_EXT_UDP                 0X23
+#define IXGBE_PACKET_TYPE_IPV4_EXT_SCTP                0X43
+#define IXGBE_PACKET_TYPE_IPV6                         0X04
+#define IXGBE_PACKET_TYPE_IPV6_TCP                     0X14
+#define IXGBE_PACKET_TYPE_IPV6_UDP                     0X24
+#define IXGBE_PACKET_TYPE_IPV6_SCTP                    0X44
+#define IXGBE_PACKET_TYPE_IPV6_EXT                     0X0C
+#define IXGBE_PACKET_TYPE_IPV6_EXT_TCP                 0X1C
+#define IXGBE_PACKET_TYPE_IPV6_EXT_UDP                 0X2C
+#define IXGBE_PACKET_TYPE_IPV6_EXT_SCTP                0X4C
+#define IXGBE_PACKET_TYPE_IPV4_IPV6                    0X05
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_TCP                0X15
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_UDP                0X25
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP               0X45
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6                0X07
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP            0X17
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP            0X27
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP           0X47
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT                0X0D
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP            0X1D
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP            0X2D
+#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP           0X4D
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT            0X0F
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP        0X1F
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP        0X2F
+#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP       0X4F
+
+#define IXGBE_PACKET_TYPE_NVGRE                   0X00
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4              0X01
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP          0X11
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP          0X21
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP         0X41
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT          0X03
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP      0X13
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP      0X23
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP     0X43
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6              0X04
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP          0X14
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP          0X24
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP         0X44
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT          0X0C
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP      0X1C
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP      0X2C
+#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP     0X4C
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6         0X05
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP     0X15
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP     0X25
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT     0X0D
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP 0X1D
+#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP 0X2D
+
+#define IXGBE_PACKET_TYPE_VXLAN                   0X80
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4              0X81
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP          0x91
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP          0xA1
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP         0xC1
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT          0x83
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP      0X93
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP      0XA3
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP     0XC3
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6              0X84
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP          0X94
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP          0XA4
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP         0XC4
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT          0X8C
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP      0X9C
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP      0XAC
+#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP     0XCC
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6         0X85
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP     0X95
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP     0XA5
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT     0X8D
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP 0X9D
+#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP 0XAD
+
+#define IXGBE_PACKET_TYPE_MAX               0X80
+#define IXGBE_PACKET_TYPE_TN_MAX            0X100
+#define IXGBE_PACKET_TYPE_SHIFT             0X04
+
 /**
  * Structure associated with each descriptor of the RX ring of a RX queue.
  */
@@ -301,6 +387,9 @@ void ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq);
  */
 void ixgbe_set_rx_function(struct rte_eth_dev *dev);
 
+uint32_t ixgbe_rxd_pkt_info_to_pkt_type(uint32_t pkt_info,
+		uint16_t ptype_mask);
+
 uint16_t ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		uint16_t nb_pkts);
 uint16_t ixgbe_recv_scattered_pkts_vec(void *rx_queue,
@@ -309,6 +398,9 @@ int ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev);
 int ixgbe_rxq_vec_setup(struct ixgbe_rx_queue *rxq);
 void ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq);
 
+extern const uint32_t ptype_table[IXGBE_PACKET_TYPE_MAX];
+extern const uint32_t ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX];
+
 #ifdef RTE_IXGBE_INC_VECTOR
 
 uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index a7bc199..6821813 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -240,6 +240,68 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 	_mm_store_si128((__m128i *)&rx_pkts[3]->rearm_data, rearm3);
 }
 
+static inline uint32_t get_packet_type(const int index,
+				       uint32_t pkt_info,
+				       uint32_t etqf_check,
+				       uint32_t tunnel_check)
+{
+	if (etqf_check & (0x02 << (index * RTE_IXGBE_DESCS_PER_LOOP)))
+		return RTE_PTYPE_UNKNOWN;
+
+	if (tunnel_check & (0x02 << (index * RTE_IXGBE_DESCS_PER_LOOP))) {
+		pkt_info &= IXGBE_PACKET_TYPE_MASK_TUNNEL;
+		return ptype_table_tn[pkt_info];
+	}
+
+	pkt_info &= IXGBE_PACKET_TYPE_MASK_82599;
+	return ptype_table[pkt_info];
+}
+
+static inline void
+desc_to_ptype_v(__m128i descs[4], uint16_t pkt_type_mask,
+		struct rte_mbuf **rx_pkts)
+{
+	__m128i etqf_mask = _mm_set_epi64x(0x800000008000LL, 0x800000008000LL);
+	__m128i ptype_mask = _mm_set_epi32(
+		pkt_type_mask, pkt_type_mask, pkt_type_mask, pkt_type_mask);
+	__m128i tunnel_mask =
+		_mm_set_epi64x(0x100000001000LL, 0x100000001000LL);
+
+	uint32_t etqf_check, tunnel_check, pkt_info;
+
+	__m128i ptype0 = _mm_unpacklo_epi32(descs[0], descs[2]);
+	__m128i ptype1 = _mm_unpacklo_epi32(descs[1], descs[3]);
+
+	/* interleave low 32 bits,
+	 * now we have 4 ptypes in a XMM register
+	 */
+	ptype0 = _mm_unpacklo_epi32(ptype0, ptype1);
+
+	/* create a etqf bitmask based on the etqf bit. */
+	etqf_check = _mm_movemask_epi8(_mm_and_si128(ptype0, etqf_mask));
+
+	/* shift left by IXGBE_PACKET_TYPE_SHIFT, and apply ptype mask */
+	ptype0 = _mm_and_si128(_mm_srli_epi32(ptype0, IXGBE_PACKET_TYPE_SHIFT),
+			       ptype_mask);
+
+	/* create a tunnel bitmask based on the tunnel bit */
+	tunnel_check = _mm_movemask_epi8(
+		_mm_slli_epi32(_mm_and_si128(ptype0, tunnel_mask), 0x3));
+
+	pkt_info = _mm_extract_epi32(ptype0, 0);
+	rx_pkts[0]->packet_type =
+		get_packet_type(0, pkt_info, etqf_check, tunnel_check);
+	pkt_info = _mm_extract_epi32(ptype0, 1);
+	rx_pkts[1]->packet_type =
+		get_packet_type(1, pkt_info, etqf_check, tunnel_check);
+	pkt_info = _mm_extract_epi32(ptype0, 2);
+	rx_pkts[2]->packet_type =
+		get_packet_type(2, pkt_info, etqf_check, tunnel_check);
+	pkt_info = _mm_extract_epi32(ptype0, 3);
+	rx_pkts[3]->packet_type =
+		get_packet_type(3, pkt_info, etqf_check, tunnel_check);
+}
+
 /*
  * vPMD raw receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
  *
@@ -447,6 +509,8 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		_mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1,
 				pkt_mb1);
 
+		desc_to_ptype_v(descs, rxq->pkt_type_mask, &rx_pkts[pos]);
+
 		/* C.4 calc avaialbe number of desc */
 		var = __builtin_popcountll(_mm_cvtsi128_si64(staterr));
 		nb_pkts_recd += var;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
  2017-05-31 23:30 [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD Qi Zhang
@ 2017-06-04 23:04 ` Ananyev, Konstantin
  2017-06-06  4:25   ` Zhang, Qi Z
  2017-06-06 15:45 ` Olivier Matz
  1 sibling, 1 reply; 5+ messages in thread
From: Ananyev, Konstantin @ 2017-06-04 23:04 UTC (permalink / raw)
  To: Zhang, Qi Z, Zhang, Helin; +Cc: Lu, Wenzhuo, Kinsella, Ray, dev

Hi Qi,

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Thursday, June 1, 2017 12:30 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin <helin.zhang@intel.com>
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Kinsella, Ray <ray.kinsella@intel.com>; dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
> 
> Hardware PTYPE in Rx desc will be parsed to fill
> mbuf's packet_type.

Vector part looks good to me, just few nits - see below.
Konstantin

> 
> Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> 
> v2:
> - replace large macro that parse packet type with inline function
> - fix couple check patch issues.
> 
>  drivers/net/ixgbe/ixgbe_ethdev.c       |   8 +
>  drivers/net/ixgbe/ixgbe_rxtx.c         | 623 ++++++++++++++-------------------
>  drivers/net/ixgbe/ixgbe_rxtx.h         |  92 +++++
>  drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c |  65 ++++
>  4 files changed, 434 insertions(+), 354 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 2083cde..3e39648 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3717,6 +3717,14 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
>  	    dev->rx_pkt_burst == ixgbe_recv_pkts_lro_bulk_alloc ||
>  	    dev->rx_pkt_burst == ixgbe_recv_pkts_bulk_alloc)
>  		return ptypes;
> +
> +#if defined(RTE_ARCH_X86_64) || \
> +	defined(RTE_ARCH_X86_X32) || \
> +	defined(RTE_ARCH_I686)
> +	if (dev->rx_pkt_burst == ixgbe_recv_pkts_vec ||
> +	    dev->rx_pkt_burst == ixgbe_recv_scattered_pkts_vec)
> +		return ptypes;
> +#endif
>  	return NULL;
>  }
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index 1e07895..5281612 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -1002,364 +1002,279 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
>   *
>   **********************************************************************/
> 
> -#define IXGBE_PACKET_TYPE_ETHER				0X00
> -#define IXGBE_PACKET_TYPE_IPV4				0X01
> -#define IXGBE_PACKET_TYPE_IPV4_TCP			0X11
> -#define IXGBE_PACKET_TYPE_IPV4_UDP			0X21
> -#define IXGBE_PACKET_TYPE_IPV4_SCTP			0X41
> -#define IXGBE_PACKET_TYPE_IPV4_EXT			0X03
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_TCP			0X13
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_UDP			0X23
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_SCTP			0X43
> -#define IXGBE_PACKET_TYPE_IPV6				0X04
> -#define IXGBE_PACKET_TYPE_IPV6_TCP			0X14
> -#define IXGBE_PACKET_TYPE_IPV6_UDP			0X24
> -#define IXGBE_PACKET_TYPE_IPV6_SCTP			0X44
> -#define IXGBE_PACKET_TYPE_IPV6_EXT			0X0C
> -#define IXGBE_PACKET_TYPE_IPV6_EXT_TCP			0X1C
> -#define IXGBE_PACKET_TYPE_IPV6_EXT_UDP			0X2C
> -#define IXGBE_PACKET_TYPE_IPV6_EXT_SCTP			0X4C
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6			0X05
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_TCP			0X15
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_UDP			0X25
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP		0X45
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6			0X07
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP		0X17
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP		0X27
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP		0X47
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT			0X0D
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP		0X1D
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP		0X2D
> -#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP		0X4D
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT		0X0F
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP		0X1F
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP		0X2F
> -#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP	0X4F
> -
> -#define IXGBE_PACKET_TYPE_NVGRE                   0X00
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4              0X01
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP          0X11
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP          0X21
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP         0X41
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT          0X03
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP      0X13
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP      0X23
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP     0X43
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6              0X04
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP          0X14
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP          0X24
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP         0X44
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT          0X0C
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP      0X1C
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP      0X2C
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP     0X4C
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6         0X05
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP     0X15
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP     0X25
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT     0X0D
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP 0X1D
> -#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP 0X2D
> -
> -#define IXGBE_PACKET_TYPE_VXLAN                   0X80
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4              0X81
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP          0x91
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP          0xA1
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP         0xC1
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT          0x83
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP      0X93
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP      0XA3
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP     0XC3
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6              0X84
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP          0X94
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP          0XA4
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP         0XC4
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT          0X8C
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP      0X9C
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP      0XAC
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP     0XCC
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6         0X85
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP     0X95
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP     0XA5
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT     0X8D
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP 0X9D
> -#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP 0XAD

As you stukk have ptype_table[] definition inside ixgbe_rxtx.c,
I think you can keep the defines above at the same place.

> -
> -#define IXGBE_PACKET_TYPE_MAX               0X80
> -#define IXGBE_PACKET_TYPE_TN_MAX            0X100
> -#define IXGBE_PACKET_TYPE_SHIFT             0X04
> +/**
> + * Use 2 different table for normal packet and tunnel packet
> + * to save the space.
> + */
> +const uint32_t
> +	ptype_table[IXGBE_PACKET_TYPE_MAX] __rte_cache_aligned = {
> +	[IXGBE_PACKET_TYPE_ETHER] = RTE_PTYPE_L2_ETHER,
> +	[IXGBE_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6,
> +	[IXGBE_PACKET_TYPE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6_EXT,
> +	[IXGBE_PACKET_TYPE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +	RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP] =
> +		RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
> +};
> +
> +const uint32_t
> +	ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX] __rte_cache_aligned = {
> +	[IXGBE_PACKET_TYPE_NVGRE] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
> +		RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
> +		RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
> +		RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP] =
> +		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> +		RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
> +		RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
> +		RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
> +		RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
> +		RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
> +		RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP] =
> +		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> +		RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
> +		RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
> +		RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
> +		RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
> +		RTE_PTYPE_INNER_L4_UDP,
> +
> +	[IXGBE_PACKET_TYPE_VXLAN] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4_EXT,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP] =
> +		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> +		RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP] =
> +		RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> +		RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
> +		RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_SCTP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_TCP,
> +	[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> +		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> +		RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> +		RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_UDP,
> +};
> 
>  /* @note: fix ixgbe_dev_supported_ptypes_get() if any change here. */
> -static inline uint32_t
> +inline uint32_t
>  ixgbe_rxd_pkt_info_to_pkt_type(uint32_t pkt_info, uint16_t ptype_mask)

Wonder why that function can't be static any more?

>  {
> -	/**
> -	 * Use 2 different table for normal packet and tunnel packet
> -	 * to save the space.
> -	 */
> -	static const uint32_t
> -		ptype_table[IXGBE_PACKET_TYPE_MAX] __rte_cache_aligned = {
> -		[IXGBE_PACKET_TYPE_ETHER] = RTE_PTYPE_L2_ETHER,
> -		[IXGBE_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6,
> -		[IXGBE_PACKET_TYPE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6_EXT,
> -		[IXGBE_PACKET_TYPE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP] =
> -			RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_TUNNEL_IP |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
> -	};
> -
> -	static const uint32_t
> -		ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX] __rte_cache_aligned = {
> -		[IXGBE_PACKET_TYPE_NVGRE] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
> -			RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
> -			RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
> -			RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP] =
> -			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> -			RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
> -			RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
> -			RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6 |
> -			RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
> -			RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV6_EXT |
> -			RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP] =
> -			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> -			RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 |
> -			RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
> -			RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
> -			RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4_EXT |
> -			RTE_PTYPE_INNER_L4_UDP,
> -
> -		[IXGBE_PACKET_TYPE_VXLAN] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4_EXT,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP] =
> -			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> -			RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6 | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_UDP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP] =
> -			RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
> -			RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN |
> -			RTE_PTYPE_INNER_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_SCTP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_TCP,
> -		[IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP] = RTE_PTYPE_L2_ETHER |
> -			RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
> -			RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_INNER_L2_ETHER |
> -			RTE_PTYPE_INNER_L3_IPV4_EXT | RTE_PTYPE_INNER_L4_UDP,
> -	};
> 
>  	if (unlikely(pkt_info & IXGBE_RXDADV_PKTTYPE_ETQF))
>  		return RTE_PTYPE_UNKNOWN;
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
> index 1ffab4c..cfd0e6a 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.h
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.h
> @@ -87,6 +87,92 @@
>  #define IXGBE_PACKET_TYPE_MASK_TUNNEL       0XFF
>  #define IXGBE_PACKET_TYPE_TUNNEL_BIT        0X1000
> 
> +#define IXGBE_PACKET_TYPE_ETHER                        0X00
> +#define IXGBE_PACKET_TYPE_IPV4                         0X01
> +#define IXGBE_PACKET_TYPE_IPV4_TCP                     0X11
> +#define IXGBE_PACKET_TYPE_IPV4_UDP                     0X21
> +#define IXGBE_PACKET_TYPE_IPV4_SCTP                    0X41
> +#define IXGBE_PACKET_TYPE_IPV4_EXT                     0X03
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_TCP                 0X13
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_UDP                 0X23
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_SCTP                0X43
> +#define IXGBE_PACKET_TYPE_IPV6                         0X04
> +#define IXGBE_PACKET_TYPE_IPV6_TCP                     0X14
> +#define IXGBE_PACKET_TYPE_IPV6_UDP                     0X24
> +#define IXGBE_PACKET_TYPE_IPV6_SCTP                    0X44
> +#define IXGBE_PACKET_TYPE_IPV6_EXT                     0X0C
> +#define IXGBE_PACKET_TYPE_IPV6_EXT_TCP                 0X1C
> +#define IXGBE_PACKET_TYPE_IPV6_EXT_UDP                 0X2C
> +#define IXGBE_PACKET_TYPE_IPV6_EXT_SCTP                0X4C
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6                    0X05
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_TCP                0X15
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_UDP                0X25
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_SCTP               0X45
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6                0X07
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_TCP            0X17
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_UDP            0X27
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_SCTP           0X47
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT                0X0D
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_TCP            0X1D
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_UDP            0X2D
> +#define IXGBE_PACKET_TYPE_IPV4_IPV6_EXT_SCTP           0X4D
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT            0X0F
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_TCP        0X1F
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_UDP        0X2F
> +#define IXGBE_PACKET_TYPE_IPV4_EXT_IPV6_EXT_SCTP       0X4F
> +
> +#define IXGBE_PACKET_TYPE_NVGRE                   0X00
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4              0X01
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_TCP          0X11
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_UDP          0X21
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_SCTP         0X41
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT          0X03
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_TCP      0X13
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_UDP      0X23
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_EXT_SCTP     0X43
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6              0X04
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_TCP          0X14
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_UDP          0X24
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_SCTP         0X44
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT          0X0C
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_TCP      0X1C
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_UDP      0X2C
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV6_EXT_SCTP     0X4C
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6         0X05
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_TCP     0X15
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_UDP     0X25
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT     0X0D
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_TCP 0X1D
> +#define IXGBE_PACKET_TYPE_NVGRE_IPV4_IPV6_EXT_UDP 0X2D
> +
> +#define IXGBE_PACKET_TYPE_VXLAN                   0X80
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4              0X81
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_TCP          0x91
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_UDP          0xA1
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_SCTP         0xC1
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT          0x83
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_TCP      0X93
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_UDP      0XA3
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_EXT_SCTP     0XC3
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6              0X84
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_TCP          0X94
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_UDP          0XA4
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_SCTP         0XC4
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT          0X8C
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_TCP      0X9C
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_UDP      0XAC
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV6_EXT_SCTP     0XCC
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6         0X85
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_TCP     0X95
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_UDP     0XA5
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT     0X8D
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_TCP 0X9D
> +#define IXGBE_PACKET_TYPE_VXLAN_IPV4_IPV6_EXT_UDP 0XAD
> +
> +#define IXGBE_PACKET_TYPE_MAX               0X80
> +#define IXGBE_PACKET_TYPE_TN_MAX            0X100
> +#define IXGBE_PACKET_TYPE_SHIFT             0X04
> +
>  /**
>   * Structure associated with each descriptor of the RX ring of a RX queue.
>   */
> @@ -301,6 +387,9 @@ void ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq);
>   */
>  void ixgbe_set_rx_function(struct rte_eth_dev *dev);
> 
> +uint32_t ixgbe_rxd_pkt_info_to_pkt_type(uint32_t pkt_info,
> +		uint16_t ptype_mask);
> +
>  uint16_t ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
>  		uint16_t nb_pkts);
>  uint16_t ixgbe_recv_scattered_pkts_vec(void *rx_queue,
> @@ -309,6 +398,9 @@ int ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev);
>  int ixgbe_rxq_vec_setup(struct ixgbe_rx_queue *rxq);
>  void ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq);
> 
> +extern const uint32_t ptype_table[IXGBE_PACKET_TYPE_MAX];
> +extern const uint32_t ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX];
> +
>  #ifdef RTE_IXGBE_INC_VECTOR
> 
>  uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> index a7bc199..6821813 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> @@ -240,6 +240,68 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
>  	_mm_store_si128((__m128i *)&rx_pkts[3]->rearm_data, rearm3);
>  }
> 
> +static inline uint32_t get_packet_type(const int index,

No need for const here.

> +				       uint32_t pkt_info,
> +				       uint32_t etqf_check,
> +				       uint32_t tunnel_check)
> +{
> +	if (etqf_check & (0x02 << (index * RTE_IXGBE_DESCS_PER_LOOP)))
> +		return RTE_PTYPE_UNKNOWN;
> +
> +	if (tunnel_check & (0x02 << (index * RTE_IXGBE_DESCS_PER_LOOP))) {
> +		pkt_info &= IXGBE_PACKET_TYPE_MASK_TUNNEL;
> +		return ptype_table_tn[pkt_info];
> +	}
> +
> +	pkt_info &= IXGBE_PACKET_TYPE_MASK_82599;
> +	return ptype_table[pkt_info];
> +}
> +
> +static inline void
> +desc_to_ptype_v(__m128i descs[4], uint16_t pkt_type_mask,
> +		struct rte_mbuf **rx_pkts)
> +{
> +	__m128i etqf_mask = _mm_set_epi64x(0x800000008000LL, 0x800000008000LL);
> +	__m128i ptype_mask = _mm_set_epi32(
> +		pkt_type_mask, pkt_type_mask, pkt_type_mask, pkt_type_mask);
> +	__m128i tunnel_mask =
> +		_mm_set_epi64x(0x100000001000LL, 0x100000001000LL);
> +
> +	uint32_t etqf_check, tunnel_check, pkt_info;
> +
> +	__m128i ptype0 = _mm_unpacklo_epi32(descs[0], descs[2]);
> +	__m128i ptype1 = _mm_unpacklo_epi32(descs[1], descs[3]);
> +
> +	/* interleave low 32 bits,
> +	 * now we have 4 ptypes in a XMM register
> +	 */
> +	ptype0 = _mm_unpacklo_epi32(ptype0, ptype1);
> +
> +	/* create a etqf bitmask based on the etqf bit. */
> +	etqf_check = _mm_movemask_epi8(_mm_and_si128(ptype0, etqf_mask));
> +
> +	/* shift left by IXGBE_PACKET_TYPE_SHIFT, and apply ptype mask */
> +	ptype0 = _mm_and_si128(_mm_srli_epi32(ptype0, IXGBE_PACKET_TYPE_SHIFT),
> +			       ptype_mask);
> +
> +	/* create a tunnel bitmask based on the tunnel bit */
> +	tunnel_check = _mm_movemask_epi8(
> +		_mm_slli_epi32(_mm_and_si128(ptype0, tunnel_mask), 0x3));
> +
> +	pkt_info = _mm_extract_epi32(ptype0, 0);
> +	rx_pkts[0]->packet_type =
> +		get_packet_type(0, pkt_info, etqf_check, tunnel_check);
> +	pkt_info = _mm_extract_epi32(ptype0, 1);
> +	rx_pkts[1]->packet_type =
> +		get_packet_type(1, pkt_info, etqf_check, tunnel_check);
> +	pkt_info = _mm_extract_epi32(ptype0, 2);
> +	rx_pkts[2]->packet_type =
> +		get_packet_type(2, pkt_info, etqf_check, tunnel_check);
> +	pkt_info = _mm_extract_epi32(ptype0, 3);
> +	rx_pkts[3]->packet_type =
> +		get_packet_type(3, pkt_info, etqf_check, tunnel_check);
> +}
> +
>  /*
>   * vPMD raw receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
>   *
> @@ -447,6 +509,8 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
>  		_mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1,
>  				pkt_mb1);
> 
> +		desc_to_ptype_v(descs, rxq->pkt_type_mask, &rx_pkts[pos]);
> +
>  		/* C.4 calc avaialbe number of desc */
>  		var = __builtin_popcountll(_mm_cvtsi128_si64(staterr));
>  		nb_pkts_recd += var;
> --
> 2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
  2017-06-04 23:04 ` Ananyev, Konstantin
@ 2017-06-06  4:25   ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2017-06-06  4:25 UTC (permalink / raw)
  To: Ananyev, Konstantin, Zhang, Helin; +Cc: Lu, Wenzhuo, Kinsella, Ray, dev

Hi Konstantin:

> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Monday, June 5, 2017 7:05 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Kinsella, Ray
> <ray.kinsella@intel.com>; dev@dpdk.org
> Subject: RE: [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
> 
> Hi Qi,
> 
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Thursday, June 1, 2017 12:30 AM
> > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin
> > <helin.zhang@intel.com>
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Kinsella, Ray
> > <ray.kinsella@intel.com>; dev@dpdk.org; Zhang, Qi Z
> > <qi.z.zhang@intel.com>
> > Subject: [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
> >
> > Hardware PTYPE in Rx desc will be parsed to fill mbuf's packet_type.
> 
> Vector part looks good to me, just few nits - see below.
> Konstantin

Agree with all the captures

Thanks
Qi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
  2017-05-31 23:30 [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD Qi Zhang
  2017-06-04 23:04 ` Ananyev, Konstantin
@ 2017-06-06 15:45 ` Olivier Matz
  2017-06-06 16:03   ` Zhang, Qi Z
  1 sibling, 1 reply; 5+ messages in thread
From: Olivier Matz @ 2017-06-06 15:45 UTC (permalink / raw)
  To: Qi Zhang; +Cc: konstantin.ananyev, helin.zhang, wenzhuo.lu, ray.kinsella, dev

Hi Qi,

On Wed, 31 May 2017 19:30:26 -0400, Qi Zhang <qi.z.zhang@intel.com> wrote:
> Hardware PTYPE in Rx desc will be parsed to fill
> mbuf's packet_type.
> 
> Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> 
> v2:
> - replace large macro that parse packet type with inline function
> - fix couple check patch issues.
> 
>  drivers/net/ixgbe/ixgbe_ethdev.c       |   8 +
>  drivers/net/ixgbe/ixgbe_rxtx.c         | 623 ++++++++++++++-------------------
>  drivers/net/ixgbe/ixgbe_rxtx.h         |  92 +++++
>  drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c |  65 ++++
>  4 files changed, 434 insertions(+), 354 deletions(-)
> 

I tried to compile your patch with RTE_MACHINE=default, and I
have the following compilation error:

gcc -Wp,-MD,./.ixgbe_rxtx_vec_sse.o.d.tmp  -m64 -pthread  -march=core2 -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3  -I/home/user/dpdk.org/build/include -include /home/user/dpdk.org/build/include/rte_config.h -O3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Werror -Wno-deprecated    -o ixgbe_rxtx_vec_sse.o -c /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c 
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/x86intrin.h:43:0,
                 from /home/user/dpdk.org/build/include/rte_vect.h:70,
                 from /home/user/dpdk.org/build/include/rte_memcpy.h:46,
                 from /home/user/dpdk.org/build/include/rte_ether.h:50,
                 from /home/user/dpdk.org/build/include/rte_ethdev.h:185,
                 from /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:35:
/home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c: In function ‘desc_to_ptype_v’:
/usr/lib/gcc/x86_64-linux-gnu/6/include/smmintrin.h:447:1: error: inlining failed in call to always_inline ‘_mm_extract_epi32’: target specific option mismatch
 _mm_extract_epi32 (__m128i __X, const int __N)
 ^~~~~~~~~~~~~~~~~
/home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:300:13: note: called from here
  pkt_info = _mm_extract_epi32(ptype0, 3);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/6/include/x86intrin.h:43:0,
                 from /home/user/dpdk.org/build/include/rte_vect.h:70,
                 from /home/user/dpdk.org/build/include/rte_memcpy.h:46,
                 from /home/user/dpdk.org/build/include/rte_ether.h:50,
                 from /home/user/dpdk.org/build/include/rte_ethdev.h:185,
                 from /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:35:
[...]


To reproduce:
 make config T=x86_64-native-linuxapp-gcc
 sed -i 's,CONFIG_RTE_MACHINE="native",CONFIG_RTE_MACHINE="default",' build/.config
 make

Do we still want to support the core2 target?


Thanks,
Olivier

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD
  2017-06-06 15:45 ` Olivier Matz
@ 2017-06-06 16:03   ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2017-06-06 16:03 UTC (permalink / raw)
  To: Olivier Matz
  Cc: Ananyev, Konstantin, Zhang, Helin, Lu, Wenzhuo, Kinsella, Ray, dev

Hi Oliver:

> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Tuesday, June 6, 2017 11:45 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Kinsella,
> Ray <ray.kinsella@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86
> vector PMD
> 
> Hi Qi,
> 
> On Wed, 31 May 2017 19:30:26 -0400, Qi Zhang <qi.z.zhang@intel.com>
> wrote:
> > Hardware PTYPE in Rx desc will be parsed to fill mbuf's packet_type.
> >
> > Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >
> > v2:
> > - replace large macro that parse packet type with inline function
> > - fix couple check patch issues.
> >
> >  drivers/net/ixgbe/ixgbe_ethdev.c       |   8 +
> >  drivers/net/ixgbe/ixgbe_rxtx.c         | 623
> ++++++++++++++-------------------
> >  drivers/net/ixgbe/ixgbe_rxtx.h         |  92 +++++
> >  drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c |  65 ++++
> >  4 files changed, 434 insertions(+), 354 deletions(-)
> >
> 
> I tried to compile your patch with RTE_MACHINE=default, and I have the
> following compilation error:
> 
> gcc -Wp,-MD,./.ixgbe_rxtx_vec_sse.o.d.tmp  -m64 -pthread
> -march=core2 -DRTE_MACHINE_CPUFLAG_SSE
> -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
> -DRTE_MACHINE_CPUFLAG_SSSE3  -I/home/user/dpdk.org/build/include
> -include /home/user/dpdk.org/build/include/rte_config.h -O3 -W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
> -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs
> -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef
> -Wwrite-strings -Werror -Wno-deprecated    -o ixgbe_rxtx_vec_sse.o -c
> /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> In file included from
> /usr/lib/gcc/x86_64-linux-gnu/6/include/x86intrin.h:43:0,
>                  from
> /home/user/dpdk.org/build/include/rte_vect.h:70,
>                  from
> /home/user/dpdk.org/build/include/rte_memcpy.h:46,
>                  from
> /home/user/dpdk.org/build/include/rte_ether.h:50,
>                  from
> /home/user/dpdk.org/build/include/rte_ethdev.h:185,
>                  from
> /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:35:
> /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c: In function
> ‘desc_to_ptype_v’:
> /usr/lib/gcc/x86_64-linux-gnu/6/include/smmintrin.h:447:1: error: inlining
> failed in call to always_inline ‘_mm_extract_epi32’: target specific option
> mismatch
>  _mm_extract_epi32 (__m128i __X, const int __N)  ^~~~~~~~~~~~~~~~~
> /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:300:13: note:
> called from here
>   pkt_info = _mm_extract_epi32(ptype0, 3);
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from
> /usr/lib/gcc/x86_64-linux-gnu/6/include/x86intrin.h:43:0,
>                  from
> /home/user/dpdk.org/build/include/rte_vect.h:70,
>                  from
> /home/user/dpdk.org/build/include/rte_memcpy.h:46,
>                  from
> /home/user/dpdk.org/build/include/rte_ether.h:50,
>                  from
> /home/user/dpdk.org/build/include/rte_ethdev.h:185,
>                  from
> /home/user/dpdk.org/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:35:
> [...]
> 
> 
> To reproduce:
>  make config T=x86_64-native-linuxapp-gcc  sed -i
> 's,CONFIG_RTE_MACHINE="native",CONFIG_RTE_MACHINE="default",'
> build/.config  make
> 
> Do we still want to support the core2 target?

Thanks for capture this/
Will fix in v3

Regards.
Qi
> 
> 
> Thanks,
> Olivier
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-06 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 23:30 [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD Qi Zhang
2017-06-04 23:04 ` Ananyev, Konstantin
2017-06-06  4:25   ` Zhang, Qi Z
2017-06-06 15:45 ` Olivier Matz
2017-06-06 16:03   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).