mbuf: expand ol_flags field to 64-bits
[dpdk.git] / app / test-pmd / rxonly.c
index 5bc74da..98c788b 100644 (file)
@@ -109,7 +109,7 @@ pkt_burst_receive(struct fwd_stream *fs)
        struct rte_mbuf  *mb;
        struct ether_hdr *eth_hdr;
        uint16_t eth_type;
-       uint16_t ol_flags;
+       uint64_t ol_flags;
        uint16_t nb_rx;
        uint16_t i;
 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
@@ -149,7 +149,7 @@ pkt_burst_receive(struct fwd_stream *fs)
                        rte_pktmbuf_free(mb);
                        continue;
                }
-               eth_hdr = (struct ether_hdr *) mb->data;
+               eth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);
                eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);
                ol_flags = mb->ol_flags;
                print_ether_addr("  src=", &eth_hdr->s_addr);