From 40edaf60169de80df4adafa7633bbc5e9798b435 Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Wed, 15 Dec 2021 18:45:59 +0100 Subject: tap: add num_tx_queues API This adds a create_tap_v3 api that has a num_tx_queues parameter allowing to create more than num_workers queues, following on multi TX support Type: feature Change-Id: Idce433147e8dd165f842241d6c76e041e1b1c9b8 Signed-off-by: Nathan Skrzypczak --- src/vnet/devices/tap/cli.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/vnet/devices/tap/cli.c') diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c index 10f4bb0ee2e..096a2c46970 100644 --- a/src/vnet/devices/tap/cli.c +++ b/src/vnet/devices/tap/cli.c @@ -41,6 +41,7 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.tap_flags = 0; args.rv = -1; args.num_rx_queues = 1; + args.num_tx_queues = 1; /* Get a line of input. */ if (unformat_user (input, unformat_line_input, line_input)) @@ -76,6 +77,8 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.host_ip6_gw_set = 1; else if (unformat (line_input, "num-rx-queues %d", &tmp)) args.num_rx_queues = tmp; + else if (unformat (line_input, "num-tx-queues %d", &tmp)) + args.num_tx_queues = tmp; else if (unformat (line_input, "rx-ring-size %d", &tmp)) args.rx_ring_sz = tmp; else if (unformat (line_input, "tx-ring-size %d", &tmp)) @@ -136,9 +139,10 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (tap_create_command, static) = { .path = "create tap", - .short_help = "create tap {id } [hw-addr ] " - "[num-rx-queues ] [rx-ring-size ] [tx-ring-size ] " - "[host-ns ] [host-bridge ] " + .short_help = + "create tap {id } [hw-addr ] " + "[num-rx-queues ] [num-tx-queues ] [rx-ring-size ] " + "[tx-ring-size ] [host-ns ] [host-bridge ] " "[host-ip4-addr ] [host-ip6-addr ] " "[host-ip4-gw ] [host-ip6-gw ] " "[host-mac-addr ] [host-if-name ] " -- cgit 1.2.3-korg