diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2022-03-25 14:27:45 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-04-04 14:22:36 +0000 |
commit | 5a7aa51f00d562814204aca7831777651a00869f (patch) | |
tree | 33539381ecf5de1ff1f5f82e85dc8e415589f147 /src/vnet/devices/af_packet/cli.c | |
parent | 3414977152ae6362277158dc732e6b9958a6e618 (diff) |
devices: add multi-queue support for af-packet
Type: feature
Change-Id: I0f4e6517fcfa07ffb0aba89b159ac1337937a508
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/af_packet/cli.c')
-rw-r--r-- | src/vnet/devices/af_packet/cli.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c index 3dd3c8ee848..c90d5251f9f 100644 --- a/src/vnet/devices/af_packet/cli.c +++ b/src/vnet/devices/af_packet/cli.c @@ -54,6 +54,10 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, // Default mode arg->mode = AF_PACKET_IF_MODE_ETHERNET; + // Default number of rx/tx queue(s) + arg->num_rxqs = 1; + arg->num_txqs = 1; + /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) return 0; @@ -72,6 +76,10 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, else if (unformat (line_input, "tx-per-block %u", &arg->tx_frames_per_block)) ; + else if (unformat (line_input, "num-rx-queues %u", &arg->num_rxqs)) + ; + else if (unformat (line_input, "num-tx-queues %u", &arg->num_txqs)) + ; else if (unformat (line_input, "mode ip")) arg->mode = AF_PACKET_IF_MODE_IP; else if (unformat (line_input, "hw-addr %U", unformat_ethernet_address, @@ -145,8 +153,8 @@ done: ?*/ VLIB_CLI_COMMAND (af_packet_create_command, static) = { .path = "create host-interface", - .short_help = - "create host-interface name <ifname> [hw-addr <mac-addr>] [mode ip]", + .short_help = "create host-interface name <ifname> [num-rx-queues <n>] " + "[num-tx-queues <n>] [hw-addr <mac-addr>] [mode ip]", .function = af_packet_create_command_fn, }; |