diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index f5f8658..678db0d 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -125,6 +125,229 @@ extern "C" {
  */
 #define PKT_TX_OFFLOAD_MASK (PKT_TX_VLAN_PKT | PKT_TX_IP_CKSUM | PKT_TX_L4_MASK)
 
+/**
+ * Ethernet packet type
+ */
+enum rte_eth_packet_type {
+
+	/* undefined packet type, means HW can't recognise it */
+	RTE_PTYPE_UNDEF = 0,
+
+	/* L2 Packet types */
+	RTE_PTYPE_PAY2,
+	RTE_PTYPE_TimeSync_PAY2, /**< IEEE1588 and 802.1AS */
+	RTE_PTYPE_FIP_PAY2,      /**< FCoE Initiation Protocol */
+	RTE_PTYPE_LLDP_PAY2,     /**< Link Layer Discovery Protocol */
+	RTE_PTYPE_ECP_PAY2,      /**< Edge Control Protocol */
+	RTE_PTYPE_EAPOL_PAY2,
+	/**< IEEE 802.1X Extensible Authentication Protocol over LAN */
+	RTE_PTYPE_ARP,
+	RTE_PTYPE_FCOE_PAY3,
+	RTE_PTYPE_FCOE_FCDATA,
+	RTE_PTYPE_FCOE_FCRDY,
+	RTE_PTYPE_FCOE_FCRSP,
+	RTE_PTYPE_FCOE_FCOTHER,
+	RTE_PTYPE_FCOE_VFT,
+	RTE_PTYPE_FCOE_VFT_FCDATA,
+	RTE_PTYPE_FCOE_VFT_FCRDY,
+	RTE_PTYPE_FCOE_VFT_FCRSP,
+	RTE_PTYPE_FCOE_VFT_FCOTHER,
+
+	/* Non Tunneled IPv4 */
+	RTE_PTYPE_IPv4FRAG,
+	RTE_PTYPE_IPv4,
+	RTE_PTYPE_IPv4_UDP,
+	RTE_PTYPE_IPv4_TCP,
+	RTE_PTYPE_IPv4_SCTP,
+	RTE_PTYPE_IPv4_ICMP,
+
+	/* IP in IP Tunneling (IPv4 --> IPv4) */
+	RTE_PTYPE_IPv4_IPv4FRAG,
+	RT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o/VXLAN --> MAC/VLAN --> IPv6 */
+	RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6FRAG,
+	RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6,
+	RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6_UDP,
+	RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6_TCP,
+	RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6_SCTP,
+	RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6_ICMP,
+};
+
+/**
+ * Given the packet type returns if it is a packet with IPv4 header,
+ * which includes IPv4 tunneling.
+ */
+#define RTE_ETH_IS_IPV4_HDR(ptype) \
+	((ptype >= RTE_PTYPE_IPv4FRAG) && \
+	(ptype <= RTE_PTYPE_IPv4_GRENAT_MACVLAN_IPv6_ICMP))
+
+/**
+ * Given the packet type returns if it is a tunneling packet
+ * with IPv4 header.
+ */
+#define RTE_ETH_IS_TUNNEL_IPV4_HDR(ptype) \
+	((ptype >= RTE_PTYPE_IPv4FRAG) && \
+	(ptype <= RTE_PTYPE_IPv4_GRENAT_MACVLAN_IPv6_ICMP))
+
+/**
+ * Given the packet type returns if it is a packet with IPv6 header,
+ * which includes IPv6 tunneling.
+ */
+#define RTE_ETH_IS_IPV6_HDR(ptype) \
+	((ptype >= RTE_PTYPE_IPv6FRAG) && \
+	(ptype <= RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6_ICMP))
+
+/**
+ * Given the packet type returns if it is a tunneling packet with
+ * IPv6 header
+ */
+#define RTE_ETH_IS_TUNNEL_IPV6_HDR(ptype) \
+	((ptype >= RTE_PTYPE_IPv6_IPv4FRAG) && \
+	(ptype <= RTE_PTYPE_IPv6_GRENAT_MACVLAN_IPv6_ICMP))
+
 /* define a set of marker types that can be used to refer to set points in the
  * mbuf */
 typedef void    *MARKER[0];   /**< generic marker for a point in a structure */
