- uint32_t pkt_type =
- pkts_burst[j]->packet_type &
- pkts_burst[j+1]->packet_type &
- pkts_burst[j+2]->packet_type &
- pkts_burst[j+3]->packet_type &
- pkts_burst[j+4]->packet_type &
- pkts_burst[j+5]->packet_type &
- pkts_burst[j+6]->packet_type &
- pkts_burst[j+7]->packet_type;
- if (pkt_type & RTE_PTYPE_L3_IPV4) {
+ struct ether_hdr *eth_h0 =
+ rte_pktmbuf_mtod(pkts_burst[j], struct ether_hdr *);
+ struct ether_hdr *eth_h1 =
+ rte_pktmbuf_mtod(pkts_burst[j+1], struct ether_hdr *);
+ struct ether_hdr *eth_h2 =
+ rte_pktmbuf_mtod(pkts_burst[j+2], struct ether_hdr *);
+ struct ether_hdr *eth_h3 =
+ rte_pktmbuf_mtod(pkts_burst[j+3], struct ether_hdr *);
+ struct ether_hdr *eth_h4 =
+ rte_pktmbuf_mtod(pkts_burst[j+4], struct ether_hdr *);
+ struct ether_hdr *eth_h5 =
+ rte_pktmbuf_mtod(pkts_burst[j+5], struct ether_hdr *);
+ struct ether_hdr *eth_h6 =
+ rte_pktmbuf_mtod(pkts_burst[j+6], struct ether_hdr *);
+ struct ether_hdr *eth_h7 =
+ rte_pktmbuf_mtod(pkts_burst[j+7], struct ether_hdr *);
+
+ uint16_t ether_type;
+ ether_type = (rte_cpu_to_be_16(eth_h0->ether_type) &
+ rte_cpu_to_be_16(eth_h1->ether_type) &
+ rte_cpu_to_be_16(eth_h2->ether_type) &
+ rte_cpu_to_be_16(eth_h3->ether_type) &
+ rte_cpu_to_be_16(eth_h4->ether_type) &
+ rte_cpu_to_be_16(eth_h5->ether_type) &
+ rte_cpu_to_be_16(eth_h6->ether_type) &
+ rte_cpu_to_be_16(eth_h7->ether_type));
+
+ if (ether_type == ETHER_TYPE_IPv4) {