diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c
index 92e7e93..956284c 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -29,7 +29,6 @@
 {
   unformat_input_t _line_input, *line_input = &_line_input;
   virtio_pci_create_if_args_t args;
-  u32 tmp;
   u64 feature_mask = (u64) ~ (0ULL);
 
   /* Get a line of input. */
@@ -43,10 +42,6 @@
 	;
       else if (unformat (line_input, "feature-mask 0x%llx", &feature_mask))
 	args.features = feature_mask;
-      else if (unformat (line_input, "rx-queue-size %u", &tmp))
-	args.rxq_size = tmp;
-      else if (unformat (line_input, "tx-queue-size %u", &tmp))
-	args.txq_size = tmp;
       else
 	return clib_error_return (0, "unknown input `%U'",
 				  format_unformat_error, input);
@@ -62,7 +57,7 @@
 VLIB_CLI_COMMAND (virtio_pci_create_command, static) = {
   .path = "create interface virtio",
   .short_help = "create interface virtio <pci-address> "
-                "[feature-mask <hex-mask>] [rx-queue-size <size>] [tx-queue-size <size>]",
+                "[feature-mask <hex-mask>]",
   .function = virtio_pci_create_command_fn,
 };
 /* *INDENT-ON* */
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 31027f7..b02b79d 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -177,16 +177,21 @@
   return queue_num;
 }
 
-
-static void
+static int
 virtio_pci_legacy_setup_queue (vlib_main_t * vm, virtio_if_t * vif,
 			       u16 queue_id, void *p)
 {
   u64 addr = vlib_physmem_get_pa (vm, p) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT;
+  u32 addr2 = 0;
   vlib_pci_write_io_u16 (vm, vif->pci_dev_handle, VIRTIO_PCI_QUEUE_SEL,
 			 &queue_id);
   vlib_pci_write_io_u32 (vm, vif->pci_dev_handle, VIRTIO_PCI_QUEUE_PFN,
 			 (u32 *) & addr);
+  vlib_pci_read_io_u32 (vm, vif->pci_dev_handle, VIRTIO_PCI_QUEUE_PFN,
+			&addr2);
+  if ((u32) addr == addr2)
+    return 0;
+  return 1;
 }
 
 static void
@@ -693,20 +698,19 @@
 				 queue_size - n_alloc);
 	}
       while (n_alloc != queue_size);
-      vif->num_txqs++;
       virtio_log_debug (vim, vif, "tx-queue: number %u, size %u", queue_num,
 			queue_size);
     }
   else
     {
-      vif->num_rxqs++;
       virtio_log_debug (vim, vif, "rx-queue: number %u, size %u", queue_num,
 			queue_size);
     }
   vring->size = queue_size;
-  virtio_pci_legacy_setup_queue (vm, vif, queue_num, ptr);
-  vring->kick_fd = -1;
+  if (virtio_pci_legacy_setup_queue (vm, vif, queue_num, ptr))
+    return clib_error_return (0, "error in queue address setup");
 
+  vring->kick_fd = -1;
   return error;
 }
 
@@ -949,12 +953,24 @@
   for (int i = 0; i < vif->max_queue_pairs; i++)
     {
       if ((error = virtio_pci_vring_init (vm, vif, RX_QUEUE (i))))
-	virtio_log_warning (vim, vif, "%s (%u) %s", "error in rxq-queue",
-			    RX_QUEUE (i), "initialization");
+	{
+	  virtio_log_warning (vim, vif, "%s (%u) %s", "error in rxq-queue",
+			      RX_QUEUE (i), "initialization");
+	}
+      else
+	{
+	  vif->num_rxqs++;
+	}
 
       if ((error = virtio_pci_vring_init (vm, vif, TX_QUEUE (i))))
-	virtio_log_warning (vim, vif, "%s (%u) %s", "error in txq-queue",
-			    TX_QUEUE (i), "initialization");
+	{
+	  virtio_log_warning (vim, vif, "%s (%u) %s", "error in txq-queue",
+			      TX_QUEUE (i), "initialization");
+	}
+      else
+	{
+	  vif->num_txqs++;
+	}
     }
 
   if (vif->features & VIRTIO_FEATURE (VIRTIO_NET_F_CTRL_VQ))
@@ -1006,25 +1022,6 @@
   vlib_pci_dev_handle_t h;
   clib_error_t *error = 0;
 
-  if (args->rxq_size == 0)
-    args->rxq_size = VIRTIO_NUM_RX_DESC;
-  if (args->txq_size == 0)
-    args->txq_size = VIRTIO_NUM_TX_DESC;
-
-  if (!virtio_pci_queue_size_valid (args->rxq_size) ||
-      !virtio_pci_queue_size_valid (args->txq_size))
-    {
-      args->rv = VNET_API_ERROR_INVALID_VALUE;
-      args->error =
-	clib_error_return (error,
-			   "queue size must be <= 4096, >= 64, "
-			   "and multiples of 64");
-      vlib_log (VLIB_LOG_LEVEL_ERR, vim->log_default, "%U: %s",
-		format_vlib_pci_addr, &args->addr,
-		"queue size must be <= 4096, >= 64, and multiples of 64");
-      return;
-    }
-
   /* *INDENT-OFF* */
   pool_foreach (vif, vim->interfaces, ({
     if (vif->pci_addr.as_u32 == args->addr)
diff --git a/src/vnet/devices/virtio/pci.h b/src/vnet/devices/virtio/pci.h
index 40648c8..dcf9b14 100644
--- a/src/vnet/devices/virtio/pci.h
+++ b/src/vnet/devices/virtio/pci.h
@@ -227,8 +227,6 @@
 typedef struct
 {
   u32 addr;
-  u16 rxq_size;
-  u16 txq_size;
   /* return */
   i32 rv;
   u32 sw_if_index;
diff --git a/src/vnet/devices/virtio/virtio.api b/src/vnet/devices/virtio/virtio.api
index cb67296..3a40fa9 100644
--- a/src/vnet/devices/virtio/virtio.api
+++ b/src/vnet/devices/virtio/virtio.api
@@ -33,8 +33,6 @@
   u32 pci_addr;
   u8 use_random_mac;
   u8 mac_address[6];
-  u16 tx_ring_sz; /* optional, default is 256 entries, must be power of 2 */
-  u16 rx_ring_sz; /* optional, default is 256 entries, must be power of 2 */
   u64 features;
 };
 
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index ff123ae..82ff791 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -65,8 +65,6 @@
       clib_memcpy (ap->mac_addr, mp->mac_address, 6);
       ap->mac_addr_set = 1;
     }
-  ap->rxq_size = ntohs (mp->rx_ring_sz);
-  ap->txq_size = ntohs (mp->tx_ring_sz);
   ap->sw_if_index = (u32) ~ 0;
   ap->features = clib_net_to_host_u64 (mp->features);
 
