+ virtio_log_debug (vif, "VHOST_SET_VRING_ADDR fd %d index %u flags 0x%x "
+ "desc_user_addr 0x%lx avail_user_addr 0x%lx "
+ "used_user_addr 0x%lx", fd, addr.index,
+ addr.flags, addr.desc_user_addr, addr.avail_user_addr,
+ addr.used_user_addr);
+ _IOCTL (fd, VHOST_SET_VRING_ADDR, &addr);
+
+ file.fd = vring->call_fd;
+ virtio_log_debug (vif, "VHOST_SET_VRING_CALL fd %d index %u call_fd %d",
+ fd, file.index, file.fd);
+ _IOCTL (fd, VHOST_SET_VRING_CALL, &file);
+
+ file.fd = vring->kick_fd;
+ virtio_log_debug (vif, "VHOST_SET_VRING_KICK fd %d index %u kick_fd %d",
+ fd, file.index, file.fd);
+ _IOCTL (fd, VHOST_SET_VRING_KICK, &file);
+
+ file.fd = tfd;
+ virtio_log_debug (vif, "VHOST_NET_SET_BACKEND fd %d index %u tap_fd %d",
+ fd, file.index, file.fd);
+ _IOCTL (fd, VHOST_NET_SET_BACKEND, &file);
+ }
+
+ if (vif->type == VIRTIO_IF_TYPE_TAP)
+ {
+ if (!args->mac_addr_set)
+ ethernet_mac_address_generate (args->mac_addr.bytes);
+
+ clib_memcpy (vif->mac_addr, args->mac_addr.bytes, 6);
+ }