diff options
Diffstat (limited to 'src/plugins/vmxnet3')
-rw-r--r-- | src/plugins/vmxnet3/cli.c | 3 | ||||
-rw-r--r-- | src/plugins/vmxnet3/vmxnet3.c | 17 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c index fd97c36aee2..ad66e768ad3 100644 --- a/src/plugins/vmxnet3/cli.c +++ b/src/plugins/vmxnet3/cli.c @@ -65,6 +65,9 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input, vmxnet3_create_if (vm, &args); + if (args.error == 0) + vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name, + vnet_get_main (), args.sw_if_index); return args.error; } diff --git a/src/plugins/vmxnet3/vmxnet3.c b/src/plugins/vmxnet3/vmxnet3.c index 43e5b58cc4c..731a34a99e1 100644 --- a/src/plugins/vmxnet3/vmxnet3.c +++ b/src/plugins/vmxnet3/vmxnet3.c @@ -452,9 +452,18 @@ vmxnet3_device_init (vlib_main_t * vm, vmxnet3_device_t * vd, } /* GSO is only supported for version >= 3 */ - if (args->enable_gso && (vd->version >= 3)) + if (args->enable_gso) { - vd->gso_enable = 1; + if (vd->version >= 3) + vd->gso_enable = 1; + else + { + error = + clib_error_return (0, + "GSO is not supported because hardware version" + " is %u. It must be >= 3", vd->version); + return error; + } } vmxnet3_reg_write (vd, 1, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK); @@ -741,6 +750,10 @@ vmxnet3_create_if (vlib_main_t * vm, vmxnet3_create_if_args_t * args) vmxnet3_log_error (vd, "No sufficient interrupt lines (%u) for rx queues", num_intr); + error = + clib_error_return (0, + "No sufficient interrupt lines (%u) for rx queues", + num_intr); goto error; } if ((error = vlib_pci_register_msix_handler (vm, h, 0, vd->num_rx_queues, |