virtio: add option to bind interface to uio driver
[vpp.git] / src / vnet / devices / virtio / cli.c
index a783369..2457e9b 100644 (file)
@@ -55,6 +55,10 @@ virtio_pci_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
        }
       else if (unformat (line_input, "packed"))
        args.virtio_flags |= VIRTIO_FLAG_PACKED;
+      else if (unformat (line_input, "bind force"))
+       args.bind = VIRTIO_BIND_FORCE;
+      else if (unformat (line_input, "bind"))
+       args.bind = VIRTIO_BIND_DEFAULT;
       else
        return clib_error_return (0, "unknown input `%U'",
                                  format_unformat_error, input);
@@ -70,8 +74,8 @@ virtio_pci_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
 VLIB_CLI_COMMAND (virtio_pci_create_command, static) = {
   .path = "create interface virtio",
   .short_help = "create interface virtio <pci-address> "
-                "[feature-mask <hex-mask>] [gso-enabled] [csum-enabled] "
-               "[buffering [size <buffering-szie>]] [packed]",
+               "[feature-mask <hex-mask>] [gso-enabled] [csum-enabled] "
+               "[buffering [size <buffering-szie>]] [packed] [bind [force]]",
   .function = virtio_pci_create_command_fn,
 };
 /* *INDENT-ON* */