summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/cli.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2022-10-13 14:01:03 +0200
committerDave Wallace <dwallacelf@gmail.com>2023-01-11 15:26:41 +0000
commitc04d8c41d151c82559ddcb90aef3f6dea994b4e9 (patch)
treebcf316384e4bf6d2b30a488bd34732d1a9449b48 /src/vnet/devices/virtio/cli.c
parent6a07348f4a5312310c01fdd5af937ce26580eb2d (diff)
virtio: add option to bind interface to uio driver
Type: improvement Change-Id: I30e66370c927afeb62ba3a2b3334bdc2a31d4561 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/cli.c')
-rw-r--r--src/vnet/devices/virtio/cli.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c
index a78336997e2..2457e9b686e 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -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* */