Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vhost-user: fix input node runtime stats
[vpp.git]
/
src
/
plugins
/
avf
/
cli.c
diff --git
a/src/plugins/avf/cli.c
b/src/plugins/avf/cli.c
index
ba9f560
..
492494d
100644
(file)
--- a/
src/plugins/avf/cli.c
+++ b/
src/plugins/avf/cli.c
@@
-32,8
+32,9
@@
avf_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
{
unformat_input_t _line_input, *line_input = &_line_input;
avf_create_if_args_t args;
{
unformat_input_t _line_input, *line_input = &_line_input;
avf_create_if_args_t args;
+ u32 tmp;
- memset (&args, 0, sizeof (avf_create_if_args_t));
+
clib_
memset (&args, 0, sizeof (avf_create_if_args_t));
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
@@
-45,13
+46,18
@@
avf_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
;
else if (unformat (line_input, "elog"))
args.enable_elog = 1;
;
else if (unformat (line_input, "elog"))
args.enable_elog = 1;
+ else if (unformat (line_input, "rx-queue-size %u", &tmp))
+ args.rxq_size = tmp;
+ else if (unformat (line_input, "tx-queue-size %u", &tmp))
+ args.txq_size = tmp;
+ else if (unformat (line_input, "num-rx-queues %u", &tmp))
+ args.rxq_num = tmp;
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);
}
unformat_free (line_input);
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);
}
unformat_free (line_input);
-
avf_create_if (vm, &args);
return args.error;
avf_create_if (vm, &args);
return args.error;
@@
-60,7
+66,9
@@
avf_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (avf_create_command, static) = {
.path = "create interface avf",
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (avf_create_command, static) = {
.path = "create interface avf",
- .short_help = "create interface avf <pci-address>",
+ .short_help = "create interface avf <pci-address> "
+ "[rx-queue-size <size>] [tx-queue-size <size>] "
+ "[num-rx-queues <size>]",
.function = avf_create_command_fn,
};
/* *INDENT-ON* */
.function = avf_create_command_fn,
};
/* *INDENT-ON* */
@@
-99,7
+107,7
@@
avf_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
hw = vnet_get_sup_hw_interface (vnm, sw_if_index);
if (hw == NULL || avf_device_class.index != hw->dev_class_index)
hw = vnet_get_sup_hw_interface (vnm, sw_if_index);
if (hw == NULL || avf_device_class.index != hw->dev_class_index)
- return clib_error_return (0, "not a AVF interface");
+ return clib_error_return (0, "not a
n
AVF interface");
ad = pool_elt_at_index (am->devices, hw->dev_instance);
ad = pool_elt_at_index (am->devices, hw->dev_instance);