diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2021-12-15 18:45:59 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-01-06 14:02:30 +0000 |
commit | 40edaf60169de80df4adafa7633bbc5e9798b435 (patch) | |
tree | d1b4372512bb4aabe936c1733222d387766890e7 /src/vnet/devices/tap/cli.c | |
parent | 254b5cb50c1c905a27e8f33ab7730ff1715ce2e1 (diff) |
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 <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/devices/tap/cli.c')
-rw-r--r-- | src/vnet/devices/tap/cli.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 <if-id>} [hw-addr <mac-address>] " - "[num-rx-queues <n>] [rx-ring-size <size>] [tx-ring-size <size>] " - "[host-ns <netns>] [host-bridge <bridge-name>] " + .short_help = + "create tap {id <if-id>} [hw-addr <mac-address>] " + "[num-rx-queues <n>] [num-tx-queues <n>] [rx-ring-size <size>] " + "[tx-ring-size <size>] [host-ns <netns>] [host-bridge <bridge-name>] " "[host-ip4-addr <ip4addr/mask>] [host-ip6-addr <ip6-addr>] " "[host-ip4-gw <ip4-addr>] [host-ip6-gw <ip6-addr>] " "[host-mac-addr <host-mac-address>] [host-if-name <name>] " |