aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/device.c
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/avf/device.c
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/avf/device.c')
-rw-r--r--src/plugins/avf/device.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index 71105e88677..c23746be1b2 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -240,14 +240,11 @@ avf_rxq_init (vlib_main_t * vm, avf_device_t * ad, u16 qid, u16 rxq_size)
avf_rx_desc_t *d = rxq->descs;
for (i = 0; i < n_alloc; i++)
{
+ vlib_buffer_t *b = vlib_get_buffer (vm, rxq->bufs[i]);
if (ad->flags & AVF_DEVICE_F_IOVA)
- {
- vlib_buffer_t *b = vlib_get_buffer (vm, rxq->bufs[i]);
- d->qword[0] = pointer_to_uword (b->data);
- }
+ d->qword[0] = vlib_buffer_get_va (b);
else
- d->qword[0] =
- vlib_get_buffer_data_physical_address (vm, rxq->bufs[i]);
+ d->qword[0] = vlib_buffer_get_pa (vm, b);
d++;
}