]> git.droids-corp.org - dpdk.git/blobdiff - examples/l3fwd-vf/main.c
mk: remove variables identical to config ones
[dpdk.git] / examples / l3fwd-vf / main.c
index 6e56cfb3acdcf782cafd5c5ad16c35f3d9ac843a..ccbb02fdcec8cbb4859ec5885a675c0d9f64166e 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) */