+ iph = (struct rte_ipv4_hdr *)l3_ptr_actual;
+ if ((iph->version_ihl >> 4) == 4) {
+ ip_len = rte_be_to_cpu_16(iph->total_length);
+ *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
+ } else {
+ ip6h = (struct rte_ipv6_hdr *)iph;
+ ip_len = rte_be_to_cpu_16(ip6h->payload_len);
+ *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
+ }
+
+ m_len = ip_len + l2_len;