summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3/cli.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2019-02-25 12:10:53 -0800
committerDamjan Marion <dmarion@me.com>2019-02-26 11:30:42 +0000
commitdd3737284d5021e2e3bd0413b61aab14797e365c (patch)
tree4c538ed6e44118102b9f2af9a2de5697e4d2a3d9 /src/plugins/vmxnet3/cli.c
parent5ecd5a5d159332a964dd840fcdabe5f8d3111b0e (diff)
vmxnet3: lro/tso and rx checksum
Add lro/tso and rx checksum support. lro/tso is configured via startup.conf vmxnet3 { lro } It is disable by default due to not all versions of ESXi supports it. Change-Id: Icf224ff528884ecd9e655b4fcf4481194e8c5a63 Signed-off-by: Steven Luong <sluong@cisco.com>
Diffstat (limited to 'src/plugins/vmxnet3/cli.c')
-rw-r--r--src/plugins/vmxnet3/cli.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c
index e110a479988..571c3dbd042 100644
--- a/src/plugins/vmxnet3/cli.c
+++ b/src/plugins/vmxnet3/cli.c
@@ -205,6 +205,7 @@ 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]);
@@ -213,6 +214,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, " PCI Address: %U", format_vlib_pci_addr,
&vd->pci_addr);
vlib_cli_output (vm, " Mac Address: %U", format_ethernet_address,
@@ -580,6 +582,26 @@ 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
*