Commit Graph

381 Commits

Author SHA1 Message Date
Bruce Richardson
5b9656b157 lib: build with meson
Add non-EAL libraries to DPDK build. The compat lib is a special case,
along with the previously-added EAL, but all other libs can be build using
the same set of commands, where the individual meson.build files only need
to specify their dependencies, source files, header files and ABI versions.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30 17:49:16 +01:00
Bruce Richardson
844514c735 eal: build with meson
Support building the EAL with meson and ninja. This involves a number of
different meson.build files for iterating through all the different
subdirectories in the EAL. The library itself will be compiled on build but
the header files are only copied from their initial location once "ninja
install" is run. Instead, we use meson dependency tracking to ensure that
other libraries which use the EAL headers can find them in their original
locations.

Note: this does not include building kernel modules on either BSD or Linux

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30 17:49:16 +01:00
Bruce Richardson
a25a650be5 build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt

This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.

From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30 17:49:16 +01:00
Hemant Agrawal
1ee9569576 config: enable dpaaX drivers for generic ARMv8
This patch enables the NXP DPAA & DPAA2 drivers for
ARMV8 targets. They can be used with standard armv8 config
with command line mempool argument or newly introduced
platform mempool internal registration mechanism.

Note that the dpaa(x) specific config files are still preserved
to continue customer support. They also contain some of the ARM
performance tuning flags. e.g the default ARM cache size of 128
is not optimal for NXP platforms.

However, these configs will eventually be removed once a dynamic
mechanisms are developed to detect the performance settings.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-30 16:54:50 +01:00
Rasesh Mody
860b1a5ff4 net/qede: remove debug config option
With dynamic logging, we no longer need DEBUG INFO config option.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-01-29 10:48:16 +01:00
Hemant Agrawal
8824b74d8f bus/fslmc: register platform HW mempool on runtime
Detect if the DPAA2 mempool objects are present and register
it as platform default hw mempool

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 19:02:05 +01:00
Hemant Agrawal
2bd0d5b951 bus/dpaa: register platform HW mempool on runtime
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 19:02:05 +01:00
Jerin Jacob
369adc4885 config/thunderx: disable C11 memory model ring
On thunderx and octeontx, ring_perf_autotest and
ring_pmd_perf_autotest test shows better performance
when disabling CONFIG_RTE_RING_USE_C11_MEM_MODEL.
On the other hand, Enabling CONFIG_RTE_RING_USE_C11_MEM_MODEL
shows better performance on thunderx2.
Since thunderx2 is using the default armv8 config,
no particular change is required.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-29 16:40:01 +01:00
Jia He
39368ebfc6 ring: introduce C11 memory model barrier option
This patch is to support C11 memory model barrier in librte_ring.

There are 2 barrier implementation options in librte_ring (suggested
by Jerin).
1. use rte_smp_rmb
2. use load_acquire/store_release(refer to [1]).
The reason why providing 2 options is the performance benchmark
difference in different arm machines, refer to [2].

CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided, and by default it is "n"
on any architectures and only "y" on arm64 so far.

[1] https://github.com/freebsd/freebsd/blob/master/sys/sys/buf_ring.h#L170
[2] http://dpdk.org/ml/archives/dev/2017-October/080861.html

Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Jia He <jia.he@hxt-semitech.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 16:10:20 +01:00
Ferruh Yigit
192f52e230 config: sort PMD config options
No config option changed, added or removed.
Only reshuffle PMD config options mostly to help new PMDs where to put
their new config option.

Ordered as physical, paravirtual and virtual groups. Alphabetical order
within a group.

Also tried to group vendor devices together which breaks alphabetical
order in some places.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-22 01:59:14 +01:00
Matan Azrad
6086ab3bb3 net/vdev_netvsc: introduce Hyper-V platform driver
This patch lays the groundwork for this driver (draft documentation,
copyright notices, code base skeleton and build system hooks). While it can
be successfully compiled and invoked, it's an empty shell at this stage.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-01-21 15:51:52 +01:00
Rasesh Mody
f64b91b0eb net/qede: replace config option with run-time arg
This patch adds support for handling run-time driver arguments.
We have removed config option for per VF Tx switching and added
a run-time argument vf_txswitch. By default, the VF Tx switching is
enabled however it can be disabled using run-time argument.

Sample usage to disable per port VF Tx switching is something like...

 -w 05:00.0,vf_txswitch=0 -w 05:00.1,vf_txswitch=0

Fixes: 1282943aa0 ("net/qede: fix default config option")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-01-21 15:51:52 +01:00
Pablo de Lara
d1be197787 cryptodev: remove duplicated device name length
Two macros were defined in cryptodev, to serve the same
purpose: RTE_CRYPTODEV_NAME_LEN (in the config file) and
RTE_CRYPTODEV_NAME_MAX_LEN (in the rte_cryptodev.h file).
Since the second one is part of the external API,
the first one has been removed, avoiding duplications.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
2018-01-20 16:10:53 +01:00
Herbert Guan
cd7fc8a84b eal/arm64: optimize memcpy
This patch provides an option to do rte_memcpy() using 'restrict'
qualifier, which can induce GCC to do optimizations by using more
efficient instructions, providing some performance gain over memcpy()
on some ARM64 platforms/enviroments.

The memory copy performance differs between different ARM64
platforms. And a more recent glibc (e.g. 2.23 or later)
can provide a better memcpy() performance compared to old glibc
versions. It's always suggested to use a more recent glibc if
possible, from which the entire system can get benefit. If for some
reason an old glibc has to be used, this patch is provided for an
alternative.

This implementation can improve memory copy on some ARM64
platforms, when an old glibc (e.g. 2.19, 2.17...) is being used.
It is disabled by default and needs "RTE_ARCH_ARM64_MEMCPY"
defined to activate. It's not always proving better performance
than memcpy() so users need to run DPDK unit test
"memcpy_perf_autotest" and customize parameters in "customization
section" in rte_memcpy_64.h for best performance.

Compiler version will also impact the rte_memcpy() performance.
It's observed on some platforms and with the same code, GCC 7.2.0
compiled binary can provide better performance than GCC 4.8.5. It's
suggested to use GCC 5.4.0 or later.

Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-20 17:47:25 +01:00
Sunil Kumar Kori
ef4fb1d6c7 config: enable compilation of DPAA eventdev PMD
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Nipun Gupta
72654f090a event/dpaa2: replace static with dynamic logging
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Liang Ma
4236ce9bf5 event/opdl: add OPDL ring infrastructure library
OPDL ring is the core infrastructure of OPDL PMD. OPDL ring library
provide the core data structure and core helper function set. The Ring
implements a single ring multi-port/stage pipelined packet distribution
mechanism. This mechanism has the following characteristics:

• No multiple queue cost, therefore, latency is significant reduced.
• Fixed dependencies between queue/ports is more suitable for complex.
  fixed pipelines of stateless packet processing (static pipeline).
• Has decentralized distribution (no scheduling core).
• Packets remain in order (no reorder core(s)).
* Update build system to enable compilation.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
2018-01-19 16:09:56 +01:00
Amr Mokhtar
f714a18885 app/testbbdev: add test application for bbdev
- full test suite for bbdev
- test App works seamlessly on all PMDs registered with bbdev
 framework
- a python script is provided to make our life easier
- supports execution of tests by parsing Test Vector files
- test Vectors can be added/deleted/modified with no need for
 re-compilation
- various tests can be executed:
 (a) Throughput test
 (b) Offload latency test
 (c) Operation latency test
 (d) Validation test
 (c) Sanity checks

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
2018-01-19 01:44:25 +01:00
Amr Mokhtar
b8cfe2c9ae bb/turbo_sw: add software turbo driver
- bbdev 'turbo_sw' is the software accelerated version of 3GPP L1
 Turbo coding operation using the optimized Intel FlexRAN SDK libraries.
- 'turbo_sw' pmd is disabled by default

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-19 01:44:25 +01:00
Amr Mokhtar
7dc2b15894 bb/null: add null base band device driver
- 'bbdev_null' is a basic pmd that performs a minimalistic
 bbdev operation
- useful for bbdev smoke testing and in measuring the overhead
 introduced by the bbdev library
- 'bbdev_null' pmd is enabled by default

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-19 01:44:25 +01:00
Amr Mokhtar
4935e1e9f7 bbdev: introduce wireless base band device lib
- wireless baseband device (bbdev) library files
- bbdev is tagged as EXPERIMENTAL
- Makefiles and configuration macros definition
- bbdev library is enabled by default
- release notes of the initial version

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-19 01:44:25 +01:00
Anatoly Burakov
7425a8fc5a app/procinfo: add compilation option in config
Unlike every other DPDK application's compilation, proc_info's
compilation cannot be turned off on Linux. Fix it by adding a
config option to base linuxapp config.

Fixes: 22561383ea ("app: replace dump_cfg by proc_info")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-01-17 19:42:01 +01:00
Pavan Nikhilesh
43e9f17ce7 log: remove log level config option
Remove RTE_LOG_LEVEL config option, use existing RTE_LOG_DP_LEVEL config
option for controlling datapath log level.
RTE_LOG_LEVEL is no longer needed as dynamic logging can be used to
control global and module specific log levels.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2018-01-17 14:21:46 +01:00
Pavan Nikhilesh
1334a505ef config: select maximum VFIO groups on ThunderX
Increase the max vfio groups to 128.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-17 01:04:24 +01:00
Pavan Nikhilesh
c3f1685793 vfio: make groups max configurable
Make max vfio groups compile-time configurable so that platforms can
choose vfio group limit.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-01-17 00:50:17 +01:00
Hyong Youb Kim
36efba2f93 net/enic: use dynamic log types
"pmd.enic.init" replaces CONFIG_RTE_LIBRTE_ENIC_DEBUG
"pmd.enic.flow" replaces CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-01-16 18:47:49 +01:00
Jingjing Wu
319c421f38 net/avf: enable SSE Rx Tx
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2018-01-16 18:47:49 +01:00
Wenzhuo Lu
a2b29a7733 net/avf: enable basic Rx Tx
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Jingjing Wu
22b123a36d net/avf: initialize PMD
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2018-01-16 18:47:49 +01:00
Wei Dai
ee653bd800 net/i40e: determine number of queues per VF at run time
Without this patch, the number of queues per i40e VF is set to 4
by CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4 in config/common_base.
It is a fixed value determined at compile time and can't be changed
at run time.
With this patch, the number of queues per i40e VF can be determined
at run time. For example, if the PCI address of an i40e PF is
aaaa:bb.cc, with the EAL parameter -w aaaa:bb.cc,queue-num-per-vf=8,
the number of queues per VF created from this PF is set to 8.
If there is no "queue-num-per-vf" setting in EAL parameters, it uses
the default value of 4. And if the value after the "queue-num-per-vf"
is invalid, it will also use the default value. The valid values can
be 1, 2, 4, 8, or 16.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-01-16 18:47:49 +01:00
Pavan Nikhilesh
6ff1717841 event/octeontx: implement dynamic logging
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Pavan Nikhilesh
7d6321de8d mempool/octeontx: implement dynamic logging
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Pavan Nikhilesh
4d35a276c1 net/octeontx: implement dynamic logging
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Pavan Nikhilesh
c563443c64 net/thunderx: implement dynamic logging
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
70e28c612d net/liquidio: implement dynamic logging
This driver mostly uses the common pattern. Convert this to the
dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
69b6573980 net/qede: implement dynamic logging
This driver is mostly like others with slightly different logging
macros. The semantics were retained, with some minor reformatting.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
8bc0acae97 net/ena: implement dynamic logging
Use dynamic rather static configuration for logging.
Also include ena_assert_msg.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
1ad18ef8bf net/fm10k: implement dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
c73f9b2662 net/nfp: implement dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

---
v2: remove unsed macro RTE_LIBRTE_NFP_NET_DEBUG_INIT
2018-01-16 18:47:49 +01:00
Stephen Hemminger
0062818856 net/virtio: implement dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
ed5bbb767c net/e1000: implement dynamic logging
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
174dae95c9 net/ixgbe: implement dynamic logging
Convert all drivers possible to dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
79daffdcb6 net/vmxnet3: implement dynamic logging
Replace compile time configuration with runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Stephen Hemminger
4f3419a602 net/bnx2x: implement dynamic logging
Replace compile time option for init and driver log with
dynamic value.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

---
v2: remove remaining RTE_LIBRTE_BNX2X_DEBUG usage
2018-01-16 18:47:49 +01:00
Stephen Hemminger
e6b790c065 net/avp: implement dynamic logging
All PMD should be using dynamic log levels.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-16 18:47:49 +01:00
Matan Azrad
c2b3dba84a net/mlx4: revert workaround for broken Verbs
This workaround was needed to properly handle device removal with old
Mellanox OFED releases that are not supported by this PMD anymore.

Starting from rdma-core v16 this removal issue shouldn't happen when
setting MLX4_DEVICE_FATAL_CLEANUP environment variable to 1.

Set the aforementioned variable to 1.

Reverts: 5f4677c6ad ("net/mlx4: workaround verbs error after plug-out")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-01-16 18:47:49 +01:00
Jerin Jacob
b84ad85188 config: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Hemant Agrawal
d81734cacc drivers: use SPDX tag in NXP dpaa files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-04 22:41:39 +01:00
Hemant Agrawal
131a75b6e4 drivers: use SPDX tag in NXP dpaa2 files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-04 22:41:39 +01:00
Harish Patil
1282943aa0 net/qede: fix default config option
Restore the default configuration as in previous releases and
add a debug msg.

Fixes: f07aa795c9 ("net/qede: disable per-VF Tx switching feature")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-11-10 08:12:20 +00:00