api: Add API support for marvell PP2 plugin
[vpp.git] / src / plugins / marvell / pp2 / cli.c
index 3264cc8..345b237 100644 (file)
@@ -94,7 +94,7 @@ mrvl_pp2_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 || mrvl_pp2_device_class.index != hw->dev_class_index)
     return clib_error_return (0, "not a Marvell PP2 interface");
 
@@ -117,6 +117,9 @@ VLIB_CLI_COMMAND (mrvl_pp2_delete_command, static) = {
 clib_error_t *
 mrvl_pp2_cli_init (vlib_main_t * vm)
 {
+  /* initialize binary API */
+  mrvl_pp2_plugin_api_hookup (vm);
+
   return 0;
 }