vmxnet3: import new vmxnet3 poll mode driver implementation
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 10 Feb 2014 15:27:26 +0000 (15:27 +0000)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 09:22:32 +0000 (10:22 +0100)
commitdfaff37fc46d6ef1700c44f03f38bf7dd24347e4
treecb47dea28a9974698dcdc5bfd2927a74b340c7ea
parentd0c5ae3392802112b6167197dca7757f0c6a83da
vmxnet3: import new vmxnet3 poll mode driver implementation

Poll Mode Driver for Paravirtual VMXNET3 NIC.
As a PMD, the VMXNET3 driver provides the packet reception and transmission
callbacks, vmxnet3_recv_pkts and vmxnet3_xmit_pkts. It does not support
scattered packet reception as part of vmxnet3_recv_pkts and
vmxnet3_xmit_pkts. Also, it does not support scattered packet reception as part of
the device operations supported.

The VMXNET3 PMD handles all the packet buffer memory allocation and resides in
guest address space and it is solely responsible to free that memory when not needed.
The packet buffers and features to be supported are made available to hypervisor via
VMXNET3 PCI configuration space BARs. During RX/TX, the packet buffers are
exchanged by their GPAs, and the hypervisor loads the buffers with packets in the RX
case and sends packets to vSwitch in the TX case.

The VMXNET3 PMD is compiled with vmxnet3 device headers. The interface is similar
to that of the other PMDs available in the Intel(R) DPDK API. The driver pre-allocates the
packet buffers and loads the command ring descriptors in advance. The hypervisor fills
those packet buffers on packet arrival and write completion ring descriptors, which are
eventually pulled by the PMD. After reception, the Intel(R) DPDK application frees the
descriptors and loads new packet buffers for the coming packets. The interrupts are
disabled and there is no notification required. This keeps performance up on the RX
side, even though the device provides a notification feature.

In the transmit routine, the Intel(R) DPDK application fills packet buffer pointers in the
descriptors of the command ring and notifies the hypervisor. In response the hypervisor
takes packets and passes them to the vSwitch. It writes into the completion descriptors
ring. The rings are read by the PMD in the next transmit routine call and the buffers
and descriptors are freed from memory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
20 files changed:
config/defconfig_i686-default-linuxapp-gcc
config/defconfig_i686-default-linuxapp-icc
config/defconfig_x86_64-default-linuxapp-gcc
config/defconfig_x86_64-default-linuxapp-icc
lib/Makefile
lib/librte_ether/rte_ethdev.h
lib/librte_pmd_vmxnet3/Makefile [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/README [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/includeCheck.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/upt1_defs.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_begin.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_end.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_defs.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_osdep.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3_ethdev.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3_logs.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3_ring.h [new file with mode: 0644]
lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c [new file with mode: 0644]
mk/rte.app.mk