aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/device.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-04-08 16:34:28 +0200
committerDamjan Marion <dmarion@me.com>2021-04-13 12:37:31 +0000
commitca1812dbe714fc8e4de13f88df2d3b830d95a2c9 (patch)
treee68e2942ebebecc3f4e240f0c123bf71d6f204ab /src/plugins/avf/device.c
parent7a016e87e473d28f87d4c0998d0682ead8642cf9 (diff)
avf: avoid ring wrap in the tx path
Type: improvement Change-Id: I91ecf0bff2ddd43ab5cf0f03ed2882882154557b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/device.c')
-rw-r--r--src/plugins/avf/device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index 14ad47c9854..e0c3c99453a 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -336,6 +336,9 @@ avf_txq_init (vlib_main_t * vm, avf_device_t * ad, u16 qid, u16 txq_size)
/* initialize ring of pending RS slots */
clib_ring_new_aligned (txq->rs_slots, 32, CLIB_CACHE_LINE_BYTES);
+ vec_validate_aligned (txq->tmp_descs, txq->size, CLIB_CACHE_LINE_BYTES);
+ vec_validate_aligned (txq->tmp_bufs, txq->size, CLIB_CACHE_LINE_BYTES);
+
ad->n_tx_queues = clib_min (ad->num_queue_pairs, qid + 1);
return 0;
}
@@ -1518,6 +1521,8 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier)
vlib_buffer_free_one(vm, txq->ctx_desc_placeholder_bi);
vec_free (txq->bufs);
clib_ring_free (txq->rs_slots);
+ vec_free (txq->tmp_bufs);
+ vec_free (txq->tmp_descs);
}
/* *INDENT-ON* */
vec_free (ad->txqs);