diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2022-04-05 12:03:47 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-04-06 11:42:08 +0000 |
commit | 2b6479c07ed67940e47a676f3386a2df21c16655 (patch) | |
tree | 7163e8b0930a2bcd1808c19ec88d919aef94be8a /src/vnet/devices/af_packet/cli.c | |
parent | eecec8ceba7dcd572ff557726e7e253488b13656 (diff) |
devices: add cli support to disable qdisc bypass
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ie5f2bdb8fb559680bab863a7c24a49360e005b58
Diffstat (limited to 'src/vnet/devices/af_packet/cli.c')
-rw-r--r-- | src/vnet/devices/af_packet/cli.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c index c90d5251f9f..443a1d5c737 100644 --- a/src/vnet/devices/af_packet/cli.c +++ b/src/vnet/devices/af_packet/cli.c @@ -58,6 +58,9 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, arg->num_rxqs = 1; arg->num_txqs = 1; + // Default flags + arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS; + /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) return 0; @@ -80,6 +83,8 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, ; else if (unformat (line_input, "num-tx-queues %u", &arg->num_txqs)) ; + else if (unformat (line_input, "qdisc-bypass-disable")) + arg->flags &= ~AF_PACKET_IF_FLAGS_QDISC_BYPASS; 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, @@ -154,7 +159,8 @@ done: VLIB_CLI_COMMAND (af_packet_create_command, static) = { .path = "create host-interface", .short_help = "create host-interface name <ifname> [num-rx-queues <n>] " - "[num-tx-queues <n>] [hw-addr <mac-addr>] [mode ip]", + "[num-tx-queues <n>] [hw-addr <mac-addr>] [mode ip] " + "[qdisc-bypass-disable]", .function = af_packet_create_command_fn, }; |