From 773291163a4f72f131afc6a84b065bcfed13aeb7 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Tue, 29 Jan 2019 15:13:31 -0800 Subject: 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 --- src/plugins/vmxnet3/cli.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/plugins/vmxnet3/cli.c') 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 " - "[rx-queue-size ] [tx-queue-size ]", + "[rx-queue-size ] [tx-queue-size ]" + "[num-tx-queues ]", .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); -- cgit 1.2.3-korg