mk: remove variables identical to config ones
[dpdk.git] / examples / l3fwd-vf / main.c
index 6e56cfb..ccbb02f 100644 (file)
@@ -459,8 +459,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, lookup_struct_t * l3fwd
 
        eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
 
-       ipv4_hdr = (struct ipv4_hdr *)(rte_pktmbuf_mtod(m, unsigned char *) +
-                               sizeof(struct ether_hdr));
+       ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
+                                          sizeof(struct ether_hdr));
 
 #ifdef DO_RFC_1812_CHECKS
        /* Check to make sure the packet is valid (RFC1812) */