diff options
author | Damjan Marion <damarion@cisco.com> | 2016-07-13 22:44:18 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-07-22 09:10:58 +0200 |
commit | 1f0da170e818a6991d841df47de0885da720b0c3 (patch) | |
tree | 900f90de63cd398cd80ff65182c6d815dd69d07d | |
parent | 11bfc2f7f3896b7a539f662f1385516e653b3926 (diff) |
Add DPDK 16.07 support (rc3 based)
DPDK vhost-user support is disabled due to significan changes
in the DPDK vhost-user code which are not compatible with current
VPP code.
Change-Id: I3f0d28cb75f6370282ec7e33d57cbfb77e1a3ce1
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | dpdk/Makefile | 2 | ||||
-rw-r--r-- | dpdk/dpdk-16.07-rc3_patches/0001-i40e-Add-packet_type-metadata-in-the-i40e-vPMD.patch | 1210 | ||||
-rw-r--r-- | dpdk/dpdk-16.07-rc3_patches/0002-i40e-Enable-bad-checksum-flags-in-i40e-vPMD.patch | 111 | ||||
-rw-r--r-- | vlib/vlib/dpdk_buffer.c | 5 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/cli.c | 5 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/device.c | 8 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/dpdk.h | 19 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/dpdk_priv.h | 11 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/format.c | 34 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/init.c | 8 | ||||
-rw-r--r-- | vnet/vnet/devices/dpdk/vhost_user.c | 3 | ||||
-rw-r--r-- | vpp/vpp-api/api.c | 23 |
12 files changed, 1420 insertions, 19 deletions
diff --git a/dpdk/Makefile b/dpdk/Makefile index 6296c965432..6a38ef1092f 100644 --- a/dpdk/Makefile +++ b/dpdk/Makefile @@ -28,9 +28,9 @@ DPDK_VERSION ?= 16.04 DPDK_BASE_URL ?= http://fast.dpdk.org/rel DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL) -DPDK_2.1.0_TARBALL_MD5_CKSUM := a0d69f78f360e03dbdf38ae93fad32d4 DPDK_2.2.0_TARBALL_MD5_CKSUM := bfa10283b49d56264c82519d130458cc DPDK_16.04_TARBALL_MD5_CKSUM := d1f82e7d7589b3b2f623c155442b8306 +DPDK_16.07-rc3_TARBALL_MD5_CKSUM := fd59b0c2ab13c6cc7b7c22c2108b33c9 DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION) ifneq (,$(findstring clang,$(CC))) diff --git a/dpdk/dpdk-16.07-rc3_patches/0001-i40e-Add-packet_type-metadata-in-the-i40e-vPMD.patch b/dpdk/dpdk-16.07-rc3_patches/0001-i40e-Add-packet_type-metadata-in-the-i40e-vPMD.patch new file mode 100644 index 00000000000..74d9416e7b6 --- /dev/null +++ b/dpdk/dpdk-16.07-rc3_patches/0001-i40e-Add-packet_type-metadata-in-the-i40e-vPMD.patch @@ -0,0 +1,1210 @@ +From 79a2ddaf4d7df7172faa54716ae7647ad7a549b9 Mon Sep 17 00:00:00 2001 +From: Damjan Marion <damarion@cisco.com> +Date: Thu, 14 Jul 2016 09:59:01 -0700 +Subject: [PATCH 1/2] i40e: Add packet_type metadata in the i40e vPMD + +The ptype is decoded from the rx descriptor and stored +in the packet type field in the mbuf using the same function +as the non-vector driver. + +Signed-off-by: Damjan Marion <damarion@cisco.com> +Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com> +--- + drivers/net/i40e/i40e_rxtx.c | 566 +-------------------------------------- + drivers/net/i40e/i40e_rxtx.h | 563 ++++++++++++++++++++++++++++++++++++++ + drivers/net/i40e/i40e_rxtx_vec.c | 16 ++ + 3 files changed, 581 insertions(+), 564 deletions(-) + +diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c +index d3cfb98..2903347 100644 +--- a/drivers/net/i40e/i40e_rxtx.c ++++ b/drivers/net/i40e/i40e_rxtx.c +@@ -174,569 +174,6 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) + } + #endif + +-/* For each value it means, datasheet of hardware can tell more details +- * +- * @note: fix i40e_dev_supported_ptypes_get() if any change here. +- */ +-static inline uint32_t +-i40e_rxd_pkt_type_mapping(uint8_t ptype) +-{ +- static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = { +- /* L2 types */ +- /* [0] reserved */ +- [1] = RTE_PTYPE_L2_ETHER, +- [2] = RTE_PTYPE_L2_ETHER_TIMESYNC, +- /* [3] - [5] reserved */ +- [6] = RTE_PTYPE_L2_ETHER_LLDP, +- /* [7] - [10] reserved */ +- [11] = RTE_PTYPE_L2_ETHER_ARP, +- /* [12] - [21] reserved */ +- +- /* Non tunneled IPv4 */ +- [22] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_FRAG, +- [23] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_NONFRAG, +- [24] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_UDP, +- /* [25] reserved */ +- [26] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_TCP, +- [27] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_SCTP, +- [28] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_ICMP, +- +- /* IPv4 --> IPv4 */ +- [29] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [30] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [31] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [32] reserved */ +- [33] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [34] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [35] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> IPv6 */ +- [36] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [37] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [38] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [39] reserved */ +- [40] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [41] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [42] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> GRE/Teredo/VXLAN */ +- [43] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> IPv4 */ +- [44] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [45] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [46] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [47] reserved */ +- [48] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [49] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [50] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> IPv6 */ +- [51] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [52] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [53] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [54] reserved */ +- [55] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [56] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [57] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> MAC */ +- [58] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> MAC --> IPv4 */ +- [59] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [60] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [61] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [62] reserved */ +- [63] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [64] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [65] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> MAC --> IPv6 */ +- [66] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [67] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [68] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [69] reserved */ +- [70] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [71] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [72] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN */ +- [73] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv4 */ +- [74] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [75] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [76] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [77] reserved */ +- [78] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [79] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [80] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv6 */ +- [81] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [82] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [83] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [84] reserved */ +- [85] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [86] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [87] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* Non tunneled IPv6 */ +- [88] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_FRAG, +- [89] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_NONFRAG, +- [90] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_UDP, +- /* [91] reserved */ +- [92] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_TCP, +- [93] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_SCTP, +- [94] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_ICMP, +- +- /* IPv6 --> IPv4 */ +- [95] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [96] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [97] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [98] reserved */ +- [99] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [100] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [101] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> IPv6 */ +- [102] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [103] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [104] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [105] reserved */ +- [106] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [107] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [108] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_IP | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> GRE/Teredo/VXLAN */ +- [109] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> IPv4 */ +- [110] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [111] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [112] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [113] reserved */ +- [114] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [115] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [116] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> IPv6 */ +- [117] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [118] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [119] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [120] reserved */ +- [121] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [122] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [123] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> MAC */ +- [124] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> MAC --> IPv4 */ +- [125] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [126] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [127] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [128] reserved */ +- [129] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [130] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [131] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> MAC --> IPv6 */ +- [132] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [133] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [134] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [135] reserved */ +- [136] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [137] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [138] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN */ +- [139] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv4 */ +- [140] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [141] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [142] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [143] reserved */ +- [144] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [145] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [146] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv6 */ +- [147] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_FRAG, +- [148] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_NONFRAG, +- [149] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_UDP, +- /* [150] reserved */ +- [151] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_TCP, +- [152] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_SCTP, +- [153] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_TUNNEL_GRENAT | +- RTE_PTYPE_INNER_L2_ETHER_VLAN | +- RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_INNER_L4_ICMP, +- +- /* L2 NSH packet type */ +- [154] = RTE_PTYPE_L2_ETHER_NSH, +- [155] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_FRAG, +- [156] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_NONFRAG, +- [157] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_UDP, +- [158] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_TCP, +- [159] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_SCTP, +- [160] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | +- RTE_PTYPE_L4_ICMP, +- [161] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_FRAG, +- [162] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_NONFRAG, +- [163] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_UDP, +- [164] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_TCP, +- [165] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_SCTP, +- [166] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | +- RTE_PTYPE_L4_ICMP, +- +- /* All others reserved */ +- }; +- +- return type_table[ptype]; +-} +- + #define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03 + #define I40E_RX_DESC_EXT_STATUS_FLEXBH_FD_ID 0x01 + #define I40E_RX_DESC_EXT_STATUS_FLEXBH_FLEX 0x02 +@@ -2136,7 +1573,8 @@ i40e_dev_supported_ptypes_get(struct rte_eth_dev *dev) + #ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC + dev->rx_pkt_burst == i40e_recv_pkts_bulk_alloc || + #endif +- dev->rx_pkt_burst == i40e_recv_scattered_pkts) ++ dev->rx_pkt_burst == i40e_recv_scattered_pkts || ++ dev->rx_pkt_burst == i40e_recv_pkts_vec) + return ptypes; + return NULL; + } +diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h +index 98179f0..ecdb13c 100644 +--- a/drivers/net/i40e/i40e_rxtx.h ++++ b/drivers/net/i40e/i40e_rxtx.h +@@ -255,4 +255,567 @@ void i40e_set_tx_function_flag(struct rte_eth_dev *dev, + struct i40e_tx_queue *txq); + void i40e_set_tx_function(struct rte_eth_dev *dev); + ++/* For each value it means, datasheet of hardware can tell more details ++ * ++ * @note: fix i40e_dev_supported_ptypes_get() if any change here. ++ */ ++static inline uint32_t ++i40e_rxd_pkt_type_mapping(uint8_t ptype) ++{ ++ static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = { ++ /* L2 types */ ++ /* [0] reserved */ ++ [1] = RTE_PTYPE_L2_ETHER, ++ [2] = RTE_PTYPE_L2_ETHER_TIMESYNC, ++ /* [3] - [5] reserved */ ++ [6] = RTE_PTYPE_L2_ETHER_LLDP, ++ /* [7] - [10] reserved */ ++ [11] = RTE_PTYPE_L2_ETHER_ARP, ++ /* [12] - [21] reserved */ ++ ++ /* Non tunneled IPv4 */ ++ [22] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_FRAG, ++ [23] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_NONFRAG, ++ [24] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_UDP, ++ /* [25] reserved */ ++ [26] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_TCP, ++ [27] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_SCTP, ++ [28] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_ICMP, ++ ++ /* IPv4 --> IPv4 */ ++ [29] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [30] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [31] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [32] reserved */ ++ [33] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [34] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [35] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> IPv6 */ ++ [36] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [37] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [38] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [39] reserved */ ++ [40] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [41] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [42] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN */ ++ [43] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> IPv4 */ ++ [44] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [45] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [46] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [47] reserved */ ++ [48] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [49] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [50] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> IPv6 */ ++ [51] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [52] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [53] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [54] reserved */ ++ [55] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [56] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [57] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> MAC */ ++ [58] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> MAC --> IPv4 */ ++ [59] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [60] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [61] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [62] reserved */ ++ [63] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [64] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [65] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> MAC --> IPv6 */ ++ [66] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [67] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [68] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [69] reserved */ ++ [70] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [71] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [72] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN */ ++ [73] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv4 */ ++ [74] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [75] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [76] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [77] reserved */ ++ [78] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [79] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [80] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv6 */ ++ [81] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [82] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [83] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [84] reserved */ ++ [85] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [86] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [87] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* Non tunneled IPv6 */ ++ [88] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_FRAG, ++ [89] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_NONFRAG, ++ [90] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_UDP, ++ /* [91] reserved */ ++ [92] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_TCP, ++ [93] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_SCTP, ++ [94] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_ICMP, ++ ++ /* IPv6 --> IPv4 */ ++ [95] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [96] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [97] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [98] reserved */ ++ [99] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [100] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [101] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> IPv6 */ ++ [102] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [103] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [104] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [105] reserved */ ++ [106] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [107] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [108] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_IP | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN */ ++ [109] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> IPv4 */ ++ [110] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [111] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [112] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [113] reserved */ ++ [114] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [115] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [116] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> IPv6 */ ++ [117] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [118] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [119] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [120] reserved */ ++ [121] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [122] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [123] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> MAC */ ++ [124] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> MAC --> IPv4 */ ++ [125] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [126] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [127] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [128] reserved */ ++ [129] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [130] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [131] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> MAC --> IPv6 */ ++ [132] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [133] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [134] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [135] reserved */ ++ [136] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [137] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [138] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN */ ++ [139] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv4 */ ++ [140] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [141] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [142] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [143] reserved */ ++ [144] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [145] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [146] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv6 */ ++ [147] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_FRAG, ++ [148] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_NONFRAG, ++ [149] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_UDP, ++ /* [150] reserved */ ++ [151] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_TCP, ++ [152] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_SCTP, ++ [153] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_TUNNEL_GRENAT | ++ RTE_PTYPE_INNER_L2_ETHER_VLAN | ++ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_INNER_L4_ICMP, ++ ++ /* L2 NSH packet type */ ++ [154] = RTE_PTYPE_L2_ETHER_NSH, ++ [155] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_FRAG, ++ [156] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_NONFRAG, ++ [157] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_UDP, ++ [158] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_TCP, ++ [159] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_SCTP, ++ [160] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | ++ RTE_PTYPE_L4_ICMP, ++ [161] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_FRAG, ++ [162] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_NONFRAG, ++ [163] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_UDP, ++ [164] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_TCP, ++ [165] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_SCTP, ++ [166] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | ++ RTE_PTYPE_L4_ICMP, ++ ++ /* All others reserved */ ++ }; ++ ++ return type_table[ptype]; ++} ++ + #endif /* _I40E_RXTX_H_ */ +diff --git a/drivers/net/i40e/i40e_rxtx_vec.c b/drivers/net/i40e/i40e_rxtx_vec.c +index 05cb415..e78ac63 100644 +--- a/drivers/net/i40e/i40e_rxtx_vec.c ++++ b/drivers/net/i40e/i40e_rxtx_vec.c +@@ -187,6 +187,21 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) + + #define PKTLEN_SHIFT 10 + ++static inline void ++desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts) ++{ ++ __m128i ptype0 = _mm_unpackhi_epi64(descs[0], descs[1]); ++ __m128i ptype1 = _mm_unpackhi_epi64(descs[2], descs[3]); ++ ++ ptype0 = _mm_srli_epi64(ptype0, 30); ++ ptype1 = _mm_srli_epi64(ptype1, 30); ++ ++ rx_pkts[0]->packet_type = i40e_rxd_pkt_type_mapping(_mm_extract_epi8(ptype0, 0)); ++ rx_pkts[1]->packet_type = i40e_rxd_pkt_type_mapping(_mm_extract_epi8(ptype0, 8)); ++ rx_pkts[2]->packet_type = i40e_rxd_pkt_type_mapping(_mm_extract_epi8(ptype1, 0)); ++ rx_pkts[3]->packet_type = i40e_rxd_pkt_type_mapping(_mm_extract_epi8(ptype1, 8)); ++} ++ + /* + * Notice: + * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet +@@ -393,6 +408,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, + pkt_mb2); + _mm_storeu_si128((void *)&rx_pkts[pos]->rx_descriptor_fields1, + pkt_mb1); ++ desc_to_ptype_v(descs, &rx_pkts[pos]); + /* C.4 calc avaialbe number of desc */ + var = __builtin_popcountll(_mm_cvtsi128_si64(staterr)); + nb_pkts_recd += var; +-- +2.7.4 + diff --git a/dpdk/dpdk-16.07-rc3_patches/0002-i40e-Enable-bad-checksum-flags-in-i40e-vPMD.patch b/dpdk/dpdk-16.07-rc3_patches/0002-i40e-Enable-bad-checksum-flags-in-i40e-vPMD.patch new file mode 100644 index 00000000000..58256f191cf --- /dev/null +++ b/dpdk/dpdk-16.07-rc3_patches/0002-i40e-Enable-bad-checksum-flags-in-i40e-vPMD.patch @@ -0,0 +1,111 @@ +From 5917bd1cf9857979a7cae89f362d2c885f09d034 Mon Sep 17 00:00:00 2001 +From: Damjan Marion <damarion@cisco.com> +Date: Thu, 14 Jul 2016 09:59:02 -0700 +Subject: [PATCH 2/2] i40e: Enable bad checksum flags in i40e vPMD + +Decode the checksum flags from the rx descriptor, setting +the appropriate bit in the mbuf ol_flags field when the flag +indicates a bad checksum. + +Signed-off-by: Damjan Marion <damarion@cisco.com> +Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com> +--- + drivers/net/i40e/i40e_rxtx_vec.c | 48 +++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 20 deletions(-) + +diff --git a/drivers/net/i40e/i40e_rxtx_vec.c b/drivers/net/i40e/i40e_rxtx_vec.c +index e78ac63..ace51df 100644 +--- a/drivers/net/i40e/i40e_rxtx_vec.c ++++ b/drivers/net/i40e/i40e_rxtx_vec.c +@@ -138,19 +138,14 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq) + static inline void + desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) + { +- __m128i vlan0, vlan1, rss; +- union { +- uint16_t e[4]; +- uint64_t dword; +- } vol; ++ __m128i vlan0, vlan1, rss, l3_l4e; + + /* mask everything except RSS, flow director and VLAN flags + * bit2 is for VLAN tag, bit11 for flow director indication + * bit13:12 for RSS indication. + */ +- const __m128i rss_vlan_msk = _mm_set_epi16( +- 0x0000, 0x0000, 0x0000, 0x0000, +- 0x3804, 0x3804, 0x3804, 0x3804); ++ const __m128i rss_vlan_msk = _mm_set_epi32( ++ 0x1c03004, 0x1c03004, 0x1c03004, 0x1c03004); + + /* map rss and vlan type to rss hash and vlan flag */ + const __m128i vlan_flags = _mm_set_epi8(0, 0, 0, 0, +@@ -163,23 +158,36 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) + PKT_RX_RSS_HASH | PKT_RX_FDIR, PKT_RX_RSS_HASH, 0, 0, + 0, 0, PKT_RX_FDIR, 0); + +- vlan0 = _mm_unpackhi_epi16(descs[0], descs[1]); +- vlan1 = _mm_unpackhi_epi16(descs[2], descs[3]); +- vlan0 = _mm_unpacklo_epi32(vlan0, vlan1); ++ const __m128i l3_l4e_flags = _mm_set_epi8(0, 0, 0, 0, 0, 0, 0, 0, ++ PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD, ++ PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD, ++ PKT_RX_L4_CKSUM_BAD, ++ PKT_RX_IP_CKSUM_BAD, ++ 0); ++ ++ vlan0 = _mm_unpackhi_epi32(descs[0], descs[1]); ++ vlan1 = _mm_unpackhi_epi32(descs[2], descs[3]); ++ vlan0 = _mm_unpacklo_epi64(vlan0, vlan1); + + vlan1 = _mm_and_si128(vlan0, rss_vlan_msk); + vlan0 = _mm_shuffle_epi8(vlan_flags, vlan1); + +- rss = _mm_srli_epi16(vlan1, 11); ++ rss = _mm_srli_epi32(vlan1, 12); + rss = _mm_shuffle_epi8(rss_flags, rss); + ++ l3_l4e = _mm_srli_epi32(vlan1, 22); ++ l3_l4e = _mm_shuffle_epi8(l3_l4e_flags, l3_l4e); ++ + vlan0 = _mm_or_si128(vlan0, rss); +- vol.dword = _mm_cvtsi128_si64(vlan0); ++ vlan0 = _mm_or_si128(vlan0, l3_l4e); + +- rx_pkts[0]->ol_flags = vol.e[0]; +- rx_pkts[1]->ol_flags = vol.e[1]; +- rx_pkts[2]->ol_flags = vol.e[2]; +- rx_pkts[3]->ol_flags = vol.e[3]; ++ rx_pkts[0]->ol_flags = _mm_extract_epi16(vlan0, 0); ++ rx_pkts[1]->ol_flags = _mm_extract_epi16(vlan0, 2); ++ rx_pkts[2]->ol_flags = _mm_extract_epi16(vlan0, 4); ++ rx_pkts[3]->ol_flags = _mm_extract_epi16(vlan0, 6); + } + #else + #define desc_to_olflags_v(desc, rx_pkts) do {} while (0) +@@ -754,7 +762,8 @@ i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev) + #ifndef RTE_LIBRTE_I40E_RX_OLFLAGS_ENABLE + /* whithout rx ol_flags, no VP flag report */ + if (rxmode->hw_vlan_strip != 0 || +- rxmode->hw_vlan_extend != 0) ++ rxmode->hw_vlan_extend != 0 || ++ rxmode->hw_ip_checksum != 0) + return -1; + #endif + +@@ -765,8 +774,7 @@ i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev) + /* - no csum error report support + * - no header split support + */ +- if (rxmode->hw_ip_checksum == 1 || +- rxmode->header_split == 1) ++ if (rxmode->header_split == 1) + return -1; + + return 0; +-- +2.7.4 + diff --git a/vlib/vlib/dpdk_buffer.c b/vlib/vlib/dpdk_buffer.c index 7e6e84247d5..84bca0f53d0 100644 --- a/vlib/vlib/dpdk_buffer.c +++ b/vlib/vlib/dpdk_buffer.c @@ -62,6 +62,7 @@ #include <rte_ring.h> #include <rte_mempool.h> #include <rte_mbuf.h> +#include <rte_version.h> #include <vlib/vlib.h> @@ -989,7 +990,11 @@ vlib_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs, if (rmp) { new_start = pointer_to_uword (rmp); +#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0) + new_size = (uintptr_t)STAILQ_FIRST(&rmp->mem_list)->addr + STAILQ_FIRST(&rmp->mem_list)->len - new_start; +#else new_size = rmp->elt_va_end - new_start; +#endif if (vpm->virtual.size > 0) { diff --git a/vnet/vnet/devices/dpdk/cli.c b/vnet/vnet/devices/dpdk/cli.c index bcc3d2f91a5..3b0befd55df 100644 --- a/vnet/vnet/devices/dpdk/cli.c +++ b/vnet/vnet/devices/dpdk/cli.c @@ -167,8 +167,13 @@ show_dpdk_buffer (vlib_main_t * vm, unformat_input_t * input, rmp = vm->buffer_main->pktmbuf_pools[i]; if (rmp) { +#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0) + unsigned count = rte_mempool_avail_count(rmp); + unsigned free_count = rte_mempool_in_use_count(rmp); +#else unsigned count = rte_mempool_count(rmp); unsigned free_count = rte_mempool_free_count(rmp); +#endif vlib_cli_output(vm, "name=\"%s\" available = %7d allocated = %7d total = %7d\n", rmp->name, (u32)count, (u32)free_count, diff --git a/vnet/vnet/devices/dpdk/device.c b/vnet/vnet/devices/dpdk/device.c index 27e352294b9..66d4b6d4eed 100644 --- a/vnet/vnet/devices/dpdk/device.c +++ b/vnet/vnet/devices/dpdk/device.c @@ -355,6 +355,7 @@ u32 tx_burst_vector_internal (vlib_main_t * vm, n_retry = (rv == DPDK_TX_RING_SIZE - tx_tail) ? 1 : 0; } } +#if DPDK_VHOST_USER else if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER) { u32 offset = 0; @@ -450,6 +451,7 @@ u32 tx_burst_vector_internal (vlib_main_t * vm, if (xd->need_txlock) *xd->lockp[queue_id] = 0; } +#endif #if RTE_LIBRTE_KNI else if (xd->dev_type == VNET_DPDK_DEV_KNI) { @@ -878,6 +880,7 @@ dpdk_interface_tx (vlib_main_t * vm, static int dpdk_device_renumber (vnet_hw_interface_t * hi, u32 new_dev_instance) { +#if DPDK_VHOST_USER dpdk_main_t * dm = &dpdk_main; dpdk_device_t * xd = vec_elt_at_index (dm->devices, hi->dev_instance); @@ -888,6 +891,7 @@ static int dpdk_device_renumber (vnet_hw_interface_t * hi, } xd->vu_if_id = new_dev_instance; +#endif return 0; } @@ -926,6 +930,7 @@ static void dpdk_clear_hw_interface_counters (u32 instance) memset (&xd->last_stats, 0, sizeof (xd->last_stats)); } +#if DPDK_VHOST_USER if (PREDICT_FALSE(xd->dev_type == VNET_DPDK_DEV_VHOST_USER)) { int i; for (i = 0; i < xd->rx_q_used * VIRTIO_QNUM; i++) { @@ -933,6 +938,7 @@ static void dpdk_clear_hw_interface_counters (u32 instance) xd->vu_intf->vrings[i].bytes = 0; } } +#endif } #ifdef RTE_LIBRTE_KNI @@ -1027,6 +1033,7 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return 0; } #endif +#if DPDK_VHOST_USER if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER) { if (is_up) @@ -1045,6 +1052,7 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return 0; } +#endif if (is_up) diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h index 00caeafaa0b..830bf102aa3 100644 --- a/vnet/vnet/devices/dpdk/dpdk.h +++ b/vnet/vnet/devices/dpdk/dpdk.h @@ -61,6 +61,12 @@ #define always_inline static inline __attribute__ ((__always_inline__)) #endif +#if RTE_VERSION < RTE_VERSION_NUM(16, 7, 0, 0) +#define DPDK_VHOST_USER 1 +#else +#define DPDK_VHOST_USER 0 +#endif + #include <vlib/pci/pci.h> #define NB_MBUF (16<<10) @@ -131,6 +137,7 @@ typedef struct { u32 total_packet_cnt; } dpdk_efd_agent_t; +#if DPDK_VHOST_USER typedef struct { int callfd; int kickfd; @@ -160,6 +167,7 @@ typedef struct { u32 region_fd[VHOST_MEMORY_MAX_NREGIONS]; u64 region_offset[VHOST_MEMORY_MAX_NREGIONS]; } dpdk_vu_intf_t; +#endif typedef void (*dpdk_flowcontrol_callback_t) (vlib_main_t *vm, u32 hw_if_index, @@ -225,11 +233,13 @@ typedef struct { struct rte_kni *kni; u8 kni_port_id; +#if DPDK_VHOST_USER /* vhost-user related */ u32 vu_if_id; struct virtio_net vu_vhost_dev; u32 vu_is_running; dpdk_vu_intf_t *vu_intf; +#endif /* af_packet */ u8 af_packet_port_id; @@ -240,8 +250,13 @@ typedef struct { struct rte_eth_stats stats; struct rte_eth_stats last_stats; struct rte_eth_stats last_cleared_stats; +#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0) + struct rte_eth_xstat * xstats; + struct rte_eth_xstat * last_cleared_xstats; +#else struct rte_eth_xstats * xstats; struct rte_eth_xstats * last_cleared_xstats; +#endif f64 time_last_stats_update; dpdk_port_type_t port_type; @@ -509,10 +524,12 @@ u32 is_efd_discardable(vlib_thread_main_t *tm, vlib_buffer_t * b0, struct rte_mbuf *mb); +#if DPDK_VHOST_USER /* dpdk vhost-user interrupt management */ u8 dpdk_vhost_user_want_interrupt (dpdk_device_t *xd, int idx); void dpdk_vhost_user_send_interrupt (vlib_main_t * vm, dpdk_device_t * xd, int idx); +#endif static inline u64 vnet_get_aggregate_rx_packets (void) @@ -544,6 +561,7 @@ void efd_config(u32 enabled, void post_sw_interface_set_flags (vlib_main_t *vm, u32 sw_if_index, u32 flags); +#if DPDK_VHOST_USER typedef struct vhost_user_memory vhost_user_memory_t; void dpdk_vhost_user_process_init (void **ctx); @@ -568,6 +586,7 @@ int dpdk_vhost_user_delete_if (vnet_main_t * vnm, vlib_main_t * vm, u32 sw_if_index); int dpdk_vhost_user_dump_ifs (vnet_main_t * vnm, vlib_main_t * vm, vhost_user_intf_details_t **out_vuids); +#endif u32 dpdk_get_admin_up_down_in_progress (void); diff --git a/vnet/vnet/devices/dpdk/dpdk_priv.h b/vnet/vnet/devices/dpdk/dpdk_priv.h index c6be7e7f525..ac499432d4d 100644 --- a/vnet/vnet/devices/dpdk/dpdk_priv.h +++ b/vnet/vnet/devices/dpdk/dpdk_priv.h @@ -23,6 +23,15 @@ #define DPDK_NB_TX_DESC_40GE 1024 #define DPDK_NB_RX_DESC_ENIC 1024 +#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0) +#define I40E_DEV_ID_SFP_XL710 0x1572 +#define I40E_DEV_ID_QSFP_A 0x1583 +#define I40E_DEV_ID_QSFP_B 0x1584 +#define I40E_DEV_ID_QSFP_C 0x1585 +#define I40E_DEV_ID_10G_BASE_T 0x1586 +#define I40E_DEV_ID_VF 0x154C +#endif + /* These args appear by themselves */ #define foreach_eal_double_hyphen_predicate_arg \ _(no-shconf) \ @@ -72,6 +81,7 @@ dpdk_rx_burst ( dpdk_main_t * dm, dpdk_device_t * xd, u16 queue_id) break; } } +#if DPDK_VHOST_USER else if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER) { vlib_main_t * vm = vlib_get_main(); @@ -129,6 +139,7 @@ dpdk_rx_burst ( dpdk_main_t * dm, dpdk_device_t * xd, u16 queue_id) } } +#endif #ifdef RTE_LIBRTE_KNI else if (xd->dev_type == VNET_DPDK_DEV_KNI) { diff --git a/vnet/vnet/devices/dpdk/format.c b/vnet/vnet/devices/dpdk/format.c index 25591c2e26c..4c553655db6 100644 --- a/vnet/vnet/devices/dpdk/format.c +++ b/vnet/vnet/devices/dpdk/format.c @@ -28,16 +28,11 @@ _ (tx_frames_ok, opackets) \ _ (tx_bytes_ok, obytes) \ _ (tx_errors, oerrors) \ - _ (tx_loopback_frames_ok, olbpackets) \ - _ (tx_loopback_bytes_ok, olbbytes) \ _ (rx_frames_ok, ipackets) \ _ (rx_bytes_ok, ibytes) \ _ (rx_errors, ierrors) \ _ (rx_missed, imissed) \ - _ (rx_multicast_frames_ok, imcasts) \ - _ (rx_no_bufs, rx_nombuf) \ - _ (rx_loopback_frames_ok, ilbpackets) \ - _ (rx_loopback_bytes_ok, ilbbytes) + _ (rx_no_bufs, rx_nombuf) #define foreach_dpdk_q_counter \ _ (rx_frames_ok, q_ipackets) \ @@ -174,9 +169,11 @@ u8 * format_dpdk_device_name (u8 * s, va_list * args) return format(s, "kni%d", dm->devices[i].kni_port_id); } else #endif +#if DPDK_VHOST_USER if (dm->devices[i].dev_type == VNET_DPDK_DEV_VHOST_USER) { return format(s, "VirtualEthernet0/0/%d", dm->devices[i].vu_if_id); } +#endif switch (dm->devices[i].port_type) { case VNET_DPDK_PORT_TYPE_ETH_1G: @@ -463,7 +460,6 @@ u8 * format_dpdk_device (u8 * s, va_list * args) format_white_space, indent + 2, xd->cpu_socket); /* $$$ MIB counters */ - { #define _(N, V) \ if ((xd->stats.V - xd->last_cleared_stats.V) != 0) { \ @@ -479,21 +475,33 @@ u8 * format_dpdk_device (u8 * s, va_list * args) u8 * xs = 0; u32 i = 0; +#if RTE_VERSION < RTE_VERSION_NUM(16, 7, 0, 0) + struct rte_eth_xstats * xstat, * last_xstat; +#else + struct rte_eth_xstat * xstat, * last_xstat; + struct rte_eth_xstat_name * xstat_names = 0; + int len = rte_eth_xstats_get_names (xd->device_index, NULL, 0); + vec_validate (xstat_names, len - 1); + rte_eth_xstats_get_names (xd->device_index, xstat_names, len); +#endif ASSERT(vec_len(xd->xstats) == vec_len(xd->last_cleared_xstats)); vec_foreach_index(i, xd->xstats) { u64 delta = 0; - struct rte_eth_xstats* xstat = vec_elt_at_index(xd->xstats, i); - struct rte_eth_xstats* last_xstat = - vec_elt_at_index(xd->last_cleared_xstats, i); + xstat = vec_elt_at_index(xd->xstats, i); + last_xstat = vec_elt_at_index(xd->last_cleared_xstats, i); delta = xstat->value - last_xstat->value; if (verbose == 2 || (verbose && delta)) { /* format_c_identifier doesn't like c strings inside vector */ +#if RTE_VERSION < RTE_VERSION_NUM(16, 7, 0, 0) u8 * name = format(0,"%s", xstat->name); +#else + u8 * name = format(0,"%s", xstat_names[i].name); +#endif xs = format(xs, "\n%U%-38U%16Ld", format_white_space, indent + 4, format_c_identifier, name, delta); @@ -501,6 +509,11 @@ u8 * format_dpdk_device (u8 * s, va_list * args) } } +#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0) + vec_free (xstat_names); +#endif + +#if DPDK_VHOST_USER if (verbose && xd->dev_type == VNET_DPDK_DEV_VHOST_USER) { int i; for (i = 0; i < xd->rx_q_used * VIRTIO_QNUM; i++) { @@ -528,6 +541,7 @@ u8 * format_dpdk_device (u8 * s, va_list * args) } } } +#endif if (xs) { diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c index 178ff31bea3..816b20b37e6 100644 --- a/vnet/vnet/devices/dpdk/init.c +++ b/vnet/vnet/devices/dpdk/init.c @@ -1539,7 +1539,9 @@ dpdk_process (vlib_main_t * vm, ethernet_main_t * em = ðernet_main; dpdk_device_t * xd; vlib_thread_main_t * tm = vlib_get_thread_main(); +#if DPDK_VHOST_USER void *vu_state; +#endif int i; error = dpdk_lib_init (dm); @@ -1564,7 +1566,9 @@ dpdk_process (vlib_main_t * vm, if (error) clib_error_report (error); +#if DPDK_VHOST_USER dpdk_vhost_user_process_init(&vu_state); +#endif tm->worker_thread_release = 1; @@ -1654,13 +1658,17 @@ dpdk_process (vlib_main_t * vm, if ((now - xd->time_last_link_update) >= dm->link_state_poll_interval) dpdk_update_link_state (xd, now); +#if DPDK_VHOST_USER if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER) if (dpdk_vhost_user_process_if(vm, xd, vu_state) != 0) continue; +#endif } } +#if DPDK_VHOST_USER dpdk_vhost_user_process_cleanup(vu_state); +#endif return 0; } diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c index 2d9462f0f1b..212313a7069 100644 --- a/vnet/vnet/devices/dpdk/vhost_user.c +++ b/vnet/vnet/devices/dpdk/vhost_user.c @@ -39,6 +39,8 @@ #define DBG_SOCK(args...) #endif +#if DPDK_VHOST_USER + static const char *vhost_message_str[] __attribute__((unused)) = { [VHOST_USER_NONE] = "VHOST_USER_NONE", [VHOST_USER_GET_FEATURES] = "VHOST_USER_GET_FEATURES", @@ -1917,3 +1919,4 @@ VLIB_CLI_COMMAND (show_vhost_user_command, static) = { .short_help = "show vhost-user interface", .function = show_dpdk_vhost_user_command_fn, }; +#endif diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index 6433664bce4..b47dc9e873c 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -3791,9 +3791,9 @@ vl_api_l2_interface_vlan_tag_rewrite_t_handler (vl_api_l2_interface_vlan_tag_rew static void vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t *mp) { -#if DPDK > 0 int rv = 0; vl_api_create_vhost_user_if_reply_t * rmp; +#if DPDK > 0 && DPDK_VHOST_USER u32 sw_if_index = (u32)~0; vnet_main_t * vnm = vnet_get_main(); @@ -3808,15 +3808,18 @@ vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t *mp) ({ rmp->sw_if_index = ntohl (sw_if_index); })); +#else + rv = VNET_API_ERROR_UNIMPLEMENTED; + REPLY_MACRO(VL_API_CREATE_VHOST_USER_IF_REPLY); #endif } static void vl_api_modify_vhost_user_if_t_handler (vl_api_modify_vhost_user_if_t *mp) { -#if DPDK > 0 int rv = 0; vl_api_modify_vhost_user_if_reply_t * rmp; +#if DPDK > 0 && DPDK_VHOST_USER u32 sw_if_index = ntohl(mp->sw_if_index); vnet_main_t * vnm = vnet_get_main(); @@ -3825,18 +3828,19 @@ vl_api_modify_vhost_user_if_t_handler (vl_api_modify_vhost_user_if_t *mp) rv = dpdk_vhost_user_modify_if(vnm, vm, (char *)mp->sock_filename, mp->is_server, sw_if_index, (u64)~0, mp->renumber, ntohl(mp->custom_dev_instance)); - - REPLY_MACRO(VL_API_MODIFY_VHOST_USER_IF_REPLY); +#else + rv = VNET_API_ERROR_UNIMPLEMENTED; #endif + REPLY_MACRO(VL_API_MODIFY_VHOST_USER_IF_REPLY); } static void vl_api_delete_vhost_user_if_t_handler (vl_api_delete_vhost_user_if_t *mp) { -#if DPDK > 0 int rv = 0; - vpe_api_main_t * vam = &vpe_api_main; vl_api_delete_vhost_user_if_reply_t * rmp; +#if DPDK > 0 && DPDK_VHOST_USER + vpe_api_main_t * vam = &vpe_api_main; u32 sw_if_index = ntohl(mp->sw_if_index); vnet_main_t * vnm = vnet_get_main(); @@ -3853,6 +3857,9 @@ vl_api_delete_vhost_user_if_t_handler (vl_api_delete_vhost_user_if_t *mp) send_sw_interface_flags_deleted (vam, q, sw_if_index); } +#else + rv = VNET_API_ERROR_UNIMPLEMENTED; + REPLY_MACRO(VL_API_DELETE_VHOST_USER_IF_REPLY); #endif } @@ -3862,7 +3869,7 @@ static void vl_api_sw_interface_vhost_user_details_t_handler ( clib_warning ("BUG"); } -#if DPDK > 0 +#if DPDK > 0 && DPDK_VHOST_USER static void send_sw_interface_vhost_user_details (vpe_api_main_t * am, unix_shared_memory_queue_t *q, vhost_user_intf_details_t * vui, @@ -3894,7 +3901,7 @@ static void vl_api_sw_interface_vhost_user_dump_t_handler ( vl_api_sw_interface_vhost_user_dump_t *mp) { -#if DPDK > 0 +#if DPDK > 0 && DPDK_VHOST_USER int rv = 0; vpe_api_main_t * am = &vpe_api_main; vnet_main_t * vnm = vnet_get_main(); |