#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_ether.h>
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_prefetch.h>
#include <rte_ip.h>
#include <rte_udp.h>
struct rte_ipv6_hdr *ipv6_hdr;
struct rte_tcp_hdr *tcp_hdr;
char *ptr;
+ uint8_t segs;
RTE_ASSERT(rcd->tcp);
tcp_hdr = (struct rte_tcp_hdr *)(ptr + hlen);
hlen += (tcp_hdr->data_off & 0xf0) >> 2;
- if (rxm->udata64 > 1)
- return (rte_pktmbuf_pkt_len(rxm) - hlen +
- rxm->udata64 - 1) / rxm->udata64;
+ segs = *vmxnet3_segs_dynfield(rxm);
+ if (segs > 1)
+ return (rte_pktmbuf_pkt_len(rxm) - hlen + segs - 1) / segs;
else
return hw->mtu - hlen + sizeof(struct rte_ether_hdr);
}
(const Vmxnet3_RxCompDescExt *)rcd;
rxm->tso_segsz = rcde->mss;
- rxm->udata64 = rcde->segCnt;
+ *vmxnet3_segs_dynfield(rxm) = rcde->segCnt;
ol_flags |= PKT_RX_LRO;
}
} else { /* Offloads set in eop */