virtio: fix the out of order descriptors in tx
[vpp.git] / src / vnet / devices / virtio / virtio.c
index c0c163f..d78c911 100644 (file)
@@ -113,6 +113,11 @@ virtio_vring_init (vlib_main_t * vm, virtio_if_t * vif, u16 idx, u16 sz)
   ASSERT (vring->buffers == 0);
   vec_validate_aligned (vring->buffers, sz, CLIB_CACHE_LINE_BYTES);
 
+  if (idx & 1)
+    {
+      clib_memset_u32 (vring->buffers, ~0, sz);
+    }
+
   vring->size = sz;
   vring->call_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
   vring->kick_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
@@ -299,6 +304,8 @@ virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type)
          if (vif->host_mtu_size)
            vlib_cli_output (vm, "  host-mtu-size \"%d\"",
                             vif->host_mtu_size);
+         vlib_cli_output (vm, "  host-mac-addr: %U",
+                          format_ethernet_address, vif->host_mac_addr);
 
          vec_foreach_index (i, vif->vhost_fds)
            str = format (str, " %d", vif->vhost_fds[i]);