dpdk.git
10 years agodoc: generate HTML for API with doxygen
Thomas Monjalon [Fri, 19 Apr 2013 10:34:40 +0000 (12:34 +0200)]
doc: generate HTML for API with doxygen

- add index page
- add doxygen configuration for API
- add doxygen CSS customization applied by a script
- HTML generation via make rules

The configuration is splitted in a static file and a make rule in order to
dynamically configure output format and path.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
10 years agomk: clean dead doc rules
Thomas Monjalon [Fri, 19 Apr 2013 10:59:25 +0000 (12:59 +0200)]
mk: clean dead doc rules

It seems that doc/ has been removed so these rules are useless.
This clean-up is preliminary to generate some doc.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agomk: factorize some rules
Thomas Monjalon [Fri, 19 Apr 2013 12:46:35 +0000 (14:46 +0200)]
mk: factorize some rules

rte.sdkroot.mk is mainly calling other makefiles.
These redirecting rules can be factorized by called makefile.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agoconfig: remove unused KNI debug option
Thomas Monjalon [Wed, 30 Oct 2013 15:22:04 +0000 (16:22 +0100)]
config: remove unused KNI debug option

The option RTE_LIBRTE_KNI_DEBUG has no effect so it should be removed.
The right options are:
- RTE_KNI_KO_DEBUG
- RTE_KNI_VHOST_DEBUG_RX
- RTE_KNI_VHOST_DEBUG_TX

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
10 years agoconfig: disable KNI for 32-bit because cannot work
Jean-Mickael Guerin [Mon, 4 Mar 2013 16:48:25 +0000 (16:48 +0000)]
config: disable KNI for 32-bit because cannot work

This is not supported, disable to avoid compilation error like:
lib/librte_eal/linuxapp/kni/kni_misc.c:304:2: error:
format '%llx' expects argument of type 'long long unsigned int',
but argument 2 has type 'phys_addr_t' [-Werror=format]

Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
10 years agoversion: 1.6.0
Bruce Richardson [Wed, 5 Feb 2014 12:39:22 +0000 (12:39 +0000)]
version: 1.6.0

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoexamples/netmap_compat: import netmap compatibility example
Bruce Richardson [Tue, 11 Feb 2014 13:47:39 +0000 (13:47 +0000)]
examples/netmap_compat: import netmap compatibility example

This provides a sample application and library showing how to use the
Intel(R) DPDK with basic netmap applications.

The Netmap compatibility library provides a minimal set of APIs to give the ability to
programs written against the Netmap APIs to be run with minimal changes to their
source code, using the Intel® DPDK to perform the actual packet I/O.
Since Netmap applications use regular system calls, like open(), ioctl() and
mmap() to communicate with the Netmap kernel module performing the packet I/O,
the compat_netmap library provides a set of similar APIs to use in place of those
system calls, effectively turning a Netmap application into a Intel(R) DPDK one.
The provided library is currently minimal and doesn’t support all the features that
Netmap supports, but is enough to run simple applications, such as the
bridge example included.

The application requires a single command line option:
 -i INTERFACE is the number of a valid Intel(R) DPDK port to use.
If a single -i parameter is given, the interface will send back all the traffic it
receives. If two -i parameters are given, the two interfaces form a bridge, where
traffic received on one interface is replicated and sent by the other interface.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoexamples/l2fwd-ivshmem: import sample application
Bruce Richardson [Tue, 11 Feb 2014 11:31:03 +0000 (11:31 +0000)]
examples/l2fwd-ivshmem: import sample application

This provides a new sample application which demonstrates how
the ivshmem library and EAL capabilities can be used to create
a zero-copy fast-path for packet communication between host
machine and guest vm.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoexamples/vhost: import userspace vhost application
Bruce Richardson [Mon, 10 Feb 2014 13:57:48 +0000 (13:57 +0000)]
examples/vhost: import userspace vhost application

The vhost sample application demonstrates integration of the Intel(R) Data Plane
Development Kit (Intel(R) DPDK) with the Linux KVM hypervisor by implementing the
vhost-net offload API. The sample application performs simple packet switching
between virtual machines based on Media Access Control (MAC) address or Virtual
Local Area Network (VLAN) tag. The splitting of ethernet traffic from an external switch
is performed in hardware by the Virtual Machine Device Queues (VMDQ) and Data
Center Bridging (DCB) features of the Intel(R) 82599 10 Gigabit Ethernet Controller.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoexamples/dpdk-qat: various updates
Bruce Richardson [Mon, 10 Feb 2014 13:33:44 +0000 (13:33 +0000)]
examples/dpdk-qat: various updates

Updates including support for Intel® Communications Chipset
8925 to 8955 Series.
Add support for the wireless KASUMI algorithm.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoexamples: minor changes
Bruce Richardson [Tue, 11 Feb 2014 15:35:19 +0000 (15:35 +0000)]
examples: minor changes

A series of minor changes to example applications included in the
Intel DPDK 1.6 release.
* changes to NIC configuration flags, e.g. specifying RSS
* replacing local "DIM" macro with common "RTE_DIM" macro
* minor whitespace changes for alignment.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoapp/testpmd: disable RSS when in SRIOV
Bruce Richardson [Tue, 18 Feb 2014 10:23:55 +0000 (11:23 +0100)]
app/testpmd: disable RSS when in SRIOV

Hardware does not support RSS in SRIOV setups.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoapp/testpmd: fix RSS by setting mq_mode
Daniel Kan [Thu, 16 Jan 2014 00:31:39 +0000 (16:31 -0800)]
app/testpmd: fix RSS by setting mq_mode

The mq_mode was not set when rxq is > 0; it's defaulted to ETH_MQ_RX_NONE.
As a result, RSS remains inactive. The fix is to set mq_mode to ETH_MQ_RX_RSS
when hf is non-zero.

This bug was introduced by commit 243db2ddee3094a2cb39fdd4b17e26df4e7735e1
igb/ixgbe: ETH_MQ_RX_NONE should disable RSS

Signed-off-by: Daniel Kan <dan@nyansa.com>
Acked-by: Maxime Leroy <maxime.leroy@6wind.com>
10 years agoapp/testpmd: added new macfwd-retry mode
Bruce Richardson [Wed, 12 Feb 2014 16:09:58 +0000 (16:09 +0000)]
app/testpmd: added new macfwd-retry mode

This adds a new forwarding mode to testpmd, whereby it will forward
packets, but on a transmit failure, it will wait a small amount of time
before retrying the transmit again. This mode can be useful in some
cases to set a zero-packet loss rate at the cost of overall throughput,
especially in cases where TX ring size/buffering is constrained, such as
with virtio.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoapp/test: fixes to python control script
Bruce Richardson [Tue, 11 Feb 2014 12:03:26 +0000 (12:03 +0000)]
app/test: fixes to python control script

* Change behaviour to spread the memory specified across all sockets
  rather than duplicating the memory for each one. This way the memory
  size specified is the total memory needed by the test.
* Minor reordering of test cases, to ensure that ring autotest is the
  final test run.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoapp/test: remove all-autotests option
Bruce Richardson [Mon, 10 Feb 2014 11:47:38 +0000 (11:47 +0000)]
app/test: remove all-autotests option

It's no longer possible to run all autotests in
a single go and have them pass, so remove that option.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoapp/test: minor cleanup in test_acl
Bruce Richardson [Tue, 11 Feb 2014 15:50:01 +0000 (15:50 +0000)]
app/test: minor cleanup in test_acl

Minor chanes including replacing local DIM macro with more standard
RTE_DIM macro from rte_common.h.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoapp/test: conditionalize on timer enabled
Bruce Richardson [Tue, 11 Feb 2014 16:33:41 +0000 (16:33 +0000)]
app/test: conditionalize on timer enabled

don't compile the timer autotests unless timer library is turned on in
the compile-time configuration.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoapp/test: minor updates
Bruce Richardson [Wed, 12 Feb 2014 16:05:56 +0000 (16:05 +0000)]
app/test: minor updates

Minor fixes/updates to the autotest app, including:
* replace hard-coded values with #defines in rte_power.h
* replace local DIM() macro with common RTE_DIM

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: fix vf irq storm when running on Xen Dom0.
Bruce Richardson [Mon, 17 Feb 2014 18:57:55 +0000 (19:57 +0100)]
ixgbe: fix vf irq storm when running on Xen Dom0.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoixgbe: prepare for vector pmd
Bruce Richardson [Wed, 12 Feb 2014 16:34:33 +0000 (16:34 +0000)]
ixgbe: prepare for vector pmd

The following changes are included in this patch for ixgbe:
* Support for a separate Vector Poll-Mode Driver component
* Refactoring to extract out definitions from .c file to separate .h

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoixgbe: minor rework offloading bits fix
Bruce Richardson [Mon, 17 Feb 2014 17:27:46 +0000 (18:27 +0100)]
ixgbe: minor rework offloading bits fix

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoixgbe: fix offloading bits when Rx bulk alloc is used
Bryan Benson [Fri, 8 Nov 2013 19:47:22 +0000 (19:47 +0000)]
ixgbe: fix offloading bits when Rx bulk alloc is used

This is a fix for the ixgbe hardware offload flags not being set
when bulk alloc RX is used. The issue was caused by masking off
the bits that store the hardware offload values in the status_error
field to retrieve the done bit for the descriptor.

Commit 7431041062b9fd0555bac7ca4abebc99e3379fa5 in DPDK-1.3.0
introduced bulk dequeue, which included the bug.

Signed-off-by: Bryan Benson <bmbenson@amazon.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
10 years agoixgbe: query assignment of VF queues
Qinglai Xiao [Mon, 21 Oct 2013 14:11:14 +0000 (17:11 +0300)]
ixgbe: query assignment of VF queues

Physical Function assignes Tx/Rx queues to each Virtual Function
according to different schemes[1]. By querying through mailbox,
VF is able to get number of Tx/Rx queues assigned to it.

Note that current Intel ixgbe driver ixgbe-3.18.7 does not fully
support mailbox message IXGBE_VF_GET_QUEUES. The service routine
for IXGBE_VF_GET_QUEUES must be fixed, otherwise PF always return
1 as Tx/Rx queue number.

[1] See section 7.2.1.2.1, 7.1.2.2 and 7.10.2.7.2 of Intel 82599 10
    Gbe Controller Datasheet.

Signed-off-by: Qinglai Xiao <jigsaw@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoixgbe: fix disabling loopback mode
Bruce Richardson [Mon, 17 Feb 2014 18:55:26 +0000 (19:55 +0100)]
ixgbe: fix disabling loopback mode

Following introduction of loopback mode, this mode should be explicitely
disabled in ixgbe_dev_rx_init() if not enabled.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoixgbe: add Tx->Rx loopback mode for 82599
Qinglai Xiao [Thu, 26 Sep 2013 13:34:44 +0000 (16:34 +0300)]
ixgbe: add Tx->Rx loopback mode for 82599

82599 has two loopback operation modes, Tx->Rx and Rx->Tx.
For the time being only Tx->Rx is supported.

The new field lpbk_mode added in struct rte_eth_conf defines loopback
operation mode for certain ethernet controller. By default the value
of lpbk_mode is 0, meaning loopback mode disabled.

Since each ethernet controller has its own definition of loopback modes,
API user has to check both datasheet and implementation of certain driver
so as to understand what are valid values to be set, and what are the
expected behaviors.

Check IXGBE_LPBK_82599_XXX which are defined in ixgbe_ethdev.h
for valid values of 82599 loopback mode.

Signed-off-by: Qinglai Xiao <jigsaw@gmail.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Venky Venkatesan <venky.venkatesan@intel.com>
10 years agoigb: fix dual vlan ethertype
Bruce Richardson [Mon, 17 Feb 2014 20:21:03 +0000 (21:21 +0100)]
igb: fix dual vlan ethertype

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoigb: restore workaround errata with wthresh on 82576
Stephen Hemminger [Thu, 30 May 2013 17:12:35 +0000 (10:12 -0700)]
igb: restore workaround errata with wthresh on 82576

The 82576 has known issues which require the write threshold to be set to 1.
See:
http://download.intel.com/design/network/specupdt/82576_SPECUPDATE.pdf

If not then single packets will hang in transmit ring until more arrive.
Simple tests like ping will fail.

The workaround was in the wrong file (commit a30ebfbb8c3a).
Move it in igb one to restore original patch (7e9e49feea).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoigb/ixgbe: remove useless header inclusion
Bruce Richardson [Mon, 17 Feb 2014 12:42:33 +0000 (13:42 +0100)]
igb/ixgbe: remove useless header inclusion

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
10 years agoigb/ixgbe: allow RSS with only one Rx queue
Maxime Leroy [Mon, 2 Sep 2013 15:14:10 +0000 (17:14 +0200)]
igb/ixgbe: allow RSS with only one Rx queue

It should be possible to enable RSS with one Rx queue.
RSS hash can be useful independently of the number of Rx queues.
Applications can use RSS hash to identify different IP flows.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
10 years agoigb/ixgbe: ETH_MQ_RX_NONE should disable RSS
Maxime Leroy [Mon, 2 Sep 2013 15:07:55 +0000 (17:07 +0200)]
igb/ixgbe: ETH_MQ_RX_NONE should disable RSS

As explained in rte_ethdev.h, ETH_MQ_RX_NONE allows to not choose RSS, DCB
or VMDQ mode.

But the igb/ixgbe code always silently select the RSS mode with ETH_MQ_RX_NONE.
This patch fixes this incoherence between the API and the implementation.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
10 years agopcap: add missing dependency on malloc
Bruce Richardson [Mon, 10 Feb 2014 14:52:22 +0000 (14:52 +0000)]
pcap: add missing dependency on malloc

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agovirtio: mark functions as always inline
Bruce Richardson [Wed, 12 Feb 2014 16:44:00 +0000 (16:44 +0000)]
virtio: mark functions as always inline

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agovirtio: various improvements
Bruce Richardson [Wed, 12 Feb 2014 16:44:00 +0000 (16:44 +0000)]
virtio: various improvements

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agovirtio: add close function
Bruce Richardson [Wed, 12 Feb 2014 16:44:44 +0000 (16:44 +0000)]
virtio: add close function

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agovmxnet3: import new vmxnet3 poll mode driver implementation
Bruce Richardson [Mon, 10 Feb 2014 15:27:26 +0000 (15:27 +0000)]
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>
10 years agopci: add pci ids for vmxnet3 devices
Bruce Richardson [Tue, 11 Feb 2014 15:42:33 +0000 (15:42 +0000)]
pci: add pci ids for vmxnet3 devices

pci ids for vmxnet3 devices added.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agokni: update kernel driver ethtool baseline
Bruce Richardson [Tue, 11 Feb 2014 12:25:54 +0000 (12:25 +0000)]
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>
10 years agokni: fix packet loss in loopback mode
Bruce Richardson [Wed, 12 Feb 2014 16:23:00 +0000 (16:23 +0000)]
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>
10 years agokni: add kni close function
Bruce Richardson [Wed, 12 Feb 2014 16:23:56 +0000 (16:23 +0000)]
kni: add kni close function

KNI close function added.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoxen: import xenvirt pmd and vhost_xen
Bruce Richardson [Wed, 12 Feb 2014 15:50:11 +0000 (15:50 +0000)]
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>
10 years agoxen: core library changes
Bruce Richardson [Wed, 12 Feb 2014 15:32:25 +0000 (15:32 +0000)]
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>
10 years agoivshmem: library changes for mmaping using ivshmem
Bruce Richardson [Tue, 11 Feb 2014 10:28:51 +0000 (10:28 +0000)]
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>
10 years agomem: add bounded reserve function
Bruce Richardson [Tue, 11 Feb 2014 16:24:25 +0000 (16:24 +0000)]
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>
10 years agomem: remove duplicated lines
Pei Chao [Thu, 2 Jan 2014 13:05:42 +0000 (21:05 +0800)]
mem: remove duplicated lines

Extra space for future alignment was reserved twice.
It was introduced in version 1.3.0 (commit 916e4f4f4e45a1d3cdd473cf9ef).

Signed-off-by: Pei Chao <peichao85@gmail.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomem: fix log for --no-huge
Thomas Monjalon [Mon, 8 Apr 2013 16:13:06 +0000 (18:13 +0200)]
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>
10 years agomem: allow virtual memory address hinting
Bruce Richardson [Wed, 12 Feb 2014 13:38:45 +0000 (13:38 +0000)]
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>
10 years agombuf: rework check on mbuf freeing
Bruce Richardson [Mon, 17 Feb 2014 19:15:19 +0000 (20:15 +0100)]
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>
10 years agosched: use common macro RTE_DIM
Bruce Richardson [Wed, 12 Feb 2014 16:26:03 +0000 (16:26 +0000)]
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>
10 years agotimer: missing optimization flag in compile
Bruce Richardson [Tue, 11 Feb 2014 12:11:44 +0000 (12:11 +0000)]
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>
10 years agoeal: fix printf format
Bruce Richardson [Wed, 12 Feb 2014 16:46:12 +0000 (16:46 +0000)]
eal: fix printf format

Fix some format indicators in printf.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoeal: cleanup on mempool and memzone object names
Bruce Richardson [Tue, 18 Feb 2014 09:51:16 +0000 (10:51 +0100)]
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>
10 years agoeal: fix build with some gcc 4.4 toolchains
Bruce Richardson [Wed, 12 Feb 2014 17:04:33 +0000 (17:04 +0000)]
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>
10 years agoeal: fix typo for RTE_EAL_ALLOW_INV_SOCKET_ID
Bruce Richardson [Mon, 17 Feb 2014 20:04:44 +0000 (21:04 +0100)]
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>
10 years agoeal: fix support for older gcc versions
Bruce Richardson [Tue, 11 Feb 2014 15:40:49 +0000 (15:40 +0000)]
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>
10 years agoeal: fix cpuflags for latest microarch
Bruce Richardson [Tue, 11 Feb 2014 15:38:29 +0000 (15:38 +0000)]
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>
10 years agoeal: new common macros added
Bruce Richardson [Tue, 11 Feb 2014 10:08:43 +0000 (10:08 +0000)]
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>
10 years agoeal: add rte_compiler_barrier() macro
Bruce Richardson [Mon, 10 Feb 2014 14:43:44 +0000 (14:43 +0000)]
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>
10 years agomk: compilation fixes
Bruce Richardson [Tue, 11 Feb 2014 12:10:16 +0000 (12:10 +0000)]
mk: compilation fixes

Missing _GNU_SOURCE define for compilation of a number of files.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agomk: add haswell target
Bruce Richardson [Mon, 17 Feb 2014 12:56:37 +0000 (13:56 +0100)]
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>
10 years agomk: rework cpu flags detection
Bruce Richardson [Mon, 17 Feb 2014 12:46:06 +0000 (13:46 +0100)]
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>
10 years agoconfig: remove deprecated opt for unbinding ports
Bruce Richardson [Tue, 11 Feb 2014 16:46:00 +0000 (16:46 +0000)]
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>
10 years agoconfig: fix combined/shared lib
Thomas Monjalon [Wed, 23 Oct 2013 09:40:56 +0000 (11:40 +0200)]
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>
10 years agoadd FreeBSD support
Bruce Richardson [Mon, 10 Feb 2014 11:49:10 +0000 (11:49 +0000)]
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>
10 years agoupdate Intel copyright years to 2014
Bruce Richardson [Mon, 10 Feb 2014 11:46:50 +0000 (11:46 +0000)]
update Intel copyright years to 2014

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoversion: 1.5.2
Intel [Wed, 4 Dec 2013 09:00:00 +0000 (10:00 +0100)]
version: 1.5.2

Signed-off-by: Intel
10 years agolpm: fix sub-rule deletion
Intel [Wed, 4 Dec 2013 09:00:00 +0000 (10:00 +0100)]
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
10 years agopcap: fix mbuf allocation
Richardson, Bruce [Tue, 26 Nov 2013 16:49:46 +0000 (16:49 +0000)]
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>
10 years agoixgbe: residual fix about resetting big Tx queues
Intel [Wed, 4 Dec 2013 09:00:00 +0000 (10:00 +0100)]
ixgbe: residual fix about resetting big Tx queues

Index overflow when resetting big queues was partially fixed in
bcf457f8c0d64a5c (ixgbe: fix index overflow when resetting big Tx queues)
and better fixed in
e8ae856140bce4e4 (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
10 years agoigb/ixgbe: fix build with ICC
Richardson, Bruce [Tue, 26 Nov 2013 11:07:52 +0000 (11:07 +0000)]
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 e8ae856140bce4e
(fix index overflow when resetting big queues).

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoigb/ixgbe: fix index overflow when resetting big queues
Thomas Monjalon [Fri, 15 Nov 2013 11:08:10 +0000 (12:08 +0100)]
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 bcf457f8c0d64a5cb094fd55836b324bddb930b6).
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>
10 years agoversion: 1.5.1
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
version: 1.5.1

Signed-off-by: Intel
10 years agoexamples/l3fwd-vf: improve configuration
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
examples/l3fwd-vf: improve configuration

Signed-off-by: Intel
10 years agoexamples/exception_path: 64-bit coremasks
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
examples/exception_path: 64-bit coremasks

Signed-off-by: Intel
10 years agoapp/testpmd: more help
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/testpmd: more help

Signed-off-by: Intel
10 years agoapp/testpmd: add MAC control forward
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/testpmd: add MAC control forward

Signed-off-by: Intel
10 years agoapp/testpmd: add bypass support
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/testpmd: add bypass support

Signed-off-by: Intel
10 years agoapp/test: fix memory autotest
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/test: fix memory autotest

Memory length is printed as a decimal value since version 1.4
(commit 3b46fb77ebdb6bb6b47c578a2986077dcff68a19).

Signed-off-by: Intel
10 years agoapp/test: fix whitelist
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/test: fix whitelist

Signed-off-by: Intel
10 years agoapp/test: add pmd_ring
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/test: add pmd_ring

Signed-off-by: Intel
10 years agoapp/test: rename pmac_acl as acl
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
app/test: rename pmac_acl as acl

Signed-off-by: Intel
10 years agoapp/cmdline_test: fix build without app/test
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
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
10 years agokni: fix vhost build with kernel 3.7
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
kni: fix vhost build with kernel 3.7

Signed-off-by: Intel
10 years agokni: fix X540 init
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
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 3fc5ca2f63529ec5ad7b1b75f517d61dc7613bd9).

Signed-off-by: Intel
10 years agokni: add i354 support
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
kni: add i354 support

Signed-off-by: Intel
10 years agoixgbe: fix index overflow when resetting big Tx queues
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
ixgbe: fix index overflow when resetting big Tx queues

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 queue rings are configured for 4096 entries
(descriptor size is 16 bytes). The result is an endless loop.

Signed-off-by: Intel
10 years agoixgbe: fix RSC disabling bit
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
ixgbe: fix RSC disabling bit

Signed-off-by: Intel
10 years agoixgbe: add MAC control forward
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
ixgbe: add MAC control forward

Signed-off-by: Intel
10 years agoe1000: add MAC control forward
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
e1000: add MAC control forward

Signed-off-by: Intel
10 years agoethdev: add MAC control forward
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
ethdev: add MAC control forward

Signed-off-by: Intel
10 years agoixgbe: add 82599 bypass support
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
ixgbe: add 82599 bypass support

Signed-off-by: Intel
10 years agoethdev: add bypass logic
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
ethdev: add bypass logic

An overview of bypass logic can be seen in this document:
http://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ethernet-server-bypass-adapter-x520-x540-family-brief.pdf

Signed-off-by: Intel
10 years agoigb: fix PF build
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
igb: fix PF build

Signed-off-by: Intel
10 years agoigb: configure CRC stripping for i211 and i354
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
igb: configure CRC stripping for i211 and i354

Signed-off-by: Intel
10 years agoigb: add i354 support
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
igb: add i354 support

Signed-off-by: Intel
10 years agoe1000: update base driver
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
e1000: update base driver

The base driver supports more NICs:
    - i210 flashless
    - i217
    - i218
    - i354

The new features are not automatically used by the DPDK PMD.

Signed-off-by: Intel
10 years agoe1000: revert fix for multicast in VF
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
e1000: revert fix for multicast in VF

Revert fix from commit 06cf9be95ce16b363c4267d2d17e27c2706629ae.

Signed-off-by: Intel
10 years agoe1000: more error checks
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
e1000: more error checks

Signed-off-by: Intel
10 years agoe1000: mark unused parameters
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
e1000: mark unused parameters

Signed-off-by: Intel
10 years agoe1000: minor changes
Intel [Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)]
e1000: minor changes

Signed-off-by: Intel