From: Didier Pallard Date: Wed, 28 Mar 2018 15:43:43 +0000 (+0200) Subject: net/vmxnet3: return unknown IPv4 extension len ptype X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0fbb05bbe3f13b0fae4e0bd6e7a1f0f82038ec8a;p=dpdk.git net/vmxnet3: return unknown IPv4 extension len ptype Rather than parsing IP header to get proper ptype to return, just return RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, that tells application that we have an IP packet with unknown header length. Signed-off-by: Didier Pallard Acked-by: Yong Wang --- diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 57557492e0..e74fb5250e 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -659,13 +659,7 @@ vmxnet3_rx_offload(const Vmxnet3_RxCompDesc *rcd, struct rte_mbuf *rxm) /* Check packet type, checksum errors, etc. Only support IPv4 for now. */ if (rcd->v4) { - struct ether_hdr *eth = rte_pktmbuf_mtod(rxm, struct ether_hdr *); - struct ipv4_hdr *ip = (struct ipv4_hdr *)(eth + 1); - - if (((ip->version_ihl & 0xf) << 2) > (int)sizeof(struct ipv4_hdr)) - rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT; - else - rxm->packet_type = RTE_PTYPE_L3_IPV4; + rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN; if (!rcd->cnc) { if (!rcd->ipc)