Commit Graph

451 Commits

Author SHA1 Message Date
Bruce Richardson
dfaff37fc4 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>
2014-02-26 10:22:32 +01:00
Bruce Richardson
d0c5ae3392 pci: add pci ids for vmxnet3 devices
pci ids for vmxnet3 devices added.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00
Bruce Richardson
b9ee370557 kni: update kernel driver ethtool baseline
Update the KNI kernel driver so it can compile on more modern kernels
Also, rebaseline the ethtool support off updated igb kernel drivers
so that we get the latest bug fixes and device support.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00
Bruce Richardson
e01d69d51c kni: fix packet loss in loopback mode
kni_net fixed to prevent losing packet bytes when doing loopback.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reported-by: Daniel Kaminsky <daniel.kaminsky@infinitelocality.com>
2014-02-26 10:22:12 +01:00
Bruce Richardson
9c495f7f18 kni: add kni close function
KNI close function added.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
47bd46112b xen: import xenvirt pmd and vhost_xen
This provides a para-virtualization packet switching solution, based on the
Xen hypervisor’s Grant Table, which provides simple and fast packet
switching capability between guest domains and host domain based on
MAC address or VLAN tag.

This solution is comprised of two components; a Poll Mode Driver (PMD)
as the front end in the guest domain and a switching back end in the
host domain.  XenStore is used to exchange configure information
between the PMD front end and switching back end,
including grant reference IDs for shared Virtio RX/TX rings, MAC
address, device state, and so on.

The front end PMD can be found in the Intel DPDK directory lib/
librte_pmd_xenvirt and back end example in examples/vhost_xen.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
148f963fb5 xen: core library changes
Core support for using the Intel DPDK with Xen Dom0 - including EAL
changes and mempool changes. These changes encompass how memory mapping
is done, including support for initializing a memory pool inside an
already-allocated block of memory.
KNI sample app updated to use KNI close function when used with Xen.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
40b966a211 ivshmem: library changes for mmaping using ivshmem
These library changes provide a new Intel DPDK feature for communicating
with virtual machines using QEMU's IVSHMEM mechanism.

The feature works by providing a command line for QEMU to map several hugepages
into a single IVSHMEM device. For the guest to know what is inside any given IVSHMEM
device (and to distinguish between Intel(R) DPDK and non-Intel(R) DPDK IVSHMEM
devices), a metadata file is also mapped into the IVSHMEM segment. No work needs to
be done by the guest application to map IVSHMEM devices into memory; they are
automatically recognized by the Intel(R) DPDK Environment Abstraction Layer (EAL).

Changes in this patch:
* Changes to EAL to allow mapping of all hugepages in a memseg into a single file
* Changes to EAL to allow ivshmem devices to be transparently mapped in
  the process running on the guest.
* New ivshmem library to create and manage metadata exported to guest VM's
* New ivshmem compilation targets
* Mempool and ring changes to allow export of structures to a VM and allow
  a VM to attach to those structures.
* New autotests to unit tests this functionality.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
013615a784 mem: add bounded reserve function
For certain functionality, e.g. Xen Dom0 support, it is required that
we can guarantee that memzones for descriptor rings won't cross 2M
boundaries. So add new memzone reserve function where we can pass in a
boundary condition parameter.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:19 +01:00
Pei Chao
e0317809cd mem: remove duplicated lines
Extra space for future alignment was reserved twice.
It was introduced in version 1.3.0 (commit 916e4f4f4e).

Signed-off-by: Pei Chao <peichao85@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-25 21:29:19 +01:00
Thomas Monjalon
f622f3848f mem: fix log for --no-huge
In some cases, it is possible to not use hugepages.
So a simple malloc is used to initialize DPDK memory.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Damien Millescamps <damien.millescamps@6wind.com>
2014-02-25 21:29:19 +01:00
Bruce Richardson
8ea9ff834f mem: allow virtual memory address hinting
For multi-process applications, it can sometimes occur that part of the
address ranges used for memory mapping in the primary process are not
free in the secondary process, which causes the secondary processes to
abort on startup.
This patch adds in a memory hinting mechanism, where you can hint a
starting base address to the primary process for where you would like
the hugepage memory to be mapped. It is just a hint, so the memory will
not always go exactly where requested, but it should allow the memory
addresses used by a primary process to be adjusted up or down a little,
thereby fixing issues with secondary process startup.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
48a0cc25f1 mbuf: rework check on mbuf freeing
Allow poll-mode drivers to maintain their own caches of mbufs, by allowing them
to check if it's ok to free an mbuf (to their local cache) without actually
freeing it back to the memory pool itself.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
657eabecd8 sched: use common macro RTE_DIM
Replace local DIM() macro with RTE_DIM in rte_red.c

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
c788bdb1a5 timer: missing optimization flag in compile
Timer library was missing the -O3 compile-time flag. This has been
added.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
cac5abc265 eal: fix printf format
Fix some format indicators in printf.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
5e8446dc6b eal: cleanup on mempool and memzone object names
Cleanup mempool and memzone object names so that we can more easily rename them
from headers.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
896c37c5af eal: fix build with some gcc 4.4 toolchains
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
88f93f9340 eal: fix typo for RTE_EAL_ALLOW_INV_SOCKET_ID
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
ae9ba5bb6d eal: fix support for older gcc versions
older versions of gcc don't support the cold attribute so make its
presence conditional.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
16a6a44761 eal: fix cpuflags for latest microarch
Ensure that support for AVX2, HLE and RTM works with cpuflags.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
a3fd610463 eal: new common macros added
Added the following new macros/inline functions, which are both
generally useful and needed for later functionality:
* rte_align64pow2: aligns a 64bit parameter to next power of 2
* RTE_LEN2MASK: create mask of type <tp> with the first <ln> bits
* RTE_DIM: return the number of elements in an array.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
6f5f8ecce1 eal: add rte_compiler_barrier() macro
The rte_ring functions used a compiler barrier to stop the compiler
reordering certain expressions. This is generally useful so is moved
to the common header file with the other barriers.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
e49680a87e mk: compilation fixes
Missing _GNU_SOURCE define for compilation of a number of files.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
df24042233 mk: add haswell target
Add support for haswell based systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
5e0c946a27 mk: rework cpu flags detection
For cases where the compilation microarchitecture is explicitly given, we
extract the cpu-flags to use from the compiler rather than hard-coding. This
means that we will only ever use instruction sets supported by the compiler,
rather than having a case where the uarch and the Intel DPDK both support a
given instruction-set, but the compiler does not.
In the case where 'native' uarch support is requested, the same mechanism is
also used to detect the instruction-sets supported

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
cb05bb4d33 config: remove deprecated opt for unbinding ports
Remove the unbind ports option from the config files as this
has been deprecated since 1.4 release.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Thomas Monjalon
173fca9078 config: fix combined/shared lib
- Configuration for combined and shared library was only in the template
defconfig_x86_64-default-linuxapp-gcc.
- CONFIG_RTE_LIBNAME was in the wrong section
- RTE_LIBNAME had no quote in "C context" (include/rte_config.h)
- and then CONFIG_RTE_LIBNAME quotes were not properly removed in "make context"

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
764bf26873 add FreeBSD support
Changes to allow compilation and use on FreeBSD. Includes:
* contigmem and nic_uio driver for FreeBSD
* new EAL instance
* new "bsdapp" compilation target
* various compilation fixes due to differences between linux and freebsd

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:18 +01:00
Bruce Richardson
e9d48c0072 update Intel copyright years to 2014
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:14 +01:00
Intel
4f85a5697e version: 1.5.2
Signed-off-by: Intel
2014-01-15 16:40:47 +01:00
Intel
466e137457 lpm: fix sub-rule deletion
Restore group validation flag of the tbl8 entry
if sub-rule is replaced by an encompassing rule.

Signed-off-by: Intel
2014-01-15 16:37:43 +01:00
Richardson, Bruce
6eb0ae218a pcap: fix mbuf allocation
A static list of 64 mbufs was being reused in Rx function.
This caused two errors:
1) If more than 64 buffers were requested in a single burst,
   only the last 64 buffers are returned, the others are lost.
2) Application will free the mbuf being returned, but the receive
   function will reuse the buffer anyway. If some other allocation
   is done, there is suddenly multiple writers for the same mbuf.
It is fixed by allocating mbuf on demand.

In the same time, some length errors are fixed.

Reported-by: Mats Liljegren <mats.liljegren@enea.com>
Reported-by: Robert Sanford <rsanford@prolexic.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-01-15 15:55:05 +01:00
Intel
5a6d9897f9 ixgbe: residual fix about resetting big Tx queues
Index overflow when resetting big queues was partially fixed in
bcf457f8c0 (ixgbe: fix index overflow when resetting big Tx queues)
and better fixed in
e8ae856140 (igb/ixgbe: fix index overflow when resetting big queues)

But this version (1.5.2r0) has residues of the initial fix from 1.5.1r0.

Signed-off-by: Intel
2014-01-15 15:31:09 +01:00
Richardson, Bruce
b2595c4aa9 igb/ixgbe: fix build with ICC
ICC requires an initializer be given for the static variables,
so adding one in cases where one wasn't previously given.

This problem was introduced in commit e8ae856140
(fix index overflow when resetting big queues).

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-01-15 15:29:29 +01:00
Thomas Monjalon
e8ae856140 igb/ixgbe: fix index overflow when resetting big queues
Rings are resetted with a loop because memset cannot be used without
issuing a warning about volatile casting.
The index of the loop was a 16-bit variable which is sufficient for
ring entries number but not for the byte size of the whole ring.
The overflow happens when rings are configured for 4096 entries
(descriptor size is 16 bytes). The result is an endless loop.

It is fixed by indexing ring entries and resetting all bytes of the entry
with a simple assignment.
The descriptor initializer is zeroed thanks to its static declaration.

There already was a fix for ixgbe Tx only
(commit bcf457f8c0).
It is reverted to use the same fix everywhere (Rx/Tx for igb/ixgbe).

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2014-01-03 17:08:09 +01:00
Intel
06bea48c36 version: 1.5.1
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
829dddb3a7 examples/l3fwd-vf: improve configuration
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
462ad42792 examples/exception_path: 64-bit coremasks
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
5e2ee19641 app/testpmd: more help
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
588ae1affb app/testpmd: add MAC control forward
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
7b7e5ba79e app/testpmd: add bypass support
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
b4ce15aa2b app/test: fix memory autotest
Memory length is printed as a decimal value since version 1.4
(commit 3b46fb77eb).

Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
b1fc0b2017 app/test: fix whitelist
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
51f567129c app/test: add pmd_ring
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
4d2ca079d4 app/test: rename pmac_acl as acl
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
9b0a912f5c app/cmdline_test: fix build without app/test
This application is built if LIBRTE_CMDLINE is enabled.
But there was no enabled source file if APP_TEST is disabled.
Let's consider that CONFIG_RTE_APP_TEST apply only on app/test.

Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
a4a9fa474c kni: fix vhost build with kernel 3.7
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
c1c677a1ec kni: fix X540 init
KNI must not do hardware reset. But it was resetting X540 devices.

This bug was in the first KNI version
(commit 3fc5ca2f63).

Signed-off-by: Intel
2013-11-24 21:31:36 +01:00
Intel
8b401ff04f kni: add i354 support
Signed-off-by: Intel
2013-11-24 21:31:36 +01:00