summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/vmxnet3')
-rw-r--r--src/plugins/vmxnet3/output.c4
-rw-r--r--src/plugins/vmxnet3/vmxnet3.h8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/vmxnet3/output.c b/src/plugins/vmxnet3/output.c
index 2a8494ed447..ce810f049e2 100644
--- a/src/plugins/vmxnet3/output.c
+++ b/src/plugins/vmxnet3/output.c
@@ -178,9 +178,7 @@ VNET_DEVICE_CLASS_TX_FN (vmxnet3_device_class) (vlib_main_t * vm,
txq->tx_ring.bufs[desc_idx] = bi0;
txd = &txq->tx_desc[desc_idx];
- txd->address =
- vlib_get_buffer_data_physical_address (vm,
- bi0) + b0->current_data;
+ txd->address = vlib_buffer_get_current_pa (vm, b0);
txd->flags[0] = generation | b0->current_length;
diff --git a/src/plugins/vmxnet3/vmxnet3.h b/src/plugins/vmxnet3/vmxnet3.h
index 491b8c10246..391ddc17113 100644
--- a/src/plugins/vmxnet3/vmxnet3.h
+++ b/src/plugins/vmxnet3/vmxnet3.h
@@ -590,9 +590,9 @@ vmxnet3_rxq_refill_ring0 (vlib_main_t * vm, vmxnet3_device_t * vd,
while (n_alloc)
{
+ vlib_buffer_t *b = vlib_get_buffer (vm, ring->bufs[ring->produce]);
rxd = &rxq->rx_desc[0][ring->produce];
- rxd->address =
- vlib_get_buffer_data_physical_address (vm, ring->bufs[ring->produce]);
+ rxd->address = vlib_buffer_get_pa (vm, b);
rxd->flags = ring->gen | VLIB_BUFFER_DATA_SIZE;
vmxnet3_rx_ring_advance_produce (rxq, ring);
@@ -632,9 +632,9 @@ vmxnet3_rxq_refill_ring1 (vlib_main_t * vm, vmxnet3_device_t * vd,
while (n_alloc)
{
+ vlib_buffer_t *b = vlib_get_buffer (vm, ring->bufs[ring->produce]);
rxd = &rxq->rx_desc[1][ring->produce];
- rxd->address =
- vlib_get_buffer_data_physical_address (vm, ring->bufs[ring->produce]);
+ rxd->address = vlib_buffer_get_pa (vm, b);
rxd->flags = ring->gen | VLIB_BUFFER_DATA_SIZE | VMXNET3_RXF_BTYPE;
vmxnet3_rx_ring_advance_produce (rxq, ring);