vhost-user: fix crash in vhost_user_intfc_tx (VPP-519) 29/3629/2
authorDamjan Marion <damarion@cisco.com>
Fri, 28 Oct 2016 21:52:40 +0000 (23:52 +0200)
committerDave Barach <openvpp@barachs.net>
Mon, 31 Oct 2016 16:39:18 +0000 (16:39 +0000)
The crash was the result of indexing off the end of the next[] array.
Removing that prefetch code completelly, as it is questionable
how much it helps so late in the game.

Change-Id: I7bc83483a1088437edb4ac0f95a54c39afce136b
Signed-off-by: Damjan Marion <damarion@cisco.com>
vnet/vnet/devices/virtio/vhost-user.c

index fd3cd21..5916ced 100644 (file)
@@ -1634,12 +1634,6 @@ vhost_user_intfc_tx (vlib_main_t * vm,
          desc_len += bytes_to_copy;
        }
 
-      if (PREDICT_TRUE (n_left >= 2))
-       {
-         vlib_prefetch_buffer_with_index (vm, buffers[1], STORE);
-         CLIB_PREFETCH (&n_left, sizeof (n_left), STORE);
-       }
-
       //Move from available to used ring
       rxvq->used->ring[rxvq->last_used_idx & qsz_mask].id = desc_head;
       rxvq->used->ring[rxvq->last_used_idx & qsz_mask].len = desc_len;