summaryrefslogtreecommitdiff
path: root/drivers/net/bnxt/bnxt_rxr.c
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2018-01-03 11:32:24 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit42b883535804d69ca8b21b39087fc1d14a1ee3f3 (patch)
tree449f81e260addf7b075818b6b29ab03e55902e29 /drivers/net/bnxt/bnxt_rxr.c
parent09150784a7768f0c193209d985b2ac26decab493 (diff)
downloaddpdk-next-eventdev-42b883535804d69ca8b21b39087fc1d14a1ee3f3.zip
dpdk-next-eventdev-42b883535804d69ca8b21b39087fc1d14a1ee3f3.tar.gz
dpdk-next-eventdev-42b883535804d69ca8b21b39087fc1d14a1ee3f3.tar.xz
net/bnxt: use new API to get IOVA address
Replace internal functions to get DMA address them with their generic IOVA version. Also rename the 'data' variable to 'mbuf' for more readability. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Diffstat (limited to 'drivers/net/bnxt/bnxt_rxr.c')
-rw-r--r--drivers/net/bnxt/bnxt_rxr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 188df36..89114cc 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -65,17 +65,17 @@ static inline int bnxt_alloc_rx_data(struct bnxt_rx_queue *rxq,
{
struct rx_prod_pkt_bd *rxbd = &rxr->rx_desc_ring[prod];
struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[prod];
- struct rte_mbuf *data;
+ struct rte_mbuf *mbuf;
- data = __bnxt_alloc_rx_data(rxq->mb_pool);
- if (!data) {
+ mbuf = __bnxt_alloc_rx_data(rxq->mb_pool);
+ if (!mbuf) {
rte_atomic64_inc(&rxq->bp->rx_mbuf_alloc_fail);
return -ENOMEM;
}
- rx_buf->mbuf = data;
+ rx_buf->mbuf = mbuf;
- rxbd->addr = rte_cpu_to_le_64(RTE_MBUF_DATA_DMA_ADDR(rx_buf->mbuf));
+ rxbd->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(mbuf));
return 0;
}
@@ -86,10 +86,10 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
{
struct rx_prod_pkt_bd *rxbd = &rxr->ag_desc_ring[prod];
struct bnxt_sw_rx_bd *rx_buf = &rxr->ag_buf_ring[prod];
- struct rte_mbuf *data;
+ struct rte_mbuf *mbuf;
- data = __bnxt_alloc_rx_data(rxq->mb_pool);
- if (!data) {
+ mbuf = __bnxt_alloc_rx_data(rxq->mb_pool);
+ if (!mbuf) {
rte_atomic64_inc(&rxq->bp->rx_mbuf_alloc_fail);
return -ENOMEM;
}
@@ -100,9 +100,9 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
RTE_LOG(ERR, PMD, "Jumbo Frame. rx_buf is NULL\n");
- rx_buf->mbuf = data;
+ rx_buf->mbuf = mbuf;
- rxbd->addr = rte_cpu_to_le_64(RTE_MBUF_DATA_DMA_ADDR(rx_buf->mbuf));
+ rxbd->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(mbuf));
return 0;
}
@@ -123,7 +123,7 @@ static inline void bnxt_reuse_rx_mbuf(struct bnxt_rx_ring_info *rxr,
prod_bd = &rxr->rx_desc_ring[prod];
- prod_bd->addr = rte_cpu_to_le_64(RTE_MBUF_DATA_DMA_ADDR(mbuf));
+ prod_bd->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(mbuf));
rxr->rx_prod = prod;
}