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 <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
/* 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)