aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/cli.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2022-04-05 12:43:13 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-04-07 11:22:41 +0000
commit788676b211cf5a3e54bac1f564f069941562437e (patch)
treea210063d85b53f78e8b9aac834182144ab014456 /src/vnet/devices/af_packet/cli.c
parent43daea8309e9f58468ad562e15b81c5a4d8aa2b2 (diff)
devices: add cli support for checksum and gso disable
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I33a29cf11998736347eca5016eee112619d847c1
Diffstat (limited to 'src/vnet/devices/af_packet/cli.c')
-rw-r--r--src/vnet/devices/af_packet/cli.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c
index 443a1d5c737..e730659bfcd 100644
--- a/src/vnet/devices/af_packet/cli.c
+++ b/src/vnet/devices/af_packet/cli.c
@@ -59,7 +59,7 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
arg->num_txqs = 1;
// Default flags
- arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS;
+ arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS | AF_PACKET_IF_FLAGS_CKSUM_GSO;
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
@@ -85,6 +85,8 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
;
else if (unformat (line_input, "qdisc-bypass-disable"))
arg->flags &= ~AF_PACKET_IF_FLAGS_QDISC_BYPASS;
+ else if (unformat (line_input, "cksum-gso-disable"))
+ arg->flags &= ~AF_PACKET_IF_FLAGS_CKSUM_GSO;
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,
@@ -160,7 +162,7 @@ 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] "
- "[qdisc-bypass-disable]",
+ "[qdisc-bypass-disable] [cksum-gso-disable]",
.function = af_packet_create_command_fn,
};