X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdevices%2Ftap%2Fcli.c;h=7580d9200616e91a54d09d1d902ff7f890d8a178;hb=a7a2281732b926df139b0fd946a084299d813654;hp=40086a588aa1c0f9e8a352709cc1727c6e0fe221;hpb=206acf84d6a04590e385f427edba1094c3bdf195;p=vpp.git diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c index 40086a588aa..7580d920061 100644 --- a/src/vnet/devices/tap/cli.c +++ b/src/vnet/devices/tap/cli.c @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include @@ -90,6 +88,8 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.tap_flags &= ~TAP_FLAG_GSO; else if (unformat (line_input, "gso")) args.tap_flags |= TAP_FLAG_GSO; + else if (unformat (line_input, "gro-coalesce")) + args.tap_flags |= TAP_FLAG_GRO_COALESCE; else if (unformat (line_input, "csum-offload")) args.tap_flags |= TAP_FLAG_CSUM_OFFLOAD; else if (unformat (line_input, "persist")) @@ -98,6 +98,10 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.tap_flags |= TAP_FLAG_ATTACH; else if (unformat (line_input, "tun")) args.tap_flags |= TAP_FLAG_TUN; + else if (unformat (line_input, "packed")) + args.tap_flags |= TAP_FLAG_PACKED; + else if (unformat (line_input, "in-order")) + args.tap_flags |= TAP_FLAG_IN_ORDER; else if (unformat (line_input, "hw-addr %U", unformat_ethernet_address, args.mac_addr.bytes)) args.mac_addr_set = 1; @@ -133,12 +137,13 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, VLIB_CLI_COMMAND (tap_create_command, static) = { .path = "create tap", .short_help = "create tap {id } [hw-addr ] " - "[rx-ring-size ] [tx-ring-size ] [host-ns ] " - "[host-bridge ] [host-ip4-addr ] " - "[host-ip6-addr ] [host-ip4-gw ] " - "[host-ip6-gw ] [host-mac-addr ] " - "[host-if-name ] [host-mtu-size ] [no-gso|gso|csum-offload] " - "[persist] [attach] [tun]", + "[num-rx-queues ] [rx-ring-size ] [tx-ring-size ] " + "[host-ns ] [host-bridge ] " + "[host-ip4-addr ] [host-ip6-addr ] " + "[host-ip4-gw ] [host-ip6-gw ] " + "[host-mac-addr ] [host-if-name ] " + "[host-mtu-size ] [no-gso|gso|csum-offload|gro-coalesce] " + "[persist] [attach] [tun] [packed] [in-order]", .function = tap_create_command_fn, }; /* *INDENT-ON* */ @@ -198,7 +203,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; @@ -214,7 +219,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")) @@ -232,11 +241,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); @@ -253,7 +262,8 @@ VLIB_CLI_COMMAND (tap_offload_command, static) = { .path = "set tap offload", .short_help = "set tap offload { | sw_if_index }" - " ", + " ", .function = tap_offload_command_fn, }; /* *INDENT-ON* */