Commit Graph

451 Commits

Author SHA1 Message Date
Damien Millescamps
f9a08f6502 eal: add support for shared object drivers
Add an option to specify libraries to be loaded before probing the PCI.

For instance, testpmd -d librte_pmd_xxx.so can be used to enable xxx driver
support on testpmd without any recompilation of testpmd.

Plugins are loaded before creating threads because we want the threads to
inherit any property that could be set while loading a plugin, such as iopl().

Signed-off-by: Damien Millescamps <damien.millescamps@6wind.com>
Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Adrien Mazarguil
527f2cb8a3 mk: fix command-line dependency check for quoted strings
Before recompiling a file, rte.compile-pre.mk checks whether the command
line is different from the previous one.

This is done by storing for each object file the entire command line in a
kind of dependency file with a .cmd extension (see obj2cmd). If that file
exists, the line is retrieved first and compared against $(C_TO_O_STR).
The object file gets recompiled if the file doesn't exist or if the line
is different.

The problem is that sometimes, files are recompiled for no apparent reason.

The check doesn't work properly when a command line contains double-quoted
strings such as -DFOO='"bar"' because the shell interprets and strips them.
This is fixed by protecting C_TO_O_CMD with simple quotes, knowing that
such quotes are already escaped in C_TO_O_STR.

Moreover, because simple quotes are escaped in C_TO_O_STR, the retrieved
command should be compared against C_TO_O instead.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Julien Courtat
0ca5de1ebf mk: fix EXTRA_LDFLAGS override
The GCC prefix -Wl was ignored because the command line value has higher priority.
It ended in impossibilty for GCC to pass parameters to LD.
The prefixed value must override the command line one.

Signed-off-by: Julien Courtat <julien.courtat@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Didier Pallard
5125f7652c mk: allow to build shared libraries
Add mk/rte.shared.mk and mk/rte.extshared.mk in framework to
   allow shared libraries compilation through framework

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
1fa0fd9d6b mk: allow to specify DESTDIR in build rule
This will install the binary sdk (bin + modules + libs + headers + mk)
in the specified directory.
This directory can be used as RTE_SDK by external applications.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
1c858a7dfe mk: in install rule, don't overwrite .config if it already exists
This allows the user to prepare a configuration with make config
before using make install.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
713295f1e0 mk: allow to specify O= in install rule
This variable $(O) can be used to specify a build directory
when doing an "install" procedure. The default is ".", which
means that targets will be built in the source dpdk.

This option is useful to compile outside of the source tree that may be
read-only.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
4403715ec6 mk: rule help
The goal of this rule is to show which rules/options are available from a
"make" command.
Let's start by printing short doc about SDK building.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
a8f1e3d4ad mk: add rule to list configs
Allow to list configs in config/ directory with a simple make rule.

The rule showconfigs is reused in config error.
In the same time, "echo -n" is replaced by the more portable "printf".

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
5ee26f8722 doc: how to build
This is a cheat sheet to build DPDK and can be used for a "make help".
It is explicitly described as a build help in order to concatenate it
with other helps such as test commands.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
d71de631d9 mk: insert version number in doxygen config
The parameter PROJECT_NUMBER is used in the HTML header
via the template variable $projectnumber.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
beae4ff0a5 mk: add rule to print version number
The version string is extracted from rte_version.h.
RTE_VER_* macros are concatenated and separators " . . r " are inserted.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
9b226335bb doc: fix some doxygen comments
- rte_panic must be before rte_panic_ to be associated to its doc
- marker /**< must be used when commenting after the declaration only
- fix rte_string_fns.h title
- typos

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
d0d2e6a505 doc: fix doxygen parsing of __attribute__
Ignore __attribute__ because it was wrongly parsed as an identifier.
This configuration is described in
	http://www.stack.nl/~dimitri/doxygen/manual/preprocessing.html

Reported-by: Cyril Cressent <cyril.cressent@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
35aa36f660 doc: add mbuf cloning functions in doxygen
Some functions are available only if RTE_MBUF_SCATTER_GATHER is enabled.
So it must be configured for doxygen parser.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
9bf486e606 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>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
ee801f6cc7 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>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
0d74541614 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>
2014-02-26 11:01:12 +01:00
Thomas Monjalon
f94ffd5bca 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>
2014-02-26 11:01:12 +01:00
Jean-Mickael Guerin
7a6b51aab7 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>
2014-02-26 11:01:12 +01:00
Bruce Richardson
dc76ed2478 version: 1.6.0
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:47:59 +01:00
Bruce Richardson
06371afe39 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>
2014-02-26 10:47:59 +01:00
Bruce Richardson
6aa4972491 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>
2014-02-26 10:47:59 +01:00
Bruce Richardson
4796ad63ba 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>
2014-02-26 10:47:59 +01:00
Bruce Richardson
de40804e0d 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>
2014-02-26 10:47:59 +01:00
Bruce Richardson
13c4ebd65a 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>
2014-02-26 10:47:59 +01:00
Bruce Richardson
3ce690d3d5 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>
2014-02-26 10:47:57 +01:00
Daniel Kan
35105f1288 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 243db2ddee
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>
2014-02-26 10:47:00 +01:00
Bruce Richardson
57e852429d 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
2d23ec5631 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
5c64c7d168 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
c1090bdee1 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
8ec70d19f5 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
e803ddb7e8 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
4074a5d806 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
429c6d86b3 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
1550c20be0 ixgbe: minor rework offloading bits fix
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-26 10:22:33 +01:00
Bryan Benson
2c90eb650c 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 7431041062 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>
2014-02-26 10:22:33 +01:00
Qinglai Xiao
27399312ef 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
f474e64f4d 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>
2014-02-26 10:22:33 +01:00
Qinglai Xiao
db03592561 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>
2014-02-26 10:22:33 +01:00
Bruce Richardson
682d65b8f5 igb: fix dual vlan ethertype
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-26 10:22:32 +01:00
Stephen Hemminger
8e7bd48f75 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 a30ebfbb8c).
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>
2014-02-26 10:22:32 +01:00
Bruce Richardson
3f6899edd7 igb/ixgbe: remove useless header inclusion
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
2014-02-26 10:22:32 +01:00
Maxime Leroy
3aa1e71982 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>
2014-02-26 10:22:32 +01:00
Maxime Leroy
7a9b2b0998 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>
2014-02-26 10:22:32 +01:00
Bruce Richardson
a18dc3319e pcap: add missing dependency on malloc
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00
Bruce Richardson
b9a4361fc5 virtio: mark functions as always inline
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00
Bruce Richardson
2cf3151ee4 virtio: various improvements
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00
Bruce Richardson
0978aa72cd virtio: add close function
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-26 10:22:32 +01:00