summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap/cli.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-08-13 18:57:26 +0200
committerBenoƮt Ganne <bganne@cisco.com>2020-08-17 08:46:53 +0000
commit9e2a78564f0fc07f1ea3d15a31fa7ca3a0f6424d (patch)
tree03387739672584357b7038b67e998d8824de5d01 /src/vnet/devices/tap/cli.c
parent00dd39044e64b4a7a33d204ef7d19aac819d71f5 (diff)
tap: add gro support
Type: feature Change-Id: I5868dd267aa26aa97aec5fd70e70c5956ac52277 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/tap/cli.c')
-rw-r--r--src/vnet/devices/tap/cli.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index 34897ea7c5d..fa5fa91e7a6 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -201,7 +201,7 @@ tap_offload_command_fn (vlib_main_t * vm, unformat_input_t * input,
unformat_input_t _line_input, *line_input = &_line_input;
u32 sw_if_index = ~0;
vnet_main_t *vnm = vnet_get_main ();
- int gso_enable = 0, gso_disable = 0;
+ int gso_enable = 0, gso_disable = 0, is_gro_coalesce = 0;
int csum_offload_enable = 0, csum_offload_disable = 0;
int rv = 0;
@@ -217,7 +217,11 @@ tap_offload_command_fn (vlib_main_t * vm, unformat_input_t * input,
vnm, &sw_if_index))
;
else if (unformat (line_input, "gso-enable"))
- gso_enable = 1;
+ {
+ gso_enable = 1;
+ if (unformat (line_input, "gro-coalesce"))
+ is_gro_coalesce = 1;
+ }
else if (unformat (line_input, "gso-disable"))
gso_disable = 1;
else if (unformat (line_input, "csum-offload-enable"))
@@ -235,11 +239,11 @@ tap_offload_command_fn (vlib_main_t * vm, unformat_input_t * input,
"please specify interface name or sw_if_index");
if (gso_enable)
- rv = tap_gso_enable_disable (vm, sw_if_index, 1);
+ rv = tap_gso_enable_disable (vm, sw_if_index, 1, is_gro_coalesce);
else if (csum_offload_enable)
rv = tap_csum_offload_enable_disable (vm, sw_if_index, 1);
else if (gso_disable)
- rv = tap_gso_enable_disable (vm, sw_if_index, 0);
+ rv = tap_gso_enable_disable (vm, sw_if_index, 0, 0);
else if (csum_offload_disable)
rv = tap_csum_offload_enable_disable (vm, sw_if_index, 0);
@@ -256,7 +260,8 @@ VLIB_CLI_COMMAND (tap_offload_command, static) =
{
.path = "set tap offload",
.short_help = "set tap offload {<interface> | sw_if_index <sw_idx>}"
- " <gso-enable | gso-disable | csum-offload-enable | csum-offload-disable>",
+ " <gso-enable [gro-coalesce] | gso-disable | csum-offload-enable |"
+ "csum-offload-disable>",
.function = tap_offload_command_fn,
};
/* *INDENT-ON* */