summaryrefslogtreecommitdiff
path: root/examples/vhost_xen/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/vhost_xen/main.c')
-rw-r--r--examples/vhost_xen/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
index 9e6f18e..5d20700 100644
--- a/examples/vhost_xen/main.c
+++ b/examples/vhost_xen/main.c
@@ -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++;