X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fvmxnet3%2Fcli.c;h=fd97c36aee2e089ac2aa047d2d9084ce03b9e5a1;hb=2985e0af6;hp=76db1cab7ed16f0d43e9799a1f884e9a5066a2ec;hpb=4201e96cbc80525b2a42295b1ab43967f844160f;p=vpp.git diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c index 76db1cab7ed..fd97c36aee2 100644 --- a/src/plugins/vmxnet3/cli.c +++ b/src/plugins/vmxnet3/cli.c @@ -43,6 +43,8 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input, { if (unformat (line_input, "%U", unformat_vlib_pci_addr, &args.addr)) ; + else if (unformat (line_input, "gso")) + args.enable_gso = 1; else if (unformat (line_input, "elog")) args.enable_elog = 1; else if (unformat (line_input, "bind")) @@ -71,8 +73,9 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input, VLIB_CLI_COMMAND (vmxnet3_create_command, static) = { .path = "create interface vmxnet3", .short_help = "create interface vmxnet3 " - "[rx-queue-size ] [tx-queue-size ]" - "[num-tx-queues ] [num-rx-queues ] [bind]", + " [rx-queue-size ] [tx-queue-size ]" + " [num-tx-queues ] [num-rx-queues ] [bind]" + " [gso]", .function = vmxnet3_create_command_fn, }; /* *INDENT-ON* */ @@ -109,7 +112,7 @@ vmxnet3_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return clib_error_return (0, "please specify interface name or sw_if_index"); - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || vmxnet3_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a vmxnet3 interface"); @@ -166,7 +169,7 @@ vmxnet3_test_command_fn (vlib_main_t * vm, unformat_input_t * input, return clib_error_return (0, "please specify interface name or sw_if_index"); - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || vmxnet3_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a vmxnet3 interface"); @@ -210,7 +213,6 @@ show_vmxnet3 (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, if (!hw_if_indices) return; - vlib_cli_output (vm, "LRO/TSO configured: %u", vmxm->lro_configured); for (i = 0; i < vec_len (hw_if_indices); i++) { hi = vnet_get_hw_interface (vnm, hw_if_indices[i]); @@ -219,7 +221,7 @@ show_vmxnet3 (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, format_vnet_hw_if_index_name, vnm, hw_if_indices[i], hw_if_indices[i]); vlib_cli_output (vm, " Version: %u", vd->version); - vlib_cli_output (vm, " LRO/TSO enable: %u", vd->lro_enable); + vlib_cli_output (vm, " GSO enable: %u", vd->gso_enable); vlib_cli_output (vm, " PCI Address: %U", format_vlib_pci_addr, &vd->pci_addr); vlib_cli_output (vm, " Mac Address: %U", format_ethernet_address, @@ -587,26 +589,6 @@ vmxnet3_cli_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (vmxnet3_cli_init); -static clib_error_t * -vmxnet3_config (vlib_main_t * vm, unformat_input_t * input) -{ - vmxnet3_main_t *vmxm = &vmxnet3_main; - - while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) - { - if (unformat (input, "lro")) - vmxm->lro_configured = 1; - else - return clib_error_return (0, "unknown input `%U'", - format_unformat_error, input); - } - - return 0; -} - -/* vmxnet3 { ... } configuration. */ -VLIB_CONFIG_FUNCTION (vmxnet3_config, "vmxnet3"); - /* * fd.io coding-style-patch-verification: ON *