vhost: release locks on RARP packet failure
authorTiwei Bie <tiwei.bie@intel.com>
Wed, 25 Jul 2018 14:18:11 +0000 (22:18 +0800)
committerTiwei Bie <tiwei.bie@intel.com>
Thu, 26 Jul 2018 08:02:52 +0000 (10:02 +0200)
Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
lib/librte_vhost/virtio_net.c

index 5779bcf..07c8237 100644 (file)
@@ -1628,7 +1628,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
                if (rarp_mbuf == NULL) {
                        RTE_LOG(ERR, VHOST_DATA,
                                "Failed to make RARP packet.\n");
-                       return 0;
+                       count = 0;
+                       goto out;
                }
                count -= 1;
        }