uint16_t i;
int vid = dev->vid;
struct vhost_queue *queue;
+ int ret;
RTE_LOG(INFO, VHOST_CONFIG,
"setting builtin vhost-user net driver\n");
else
dev->hdr_len = sizeof(struct virtio_net_hdr);
- rte_vhost_get_mem_table(vid, &dev->mem);
+ ret = rte_vhost_get_mem_table(vid, &dev->mem);
+ if (ret < 0) {
+ RTE_LOG(ERR, VHOST_CONFIG, "Failed to get "
+ "VM memory layout for device(%d)\n", vid);
+ return;
+ }
dev->nr_vrings = rte_vhost_get_vring_num(vid);
for (i = 0; i < dev->nr_vrings; i++) {