]> git.droids-corp.org - dpdk.git/blobdiff - examples/vhost_xen/main.c
mbuf: use offset macro
[dpdk.git] / examples / vhost_xen / main.c
index 9e6f18eaee783e5a0a61b33371f26ecd72719c91..5d20700031089efe6efc21eb1d1d3aec5f28905f 100644 (file)
@@ -873,8 +873,8 @@ virtio_tx_route(struct virtio_net* dev, struct rte_mbuf *m, struct rte_mempool *
        vlan_hdr->h_vlan_TCI = htons(vlan_tag);
 
        /* Copy the remaining packet contents to the mbuf. */
-       rte_memcpy((void *)(rte_pktmbuf_mtod(mbuf, uint8_t *) + VLAN_ETH_HLEN),
-               (const void *)(rte_pktmbuf_mtod(m, uint8_t *) + ETH_HLEN),
+       rte_memcpy(rte_pktmbuf_mtod_offset(mbuf, void *, VLAN_ETH_HLEN),
+               rte_pktmbuf_mtod_offset(m, const void *, ETH_HLEN),
                (m->data_len - ETH_HLEN));
        tx_q->m_table[len] = mbuf;
        len++;