History log of /vpp/src/plugins/vmxnet3/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
78565f38 06-Jan-2020 Steven Luong <sluong@cisco.com>

vmxnet3: add FEATURE.yaml

Type: docs

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I8b0432a3a384dc2431fcb0b4e7c3f0cfb1713d8e

277f03f0 06-Dec-2019 Ole Troan <ot@cisco.com>

vmxnet3: use explicit types in api

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I2e699fc812c45f88e359f0f7231f372955e70149

3f5594d8 03-Dec-2019 Mohsin Kazmi <sykazmi@cisco.com>

gso: remove the interface count

Type: refactor

Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>

4354317b 21-Oct-2019 Benoît Ganne <bganne@cisco.com>

vlib: only dump 1st buffer in chain by default

Several nodes include buffers in their traces, but only the 1st. When
formatting the trace we must not try to iterate through all chained
Default to display only the 1st buffer.

Type: fix

Change-Id: Ib3c668bbf4ab70ae68eba2ac402c7b7329825b70
Signed-off-by: Benoît Ganne <bganne@cisco.com>

10bbfce0 30-Sep-2019 Ole Troan <ot@cisco.com>

vmxnet3: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I009e806997461ad790f125d6359993862e1c5e5d

7ca5aaac 24-Sep-2019 Damjan Marion <damarion@cisco.com>

vlib: add flag to explicitelly mark nodes which can init per-node packet trace

Type: feature

Change-Id: I913f08383ee1c24d610c3d2aac07cef402570e2c
Signed-off-by: Damjan Marion <damarion@cisco.com>

ddf625d6 30-Aug-2019 Steven Luong <sluong@cisco.com>

vmxnet3: interface rx counter not increment correctly

vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using
hw_if_index may work as long as there is no subinterface created to cause
hw_if_index and sw_if_index to differ.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: If50412dc1e84c4f1f5b977b58d0e1aeb5ab8ebe6

2985e0af 29-Aug-2019 Steven Luong <sluong@cisco.com>

vmxnet3: per interface gso support

gso option for vmxnet3 is per VPP process currently. There is no reason why
we cannot provide per interface gso support.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ife962b52221191050dedd18252b859880ccd7599

e7174829 07-Aug-2019 Paul Vinciguerra <pvinci@vinciconsulting.com>

vppapigen: remove support for legacy typedefs

vppapigen has remapped legacy to typedefs behind the scenes
for some time now.

- update .api files to use new style typedefs.
- issue error on 'typeonly define' in .api files
- remove unneeded macros redefining vl_noop_handler

Type: refactor

Change-Id: I7a8c4a6dafacee6a131f95cd0e9b03a8c60dea8b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>

678d64d0 02-Aug-2019 Steven Luong <sluong@cisco.com>

vmxnet3: don't bypass ethernet_input

Queue everything to ethernet_input to not break pcap rx trace.
Fix a minor typo in vmxnet3_api.c

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I7df7b3e20b525e3d6f7421c8e213b6541cdd15b6

3940de36 23-Jul-2019 Dave Barach <dave@barachs.net>

api: binary api cleanup

Multiple API message handlers call vnet_get_sup_hw_interface(...)
without checking the inbound sw_if_index. This can cause a
pool_elt_at_index ASSERT in a debug image, and major disorder in a
production image.

Given that a number of places are coded as follows, add an
"api_visible_or_null" variant of vnet_get_sup_hw_interface, which
returns NULL given an invalid sw_if_index, or a hidden sw interface:

- 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 || memif_device_class.index != hw->dev_class_index)
return clib_error_return (0, "not a memif interface");

Rename two existing xxx_safe functions -> xxx_or_null to make it
obvious what they return.

Type: fix

Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697
Signed-off-by: Dave Barach <dave@barachs.net>

21a43846 09-Jul-2019 Dave Barach <dave@barachs.net>

vat: unload unused vat plugins

If the corresponding vpp plugin is absent, return a non-zero
clib_error_t * from vat_plugin_register ("xxx plugin not loaded"). The
vat plugin calls dlclose on the vat plugin, and it disappears.

Depending on the plugin configuration, this can reduce the vpp virtual
size by several gigabytes.

Added a VAT_PLUGIN(<plugin-name>) macro to vat_helper_macros, clean up
boilerplate vat_plugin_register() implementations. Fixed a number of
non-standard vat_plugin_register methods.

Type: refactor

Change-Id: Iac908e5af7d5497c78d6aa9c3c51cdae08374045
Signed-off-by: Dave Barach <dave@barachs.net>

4201e96c 26-Jun-2019 Steven Luong <sluong@cisco.com>

vmxnet3: custom dump and debug cli fix

Add missing custom dump for vmxnet3_create, vmxnet3_delete, and

Fix vmxnet3_create debug cli which may not parse all parameters
correctly due to passing address of u16 to unformat(). The fix is
to use a u32 local variable to receive the correct value from

Type: fix

Change-Id: I04251c9ed0ab397ed4b1b5843a73880aec98b9f6
Signed-off-by: Steven Luong <sluong@cisco.com>

5a5c036c 16-May-2019 Steven Luong <sluong@cisco.com>

vmxnet3: gso_l4_hdr_sz is not set correctly

vnet_buffer2 -> gso_l4_hdr_sz is not set correctly because
vnet_buffer->l4_hdr_offset is not set yet at the top. Move the code to set
vnet_buffer->gso_l4_hdr_sz further down.

Change-Id: I0110e4687572bb93cb593d7d4d14a3d5083af13a
Signed-off-by: Steven Luong <sluong@cisco.com>

1d1985de 23-Apr-2019 Dave Wallace <dwallacelf@gmail.com>

plugins: clean up plugin descriptions

- Make plugin descriptions more consistent
so the output of "show plugin" can be
used in the wiki.

Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>

51cbbd22 17-Apr-2019 Dave Wallace <dwallacelf@gmail.com>

Doxygen cleanup.

- Add subpages definitions in appropriate
section (User or Dev docs) for doc files
(*.rst, *.md) that being listed at the top
level of the generated doc page.
- Generate and add API list to RELEASE doc.
- Fix list_api_changes script to use HEAD
as the endtag so it doesn't need to be
changed every release.

Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 11ee93f6abfaddf5bbd56cf0858c0c6ea0384b65)

ee8ba687 14-Mar-2019 Steven Luong <sluong@cisco.com>

vmxnet3: auto bind support

For creating the vmxnet3 interface, add the bind option to automatically bind
the pci to vfio-pci module which removes the need for manual bind. Manual bind
still works, should people prefer to go that route.

Change-Id: Ife75926f8755d754a08dd0ecff0f1de326ad5ba1
Signed-off-by: Steven Luong <sluong@cisco.com>

854559d1 27-Feb-2019 Steven Luong <sluong@cisco.com>

vmxnet3: RSS support

Configurable up to 16 RX queues per interface. Default is 1.

Change-Id: If9e2beffeb7e7dc8c2264b4db902132b2fea02c1
Signed-off-by: Steven Luong <sluong@cisco.com>

dd373728 25-Feb-2019 Steven Luong <sluong@cisco.com>

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>

8934a045 09-Feb-2019 Damjan Marion <damarion@cisco.com>

buffers: fix typo

Change-Id: I4e836244409c98739a13092ee252542a2c5fe259
Signed-off-by: Damjan Marion <damarion@cisco.com>

5de3fec5 06-Feb-2019 Damjan Marion <damarion@cisco.com>

buffers: make buffer data size configurable from startup config


buffers {
default data-size 1536

Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660
Signed-off-by: Damjan Marion <damarion@cisco.com>

77329116 29-Jan-2019 Steven Luong <sluong@cisco.com>

vmxnet3: multiple TX queues support

Add num-tx-queues to the vmxnet3 create CLI/API. Default is 1. Max is
min (8, the number of cores assigned to VPP).

Change-Id: I7e0a659a82d01c719665c228dd8a71e3288a2895
Signed-off-by: Steven Luong <sluong@cisco.com>

31fe7aa3 15-Jan-2019 Steven <sluong@cisco.com>

vmxnet3: add numa support and link speed

Allocate physmem on the same numa
set link speed
cap vmxnet3 support version to 3 if the device supports higher version

Change-Id: Id47dd83b0da53e623fd6cf3ad010e58158b1ab15
Signed-off-by: Steven <sluong@cisco.com>

7bb27caf 13-Dec-2018 Steven <sluong@cisco.com>

vmxnet3: support clear hardware interface counters

Add clear hardware interface counters callback for vmxnet3 device. We take a
snap shot of the statistics in the callback. For the show hardware command,
we display the delta between the current statistics and the last snapshot.

Change-Id: Ie1389d2141f519300f427fe6ff2fdf97fd9e9378
Signed-off-by: Steven <sluong@cisco.com>

a3d5986a 10-Nov-2018 Damjan Marion <dmarion@me.com>

vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)

Typically we have scalar_size == 0, so it doesn't matter
but vlib_frame_args was providing pointer to scalar frame
data, not vector data. To avoid future confusion function
is renamed to vlib_frame_scalar_args(...)

Change-Id: I48b75523b46d487feea24f3f3cb10c528dde516f
Signed-off-by: Damjan Marion <damarion@cisco.com>

005e4d50 02-Nov-2018 Steven <sluong@cisco.com>

vmxnet3: reduce calling vmxnet3_reg_write_inline

In output.c, we buffer the descriptors and call vmxnet3_reg_write_inline
once outside the loop. This change improves the performance dramatically.

When refilling the ring, there is no need to inform the device unless
explicitly specified by the device (ctrl.update_prod == 1)

Change-Id: I7031d58bff0d249e913d14236d416c91eb6ab94a
Signed-off-by: Steven <sluong@cisco.com>

f9dafebc 27-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: add logging support to the control plane [VPP-1470]

There are different flavors of vmxnet3 device, esxi server, vm fusion, vmware
workstation, and vmware player, that we need to communicate with. Each of
them also has different versions. We really need the control plane logging
to debug when things don't work as expected.

Change-Id: I53c23cf10958bfbc06abb1c252d368003563cd04
Signed-off-by: Steven <sluong@cisco.com>

eb111905 25-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: enable promiscuous mode

Some L2 traffic requires promiscuous mode enable on the interface

Change-Id: Icbb2792aaf0d9d1c51373e46ae5049ff0d986863
Signed-off-by: Steven <sluong@cisco.com>

68b4da67 30-Sep-2018 Damjan Marion <damarion@cisco.com>

Numa-aware, growable physical memory allocator (pmalloc)

Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30
Signed-off-by: Damjan Marion <damarion@cisco.com>

b7b92993 17-Oct-2018 Dave Barach <dave@barachs.net>

c11 safe string handling support

Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>

2322798b 22-Oct-2018 Damjan Marion <damarion@cisco.com>

vlib: pci improvements

- logging
- pass vlib_main_t to all APIs
- open vfio container only when needed

Change-Id: I897e53e0af3f91c3a99f0c827401d1c0ec2e478a
Signed-off-by: Damjan Marion <damarion@cisco.com>

8f49936b 22-Oct-2018 Damjan Marion <damarion@cisco.com>

vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlines

Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d
Signed-off-by: Damjan Marion <damarion@cisco.com>

02a95ce8 12-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: show vmxnet3 with filtering capability [VPP-1452]

show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each
table may have 1000 entries. It would not be very useful to debug problem.

We need filtering capability for the subject show command. We need to be able
to display the descriptor table per interface, per interface per table, and
per interface per table per slot. The latter is the most useful.

tested the following valid combinations
show vmxnet3
show vmxnet3 desc
show vmxnet3 vmxnet3-0/13/0/0
show vmxnet3 vmxnet3-0/13/0/0 desc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 tx-comp
show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1
show vmxnet3 vmxnet3-0/13/0/0 tx-desc
show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1

negative tests and command is rejected
show vmxnet3 abc
show vmxnet3 desc abc
show vmxnet3 vmxnet3-0/13/0/0 abc
show vmxnet3 vmxnet3-0/13/0/0 desc abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc

Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb
Signed-off-by: Steven <sluong@cisco.com>

b78d6a0b 15-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr [VPP-1456]

When using vpp_api_test, there is an undefined symbol error for
format_vlib_pci_addr when vmxnet3_test_plugin.so is loaded.

The cause is due to vlib not included in vpp_api_test. Remove the reference
for vlib.so in vmxnet3_test.

Change-Id: I37c00dfe2f843d99ad6c4fc7af6ed10bac4c2df8
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 3d29e83112a349b7d27ef792463f246b18115d3e)

8b099536 10-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: better error handling

try harder on output - if there is no descriptor space available, try to free
up some and check again.
make sure we free the buffer if error is encoutered on input.

Change-Id: I41a45213e29de71935afe707889e515037cd081f
Signed-off-by: Steven <sluong@cisco.com>

744da656 03-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: coverity woe

Coverity complains that hb might be null when !prev_b0 is true. It may be right, but not likely.
To make the code more explicit when it parses a complete packet, set got_packet = 1 and test
got_packet instead of prev_b0 which is somewhat obscure.

Use vlib_buffer_free_one rather than vlib_buffer_free_no_next in output.c which takes care of
chain buffers.

Change-Id: I6e0587605fdc622c3f55fedd74c474666631ed91
Signed-off-by: Steven <sluong@cisco.com>

3c6015b0 02-Oct-2018 Steven <sluong@cisco.com>

vmxnet3: error handling

outbound -- if we have to drop the packet due to no descriptor space is available, drop the
whole packet, not fragments.
inbound -- check and drop error packets

Change-Id: Ida1d32e61521bafd67f714d729ad53cd7c487dc6
Signed-off-by: Steven <sluong@cisco.com>

0296efdf 26-Sep-2018 Steven <sluong@cisco.com>

vmxnet3: delete interface causes a crash

Need to free the buffers starting from ring->consume+1, not ring->consume
Make use of the cool API vlib_buffer_free_from_ring
Fix a memory leak in vmxnet3_txq_init

Change-Id: I0a539ea75211408d84ce433d97a0a0aec5a9618d
Signed-off-by: Steven <sluong@cisco.com>

8812a680 24-Sep-2018 Steven <sluong@cisco.com>

vmxnet3: guard against array overflow

Under extreme condition, it is possible for input node to have more than 256 packets available
to process. Add a check to the while loop to prevent overrun buffer_indices and nexts.

Change-Id: Id9830e5c254f04216eb79e864a5460e08cf2e4e5
Signed-off-by: Steven <sluong@cisco.com>

b7020d66 21-Sep-2018 Steven <sluong@cisco.com>

vmxnet3: Add hardware link status handling

Added an interrupt line for monitoring and notifying hardware link status
Displayed additional information for show hardware for vmxnet3 interface
Fixed possible garbage display on interface name for show vmxnet3

Change-Id: If457bfe7c216287fb3a4e2630f00434d595f387b
Signed-off-by: Steven <sluong@cisco.com>

6e06d667 19-Sep-2018 Steven <sluong@cisco.com>

vmxnet3: invoke vlib_buffer_enqueue_to_next() with the wrong buffers for chain buffers

If we invoke the subject API with 2 buffers, each with 2 chains, the content of
buffers[0] should be head of 1st buffer, and content of buffer[1] should be
head of 2nd buffer.

What the code did was to put
buffers[0] = head of 1st buffer
buffers[1] = next chain of 1st buffer
buffers[2] = head of 2nd buffer
buffers[3] = next chain of 2nd buffer

This is wrong and can cause crash.

The fix is to only increment bi when the entire packet is found which may consist
of multiple fragments.

Change-Id: If02cd5186a039d7a6c08a0959112840bdb242317
Signed-off-by: Steven <sluong@cisco.com>

33e6583e 18-Sep-2018 Steven <sluong@cisco.com>

vmxnet3: add support for "non-default" next node

Support feature arc
Support set interface next node
Enqueue packet to either ip4, ip6, or ethernet_input based on packet type

Change-Id: I11fb6bba98ee0bfa1d057474fc6cf3be48ef1c48
Signed-off-by: Steven <sluong@cisco.com>

b023d59d 16-Sep-2018 Florin Coras <fcoras@cisco.com>

vmxnet3: fix clang initialization error

Change-Id: I2958bd3bdec98d3e380a8ff8f970563020e28afd
Signed-off-by: Florin Coras <fcoras@cisco.com>

df7f8e8c 18-Mar-2018 Steven Luong <sluong@cisco.com>

vmxnet3 device driver

Implemented vmxnet3 deivice driver for VMWare ESXi. Tested with Ubuntu 18.04
connected to ESXi 6.0

Ubuntu-18.04 (VPP) --- ESXi-6.0

Change-Id: I85fbc86f2d8532b017bc4271612d17e24e498e4d
Signed-off-by: Steven Luong <sluong@cisco.com>