summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-11-28 11:59:20 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-30 08:39:52 +0000
commit837503cf66c432355b37db842ac5b0ee37c18085 (patch)
tree0c7421b2f3aebe245f4ca816c15a0677bef9b37d /src/vnet
parentc8f1ee6783ce8d633d4d0ffacb2ee414a267e4b2 (diff)
af_packet: update tx_frame even when ring exhausted
Change-Id: I2fde74b53d6b4dc54d4af7020130f7b22463d70f Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/af_packet/device.c4
1 files changed, 2 insertions, 2 deletions
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 ();