summaryrefslogtreecommitdiffstats
path: root/src/plugins/marvell/pp2
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-22 13:07:02 +0200
committerDamjan Marion <dmarion@me.com>2018-10-22 13:01:19 +0000
commit8f49936b20508d57968f01dcb18f8d31b1a58f3f (patch)
treeedb3ee5da2457b345274f69eab70d05123ada08e /src/plugins/marvell/pp2
parent6f3f1cbf7760efb17c5754c3dbccdefd433675cb (diff)
vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlines
Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/marvell/pp2')
-rw-r--r--src/plugins/marvell/pp2/input.c3
-rw-r--r--src/plugins/marvell/pp2/output.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/marvell/pp2/input.c b/src/plugins/marvell/pp2/input.c
index 72c1fe02f28..c1a0c624ea9 100644
--- a/src/plugins/marvell/pp2/input.c
+++ b/src/plugins/marvell/pp2/input.c
@@ -324,7 +324,8 @@ mrvl_pp2_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
while (i--)
{
u32 bi = buffers[0];
- e->buff.addr = vlib_get_buffer_data_physical_address (vm, bi) - 64;
+ vlib_buffer_t *b = vlib_get_buffer (vm, bi);
+ e->buff.addr = vlib_buffer_get_pa (vm, b) - 64;
e->buff.cookie = bi;
e->bpool = inq->bpool;
e++;
diff --git a/src/plugins/marvell/pp2/output.c b/src/plugins/marvell/pp2/output.c
index 16efae5eecc..108bbef72f2 100644
--- a/src/plugins/marvell/pp2/output.c
+++ b/src/plugins/marvell/pp2/output.c
@@ -67,7 +67,7 @@ mrvl_pp2_interface_tx (vlib_main_t * vm,
{
u32 bi0 = buffers[0];
vlib_buffer_t *b0 = vlib_get_buffer (vm, bi0);
- u64 paddr = vlib_get_buffer_data_physical_address (vm, bi0);
+ u64 paddr = vlib_buffer_get_va (vm, b0);
pp2_ppio_outq_desc_reset (d);
pp2_ppio_outq_desc_set_phys_addr (d, paddr + b0->current_data);