mbuf: get DMA address
[dpdk.git] / drivers / net / xenvirt / virtqueue.h
index 1d1bbcc..e425a04 100644 (file)
@@ -50,13 +50,6 @@ struct rte_mbuf;
 /* The alignment to use between consumer and producer parts of vring. */
 #define VIRTIO_PCI_VRING_ALIGN 4096
 
-/*
- * Address translatio is between gva<->hva,
- * rather than gpa<->hva in virito spec.
- */
-#define RTE_MBUF_DATA_DMA_ADDR(mb) \
-       ((uint64_t)(uintptr_t)rte_pktmbuf_mtod(mb, void *))
-
 enum { VTNET_RQ = 0, VTNET_TQ = 1, VTNET_CQ = 2 };
 
 /**
@@ -238,7 +231,7 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie)
        start_dp[idx].flags = VRING_DESC_F_NEXT;
        start_dp[idx].addr  = (uintptr_t)NULL;
        idx = start_dp[idx].next;
-       start_dp[idx].addr  = RTE_MBUF_DATA_DMA_ADDR(cookie);
+       start_dp[idx].addr  = rte_pktmbuf_mtod(cookie, uint64_t);
        start_dp[idx].len   = cookie->data_len;
        start_dp[idx].flags = 0;
        idx = start_dp[idx].next;