aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices')
-rw-r--r--src/vnet/devices/virtio/vhost-user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c
index ca54f110948..6b2c898acd5 100644
--- a/src/vnet/devices/virtio/vhost-user.c
+++ b/src/vnet/devices/virtio/vhost-user.c
@@ -1545,8 +1545,10 @@ vhost_user_if_input (vlib_main_t * vm,
* per packet. In case packets are bigger, we will just yeld at some point
* in the loop and come back later. This is not an issue as for big packet,
* processing cost really comes from the memory copy.
+ * The assumption is that big packets will fit in 40 buffers.
*/
- if (PREDICT_FALSE (vum->cpus[thread_index].rx_buffers_len < n_left + 1))
+ if (PREDICT_FALSE (vum->cpus[thread_index].rx_buffers_len < n_left + 1 ||
+ vum->cpus[thread_index].rx_buffers_len < 40))
{
u32 curr_len = vum->cpus[thread_index].rx_buffers_len;
vum->cpus[thread_index].rx_buffers_len +=