api: binary api cleanup
[vpp.git] / src / plugins / vmxnet3 / cli.c
index 776901e..e1d74e8 100644 (file)
@@ -32,6 +32,7 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
 {
   unformat_input_t _line_input, *line_input = &_line_input;
   vmxnet3_create_if_args_t args;
+  u32 size;
 
   /* Get a line of input. */
   if (!unformat_user (input, unformat_line_input, line_input))
@@ -46,14 +47,14 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
        args.enable_elog = 1;
       else if (unformat (line_input, "bind"))
        args.bind = 1;
-      else if (unformat (line_input, "rx-queue-size %u", &args.rxq_size))
-       ;
-      else if (unformat (line_input, "tx-queue-size %u", &args.txq_size))
-       ;
-      else if (unformat (line_input, "num-tx-queues %u", &args.txq_num))
-       ;
-      else if (unformat (line_input, "num-rx-queues %u", &args.rxq_num))
-       ;
+      else if (unformat (line_input, "rx-queue-size %u", &size))
+       args.rxq_size = size;
+      else if (unformat (line_input, "tx-queue-size %u", &size))
+       args.txq_size = size;
+      else if (unformat (line_input, "num-tx-queues %u", &size))
+       args.txq_num = size;
+      else if (unformat (line_input, "num-rx-queues %u", &size))
+       args.rxq_num = size;
       else
        return clib_error_return (0, "unknown input `%U'",
                                  format_unformat_error, input);
@@ -108,7 +109,7 @@ vmxnet3_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
     return clib_error_return (0,
                              "please specify interface name or sw_if_index");
 
-  hw = vnet_get_sup_hw_interface (vnm, sw_if_index);
+  hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index);
   if (hw == NULL || vmxnet3_device_class.index != hw->dev_class_index)
     return clib_error_return (0, "not a vmxnet3 interface");
 
@@ -165,7 +166,7 @@ vmxnet3_test_command_fn (vlib_main_t * vm, unformat_input_t * input,
     return clib_error_return (0,
                              "please specify interface name or sw_if_index");
 
-  hw = vnet_get_sup_hw_interface (vnm, sw_if_index);
+  hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index);
   if (hw == NULL || vmxnet3_device_class.index != hw->dev_class_index)
     return clib_error_return (0, "not a vmxnet3 interface");