dpdk.git
8 years agonfp: add statistics
Alejandro Lucero [Mon, 30 Nov 2015 10:25:38 +0000 (10:25 +0000)]
nfp: add statistics

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
8 years agonfp: add RSS
Alejandro Lucero [Mon, 30 Nov 2015 10:25:37 +0000 (10:25 +0000)]
nfp: add RSS

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
8 years agonfp: add Rx and Tx
Alejandro Lucero [Mon, 30 Nov 2015 10:25:36 +0000 (10:25 +0000)]
nfp: add Rx and Tx

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
8 years agonfp: introduce driver initialization
Alejandro Lucero [Mon, 30 Nov 2015 10:25:35 +0000 (10:25 +0000)]
nfp: introduce driver initialization

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
8 years agomaintainers: claim responsibility for ARMv7 and ARMv8
Jianbo Liu [Thu, 3 Dec 2015 15:02:56 +0000 (23:02 +0800)]
maintainers: claim responsibility for ARMv7 and ARMv8

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
8 years agoacl/arm: enable acl for ARMv7
Jianbo Liu [Thu, 3 Dec 2015 15:02:55 +0000 (23:02 +0800)]
acl/arm: enable acl for ARMv7

Implement vqtbl1q_u8 intrinsic function, which is not supported in armv7-a.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
8 years agoeal/arm: fix timer read from PMU
Jianbo Liu [Thu, 3 Dec 2015 15:02:54 +0000 (23:02 +0800)]
eal/arm: fix timer read from PMU

CONFIG_* from config files can not be used in code.

Fixes: 12f45fa7e29b ("eal/arm: read timer from PMU if enabled")

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
8 years agoexamples/ethtool: add user-space ethtool sample application
Remy Horton [Mon, 7 Dec 2015 13:48:59 +0000 (13:48 +0000)]
examples/ethtool: add user-space ethtool sample application

Further enhancements to the userspace ethtool implementation that was
submitted in 2.1 and packaged as a self-contained sample application.
Implements an rte_ethtool shim layer based on rte_ethdev API, along
with a command prompt driven demonstration application.

Signed-off-by: Remy Horton <remy.horton@intel.com>
8 years agomk: fix external library build when combine is enabled
Thomas Monjalon [Tue, 8 Dec 2015 00:50:17 +0000 (01:50 +0100)]
mk: fix external library build when combine is enabled

The object files are copied to prepare the internal combined library.
It must be disabled when building an external library.

It has been seen because the directory was missing:
examples/ethtool/lib/x86_64-native-linuxapp-gcc/build/lib:
No such file or directory

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agomk: remove ABI versioning for external library
Andrew G. Harvey [Mon, 7 Dec 2015 13:48:57 +0000 (13:48 +0000)]
mk: remove ABI versioning for external library

Signed-off-by: Andrew G. Harvey <agh@cisco.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agomk: fix warnings when adding extra warning flags
Panu Matilainen [Mon, 7 Dec 2015 12:56:43 +0000 (14:56 +0200)]
mk: fix warnings when adding extra warning flags

Starting with commit 9aa2053c6e81493b23346ff4e387903560de5c81
EXTRA_CFLAGS is sometimes being passed to the compiler without
WERROR_FLAGS which can cause spurious warnings by the dozen,
for example with when compiling with EXTRA_CFLAGS="-Wformat-security":

cc1: warning: -Wformat-security ignored without -Wformat [-Wformat-security]

Passing WERROR_FLAGS to AUTO_CPU helper makes the warning flag usage
consistent throughout the codebase, silencing the warnings.

Fixes: 9aa2053c6e81 ("mk: influence CPU flags with user input")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
8 years agomk: fix external shared library dependencies of drivers
Panu Matilainen [Mon, 7 Dec 2015 10:45:36 +0000 (12:45 +0200)]
mk: fix external shared library dependencies of drivers

Similar to commit 5f9115e58cc6f304ff4ade694cf5823d32887d1a, but
for qat and mpipe drivers. The former did not exist when the
previous patch was sent and latter I just missed.

Fixes: 5f9115e58cc6 ("mk: fix shared library dependencies of drivers")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
8 years agoscripts: support any git revisions as ABI validation range
Panu Matilainen [Thu, 3 Dec 2015 14:05:26 +0000 (16:05 +0200)]
scripts: support any git revisions as ABI validation range

In addition to git tags, support validating abi between any legal
gitrevisions(7) syntaxes, such as "validate-abi.sh -1 . <target>"
"validate-abi.sh master mybranch <target>" etc in addition to
validating between tags. Makes it easier to run the validator
for in-development work.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoexamples/vm_power_manager: fix build with libvirt < 1.0
Yong Liu [Mon, 7 Dec 2015 07:24:17 +0000 (15:24 +0800)]
examples/vm_power_manager: fix build with libvirt < 1.0

virNodeGetCPUMap introduced in libvirt 1.0. In some linux distributions
like Ubuntu12/14 and Fedora18, libvirt version is older than 1.0. So this
sample will not build pass.

Replace "virNodeGetCPUMap" with another libvirt API "virNodeGetInfo".

Signed-off-by: Marvin Liu <yong.liu@intel.com>
8 years agoexamples/ip_pipeline: add missing files of flow actions pipeline
Fan Zhang [Mon, 7 Dec 2015 11:51:50 +0000 (12:51 +0100)]
examples/ip_pipeline: add missing files of flow actions pipeline

When first adding flow actions pipeline, some files were not pushed
to the repository by mistake. The original commit message is below.

Fixes: 9ef2593651f9 ("examples/ip_pipeline: add flow actions pipeline")

Flow actions pipeline is an extension of flow-classification pipeline.
Some of the operations of flow classification pipeline such as traffic
metering/marking(for e.g. Single Rate Three Color Marker (srTCM), Two
Rate Three Color Marker trTCM)), policer can be performed separately in
flow action pipeline to avoid excessive computational burden on the CPU
core running the flow-classification pipeline. The Flow action pipeline
implements various function such as traffic metering, policer, stats.
Traffic mettering can configured as per the required context, for
examples- per user, per traffic class or both. These contexts can be
applied by specifying parameters in configuration file as shown below;

[PIPELINE1]
type = FLOW_ACTIONS
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
n_flows = 65536
n_meters_per_flow = 1
flow_id_offset = 158
ip_hdr_offset = 142
color_offset = 64

The entries of flow and dscp tables of flow actions pipeline can be
modified through command-line interface. The commands to add or delete
entries to the flow table, DSCP(differentiated services code point)
table and for statistics collection, etc have been included. The key
functions such as Traffic Metering/marking and policer functions have
been implemented as flow-table action handler.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agodoc: fix make help
Thomas Monjalon [Thu, 3 Dec 2015 02:52:10 +0000 (03:52 +0100)]
doc: fix make help

Fix some errors and remove an unrelated paragraph.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agodoc: fix examples in netmap compatibility guide
John McNamara [Fri, 13 Nov 2015 11:45:12 +0000 (11:45 +0000)]
doc: fix examples in netmap compatibility guide

Fix the examples in the netmap compatibility sample application
docs which referred to the packet_reordering application.

Also fix some minor rst formatting issues.

Reported-by: Qian Xu <qian.q.xu@intel.com>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agodoc: fix repeated typo in sample app guides
John McNamara [Mon, 16 Nov 2015 09:26:53 +0000 (09:26 +0000)]
doc: fix repeated typo in sample app guides

Fix repeated typo in the "Compiling the Application" section of
almost all of the sample app docs.

This generally gets copied into new sample app guides.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agodoc: fix missing blank line before code block
Tetsuya Mukawa [Tue, 20 Oct 2015 02:41:45 +0000 (11:41 +0900)]
doc: fix missing blank line before code block

The patch adds missing new line to "Managing ABI updates" section.

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agoreplace bzero with memset
Stephen Hemminger [Wed, 2 Dec 2015 03:24:10 +0000 (19:24 -0800)]
replace bzero with memset

The standard for DPDK is to use memset() not bzero which
is a leftover BSD-ism.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoremove blank lines at end-of-file
Stephen Hemminger [Wed, 2 Dec 2015 20:06:12 +0000 (12:06 -0800)]
remove blank lines at end-of-file

This is one of those trivial things git and other tools complain
about.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoremove double semicolons
Stephen Hemminger [Wed, 2 Dec 2015 21:02:32 +0000 (13:02 -0800)]
remove double semicolons

Trivial cleanup

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agopower: remove duplicate definition
Aaron Conole [Fri, 23 Oct 2015 20:03:57 +0000 (16:03 -0400)]
power: remove duplicate definition

The CHANNEL_CMDS_MAX_VM_CHANNELS is duplicated in the channel_commands
header file. This commit removes that duplication.

Fixes: 210c383e247b ("power: packet format for vm power management")

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoethdev: fix reset of Rx mbuf allocation failures
Igor Ryzhov [Fri, 27 Nov 2015 10:31:06 +0000 (13:31 +0300)]
ethdev: fix reset of Rx mbuf allocation failures

The rx_mbuf_alloc_failed counter was only cleared by virtio driver.
Now it is cleared by common rte_eth_stats_reset function for all
drivers at once.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoapp/testpmd: add description of queue info command
Konstantin Ananyev [Mon, 2 Nov 2015 13:49:05 +0000 (13:49 +0000)]
app/testpmd: add description of queue info command

Fixes: ab3257e13dc4 ("app/testpmd: add command to display queue info")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agodoc: fix ring based driver guide
Bernard Iremonger [Sat, 28 Nov 2015 11:01:54 +0000 (11:01 +0000)]
doc: fix ring based driver guide

Correct the sample code in the pcap_ring.rst file to match the latest
rte_eth_ring.c code.

The parameters to the rte_eth_from_rings() function have changed since
the documentation was written.
The API change occurred before DPDK 1.8 when the rst files were added.
The original documentation on which the pcap_ring.rst file was based was
not correct.

Fixes: fc1f2750a3ec ("doc: programmers guide")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agoapp/test: fix ring unit test
Bernard Iremonger [Sat, 28 Nov 2015 11:01:53 +0000 (11:01 +0000)]
app/test: fix ring unit test

If eth_ring vdevs are created from the command line with the --vdev option,
they create their own rings which are not shared by other vdevs.
Some of tests in this suite require that the vdevs share rings, so some
of the tests fail.

For vdevs to share rings they must be created in the test code with the
rte_eth_from_rings() function using rings created with the rte_ring_create()
function.

Use the command line option --vdev=eth_ring0 to create port 0.
This option is not mandatory for the tests to pass. It allows some additional
functional tests on cmd-line created rings to be executed.

Create two rings and five ethdevs in test_pmd_ring.c for ports 1 to 5,
and then use these to run the unit tests on the pmd ring functionality.

Improve test output by adding the port number to printf statements,
and adding a printf describing each test.

Fixes: 572eb3cd834c ("ring: simplify unit tests")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agoapp/test: fix kni success code
Helin Zhang [Thu, 3 Dec 2015 03:22:59 +0000 (11:22 +0800)]
app/test: fix kni success code

In the KNI unit test, if all test cases passed, it should
return with 0. This patch fixes the issue of returning
wrong value.

Fixes: fc27caaafd4b ("kni: remove deprecated functions")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
8 years agoapp/test: rename acl function to lowercase
Maciej Gajdzica [Thu, 13 Aug 2015 10:33:29 +0000 (12:33 +0200)]
app/test: rename acl function to lowercase

Renamed function name to comply with coding standard.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoapp/test: fix integer overflow in memory unit test
Sergio Gonzalez Monroy [Tue, 17 Nov 2015 15:39:16 +0000 (15:39 +0000)]
app/test: fix integer overflow in memory unit test

memory_autotest loops infinitely when at least one the memsegs
is bigger than 4GB.

The issue is the result of an integer overflow/wraparound of
the offset variable.

Fix it by using the correct type (size_t).

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agoapp/test: fix crash in performance test
David Hunt [Mon, 23 Nov 2015 11:45:48 +0000 (11:45 +0000)]
app/test: fix crash in performance test

Fix crash in pmd_perf_test autotest (div by 0) when no packets received
Also fixes the fact that the test passes even if exec_burst fails

To repeat the issue:
  The system must be incorrectly set up so that all packets will be lost,
  i.e. no loopback cable, etc. This is an edge case, but still the test
  should not crash or pass when failing.
  run the test app
  RTE>> set_rxtx_sc poll_before_xmit
  RTE>> pmd_perf_autotest
  --snip--
  > Generate 4096 packets @socket 1
  > start to receive total expect 4096
  > 4096 packets lost, IDLE 10000 times
  > Floating point exception (core dumped)

Signed-off-by: David Hunt <david.hunt@intel.com>
8 years agoexamples/l3fwd: fix crash with unaligned L2 header
Harish Patil [Sun, 8 Nov 2015 19:39:56 +0000 (11:39 -0800)]
examples/l3fwd: fix crash with unaligned L2 header

l3fwd app expects PMDs to return packets whose L2 header is
16-byte aligned due to usage of _mm_load_si128()/_mm_store_si128()
intrinsics in the app. However, most of the protocol stacks expects
packets such that its IP/L3 header be aligned on a 16-byte boundary.

Based on the recommendations received on dpdk-dev, we are changing
the l3fwd app to use _mm_loadu_si128()/_mm_loadu_si128() so that the
address need not be 16-byte aligned and thereby preventing crash.
We have tested that there is no performance impact due to this
change.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agoexamples/l3fwd: fix crash with IPv6
Pablo de Lara [Tue, 3 Nov 2015 20:13:48 +0000 (20:13 +0000)]
examples/l3fwd: fix crash with IPv6

Lookup burst size was changed for exact match
from 4 to 8, for both ipv4 and ipv6, but actually only
4 keys were being looked up for ipv6, instead of 8,
causing random segmentation faults.

Fixes: 80fcb4d4 ("examples/l3fwd: increase lookup burst size to 8")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
8 years agoexamples/l3fwd: fix option parsing
John McNamara [Mon, 2 Nov 2015 17:45:51 +0000 (17:45 +0000)]
examples/l3fwd: fix option parsing

Fix minor, and non critical, copy and paste error in strncmp() of eth-dest
commandline argument.

Fixes: bd785f6f6791 ("examples/l3fwd: make destination mac address configurable")

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Andrey Chilikin <andrey.chilikin@intel.com>
8 years agoexamples/l2fwd-crypto: fix option -t
Declan Doherty [Wed, 2 Dec 2015 17:16:44 +0000 (17:16 +0000)]
examples/l2fwd-crypto: fix option -t

passing -t 0 as a command line argument causes the application
to exit with an "invalid refresh period specified" error  which is
contrary to applications help text.

This patch removes the unnecessary option "--no-stats" and fixes the
behaviour of the -t parameter.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Reported-by: Min Cao <min.cao@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
8 years agoexamples/vhost_xen: fix build
Bernard Iremonger [Sun, 1 Nov 2015 15:58:57 +0000 (15:58 +0000)]
examples/vhost_xen: fix build

examples/vhost_xen/main.c:659:61: error: has no member named data
 rte_memcpy((void *)(uintptr_t)buff_addr, (const void*)buff->data, rte_pktmbuf_data_len(buff));
                                                             ^

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
8 years agoexamples/vhost: fix statistics
Jianfeng Tan [Wed, 2 Dec 2015 23:20:26 +0000 (07:20 +0800)]
examples/vhost: fix statistics

This issue was discovered under the case of software vm2vm
fowarding. When pkts are received from virtio device 0 and
tx_route to virtio device 1, tx of device 0 is not updated.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
8 years agoexamples/vmdq: fix crash when using too many pools
Xutao Sun [Tue, 27 Oct 2015 08:58:33 +0000 (16:58 +0800)]
examples/vmdq: fix crash when using too many pools

Macro MAX_QUEUES was defined to 128, only allow 16 vmdq_pools in theory.
When running vmdq_app with more than 34 vmdq_pools, it will cause the
core_dump issue.
Change MAX_QUEUES to 1024 will solve this issue.

Signed-off-by: Xutao Sun <xutao.sun@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
8 years agoexamples/bond: fix FreeBSD build
Daniel Mrzyglod [Wed, 25 Nov 2015 18:03:57 +0000 (19:03 +0100)]
examples/bond: fix FreeBSD build

Error:
examples/bond/main.c:431:24: error: use of undeclared identifier 'AF_INET'

AF_INET defined in sys/socket.h

This header included for Linux:
. /<snip>/include/rte_ip.h
.. /usr/include/netinet/in.h
... /usr/include/sys/socket.h

But not for FreeBSD:
. /<snip>/include/rte_ip.h
.. /usr/include/netinet/in.h
... /usr/include/machine/endian.h
... /usr/include/netinet6/in6.h
. /<snip>/include/rte_tcp.h

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
8 years agoexamples/ip_pipeline: add flow actions pipeline
Fan Zhang [Wed, 18 Nov 2015 17:09:23 +0000 (17:09 +0000)]
examples/ip_pipeline: add flow actions pipeline

Flow actions pipeline is an extension of flow-classification pipeline.
Some of the operations of flow classification pipeline such as traffic
metering/marking(for e.g. Single Rate Three Color Marker (srTCM), Two
Rate Three Color Marker trTCM)), policer can be performed separately in
flow action pipeline to avoid excessive computational burden on the CPU
core running the flow-classification pipeline. The Flow action pipeline
implements various function such as traffic metering, policer, stats.
Traffic mettering can configured as per the required context, for
examples- per user, per traffic class or both. These contexts can be
applied by specifying parameters in configuration file as shown below;

[PIPELINE1]
type = FLOW_ACTIONS
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
n_flows = 65536
n_meters_per_flow = 1
flow_id_offset = 158
ip_hdr_offset = 142
color_offset = 64

The entries of flow and dscp tables of flow actions pipeline can be
modified through command-line interface. The commands to add or delete
entries to the flow table, DSCP(differentiated services code point)
table and for statistics collection, etc have been included. The key
functions such as Traffic Metering/marking and policer functions have
been implemented as flow-table action handler.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: check pipeline type
Maciej Gajdzica [Thu, 17 Sep 2015 12:58:33 +0000 (14:58 +0200)]
examples/ip_pipeline: check pipeline type

This commit add to CLI command check for pipeline type. It prevents
running CLI commands on not supported pipeline types.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: reconfigure thread binding dynamically
Piotr Azarewicz [Thu, 29 Oct 2015 15:36:53 +0000 (16:36 +0100)]
examples/ip_pipeline: reconfigure thread binding dynamically

Up till now pipeline was bound to thread selected in the initial config.
This patch allows binding pipeline to other threads at runtime using CLI
commands.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: add more functions to routing pipeline
Jasvinder Singh [Wed, 2 Dec 2015 10:22:23 +0000 (10:22 +0000)]
examples/ip_pipeline: add more functions to routing pipeline

This patch adds following features to the
routing-pipeline to enable it for various NFV
use-cases;

1.Fast-path ARP table enable/disable
2.Double-tagged VLAN (Q-in-Q) packet enacapsulation
for the next-hop
3.MPLS encapsulation for the next-hop
4.Add colour (Traffic-class for QoS) to the MPLS tag
5.Classification action to select the input queue
of the hierarchical schedular (QoS)

The above proposed features can be enabled
(or disabled) through the parameters specified
in configuration file as below;

[PIPELINE0]
type = ROUTING
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
n_routes = 4096
n_arp_entries = 1024
ip_hdr_offset = 142
arp_key_offset = 64
l2 = qinq
qinq_sched = no

The LPM table entries might include additional
fields depending upon the packet encapsulation
(Q-in-Q, MPLS)for the next-hop. The CLI
commands for adding or deleting such entries
to LPM table have been implemented. Action
handlers for QinQ and MPLS encapsulation,
classification action to select the input queue
of the hierarchical schedular(QoS) and adding
colour (Traffic-class for QoS) to the MPLS
tag have been implemented.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: add flow id parameter to flow classification
Jasvinder Singh [Mon, 30 Nov 2015 14:08:22 +0000 (14:08 +0000)]
examples/ip_pipeline: add flow id parameter to flow classification

This patch adds flow id field to the flow
classification table entries and adds table action
handlers to read flow id from table entry and
write it into the packet meta-data. The flow_id
(32-bit) parameter is also added to CLI commands
flow add, flow delete, etc.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: extract fields in passthrough pipeline
Jasvinder Singh [Sat, 3 Oct 2015 11:20:12 +0000 (12:20 +0100)]
examples/ip_pipeline: extract fields in passthrough pipeline

This patch implements a generic approach to
extract fields from the packet's header and
copying them to packet metadata. The fields
are selected at the desired offset on the basis
of the mask specified in application configuration
file. The extracted fields, for instance, can be
used to compute hash for the lookup table. This
feature exposes more flexibility to the users as
they will be able to employ new protocol headers
and specify the required fields to be extracted.

The above feature has been implemented as port_in
action handler of the passthrough pipeline. The
example of the configuration file for passthrough
pipeline is as below;

[PIPELINE1]
type = PASS-THROUGH
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
dma_size = 16
dma_dst_offset = 64
dma_src_offset = 150
dma_src_mask = 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF
dma_hash_offset = 80

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: check queues
Jasvinder Singh [Tue, 1 Dec 2015 12:23:59 +0000 (12:23 +0000)]
examples/ip_pipeline: check queues

This patch checks that rx queue and tx queue of each
link specified in ip pipeline configuration file are
used.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: enable promiscuous mode configuration
Jasvinder Singh [Mon, 7 Sep 2015 12:57:42 +0000 (13:57 +0100)]
examples/ip_pipeline: enable promiscuous mode configuration

This patch allows parser to read promisc entry from
the LINK section defined in configuration file. It
is an optional parameter: if present, value should
be read (yes/no, on/off), else the value is the
default value (i.e. 1 = promiscuous mode on)

Example of config file:
[LINK0]
promisc = no; optional parameter, default value is “yes”

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: fix log in link config
Jasvinder Singh [Wed, 30 Sep 2015 15:25:55 +0000 (16:25 +0100)]
examples/ip_pipeline: fix log in link config

This patch fixes bug in app_link_config.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: fix source port mempool
Fan Zhang [Fri, 4 Dec 2015 14:28:56 +0000 (14:28 +0000)]
examples/ip_pipeline: fix source port mempool

Fixes the wrong source port mempool assignment (commit id eb32fe7c).
The source port is now assigned by parsed mempool id index value either by
default or configured by CFG file.

Previously, the mempool id for locating source port's mempool pointer was
the port id. When multiple source ports exist in the same pipeline, and
the default mempool configuration is used (one MEMPOOL0 is shared between
all source ports), the invalid mempool pointer (NULL) will be assigned to
source ports other than first source port.

Fixes: eb32fe7c5574 ("examples/ip_pipeline: rework initialization parameters")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoexamples/ip_pipeline: fix resource leak
Fan Zhang [Fri, 27 Nov 2015 15:52:38 +0000 (15:52 +0000)]
examples/ip_pipeline: fix resource leak

This patch fix the following Coverity issue:

Coverity issue: 120147
Fixes: 7122d30131ad ("examples/ip_pipeline: rework flow classification pipeline")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
8 years agoport: fix sink port statistics
Fan Zhang [Mon, 30 Nov 2015 20:41:10 +0000 (20:41 +0000)]
port: fix sink port statistics

Fixes the sink port statistics incomplete problem.

Fixes: ef3403fb6f9a ("port: source and sink")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agoport: fix mbuf allocation in source port
Fan Zhang [Mon, 30 Nov 2015 20:41:09 +0000 (20:41 +0000)]
port: fix mbuf allocation in source port

Fixes the mbuf allocation not initialized problem. This problem will cause
the mbufs not be able to freed back to mempool by rte_pktmbuf_free().

Fixes: ef3403fb6f9a ("port: source and sink")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
8 years agobonding: fix link state interrupt flag
Bernard Iremonger [Fri, 4 Dec 2015 14:05:38 +0000 (14:05 +0000)]
bonding: fix link state interrupt flag

replace RTE_PCI_DRV_INTR_LSC with RTE_ETH_DEV_INTR_LSC

Fixes: 71ba84b1ccb2 ("bonding: remove fake pci interface")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
8 years agovirtio: fix link state interrupt
Bernard Iremonger [Fri, 4 Dec 2015 15:14:26 +0000 (15:14 +0000)]
virtio: fix link state interrupt

call rte_eth_copy_pci_info() after the RTE_PCI_DRV_INTR_LSC
has been initialised.

Fixes: eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
8 years agovirtio: clean up Tx space checks
Stephen Hemminger [Fri, 4 Dec 2015 01:12:54 +0000 (17:12 -0800)]
virtio: clean up Tx space checks

The space check for transmit ring only needs a single conditional.
I.e only need to recheck for space if there was no space in first check.

This can help performance and simplifies loop.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
8 years agovirtio: fix Rx mbuf initialization
Stephen Hemminger [Fri, 4 Dec 2015 01:12:53 +0000 (17:12 -0800)]
virtio: fix Rx mbuf initialization

The virtio driver was not initializing all the fields in
the receive mbuf. This would cause bugs where previous usage
of mbuf would leave stale TCI and offload flags.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
8 years agobnx2x: set ethernet address type during VF Tx
Chas Williams [Wed, 18 Nov 2015 20:58:41 +0000 (15:58 -0500)]
bnx2x: set ethernet address type during VF Tx

The original was always setting unicast.  While here, clean up some
other references that also point into the Ethernet header.

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
8 years agobnx2x: fix little endian conversion in Tx
Chas Williams [Tue, 3 Nov 2015 17:26:16 +0000 (12:26 -0500)]
bnx2x: fix little endian conversion in Tx

tx_start_bd->vlan_or_ethertype is le16

Signed-off-by: Chas Williams <3chas3@gmail.com>
8 years agocxgbe: use explicit PCI driver structure
Stephen Hemminger [Wed, 2 Dec 2015 22:16:18 +0000 (14:16 -0800)]
cxgbe: use explicit PCI driver structure

The upcoming Hyper-V driver converts the pci_drv element
in struct eth_driver to a union.  When vmbus is added the
pci_drv needs to be explicit. Easier to fix the issue
ahead of time.

This is backwards compatible with previous code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
8 years agoi40evf: fix MAC deletion when stopping
Jingjing Wu [Mon, 30 Nov 2015 03:54:09 +0000 (11:54 +0800)]
i40evf: fix MAC deletion when stopping

When dev_stop is called in i40evf pmd driver, queues are switched off
to stop receiving and transmitting. But the mac address of this VF
still exists in VEB switch.
To stop the traffic from VSI level, the mac address need to be removed
too. Then the bandwidth for this SRIOV VSI can be freed.
This patch fix this issue.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
8 years agoi40e: fix flex payload mask
Andrey Chilikin [Wed, 2 Dec 2015 15:52:13 +0000 (15:52 +0000)]
i40e: fix flex payload mask

Fix wrong copy-paste which led to one bit missing from
I40E_INSET_FLEX_PAYLOAD mask

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
8 years agoixgbe: fix Tx bytes statistics with link down
Harry van Haaren [Tue, 1 Dec 2015 10:25:40 +0000 (10:25 +0000)]
ixgbe: fix Tx bytes statistics with link down

This patch fixes tx byte statistics when transmitting packets
with link down.

Previously, the counter would decrement 4 bytes for each packet that
was transmitted with link down, causing the uint64 to wrap around.

Fixes: c03fcee9abbd ("ixgbe: remove CRC size from byte counters")

Reported-by: Michael Qiu <michael.qiu@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agohash: customize compare function
Yu Nemo Wenbin [Fri, 4 Dec 2015 03:11:41 +0000 (11:11 +0800)]
hash: customize compare function

Give user a chance to customize the hash key compare function.
The default rte_hash_cmp_eq function is set in the rte_hash_create
function, but these builtin ones may not good enough, so the user
may call this to override the default one.

Signed-off-by: Yu Nemo Wenbin <yuwb_bjy@ctbri.com.cn>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agohash: remove duplicated exported symbol
Pablo de Lara [Thu, 3 Dec 2015 16:35:58 +0000 (16:35 +0000)]
hash: remove duplicated exported symbol

rte_hash_create function was accidentally duplicated in
DPDK_2.1 in rte_hash_version.map.

Fixes: 473d1beb ("hash: allow to store data in hash table")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
8 years agomem: fix doxygen comments regarding memzone freeing
Sergio Gonzalez Monroy [Wed, 18 Nov 2015 15:58:06 +0000 (15:58 +0000)]
mem: fix doxygen comments regarding memzone freeing

We can free memzones now, so remove incorrect doxygen documentation
stating otherwise.

Fixes: ff909fe21f0a ("mem: introduce memzone freeing")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
8 years agoethdev: fix debug macro
Yaacov Hazan [Sun, 6 Dec 2015 13:13:29 +0000 (15:13 +0200)]
ethdev: fix debug macro

RTE_PMD_DEBUG_TRACE was changed also to support pedantic flag,
but not completely.

the macro changed only under the RTE_LIBRTE_ETHDEV_DEBUG define,
but when RTE_LIBRTE_ETHDEV_DEBUG is not defined the old format
was left.

fix the macro to support pedantic flag in any case.

Fixes: b974e4a40cb5 ("ethdev: make error checking macros public")

Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
8 years agomaintainers: claim responsibility for secondary process and FreeBSD
Sergio Gonzalez Monroy [Wed, 2 Dec 2015 13:06:20 +0000 (13:06 +0000)]
maintainers: claim responsibility for secondary process and FreeBSD

Claim responsability for:
- Secondary Process as maintainer.
- FreeBSD EAL, FreeBSD contigmem and FreeBSD UIO as co-maintainer.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agomaintainers: claim responsibility for various sample apps
Pablo de Lara [Fri, 27 Nov 2015 14:14:04 +0000 (14:14 +0000)]
maintainers: claim responsibility for various sample apps

Co-maintain helloworld, l2fwd and dpdk-qat sample apps.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
8 years agomk: fix shared library dependencies of drivers
Panu Matilainen [Wed, 21 Oct 2015 14:18:27 +0000 (17:18 +0300)]
mk: fix shared library dependencies of drivers

Similar to commit 113c8e13c4201eee207723571f83aaf285277d75, but
for bnx2x, pcap, sze2data and xenvirt PMDs.

Requiring applications to know about library internal details like
dependencies to external helper libraries is a limitation of
static linkage, shared libraries should always know their own
dependencies for sane operation. This is especially highlighted
with dlopen()'ed items, having applications link against about plugin
internal dependencies goes on the side of absurd.

Note that linking with a shared combined library still requires to
know the internal dependencies.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agomk: prepare dependencies in shared libraries not combined
Thomas Monjalon [Sun, 6 Dec 2015 18:19:24 +0000 (19:19 +0100)]
mk: prepare dependencies in shared libraries not combined

Some DPDK libraries have a dependency.
The Mellanox drivers embed this declaration in shared library case.
So the application do not need to know the dependency when linking.
But it cannot work with static libraries or the combined one.
Note that Mellanox drivers are currently not supported in a shared
combined library case.

Most of the DPDK libraries declare their dependencies to be linked
with the application in every cases, even when using drivers as
shared library plugins.
This patch improves the condition used for Mellanox drivers, so that
it can be applied to other drivers without breaking the shared
combined library case.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agomaintainers: take responsibility for build system
Thomas Monjalon [Thu, 3 Dec 2015 13:38:31 +0000 (14:38 +0100)]
maintainers: take responsibility for build system

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
8 years agopkg: update RPM with standard install
Thomas Monjalon [Thu, 3 Dec 2015 03:38:31 +0000 (04:38 +0100)]
pkg: update RPM with standard install

The "make install" is more standard now.
So the recipe can be simplified.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agoapp/proc_info: rename binary with prefix
Thomas Monjalon [Tue, 1 Dec 2015 23:04:27 +0000 (00:04 +0100)]
app/proc_info: rename binary with prefix

In order to be installed system-wise, this application needs
a prefix. So it makes clear that it is DPDK related.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: install examples
Thomas Monjalon [Tue, 1 Dec 2015 23:11:28 +0000 (00:11 +0100)]
mk: install examples

The examples are part of the installed documentation.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: install doc
Thomas Monjalon [Tue, 1 Dec 2015 22:59:26 +0000 (23:59 +0100)]
mk: install doc

The HTML API and HTML/PDF guides may be installed if generated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: install binding tool in sbin directory
Thomas Monjalon [Tue, 1 Dec 2015 22:59:18 +0000 (23:59 +0100)]
mk: install binding tool in sbin directory

sbin/dpdk_nic_bind is a symbolic link to tools/dpdk_nic_bind.py
where some python objects may be generated.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: install kernel modules
Thomas Monjalon [Tue, 1 Dec 2015 22:37:52 +0000 (23:37 +0100)]
mk: install kernel modules

Add kernel modules to "make install".
Nothing is done if there is no kernel module compiled.

When using "make install T=", the default path is the same as before.

The Linux path is based on host kernel version.

Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: split install rule
Thomas Monjalon [Tue, 1 Dec 2015 22:29:48 +0000 (23:29 +0100)]
mk: split install rule

Provides new sub-rules to install runtime and sdk separately.

The build directory must be changed from BUILD_DIR to O in install
rules to avoid a bad recursive effect (O being BUILD_DIR being O + T).

Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: introduce new install syntax
Thomas Monjalon [Tue, 1 Dec 2015 14:04:01 +0000 (15:04 +0100)]
mk: introduce new install syntax

The old install command was:
make install T=x86_64-native-linuxapp-gcc DESTDIR=install
It still works and can be replaced by these more standard commands:
make config T=x86_64-native-linuxapp-gcc 0=x86_64-native-linuxapp-gcc
make O=x86_64-native-linuxapp-gcc
make install O=x86_64-native-linuxapp-gcc prefix= DESTDIR=install

It means the "make install" do not perform any compilation anymore when T
is not used. It is done only in pre_install to keep compatibility with the
old syntax based on T= option.

The default prefix /usr/local is empty in the T= case which is
used only for a local install.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: install a standard cutomizable tree
Thomas Monjalon [Tue, 1 Dec 2015 11:47:48 +0000 (12:47 +0100)]
mk: install a standard cutomizable tree

The rule "install" follows these conventions:
http://gnu.org/prep/standards/html_node/Directory-Variables.html
http://gnu.org/prep/standards/html_node/DESTDIR.html

The variable sdkdir has been added to the more standards ones,
to configure the directory used with RTE_SDK when using the DPDK makefiles
to build an application.

It is still possible to build DPDK with the "install T=" rule without
specifying any DESTDIR. In such case there is no install, as before.

The old usage of an installed SDK is:
    make -C examples/helloworld RTE_SDK=$(readlink -m $DESTDIR) \
         RTE_TARGET=x86_64-native-linuxapp-gcc
RTE_TARGET can be specified but is useless now with an installed SDK.
The RTE_SDK directory must now point to a different path depending of
the installation.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: move installation procedure in install rule
Thomas Monjalon [Tue, 1 Dec 2015 08:27:37 +0000 (09:27 +0100)]
mk: move installation procedure in install rule

The real installation was called "binary install" and was done
after the build when DESTDIR was specified.
Remove this limitation and move the code in install rule only.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: remove multi-target install
Thomas Monjalon [Tue, 1 Dec 2015 07:36:00 +0000 (08:36 +0100)]
mk: remove multi-target install

The multi-target install create some subdirectories with the target name
which is not standard for a "make install" procedure.

The uninstall procedure cannot be applied properly (without removing
all files in a directory). It would need to pre-compute paths.
As it is a packaging issue, it is removed from the build system capabilities.

The variable BUILD_DIR is also renamed to RTE_OUTPUT used in other files.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: remove testall
Thomas Monjalon [Thu, 3 Dec 2015 02:48:50 +0000 (03:48 +0100)]
mk: remove testall

It is not possible to test every configs on an unique machine.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
8 years agomk: fix combined lib build with ABI versioning
Ferruh Yigit [Thu, 3 Dec 2015 13:51:08 +0000 (13:51 +0000)]
mk: fix combined lib build with ABI versioning

Fixes following error (observed when versioning macros used):
  LD libdpdk.so
  /usr/bin/ld: /root/dpdk/build/lib/libdpdk.so: version node not found
  for symbol <function>@DPDK_x.y

Also resulting combined library contains symbol version information:
$ readelf -a build/lib/libdpdk.so | grep rte_eal_ | grep @ | head
   <...>    GLOBAL DEFAULT   12 rte_eal_alarm_set@@DPDK_2.0
   <...>    GLOBAL DEFAULT   12 rte_eal_pci_write_config@@DPDK_2.1
   <...>    GLOBAL DEFAULT   12 rte_eal_remote_launch@@DPDK_2.0
...

Versioning fixed by merging all version scripts into one automatically and
feeding it to final library.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
8 years agotools: add short alias -s to NIC binding status
Harry van Haaren [Fri, 30 Oct 2015 14:17:58 +0000 (14:17 +0000)]
tools: add short alias -s to NIC binding status

This patch adds -s as an alias to --status in dpdk_nic_bind.py,
providing a convenient shorthand.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
8 years agosched: fix build without SSE4
Mike Sowka [Sat, 5 Dec 2015 22:27:56 +0000 (17:27 -0500)]
sched: fix build without SSE4

Irrelevant of the target, the preprocessor #ifdef SSE2 for the
grinder_pipe_exists function is inadequate since the __mm_testz_si128
function requires SSE4.1, PTEST instruction described in
https://en.wikipedia.org/wiki/SSE4#SSE4.1 (I do no have better spec
reference). I have bumped the preprocessor #ifdef to require SSE4.

The Atom N2600 does not have SSE4, http://ark.intel.com/products/58916,
and so I had trouble building rte_sched with optimized version of
grinder_pipe_exists, with following:
error: inlining failed in call to always_inline _mm_testz_si128’:
       target specific option mismatch

GCC 4.9 correctly identifies my target as not having SSE4, and with
provided patch builds the non-optimized version of grinder_pipe_exists.

Signed-off-by: Mike Sowka <msowka@gmail.com>
8 years agoconfig: disable vector optimizations in sched library
Christian Ehrhardt [Tue, 1 Dec 2015 15:13:23 +0000 (16:13 +0100)]
config: disable vector optimizations in sched library

As it causes issues when building with RTE_MACHINE=default due to SSE4.x
requirements and in other discussions was so far rated "lightly tested and
doesn't provide really significant performance improvement" let us disable
that in the default config.
(=> http://dpdk.org/ml/archives/dev/2015-November/029067.html)

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
8 years agomempool: fix mlx driver loading
Thomas Monjalon [Fri, 4 Dec 2015 16:44:51 +0000 (17:44 +0100)]
mempool: fix mlx driver loading

The function rte_mempool_obj_iter used in mlx drivers
was not exported. So the driver loading was failing:

EAL: open shared lib librte_pmd_mlx4.so
EAL: x86_64-native-linuxapp-gcc/lib/librte_pmd_mlx4.so:
undefined symbol: rte_mempool_obj_iter

Fixes: 9d41beed24b0 ("lib: provide initial versioning")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agoeal: fix build with Xen dom0 enabled
Thomas Monjalon [Thu, 3 Dec 2015 04:16:55 +0000 (05:16 +0100)]
eal: fix build with Xen dom0 enabled

There is a new function in the EAL API for internal use.
It has neither a proper prefix nor a .map export:
libethdev.so: undefined reference to `is_xen_dom0_supported'

Fixes: 719dbebceb81 ("xen: allow determining DOM0 at runtime")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
8 years agomk: fix combined library build with Xen driver
Christian Ehrhardt [Thu, 3 Dec 2015 07:04:23 +0000 (08:04 +0100)]
mk: fix combined library build with Xen driver

Building RTE_LIBRTE_PMD_XENVIRT was broken when RTE_BUILD_COMBINE_LIBS was
enabled (http://dpdk.org/ml/archives/dev/2015-November/028660.html).
Now the underlying issue is rather simple, the xen code needs libxenstore.
But rte.app.mk so far only considered that when RTE_BUILD_COMBINE_LIBS was
disabled.
While it is correct to create the DPDK sublib linking only in the
RTE_BUILD_COMBINE_LIBS=n case, the libxenstore should be added to the linked
libs in any case if RTE_LIBRTE_PMD_XENVIRT is enabled.

Reported-by: Thiago Martins <thiagocmartinsc@gmail.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
8 years agomk: influence CPU flags with user input
Simon Kagstrom [Tue, 24 Nov 2015 07:50:01 +0000 (08:50 +0100)]
mk: influence CPU flags with user input

We have encountered a CPU where the AES-NI instruction set is disabled
due to export restrictions. Since the build machine and target machine
is different, using -native configs doesn't work, and on this CPU, the
application refuses to run due to the AES CPU flags being amiss.

The patch passes EXTRA_CFLAGS to the figure-out-cpu-flags helper,
which allows us to add -mno-aes to the compile flags and resolve this
problem.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
8 years agomk: fix objects and libraries order when linking
David Marchand [Fri, 4 Dec 2015 17:11:03 +0000 (18:11 +0100)]
mk: fix objects and libraries order when linking

The initial problem has been seen while building mlx4 pmd as a shared
library on Ubuntu 14.04 (gcc 4.8.4-2ubuntu1~14.04).

Resulting .so will lack the DT_NEEDED entry for libibverbs:

marchand@ubuntu1404:~/dpdk$ ldd ./build/lib/librte_pmd_mlx4.so
linux-vdso.so.1 =>  (0x00007fff87ebb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ced21a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2ced821000)

And trying to load it in testpmd triggers this error:

[...]
EAL: librte_pmd_mlx4.so: undefined symbol: ibv_query_port
[...]

After some strace, the problem comes from the --as-needed option passed to the
linker.

It is safer to specify libraries we depend on after the objects we are linking
into a shared library, especially when the linker is invoked with options like
--as-needed.

Fixes: bef06a8a0655 ("mk: set library dependencies in shared object file")

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
8 years agotools: exit setup script without prompt
John McNamara [Thu, 22 Oct 2015 10:36:27 +0000 (11:36 +0100)]
tools: exit setup script without prompt

Exit tools/setup.sh script without prompting "Press enter to continue".

The script can now be exited by typing the option number, "quit" or "q".

Signed-off-by: John McNamara <john.mcnamara@intel.com>
8 years agoscripts: fix ABI validator for KNI module config
Panu Matilainen [Thu, 24 Sep 2015 07:50:59 +0000 (10:50 +0300)]
scripts: fix ABI validator for KNI module config

The validator attempts to disable all kernel modules but since
commit 36080ff96b0eb37a6da8c4fec1a2f8a57dfadf5b fails to do so
for KNI, causing the build stage to fail if kernel headers are missing.

With the introduction of CONFIG_RTE_KNI_KMOD, CONFIG_RTE_LIBRTE_KNI=n
can eventually be dropped but leaving it around for now as its
needed with pre-2.1 versions.

Fixes: 36080ff96b0e ("config: add KNI kmod option")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoscripts: factorize ABI validator config fixups
Panu Matilainen [Thu, 24 Sep 2015 07:50:58 +0000 (10:50 +0300)]
scripts: factorize ABI validator config fixups

Move identical config fixups into a function.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoscripts: permit passing extra flags to ABI validator
Panu Matilainen [Thu, 24 Sep 2015 07:50:57 +0000 (10:50 +0300)]
scripts: permit passing extra flags to ABI validator

Its sometimes necessary to disable warnings etc to get an older
version of code to build.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
8 years agoscripts: add build tests
Thomas Monjalon [Thu, 22 Oct 2015 18:27:05 +0000 (20:27 +0200)]
scripts: add build tests

This script helps to build a list of target with some custom options.
It tries to enable most of the options.
The examples and documentation are also built.

It uses some configuration from exported variables.
This config works on my machine:
export DPDK_DEP_PCAP=y
export DPDK_DEP_MOFED=y
       mlxdep=/opt/mofed-3.0
export DPDK_DEP_CFLAGS=-I$mlxdep/include
export DPDK_DEP_LDFLAGS=-L$mlxdep/lib
export DPDK_BUILD_TEST_CONFIGS='x86_64-native-linuxapp-gcc+shared+next
       x86_64-native-linuxapp-clang+shared+combined
       i686-native-linuxapp-gcc+combined'
export DPDK_MAKE_JOBS=8
export DPDK_NOTIFY=notify-send

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
v2:
- conditionally enable szedata2
- add quotes for CFLAGS and LDFLAGS

8 years agoscripts: add checkpatch wrapper
Thomas Monjalon [Thu, 22 Oct 2015 18:26:28 +0000 (20:26 +0200)]
scripts: add checkpatch wrapper

This script can be used to call checkpatch.pl from Linux with some
custom DPDK options.

The path to the original Linux script must be set in an environment
variable. A script is added to load any configuration variables
required by development tools from a file .develconfig, or
~/.config/dpdk/devel.config or /etc/dpdk/devel.config.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
v2:
- do not ignore COMPLEX_MACRO
- use option --no-tree to avoid silent failure
- add -q and -v options

8 years agobonding: add depencency on cmdline library
Stephen Hemminger [Wed, 2 Dec 2015 04:05:09 +0000 (20:05 -0800)]
bonding: add depencency on cmdline library

Parallel build of bonding driver can fail because of
missing dependency.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
8 years agoapp/cmdline_test: add missing dependencies
Stephen Hemminger [Wed, 2 Dec 2015 04:05:08 +0000 (20:05 -0800)]
app/cmdline_test: add missing dependencies

The cmdline test is missing a necessary dependency on other components.
This caused a build failure when doing parallel builds.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>