From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CA5E47CD9 for ; Mon, 5 Jun 2017 01:04:37 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2017 16:04:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,298,1493708400"; d="scan'208";a="110817290" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga006.fm.intel.com with ESMTP; 04 Jun 2017 16:04:35 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.250]) by IRSMSX103.ger.corp.intel.com ([169.254.3.9]) with mapi id 14.03.0319.002; Mon, 5 Jun 2017 00:04:34 +0100 From: "Ananyev, Konstantin" To: "Zhang, Qi Z" , "Zhang, Helin" CC: "Lu, Wenzhuo" , "Kinsella, Ray" , "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD Thread-Index: AQHS2qGK0JZT+fwuvked8rsHg/Oy4qIVV0lw Date: Sun, 4 Jun 2017 23:04:33 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583FB058EE@IRSMSX109.ger.corp.intel.com> References: <1496273426-15176-1-git-send-email-qi.z.zhang@intel.com> In-Reply-To: <1496273426-15176-1-git-send-email-qi.z.zhang@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 23:04:39 -0000 Hi Qi, > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, June 1, 2017 12:30 AM > To: Ananyev, Konstantin ; Zhang, Helin > Cc: Lu, Wenzhuo ; Kinsella, Ray ; dev@dpdk.org; Zhang, Qi Z > Subject: [PATCH v2] net/ixgbe: enable PTYPE offload for x86 vector PMD >=20 > 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 >=20 > Signed-off-by: Ray Kinsella > Signed-off-by: Qi Zhang > --- >=20 > v2: > - replace large macro that parse packet type with inline function > - fix couple check patch issues. >=20 > 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(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.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 =3D=3D ixgbe_recv_pkts_lro_bulk_alloc || > dev->rx_pkt_burst =3D=3D 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 =3D=3D ixgbe_recv_pkts_vec || > + dev->rx_pkt_burst =3D=3D ixgbe_recv_scattered_pkts_vec) > + return ptypes; > +#endif > return NULL; > } >=20 > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxt= x.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) > * > **********************************************************************/ >=20 > -#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 =3D { > + [IXGBE_PACKET_TYPE_ETHER] =3D RTE_PTYPE_L2_ETHER, > + [IXGBE_PACKET_TYPE_IPV4] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4, > + [IXGBE_PACKET_TYPE_IPV4_TCP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP, > + [IXGBE_PACKET_TYPE_IPV4_UDP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP, > + [IXGBE_PACKET_TYPE_IPV4_SCTP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP, > + [IXGBE_PACKET_TYPE_IPV4_EXT] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4_EXT, > + [IXGBE_PACKET_TYPE_IPV4_EXT_TCP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP, > + [IXGBE_PACKET_TYPE_IPV4_EXT_UDP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP, > + [IXGBE_PACKET_TYPE_IPV4_EXT_SCTP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_SCTP, > + [IXGBE_PACKET_TYPE_IPV6] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6, > + [IXGBE_PACKET_TYPE_IPV6_TCP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP, > + [IXGBE_PACKET_TYPE_IPV6_UDP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP, > + [IXGBE_PACKET_TYPE_IPV6_SCTP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP, > + [IXGBE_PACKET_TYPE_IPV6_EXT] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6_EXT, > + [IXGBE_PACKET_TYPE_IPV6_EXT_TCP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP, > + [IXGBE_PACKET_TYPE_IPV6_EXT_UDP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP, > + [IXGBE_PACKET_TYPE_IPV6_EXT_SCTP] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_SCTP, > + [IXGBE_PACKET_TYPE_IPV4_IPV6] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP | > + RTE_PTYPE_INNER_L3_IPV6, > + [IXGBE_PACKET_TYPE_IPV4_IPV6_TCP] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > + 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 =3D { > + [IXGBE_PACKET_TYPE_NVGRE] =3D RTE_PTYPE_L2_ETHER | > + RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE | > + RTE_PTYPE_INNER_L2_ETHER, > + [IXGBE_PACKET_TYPE_NVGRE_IPV4] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > + 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > + 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > + 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > + 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] =3D 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] =3D 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] =3D 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] =3D 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, > +}; >=20 > /* @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 =3D { > - [IXGBE_PACKET_TYPE_ETHER] =3D RTE_PTYPE_L2_ETHER, > - [IXGBE_PACKET_TYPE_IPV4] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4, > - [IXGBE_PACKET_TYPE_IPV4_TCP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP, > - [IXGBE_PACKET_TYPE_IPV4_UDP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP, > - [IXGBE_PACKET_TYPE_IPV4_SCTP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_SCTP, > - [IXGBE_PACKET_TYPE_IPV4_EXT] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4_EXT, > - [IXGBE_PACKET_TYPE_IPV4_EXT_TCP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_TCP, > - [IXGBE_PACKET_TYPE_IPV4_EXT_UDP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_UDP, > - [IXGBE_PACKET_TYPE_IPV4_EXT_SCTP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4_EXT | RTE_PTYPE_L4_SCTP, > - [IXGBE_PACKET_TYPE_IPV6] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6, > - [IXGBE_PACKET_TYPE_IPV6_TCP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP, > - [IXGBE_PACKET_TYPE_IPV6_UDP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP, > - [IXGBE_PACKET_TYPE_IPV6_SCTP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP, > - [IXGBE_PACKET_TYPE_IPV6_EXT] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6_EXT, > - [IXGBE_PACKET_TYPE_IPV6_EXT_TCP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_TCP, > - [IXGBE_PACKET_TYPE_IPV6_EXT_UDP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_UDP, > - [IXGBE_PACKET_TYPE_IPV6_EXT_SCTP] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV6_EXT | RTE_PTYPE_L4_SCTP, > - [IXGBE_PACKET_TYPE_IPV4_IPV6] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4 | RTE_PTYPE_TUNNEL_IP | > - RTE_PTYPE_INNER_L3_IPV6, > - [IXGBE_PACKET_TYPE_IPV4_IPV6_TCP] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > - 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 =3D { > - [IXGBE_PACKET_TYPE_NVGRE] =3D RTE_PTYPE_L2_ETHER | > - RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE | > - RTE_PTYPE_INNER_L2_ETHER, > - [IXGBE_PACKET_TYPE_NVGRE_IPV4] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > - 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > - 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > - 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D 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] =3D > - 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] =3D 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] =3D 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] =3D 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] =3D 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, > - }; >=20 > 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_rxt= x.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 >=20 > +#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 queu= e. > */ > @@ -301,6 +387,9 @@ void ixgbe_set_tx_function(struct rte_eth_dev *dev, s= truct ixgbe_tx_queue *txq); > */ > void ixgbe_set_rx_function(struct rte_eth_dev *dev); >=20 > +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); >=20 > +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 >=20 > 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/i= xgbe_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_ini= t, uint8_t vlan_flags, > _mm_store_si128((__m128i *)&rx_pkts[3]->rearm_data, rearm3); > } >=20 > +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 &=3D IXGBE_PACKET_TYPE_MASK_TUNNEL; > + return ptype_table_tn[pkt_info]; > + } > + > + pkt_info &=3D 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 =3D _mm_set_epi64x(0x800000008000LL, 0x800000008000LL= ); > + __m128i ptype_mask =3D _mm_set_epi32( > + pkt_type_mask, pkt_type_mask, pkt_type_mask, pkt_type_mask); > + __m128i tunnel_mask =3D > + _mm_set_epi64x(0x100000001000LL, 0x100000001000LL); > + > + uint32_t etqf_check, tunnel_check, pkt_info; > + > + __m128i ptype0 =3D _mm_unpacklo_epi32(descs[0], descs[2]); > + __m128i ptype1 =3D _mm_unpacklo_epi32(descs[1], descs[3]); > + > + /* interleave low 32 bits, > + * now we have 4 ptypes in a XMM register > + */ > + ptype0 =3D _mm_unpacklo_epi32(ptype0, ptype1); > + > + /* create a etqf bitmask based on the etqf bit. */ > + etqf_check =3D _mm_movemask_epi8(_mm_and_si128(ptype0, etqf_mask)); > + > + /* shift left by IXGBE_PACKET_TYPE_SHIFT, and apply ptype mask */ > + ptype0 =3D _mm_and_si128(_mm_srli_epi32(ptype0, IXGBE_PACKET_TYPE_SHIFT= ), > + ptype_mask); > + > + /* create a tunnel bitmask based on the tunnel bit */ > + tunnel_check =3D _mm_movemask_epi8( > + _mm_slli_epi32(_mm_and_si128(ptype0, tunnel_mask), 0x3)); > + > + pkt_info =3D _mm_extract_epi32(ptype0, 0); > + rx_pkts[0]->packet_type =3D > + get_packet_type(0, pkt_info, etqf_check, tunnel_check); > + pkt_info =3D _mm_extract_epi32(ptype0, 1); > + rx_pkts[1]->packet_type =3D > + get_packet_type(1, pkt_info, etqf_check, tunnel_check); > + pkt_info =3D _mm_extract_epi32(ptype0, 2); > + rx_pkts[2]->packet_type =3D > + get_packet_type(2, pkt_info, etqf_check, tunnel_check); > + pkt_info =3D _mm_extract_epi32(ptype0, 3); > + rx_pkts[3]->packet_type =3D > + get_packet_type(3, pkt_info, etqf_check, tunnel_check); > +} > + > /* > * vPMD raw receive routine, only accept(nb_pkts >=3D RTE_IXGBE_DESCS_PE= R_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); >=20 > + desc_to_ptype_v(descs, rxq->pkt_type_mask, &rx_pkts[pos]); > + > /* C.4 calc avaialbe number of desc */ > var =3D __builtin_popcountll(_mm_cvtsi128_si64(staterr)); > nb_pkts_recd +=3D var; > -- > 2.7.4