diff options
author | Steven Luong <sluong@cisco.com> | 2019-01-29 15:13:31 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-02-02 15:31:22 +0000 |
commit | 773291163a4f72f131afc6a84b065bcfed13aeb7 (patch) | |
tree | 55a50c027d91bef911d84e6c437b7aa57bbc9dad /src/plugins/vmxnet3/cli.c | |
parent | 900cbadde906a000ce1b431fc637a9c0f7089339 (diff) |
vmxnet3: multiple TX queues support
Add num-tx-queues to the vmxnet3 create CLI/API. Default is 1. Max is
min (8, the number of cores assigned to VPP).
Change-Id: I7e0a659a82d01c719665c228dd8a71e3288a2895
Signed-off-by: Steven Luong <sluong@cisco.com>
Diffstat (limited to 'src/plugins/vmxnet3/cli.c')
-rw-r--r-- | src/plugins/vmxnet3/cli.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c index 566b0d68079..e110a479988 100644 --- a/src/plugins/vmxnet3/cli.c +++ b/src/plugins/vmxnet3/cli.c @@ -32,7 +32,6 @@ 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 tmp; /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) @@ -45,10 +44,12 @@ vmxnet3_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, "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, "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 return clib_error_return (0, "unknown input `%U'", format_unformat_error, input); @@ -65,7 +66,8 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input, VLIB_CLI_COMMAND (vmxnet3_create_command, static) = { .path = "create interface vmxnet3", .short_help = "create interface vmxnet3 <pci-address>" - "[rx-queue-size <size>] [tx-queue-size <size>]", + "[rx-queue-size <size>] [tx-queue-size <size>]" + "[num-tx-queues <number>]", .function = vmxnet3_create_command_fn, }; /* *INDENT-ON* */ @@ -319,9 +321,9 @@ show_vmxnet3 (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, } } - vec_foreach_index (qid, vd->rxqs) + vec_foreach_index (qid, vd->txqs) { - txq = vec_elt_at_index (vd->txqs, 0); + txq = vec_elt_at_index (vd->txqs, qid); vlib_cli_output (vm, " Queue %u (TX)", qid); vlib_cli_output (vm, " TX completion next index %u", txq->tx_comp_ring.next); |