summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2018-10-20 01:32:47 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:05 +0200
commit432ed10d817167007dee7ae81f0ee849dde5d7d2 (patch)
tree76940eebe79f5656013e32cf86eb9054b1fba455
parent21c3c433f37e02a69ea05932d9021c2478086622 (diff)
downloaddpdk-432ed10d817167007dee7ae81f0ee849dde5d7d2.zip
dpdk-432ed10d817167007dee7ae81f0ee849dde5d7d2.tar.gz
dpdk-432ed10d817167007dee7ae81f0ee849dde5d7d2.tar.xz
net/enic: fix supported packet types
The handler for dev_supported_ptypes_get currently returns null when the vectorized Rx handler is used. It is also missing tunnel packet types. Add the missing packet types to the supported list, and return the right list for the vectorized Rx handler. Fixes: 8a6ff33d6d36 ("net/enic: add AVX2 based vectorized Rx handler") Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
-rw-r--r--drivers/net/enic/enic_ethdev.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 4d450fe..1a129f4 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -522,10 +522,34 @@ static const uint32_t *enicpmd_dev_supported_ptypes_get(struct rte_eth_dev *dev)
RTE_PTYPE_L4_NONFRAG,
RTE_PTYPE_UNKNOWN
};
+ static const uint32_t ptypes_overlay[] = {
+ RTE_PTYPE_L2_ETHER,
+ RTE_PTYPE_L2_ETHER_VLAN,
+ RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+ RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
+ RTE_PTYPE_L4_TCP,
+ RTE_PTYPE_L4_UDP,
+ RTE_PTYPE_L4_FRAG,
+ RTE_PTYPE_L4_NONFRAG,
+ RTE_PTYPE_TUNNEL_GRENAT,
+ RTE_PTYPE_INNER_L2_ETHER,
+ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
+ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
+ RTE_PTYPE_INNER_L4_TCP,
+ RTE_PTYPE_INNER_L4_UDP,
+ RTE_PTYPE_INNER_L4_FRAG,
+ RTE_PTYPE_INNER_L4_NONFRAG,
+ RTE_PTYPE_UNKNOWN
+ };
- if (dev->rx_pkt_burst == enic_recv_pkts ||
- dev->rx_pkt_burst == enic_noscatter_recv_pkts)
- return ptypes;
+ if (dev->rx_pkt_burst != enic_dummy_recv_pkts &&
+ dev->rx_pkt_burst != NULL) {
+ struct enic *enic = pmd_priv(dev);
+ if (enic->overlay_offload)
+ return ptypes_overlay;
+ else
+ return ptypes;
+ }
return NULL;
}