X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fvmxnet3%2Foutput.c;h=2a8494ed447cf1228682173b4572ab7dd99d463c;hb=8b0995366110ff8c97d1d10aaa8291ad465b0b2f;hp=bcb02949184e7ba540261205ec805cbf2c8fe607;hpb=40dd73bcfa7625773e1e0cc049134f9d7107bccc;p=vpp.git diff --git a/src/plugins/vmxnet3/output.c b/src/plugins/vmxnet3/output.c index bcb02949184..2a8494ed447 100644 --- a/src/plugins/vmxnet3/output.c +++ b/src/plugins/vmxnet3/output.c @@ -143,15 +143,22 @@ VNET_DEVICE_CLASS_TX_FN (vmxnet3_device_class) (vlib_main_t * vm, } if (PREDICT_FALSE (space_left < space_needed)) { - vlib_buffer_free_one (vm, bi0); - vlib_error_count (vm, node->node_index, - VMXNET3_TX_ERROR_NO_FREE_SLOTS, 1); - buffers++; - n_left--; - /* - * Drop this packet. But we may have enough room for the next packet - */ - continue; + vmxnet3_txq_release (vm, vd, txq); + space_left = vmxnet3_tx_ring_space_left (txq); + + if (PREDICT_FALSE (space_left < space_needed)) + { + vlib_buffer_free_one (vm, bi0); + vlib_error_count (vm, node->node_index, + VMXNET3_TX_ERROR_NO_FREE_SLOTS, 1); + buffers++; + n_left--; + /* + * Drop this packet. But we may have enough room for the next + * packet + */ + continue; + } } /*