dpdk.git
3 years agoeal: add power management intrinsics
Liang Ma [Tue, 27 Oct 2020 14:59:02 +0000 (14:59 +0000)]
eal: add power management intrinsics

Add two new power management intrinsics, and provide an implementation
in eal/x86 based on UMONITOR/UMWAIT instructions. The instructions
are implemented as raw byte opcodes because there is not yet widespread
compiler support for these instructions.

The power management instructions provide an architecture-specific
function to either wait until a specified TSC timestamp is reached, or
optionally wait until either a TSC timestamp is reached or a memory
location is written to. The monitor function also provides an optional
comparison, to avoid sleeping when the expected write has already
happened, and no more writes are expected.

For more details, please refer to Intel(R) 64 and IA-32 Architectures
Software Developer's Manual, Volume 2.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
3 years agoeal/x86: add CPU flag for WAITPKG
Liang Ma [Tue, 27 Oct 2020 14:59:01 +0000 (14:59 +0000)]
eal/x86: add CPU flag for WAITPKG

Add a new CPUID flag indicating processor support for UMONITOR/UMWAIT
and TPAUSE instructions instruction.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoexamples/ip_pipeline: fix external build
Cristian Dumitrescu [Mon, 26 Oct 2020 21:57:55 +0000 (21:57 +0000)]
examples/ip_pipeline: fix external build

Fix build with external makefile.

Fixes: fbc74e66334f ("examples/ip_pipeline: remove infra code")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: fix resource leak
Cristian Dumitrescu [Mon, 26 Oct 2020 21:23:55 +0000 (21:23 +0000)]
examples/pipeline: fix resource leak

Coverity issue: 363041
Fixes: 5074e1d551 ("examples/pipeline: add configuration commands")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: fix string copy into fixed size buffer
Cristian Dumitrescu [Mon, 26 Oct 2020 19:59:16 +0000 (19:59 +0000)]
pipeline: fix string copy into fixed size buffer

Fix potential buffer overflows by string copy into fixed size buffer.

Coverity issue: 362732, 362736, 362760, 362772, 362775, 362784
Coverity issue: 362800, 362803, 362806, 362811, 362814, 362816
Coverity issue: 362834, 362837, 362844, 362845, 362857, 362861
Coverity issue: 362868, 362890, 362893, 362904, 362905
Fixes: 56492fd536 ("pipeline: add new SWX pipeline type")
Fixes: 1e4c88caea ("pipeline: add SWX extern objects and funcs")
Fixes: e9d870dd93 ("pipeline: add SWX pipeline tables")
Fixes: a1711f948d ("pipeline: add SWX Rx and extract instructions")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agohash: fix check of parameter
Yunjian Wang [Tue, 27 Oct 2020 12:51:25 +0000 (20:51 +0800)]
hash: fix check of parameter

Coverity flags that 'h' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 363625
Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
3 years agoeal: fix interrupt trace point
Yunjian Wang [Thu, 15 Oct 2020 08:42:30 +0000 (16:42 +0800)]
eal: fix interrupt trace point

This patch fixes (dereference after null check) coverity issue.
For this reason, we should add null check at the beginning of the
function and return error directly if the 'intr_handle' is null.

Coverity issue: 357695, 357751
Fixes: 05c4105738d8 ("trace: add interrupt tracepoints")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
3 years agotest/ring: add stress tests for zero copy API
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:52 +0000 (00:45 -0500)]
test/ring: add stress tests for zero copy API

Add stress tests for zero copy API.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agotest/ring: add functional tests for zero copy API
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:50 +0000 (00:45 -0500)]
test/ring: add functional tests for zero copy API

Add functional tests for zero copy APIs. Test enqueue/dequeue
functions are created using the zero copy APIs to fit into
the existing testing method.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoring: add zero copy API
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:49 +0000 (00:45 -0500)]
ring: add zero copy API

Add zero-copy APIs. These APIs provide the capability to
copy the data to/from the ring memory directly, without
having a temporary copy (for ex: an array of mbufs on
the stack). Use cases that involve copying large amount
of data to/from the ring can benefit from these APIs.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agotest/ring: fix integer cast to pointer
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:56 +0000 (00:45 -0500)]
test/ring: fix integer cast to pointer

Use uintptr_t instead of unsigned long while initializing the
array of pointers.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agotest/ring: remove unnecessary braces
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:55 +0000 (00:45 -0500)]
test/ring: remove unnecessary braces

Remove unnecessary braces to improve readability.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agotest/ring: fix memory dump
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:54 +0000 (00:45 -0500)]
test/ring: fix memory dump

Pass the correct number of bytes to dump the memory.

Fixes: bf28df24e915 ("test/ring: add contention stress test")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agoexamples/tep_term: remove this application
Xiaoyun Li [Mon, 26 Oct 2020 08:11:43 +0000 (16:11 +0800)]
examples/tep_term: remove this application

This example sets up a scenario that VXLAN packets can be received
by different PF queues based on VNID and each queue is bound to a VM
with a VNID so that the VM can receive its inner packets.

Usually, OVS is used to do the software encap/decap for VXLAN packets.

And the VXLAN packets offloading can be replaced with flow rules in
testpmd like Chapter "Sample VXLAN flow rules" in Testpmd Application
User Guide.

And this example hasn't been used for a long time.

So deprecate this example.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agoapp/fib: select lookup
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:30 +0000 (15:11 +0000)]
app/fib: select lookup

Added -v option to switch between different lookup implementations
to measure their performance and correctness.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
3 years agofib6: add AVX512 lookup
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:29 +0000 (15:11 +0000)]
fib6: add AVX512 lookup

Add new lookup implementation for FIB6 trie algorithm using
AVX512 instruction set

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agofib6: move lookup definition to header
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:28 +0000 (15:11 +0000)]
fib6: move lookup definition to header

Move trie table layout and lookup definition into the
private header file. This is necessary for implementing a
vectorized lookup function in a separate .с file.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agofib6: add lookup runtime selection
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:27 +0000 (15:11 +0000)]
fib6: add lookup runtime selection

Add type argument to trie_get_lookup_fn()
Now it only supports RTE_FIB6_LOOKUP_TRIE_SCALAR

Add new rte_fib6_select_lookup() - user can change lookup
function type runtime.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agofib: add AVX512 lookup
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:26 +0000 (15:11 +0000)]
fib: add AVX512 lookup

Add new lookup implementation for DIR24_8 algorithm using
AVX512 instruction set

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agofib: move lookup definition to header
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:25 +0000 (15:11 +0000)]
fib: move lookup definition to header

Move dir24_8 table layout and lookup definition into the
private header file. This is necessary for implementing a
vectorized lookup function in a separate .с file.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agofib: add lookup runtime selection
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:24 +0000 (15:11 +0000)]
fib: add lookup runtime selection

Add type argument to dir24_8_get_lookup_fn()
Now it supports 3 different lookup implementations:
 RTE_FIB_LOOKUP_DIR24_8_SCALAR_MACRO
 RTE_FIB_LOOKUP_DIR24_8_SCALAR_INLINE
 RTE_FIB_LOOKUP_DIR24_8_SCALAR_UNI

Add new rte_fib_select_lookup() - user can change lookup
function type runtime.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agofib: remove maximum type enums
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:31 +0000 (15:11 +0000)]
fib: remove maximum type enums

FIB type RTE_FIB_TYPE_MAX is used only for sanity checks,
remove it to prevent applications start using it.
The same is for FIB6's RTE_FIB6_TYPE_MAX.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoservice: separate statistics dump and reset
David Marchand [Thu, 22 Oct 2020 08:08:10 +0000 (10:08 +0200)]
service: separate statistics dump and reset

No functional change intended.

service_dump_calls_per_lcore() was always called with a 0 reset flag.
service_dump_one() was called with either a 0 reset flag or a NULL
FILE pointer.

We can split the code for readability sake.

Note: there is no path to resetting calls_per_service[], this is left as
is.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
3 years agodoc: update ABI version references
Ray Kinsella [Mon, 26 Oct 2020 19:31:14 +0000 (19:31 +0000)]
doc: update ABI version references

Updated references to abi versions in the contributors guide.
Fixed an inaccurate reference to a symbol in the policy.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoapp/procinfo: clean old build macro
David Marchand [Fri, 23 Oct 2020 07:44:51 +0000 (09:44 +0200)]
app/procinfo: clean old build macro

When merging this series after Bruce changes on build macros, an old macro
usage has been re-introduced.

Fixes: d82d6ac64338 ("app/procinfo: add crypto security context info")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agolpm: hide internal data
Ruifeng Wang [Fri, 23 Oct 2020 09:38:18 +0000 (11:38 +0200)]
lpm: hide internal data

Fields except tbl24 and tbl8 in rte_lpm structure have no
need to be exposed to the user.
Hide the unneeded exposure of structure fields for better
ABI maintainability.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
3 years agolpm: fix free of data structure
Ruifeng Wang [Fri, 23 Oct 2020 09:38:17 +0000 (11:38 +0200)]
lpm: fix free of data structure

The container structure should be freed instead of rte_lpm structure
after wrapping rte_lpm into internal structure __rte_lpm.

Fixes: 8a9f8564e9f9 ("lpm: implement RCU rule reclamation")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
3 years agomaintainers: improve coverage of arch-specific files
Thomas Monjalon [Sat, 24 Oct 2020 16:36:19 +0000 (18:36 +0200)]
maintainers: improve coverage of arch-specific files

The sub-directories of config/ are maintained by
different architecture maintainers.

Some wildcards are used to describe the lib, drivers and app files
which are specific to some architectures.

The EAL Arm files have split responsibilities depending on 32/64 suffix,
and the common files are shared between Armv7 and Armv8 sections.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agotest/hash: add RCU tests
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:06 +0000 (17:50 -0500)]
test/hash: add RCU tests

Add functional and performance tests for the integrated RCU QSBR.

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
3 years agotest/hash: use C11 atomics in lock-free perf test
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:05 +0000 (17:50 -0500)]
test/hash: use C11 atomics in lock-free perf test

Replace rte_atomic APIs with C11 atomic APIs in
test_hash_readwrite_lf_perf.c

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
3 years agohash: implement RCU resources reclamation
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:04 +0000 (17:50 -0500)]
hash: implement RCU resources reclamation

Currently, users have to use external RCU mechanisms to free resources
when using lock free hash algorithm.

Integrate RCU QSBR process to make it easier for the applications to use
lock free algorithm.
Refer to RCU documentation to understand various aspects of
integrating RCU library into other libraries.

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
3 years agorcu: build on Windows
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:03 +0000 (17:50 -0500)]
rcu: build on Windows

Build the lib for Windows.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Tested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
3 years agodoc: remove references to make from known issues
Thomas Monjalon [Thu, 22 Oct 2020 17:30:09 +0000 (19:30 +0200)]
doc: remove references to make from known issues

The config options CONFIG_RTE_* are simple RTE_* defines with meson.
Now that make support is dropped, update the HPET config reference.

The comment about the AVX512 config option is not relevant anymore.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoremove config prefix used with make
Thomas Monjalon [Thu, 22 Oct 2020 19:22:45 +0000 (21:22 +0200)]
remove config prefix used with make

The config options CONFIG_RTE_* are simple RTE_* defines with meson.
Now that make support is dropped, update the names in logs and comments.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agomem: fix config name in error logs
Thomas Monjalon [Thu, 22 Oct 2020 17:36:21 +0000 (19:36 +0200)]
mem: fix config name in error logs

When introducing the new option CONFIG_RTE_MAX_MEM_MB_PER_TYPE,
some logs were referencing a wrong name: CONFIG_RTE_MAX_MEM_PER_TYPE.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoeal: remove comment about old partition option
Thomas Monjalon [Thu, 22 Oct 2020 17:37:34 +0000 (19:37 +0200)]
eal: remove comment about old partition option

The main initialization function (rte_eal_init) has documentation
about a feature from another era: memory partition.

Curiously, this lost treasure is found only now,
suggesting there may be other interesting things to discover in the doc.
To all aspiring Indiana Jones: the hunt is open!

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoexamples/pipeline: fix help command
Yogesh Jangra [Thu, 22 Oct 2020 11:01:52 +0000 (07:01 -0400)]
examples/pipeline: fix help command

This patch has the changes to list all supported commands and fix
supported commands help details.

Fixes: 5074e1d55107 ("examples/pipeline: add configuration commands")

Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoeal: report duplicate device event callback
Yunjian Wang [Wed, 21 Oct 2020 11:19:49 +0000 (19:19 +0800)]
eal: report duplicate device event callback

We should return an error value, when the callback is already exist.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoeal: return errors on device event callback unregister
Yunjian Wang [Wed, 21 Oct 2020 11:19:23 +0000 (19:19 +0800)]
eal: return errors on device event callback unregister

Fix return value, using -EAGAIN instead of 0 when the callback is busy
and using -ENOENT instead of 0 when the callback is not found.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoeal: fix leak on device event callback unregister
Yunjian Wang [Wed, 21 Oct 2020 11:19:03 +0000 (19:19 +0800)]
eal: fix leak on device event callback unregister

The event_cb->dev_name is not freed when freeing event_cb,
and this causes a memory leak.

Fixes: a753e53d517b ("eal: add device event monitor framework")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoexamples/ipsec-secgw: use POSIX network address conversion
Ibtisam Tariq [Mon, 13 Jul 2020 09:57:30 +0000 (09:57 +0000)]
examples/ipsec-secgw: use POSIX network address conversion

inet_pton4 and inet_pton6 was reimplemented. Replace implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoexamples/ip_pipeline: use POSIX network address conversion
Ibtisam Tariq [Mon, 13 Jul 2020 09:57:29 +0000 (09:57 +0000)]
examples/ip_pipeline: use POSIX network address conversion

inet_pton4 and inet_pton6 was reimplemented. Replacing implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: ed7a0490f7e2 ("examples/ip_pipeline: add string parsing helpers")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agonet/softnic: use POSIX network address conversion
Ibtisam Tariq [Mon, 13 Jul 2020 09:57:28 +0000 (09:57 +0000)]
net/softnic: use POSIX network address conversion

inet_pton4 and inet_pton6 was reimplemented. Replace implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: 31ce8d888625 ("net/softnic: add command interface")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agodoc: update guide for armv8 crypto
Ruifeng Wang [Wed, 14 Oct 2020 09:24:14 +0000 (17:24 +0800)]
doc: update guide for armv8 crypto

Added guide about building by using meson.

Also added the command to create virtual device.

Suggested-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
3 years agodoc: update patch cheatsheet to use meson
Kevin Laatz [Wed, 21 Oct 2020 08:17:24 +0000 (09:17 +0100)]
doc: update patch cheatsheet to use meson

With 'make' being removed, the patch cheatsheet needs to be updated to
remove any references to 'make'. These references have been replaced with
meson alternatives in this patch.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agodoc: add to release notes to reflect removal of make
Ciara Power [Wed, 21 Oct 2020 08:17:23 +0000 (09:17 +0100)]
doc: add to release notes to reflect removal of make

Added an entry to describe the removal of the Make build system to the
release notes for 20.11.

Signed-off-by: Ciara Power <ciara.power@intel.com>
3 years agodoc: remove references to make from contributing guide
Ciara Power [Wed, 21 Oct 2020 08:17:22 +0000 (09:17 +0100)]
doc: remove references to make from contributing guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
3 years agodoc: remove reference to make from tools guide
Ciara Power [Wed, 21 Oct 2020 08:17:21 +0000 (09:17 +0100)]
doc: remove reference to make from tools guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
3 years agodoc: remove references to make from apps guide
Ciara Power [Wed, 21 Oct 2020 08:17:20 +0000 (09:17 +0100)]
doc: remove references to make from apps guide

While make has been deprecated for DPDK, it's still applicable for
some example apps to be built standalone, this patch adjusts the
guides to take that into consideration.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodoc: remove references to make from rawdevs guide
Ciara Power [Wed, 21 Oct 2020 08:17:19 +0000 (09:17 +0100)]
doc: remove references to make from rawdevs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agodoc: remove references to make from eventdevs guide
Ciara Power [Wed, 21 Oct 2020 08:17:18 +0000 (09:17 +0100)]
doc: remove references to make from eventdevs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agodoc: remove references to make from compressdevs guide
Ciara Power [Wed, 21 Oct 2020 08:17:17 +0000 (09:17 +0100)]
doc: remove references to make from compressdevs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
3 years agodoc: remove references to make from cryptodevs guide
Ciara Power [Wed, 21 Oct 2020 08:17:16 +0000 (09:17 +0100)]
doc: remove references to make from cryptodevs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
3 years agodoc: remove references to make from bbdevs guide
Ciara Power [Wed, 21 Oct 2020 08:17:15 +0000 (09:17 +0100)]
doc: remove references to make from bbdevs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agodoc: remove references to make from vdpadevs guide
Ciara Power [Wed, 21 Oct 2020 08:17:14 +0000 (09:17 +0100)]
doc: remove references to make from vdpadevs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agodoc: remove references to make from NICs guide
Ciara Power [Wed, 21 Oct 2020 08:17:13 +0000 (09:17 +0100)]
doc: remove references to make from NICs guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
3 years agodoc: remove references to make from mempool guide
Ciara Power [Wed, 21 Oct 2020 08:17:12 +0000 (09:17 +0100)]
doc: remove references to make from mempool guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agodoc: remove references to make from platforms guide
Ciara Power [Wed, 21 Oct 2020 08:17:11 +0000 (09:17 +0100)]
doc: remove references to make from platforms guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agoefd: fix tailq entry leak in error path
Yunjian Wang [Tue, 29 Sep 2020 03:31:35 +0000 (11:31 +0800)]
efd: fix tailq entry leak in error path

In rte_efd_create() allocated memory for tailq entry, we should
free it when error happens, otherwise it will lead to memory leak.

Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
3 years agohash: use x86 common flag for jhash
David Marchand [Thu, 22 Oct 2020 07:59:59 +0000 (09:59 +0200)]
hash: use x86 common flag for jhash

jhash has been forgotten when factorising the x86 arch check.

Fixes: dbf17d44f375 ("hash: use common x86 flag")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodrivers: add headers install helper
David Marchand [Thu, 22 Oct 2020 07:55:45 +0000 (09:55 +0200)]
drivers: add headers install helper

A lot of drivers export headers, reproduce the same facility than for
libraries.

Note: this change fixes an issue with the crypto scheduler headers which
were not installed properly. A separate backport will be sent to stable
branches.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agobpf: use helper to install headers
David Marchand [Thu, 22 Oct 2020 07:50:38 +0000 (09:50 +0200)]
bpf: use helper to install headers

Libraries can use the headers variable to install headers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agobuild: fix version map file references in documentation
David Marchand [Thu, 22 Oct 2020 07:47:04 +0000 (09:47 +0200)]
build: fix version map file references in documentation

Fixes: 63b3907833d8 ("build: remove library name from version map file name")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agoversion: 20.11-rc1
Thomas Monjalon [Tue, 20 Oct 2020 14:38:46 +0000 (16:38 +0200)]
version: 20.11-rc1

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agoeal/linux: fix memory leak in uevent handling
Yunjian Wang [Sat, 23 May 2020 10:52:21 +0000 (18:52 +0800)]
eal/linux: fix memory leak in uevent handling

When the memory for uevent.devname is allocated in dev_uev_parse(). It
is not freed when parse the subsystem layer fails in dev_uev_parse().
Before return, it is also not freed in dev_uev_handler(). These cause a
memory leak.

Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agobus/pci: remove unused scan by address
Thomas Monjalon [Wed, 14 Oct 2020 20:18:13 +0000 (22:18 +0200)]
bus/pci: remove unused scan by address

The function pci_update_device was used to scan a device
for probing by PCI address.
This private function (and implementations) are unused
since such probing is removed.

Fixes: f3bac43b60da ("bus/pci: remove unused function to probe by address")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoeal/windows: add missing stdint include
Tal Shnaiderman [Tue, 20 Oct 2020 08:48:15 +0000 (11:48 +0300)]
eal/windows: add missing stdint include

Following the addition of the in_addr/in6_addr structs
to in.h the header file must have stdint.h included
for the definitions of the uint8_t/uint32_t types used
within the new structs.

Not having it could results in the following errors
in places where in.h is included:

in.h:30:2: error: unknown type name 'uint32_t'
        uint32_t s_addr;

in.h:34:2: error: unknown type name 'uint8_t'
        uint8_t s6_addr[16];

Fixes: f40a74cfcf0 ("eal/windows: improve compatibility networking headers")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
3 years agoconfig: fix kni build
Bruce Richardson [Tue, 20 Oct 2020 09:17:43 +0000 (10:17 +0100)]
config: fix kni build

When building kernel modules such as kni, the "config" directory is not
passed as a standard path in the EXTRA_CFLAGS value, meaning that the
rte_compatibility_defines.h is not found from rte_config.h. However, since
both headers are in the same directory, we can just use quotes rather than
angle-brackets to ensure the second header is always found if the first is.

Fixes: b0b672aeadaa ("build: add defines for compatibility with make build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agonet/failsafe: replace references to slave devices
Stephen Hemminger [Thu, 15 Oct 2020 22:57:36 +0000 (15:57 -0700)]
net/failsafe: replace references to slave devices

The term slave is only used in some comments and can be
replaced with sub devices, as done elsewhere.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/memif: replace master/slave arguments
Stephen Hemminger [Thu, 15 Oct 2020 22:57:22 +0000 (15:57 -0700)]
net/memif: replace master/slave arguments

Replace master/slave terms in this driver.

The memory interface drivers uses a client/server architecture
so change the variable names and device arguments to that.

The previous devargs are maintained for compatibility, but if
used cause a notice in the log.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agodrivers/bus: reword slave process as secondary
Stephen Hemminger [Thu, 15 Oct 2020 22:57:21 +0000 (15:57 -0700)]
drivers/bus: reword slave process as secondary

Correct wording is "secondary process".

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agoeal: rename lcore master and slave
Stephen Hemminger [Thu, 15 Oct 2020 22:57:19 +0000 (15:57 -0700)]
eal: rename lcore master and slave

Replace master lcore with main lcore and
replace slave lcore with worker lcore.

Keep the old functions and macros but mark them as deprecated
for this release.

The "--master-lcore" command line option is also deprecated
and any usage will print a warning and use "--main-lcore"
as replacement.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agoeal: add macro to mark macros as deprecated
Stephen Hemminger [Thu, 15 Oct 2020 22:57:18 +0000 (15:57 -0700)]
eal: add macro to mark macros as deprecated

Add a macro that causes GCC and CLANG to emit a warning when
a deprecated macro is used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: add policy about master/slave words
Stephen Hemminger [Thu, 15 Oct 2020 22:57:17 +0000 (15:57 -0700)]
doc: add policy about master/slave words

Update the coding style document to include a policy against
introducing new master/slave usage. This is taken from the similar
place in the Linux kernel coding style.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agoapp/procinfo: provide way to request info on owned ports
Stephen Hemminger [Thu, 24 Sep 2020 05:34:33 +0000 (22:34 -0700)]
app/procinfo: provide way to request info on owned ports

There are cases where a port maybe owned by another (failsafe, netvsc,
bond); but currently proc-info has no way to look at stats of those
ports. This patch provides way for the user to explicitly ask for these
ports.

If no portmask is given the output is unchanged; it only shows the
top level ports. If portmask requests a specific port it will be
shown even if owned.

Increase the size of port mask variable to unsigned long to
allow up to 64 ports to be handled on 64 bit architecture.

The device owner is also a useful thing to show in port info.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/procinfo: add crypto security context info
Hemant Agrawal [Thu, 24 Sep 2020 05:34:32 +0000 (22:34 -0700)]
app/procinfo: add crypto security context info

If crypto context is not present, no point in displaying it.

This patch adds the crypto based security context info.
Also improve the flag printing to SECURITY OFFLOAD from
INLINE.

Use common code for displaying crypto context information
when doing show_ports and show_crypto.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoapp/procinfo: dump Rx and Tx descriptor info
Stephen Hemminger [Thu, 24 Sep 2020 05:34:31 +0000 (22:34 -0700)]
app/procinfo: dump Rx and Tx descriptor info

Many drivers will report per queue info
as well as how many descriptors are in use.
Also display per-queue offload flags.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/procinfo: add more port info
Stephen Hemminger [Thu, 24 Sep 2020 05:34:30 +0000 (22:34 -0700)]
app/procinfo: add more port info

Revise the display of port information to include more data
and be more human friendly.

  * Show driver and device information
  * Show MAC address
  * Show flow control information
  * Combine lines if possible
  * Show all multicast mode
  * Show queue mempool name

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/procinfo: hide EAL info messages
Stephen Hemminger [Thu, 24 Sep 2020 05:34:29 +0000 (22:34 -0700)]
app/procinfo: hide EAL info messages

The DPDK EAL info messages at the start of a diagnostic application
are not helpful to end user. Suppress them by setting log-level
by default.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/procinfo: eliminate useless borders
Stephen Hemminger [Thu, 24 Sep 2020 05:34:28 +0000 (22:34 -0700)]
app/procinfo: eliminate useless borders

Printing extra borders does not improve readability, and is just
unnecessary. Putting TSC hz in header also makes no sense here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/procinfo: remove unused logtype
Stephen Hemminger [Thu, 24 Sep 2020 05:34:27 +0000 (22:34 -0700)]
app/procinfo: remove unused logtype

This logtype is defined but never used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/regex: fix crash in options parsing
Ophir Munk [Sun, 18 Oct 2020 14:21:47 +0000 (14:21 +0000)]
app/regex: fix crash in options parsing

getopt_long() parses command-line arguments. One of its arguments
'longopts' is a pointer to the first element of an array of struct
option.  The last element of the array has to be filled with zeros
to mark the end of options. For example:

struct option longopts[] = {
{ "help",  0, 0, ARG_HELP},
....
/* End of options */
{ 0, 0, 0, 0 }
};

This commit adds the last element. Prior to this commit getopt_long()
continued parsing beyond the longopts[] array which occasionally caused
segmentation faults.

Fixes: de06137cb295 ("app/regex: add RegEx test application")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
3 years agoethdev: rename tunnel flow offload callbacks
Gregory Etelson [Sun, 18 Oct 2020 12:15:23 +0000 (15:15 +0300)]
ethdev: rename tunnel flow offload callbacks

Rename new rte_flow ops callbacks to emphasize relation to tunnel
offload API.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
3 years agoipc: fix spelling in log and comment
Stephen Hemminger [Fri, 16 Oct 2020 00:26:52 +0000 (17:26 -0700)]
ipc: fix spelling in log and comment

Fixes spelling in comment and message about thread error.
Found while looking at checkpatch complaints about "thead"

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agobuild: replace use of old build macros
Bruce Richardson [Thu, 15 Oct 2020 15:05:54 +0000 (16:05 +0100)]
build: replace use of old build macros

Use the newer macros defined by meson in all DPDK source code, to ensure
there are no errors when the old non-standard macros are removed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agobuild: standardize component names and defines
Bruce Richardson [Thu, 15 Oct 2020 15:05:53 +0000 (16:05 +0100)]
build: standardize component names and defines

As discussed on the dpdk-dev mailing list[1], we can make some easy
improvements in standardizing the naming of the various components in DPDK,
and their associated feature-enabled macros.

Following this patch, each library will have the name in format,
'librte_<name>.so', and the macro indicating that library is enabled in the
build will have the form 'RTE_LIB_<NAME>'.

Similarly, for libraries, the equivalent name formats and macros are:
'librte_<class>_<name>.so' and 'RTE_<CLASS>_<NAME>', where class is the
device type taken from the relevant driver subdirectory name, i.e. 'net',
'crypto' etc.

To avoid too many changes at once for end applications, the old macro names
will still be provided in the build in this release, but will be removed
subsequently.

[1] http://inbox.dpdk.org/dev/ef7c1a87-79ab-e405-4202-39b7ad6b0c71@solarflare.com/t/#u

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agodevtools: load all drivers in null test
Bruce Richardson [Thu, 15 Oct 2020 15:05:52 +0000 (16:05 +0100)]
devtools: load all drivers in null test

Rather than specifying specific drivers in the driver directory to load, we
can just pass in the whole driver directory to the "-d" EAL flag, causing
all drivers to load. This makes the load of driver independent of any
specific driver names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agobuild: remove library name from version map file name
Bruce Richardson [Thu, 15 Oct 2020 15:05:51 +0000 (16:05 +0100)]
build: remove library name from version map file name

Since each version map file is contained in the subdirectory of the library
it refers to, there is no need to include the library name in the filename.
This makes things simpler in case of library renaming.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Rosen Xu <rosen.xu@intel.com>
3 years agocommon/qat: build drivers from common folder
Bruce Richardson [Thu, 15 Oct 2020 15:05:50 +0000 (16:05 +0100)]
common/qat: build drivers from common folder

Since the drivers in the common directory can be processed out of order, in
this case following the "bus" directory, we can simplify somewhat the build
of the QAT driver to be done entirely from the "common/qat" folder rather
than having it's build distributed across 3 folders.

This also opens up the possibility of building the QAT driver with crypto
only and the compression part disabled. It further allows more sensible
naming of the resulting shared library in case of standardizing library
names based on device class; i.e. common_qat is more descriptive for a
combined crypto/compression driver than either of the other two prefixes
individually.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
3 years agobuild: add defines for compatibility with make build
Bruce Richardson [Thu, 15 Oct 2020 15:05:49 +0000 (16:05 +0100)]
build: add defines for compatibility with make build

The defines used to indicate what crypto, compression and eventdev drivers
were being built were different to those used in the make build, with meson
defining them with "_PMD" at the end, while make defined them with "_PMD"
in the middle and the specific driver name at the end. This might cause
compatibility issues for applications which used the older defines, which
switching to build against new DPDK releases.

As well as changing the default to match that of make, meson also
special-cases the crypto/compression/event drivers to have both defines
provided. This ensures compatibility for these macros with both meson and
make from older versions.

For a selection of other libraries and drivers, there were other
incompatibilities between the meson and make-defined macros which were not
previously highlighted in a deprecation notice, so we add per-macro
compatibility defines for these to ease the transition from make to meson.

Fixes: 5b9656b157d3 ("lib: build with meson")
Fixes: 9314afb68a53 ("drivers: add infrastructure for meson build")
Fixes: dcadbbde8e61 ("crypto/null: build with meson")
Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
Fixes: eca504f318db ("drivers/event: build skeleton and SW drivers with meson")

Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
3 years agoexamples/l2fwd-crypto: fix missing dependency
Bruce Richardson [Thu, 15 Oct 2020 15:05:48 +0000 (16:05 +0100)]
examples/l2fwd-crypto: fix missing dependency

When the crypto-scheduler support is enabled, we were missing the
dependency on it as part of the meson build.

Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
3 years agoapp: fix missing dependencies
Bruce Richardson [Thu, 15 Oct 2020 15:05:47 +0000 (16:05 +0100)]
app: fix missing dependencies

A number of lib and driver dependencies for various apps were missed on
build because the proper macro names for their use were mismatched between
meson and make build systems. Before adding in equivalent compatibility
macros we need to ensure to add the proper dependencies to ensure a valid
build.

Fixes: 16ade738fd0d ("app/testpmd: build with meson")
Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Fixes: 996ef1176111 ("app: add all remaining apps to meson build")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
3 years agodoc: add SPDX license tag header to meson guide
Bruce Richardson [Thu, 10 Sep 2020 11:32:05 +0000 (12:32 +0100)]
doc: add SPDX license tag header to meson guide

The build-sdk-meson.rst file originates from the short plain-text meson
instructions added in 2018. Add SPDX tag and copyright notice based on the
original commit.

Fixes: 9c3adc289c5e ("doc: add instructions on build using meson")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agomaintainers: resign from virtio and vhost
Zhihong Wang [Wed, 14 Oct 2020 07:44:05 +0000 (07:44 +0000)]
maintainers: resign from virtio and vhost

I'm resigning from DPDK virtio and vhost maintainer as I'm leaving Intel.

Sincerely thank Maxime, Chenbo and the community for all the support.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agotest/telemetry: fix socket resource leak
Ciara Power [Tue, 13 Oct 2020 15:56:48 +0000 (16:56 +0100)]
test/telemetry: fix socket resource leak

If an error occurred when reading from the socket, the function
returned without closing the socket. This is now fixed to avoid the
resource leak of the sock variable going out of scope.

Coverity issue: 363043
Fixes: bd78cf693ebd ("test/telemetry: add unit tests for data to JSON")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agotest/telemetry: fix error handling for socket
Ciara Power [Tue, 13 Oct 2020 16:28:20 +0000 (17:28 +0100)]
test/telemetry: fix error handling for socket

When the socket connection failed, an error was printed to screen but
the function did not return an error, and continued to try read from the
socket. This is now corrected to close the socket and return -1 when the
connection fails.

Fixes: bd78cf693ebd ("test/telemetry: add unit tests for data to JSON")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agoacl: check max SIMD bitwidth
Ciara Power [Mon, 19 Oct 2020 13:48:58 +0000 (15:48 +0200)]
acl: check max SIMD bitwidth

When choosing a vector path to take, an extra condition must be
satisfied to ensure the max SIMD bitwidth allows for the CPU enabled
path. These checks are added in the check alg helper functions.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
3 years agonode: choose vector path at runtime
Ciara Power [Mon, 19 Oct 2020 13:48:57 +0000 (15:48 +0200)]
node: choose vector path at runtime

When choosing the vector path, max SIMD bitwidth is now checked to
ensure the vector path is suitable. To do this, the scalar function is
chosen by default in the struct, but at node initialisation time, this
function pointer is updated to the vector version if supported, and
if it is within the max SIMD bitwidth limit.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet: check max SIMD bitwidth
Ciara Power [Mon, 19 Oct 2020 13:48:56 +0000 (15:48 +0200)]
net: check max SIMD bitwidth

When choosing a vector path to take, an extra condition must be
satisfied to ensure the max SIMD bitwidth allows for the CPU enabled
path.

The vector path was initially chosen in RTE_INIT, however this is no
longer suitable as we cannot check the max SIMD bitwidth at that time.
Default handlers are now chosen on initialisation, these default
handlers are used the first time the crc calc is called, and they set
the suitable handlers to be used going forward.

Suggested-by: Jasvinder Singh <jasvinder.singh@intel.com>
Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
3 years agoefd: check max SIMD bitwidth
Ciara Power [Mon, 19 Oct 2020 13:48:55 +0000 (15:48 +0200)]
efd: check max SIMD bitwidth

When choosing a vector path to take, an extra condition must be
satisfied to ensure the max SIMD bitwidth allows for the CPU enabled
path.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>