summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_rxtx_simple.c
diff options
context:
space:
mode:
authorRavi Kerur <rkerur@gmail.com>2016-03-04 10:09:40 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-04 16:01:15 +0100
commitd6b324c00fc933f757e68c54c0e50c92826d83f0 (patch)
tree69070513894f2e5deeefe718887cc4ca084ffe06 /drivers/net/virtio/virtio_rxtx_simple.c
parentac78cb27a80852f337c92f5373ca778e67a85c40 (diff)
downloaddpdk-next-eventdev-d6b324c00fc933f757e68c54c0e50c92826d83f0.zip
dpdk-next-eventdev-d6b324c00fc933f757e68c54c0e50c92826d83f0.tar.gz
dpdk-next-eventdev-d6b324c00fc933f757e68c54c0e50c92826d83f0.tar.xz
mbuf: get DMA address
Macros RTE_MBUF_DATA_DMA_ADDR and RTE_MBUF_DATA_DMA_ADDR_DEFAULT are defined in each PMD driver file. Convert macros to inline functions and move them to common lib/librte_mbuf/rte_mbuf.h file. PMD drivers include rte_mbuf.h file directly/indirectly hence no additioanl header file inclusion is necessary. Signed-off-by: Ravi Kerur <rkerur@gmail.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'drivers/net/virtio/virtio_rxtx_simple.c')
-rw-r--r--drivers/net/virtio/virtio_rxtx_simple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index 3a1de9d..8f5293d 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -366,7 +366,7 @@ virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
txvq->vq_descx[desc_idx + i].cookie = tx_pkts[i];
for (i = 0; i < nb_tail; i++) {
start_dp[desc_idx].addr =
- RTE_MBUF_DATA_DMA_ADDR(*tx_pkts);
+ rte_mbuf_data_dma_addr(*tx_pkts);
start_dp[desc_idx].len = (*tx_pkts)->pkt_len;
tx_pkts++;
desc_idx++;
@@ -377,7 +377,7 @@ virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
for (i = 0; i < nb_commit; i++)
txvq->vq_descx[desc_idx + i].cookie = tx_pkts[i];
for (i = 0; i < nb_commit; i++) {
- start_dp[desc_idx].addr = RTE_MBUF_DATA_DMA_ADDR(*tx_pkts);
+ start_dp[desc_idx].addr = rte_mbuf_data_dma_addr(*tx_pkts);
start_dp[desc_idx].len = (*tx_pkts)->pkt_len;
tx_pkts++;
desc_idx++;