From 837503cf66c432355b37db842ac5b0ee37c18085 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 28 Nov 2017 11:59:20 -0800 Subject: af_packet: update tx_frame even when ring exhausted Change-Id: I2fde74b53d6b4dc54d4af7020130f7b22463d70f Signed-off-by: Florin Coras --- src/vnet/devices/af_packet/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vnet/devices') diff --git a/src/vnet/devices/af_packet/device.c b/src/vnet/devices/af_packet/device.c index e01b1c71b32..b9492b36a69 100644 --- a/src/vnet/devices/af_packet/device.c +++ b/src/vnet/devices/af_packet/device.c @@ -132,11 +132,11 @@ af_packet_interface_tx (vlib_main_t * vm, tph->tp_status = TP_STATUS_SEND_REQUEST; n_sent++; next: + tx_frame = (tx_frame + 1) % frame_num; + /* check if we've exhausted the ring */ if (PREDICT_FALSE (frame_not_ready + n_sent == frame_num)) break; - - tx_frame = (tx_frame + 1) % frame_num; } CLIB_MEMORY_BARRIER (); -- cgit 1.2.3-korg