aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-22 17:25:00 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-02-22 17:15:38 +0000
commitb1bfda207442177a14f08fc95b350684e5034c7f (patch)
treef9ef4ae2f530d1e1b70d0f8a68b1854beb903edb /src/plugins/avf
parent0e3eb60f35c17297383bdd4b353fecdea704be17 (diff)
avf: fix eat own tail issue on tx
Change-Id: Ie14ca18bab47ac6765ff0799475d0c2a4d936f90 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf')
-rw-r--r--src/plugins/avf/output.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c
index 47803fc2729..1e38377e844 100644
--- a/src/plugins/avf/output.c
+++ b/src/plugins/avf/output.c
@@ -45,6 +45,9 @@ avf_tx_enqueue (vlib_main_t * vm, avf_txq_t * txq, u32 * buffers,
/* avoid ring wrap */
n_desc_left = txq->size - clib_max (txq->next, txq->n_enqueued + 8);
+ if (n_desc_left == 0)
+ return 0;
+
while (n_packets_left && n_desc_left)
{
u32 or_flags;
@@ -140,7 +143,7 @@ VNET_DEVICE_CLASS_TX_FN (avf_device_class) (vlib_main_t * vm,
avf_txq_t *txq = vec_elt_at_index (ad->txqs, qid % ad->num_queue_pairs);
u32 *buffers = vlib_frame_vector_args (frame);
u16 n_enq, n_left;
- u16 n_retry = 5;
+ u16 n_retry = 2;
clib_spinlock_lock_if_init (&txq->lock);
@@ -158,10 +161,11 @@ retry:
if (slot == 0)
break;
- complete_slot = slot[0];
- if (avf_tx_desc_get_dtyp (txq->descs + complete_slot) != 0x0F)
+ if (avf_tx_desc_get_dtyp (txq->descs + slot[0]) != 0x0F)
break;
+ complete_slot = slot[0];
+
clib_ring_deq (txq->rs_slots);
}
<http://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html>`_ For a more detailed list of Sphinx Markup Constructs please refer to: `Sphinx Markup Constructs <http://www.sphinx-doc.org/en/stable/markup/index.html>`_ This document is also an example of a directory structure for a document that spans mutliple pages. Notice we have the file **index.rst** and the then documents that are referenced in index.rst. The referenced documents are shown at the bottom of this page. A label is shown at the top of this page. Then the first construct describes a the document title **FD.io Style Guide**. Text usually follows under each title or heading. A **Table of Contents** structure is shown below. Using **toctree** in this way will show the headings in a nicely in the generated documents. .. toctree:: styleguide.rst styleguide02.rst styleguide02table.rst styleguide03.rst styleguide04.rst styleguide05.rst