api: binary api cleanup
[vpp.git] / src / vnet / devices / virtio / virtio_api.c
index ff123ae..e354958 100644 (file)
@@ -65,9 +65,11 @@ vl_api_virtio_pci_create_t_handler (vl_api_virtio_pci_create_t * mp)
       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;
+  if (mp->gso_enabled)
+    ap->gso_enabled = 1;
+  else
+    ap->gso_enabled = 0;
   ap->features = clib_net_to_host_u64 (mp->features);
 
   virtio_pci_create_if (vm, ap);
@@ -97,10 +99,12 @@ vl_api_virtio_pci_delete_t_handler (vl_api_virtio_pci_delete_t * mp)
   vl_api_virtio_pci_delete_reply_t *rmp;
   vl_api_registration_t *reg;
 
-  hw = vnet_get_sup_hw_interface (vnm, htonl (mp->sw_if_index));
+  hw =
+    vnet_get_sup_hw_interface_api_visible_or_null (vnm,
+                                                  htonl (mp->sw_if_index));
   if (hw == NULL || virtio_device_class.index != hw->dev_class_index)
     {
-      rv = VNET_API_ERROR_INVALID_INTERFACE;
+      rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
       goto reply;
     }