diff options
author | Damjan Marion <damarion@cisco.com> | 2018-12-28 17:43:22 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-12-29 08:01:36 +0000 |
commit | c879c149d66d556b9b8183374c601004cecbf982 (patch) | |
tree | 70446dad5828072ba73238e83c6e58780f7fa2f6 /src/plugins/avf/device.c | |
parent | 1e75c6cffe08886509e52ff496b96b8d32d76d88 (diff) |
avf: tx dequeue optimizations
Change-Id: I9d8fcf930132e832941e5678a9278a029e104dc3
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/device.c')
-rw-r--r-- | src/plugins/avf/device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index 9a8afa2ab42..f6a00a1d30a 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -16,6 +16,7 @@ */ #include <vlib/vlib.h> +#include <vppinfra/ring.h> #include <vlib/unix/unix.h> #include <vlib/pci/pci.h> #include <vnet/ethernet/ethernet.h> @@ -289,6 +290,9 @@ avf_txq_init (vlib_main_t * vm, avf_device_t * ad, u16 qid, u16 txq_size) vec_validate_aligned (txq->bufs, txq->size, CLIB_CACHE_LINE_BYTES); txq->qtx_tail = ad->bar0 + AVF_QTX_TAIL (qid); + /* initialize ring of pending RS slots */ + clib_ring_new_aligned (txq->rs_slots, 32, CLIB_CACHE_LINE_BYTES); + ad->n_tx_queues = clib_min (ad->num_queue_pairs, qid + 1); return 0; } @@ -1166,6 +1170,7 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad) txq->n_enqueued); } vec_free (txq->bufs); + clib_ring_free (txq->rs_slots); } /* *INDENT-ON* */ vec_free (ad->txqs); |