Commit Graph

17269 Commits

Author SHA1 Message Date
Yongseok Koh
d588f12ffb net/mlx: fix library search in meson build
If MLNX_OFED is installed, there's no .pc file installed for libraries and
dependency() can't find libraries by pkg-config. By adding fallback of
using cc.find_library(), libraries are properly located.

Fixes: e30b4e566f ("build: improve dependency handling")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-18 18:22:42 +02:00
Yongseok Koh
0559d091cc drivers/event: disable OcteonTx for buggy Arm compilers
Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler
error" for aarch64

Fixes: bd77f2d64c ("event/octeontx: build with meson")
Fixes: 4f760550a0 ("mk: disable OcteonTx for buggy compilers")
Fixes: f3af3e44a4 ("mk: disable OcteonTx for buggy compilers only on arm64")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-04-18 18:14:44 +02:00
Luca Boccassi
f0b86e3f2f doc: mention machine=default option for meson
Document the new value, as it's useful for distributions and users
who need to use a stable baseline -march

Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-04-18 17:16:03 +02:00
Luca Boccassi
380154406d build: use default flags for default Arm machine
When building for generic distribution we need a stable baseline
architecture, or depending on the build worker the result will vary.

Force the default flags if the user explicitly sets machine=default
at configuration time.

Fixes: b1d48c4118 ("build: support ARM with meson")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-04-17 22:28:39 +02:00
Erik Gabriel Carrillo
821c51267b timer: add function to stop all timers in a list
Add a function to the timer API that allows a caller to traverse a
specified set of timer lists, stopping each timer in each list,
and invoking a callback function.

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
2019-04-17 20:05:30 +02:00
Erik Gabriel Carrillo
c0749f7096 timer: allow management in shared memory
Currently, the timer library uses a per-process table of structures to
manage skiplists of timers presumably because timers contain arbitrary
function pointers whose value may not resolve properly in other
processes.

However, if the same callback is used handle all timers, and that
callback is only invoked in one process, then it woud be safe to allow
the data structures to be allocated in shared memory, and to allow
secondary processes to modify the timer lists.  This would let timers be
used in more multi-process scenarios.

The library's global variables are wrapped with a struct, and an array
of these structures is created in shared memory.  The original APIs
are updated to reference the zeroth entry in the array. This maintains
the original behavior for both primary and secondary processes since
the set intersection of their coremasks should be empty [1].  New APIs
are introduced to enable the allocation/deallocation of other entries
in the array.

New variants of the APIs used to start and stop timers are introduced;
they allow a caller to specify which array entry should be used to
locate the timer list to insert into or delete from.

Finally, a new variant of rte_timer_manage() is introduced, which
allows a caller to specify which array entry should be used to locate
the timer lists to process; it can also process multiple timer lists per
invocation.

[1] https://doc.dpdk.org/guides/prog_guide/multi_proc_support.html#multi-process-limitations

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
2019-04-17 20:05:20 +02:00
Hemant Agrawal
73eca2f77f devargs: promote experimental API as stable
These APIs are available in DPDK for last 4 releases
and used by multiple drivers.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2019-04-17 18:30:04 +02:00
Bruce Richardson
d51e5ec7b1 examples/l2fwd-cat: fix build on FreeBSD
The definition of CPU_AND differs from Linux to BSD, so we need to use
RTE_CPU_AND instead.

Fixes: f6baccbc2b ("examples/l2fwd-cat: add sample application for PQoS CAT and CDP")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:10:34 +02:00
Bruce Richardson
9d03815f56 distributor: skip building if power library not found
The power library is not built on non-Linux systems, so skip the
distributor sample if it's not found, as it's a mandatory dependency.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: David Hunt <david.hunt@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:09:53 +02:00
Bruce Richardson
adf93ca564 build: increase readability via shortcut variables
Define variables for "is_linux", "is_freebsd" and "is_windows"
to make the code shorter for comparisons and more readable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:09:52 +02:00
Bruce Richardson
b458c2927a build: simplify subdirectory detection for EAL
Within EAL we had a series of if statements for selecting the EAL directory
to use. Now that the directory names match those of the OS's they are for
we can instead just use a generated subdirectory name, shortening the code.
To avoid strange errors, we still need to check for unsupported OS's, but
do this check up-front in the config meson.build file.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:09:51 +02:00
Bruce Richardson
c039a73fc6 devtools: fix bash-isms in meson test
The use of "==" is non-standard extension from bash, so use "="
for comparisons instead.

Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 17:16:47 +02:00
Bruce Richardson
2660c6f653 devtools: support older compilers with meson test
Older versions of GCC, such as on Redhat/CentOS 7, don't support
-march=nehalem, but need -march=corei7 instead.

Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 17:16:01 +02:00
Bruce Richardson
e887ebb663 devtools: skip meson build for missing compilers
If either gcc or clang are missing, skip doing those builds.
This allows a setup to only do, e.g. gcc tests.

Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-04-17 17:15:55 +02:00
Aaron Conole
c70622ac6f test: detect number of cores with meson
The arguments being passed will cause failures on laptops that have,
for instance, 2 cores only.  Most of the tests don't require more
than a single core.  Some require multiple cores (but those tests
should be modified to 'SKIP' when the correct number of cores
aren't available).

The unit test results shouldn't be impacted by this change, but it
allows for a future enhancement to pass flags such as '--no-huge'.

Also include a fix to a reported issue with running on FreeBSD.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-04-17 13:57:56 +02:00
Aaron Conole
98e6329c80 ci: add a distinguisher to the extra Travis builds
This helps in two ways:
  1. When looking at travis page for dpdk, it's a visual distinction

  2. For ccache support, the build IDs include the 'env', so we get unique
     cache data.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 13:56:23 +02:00
Aaron Conole
5afc16b825 ci: enable ccache in Travis
We try to make the planet happy travis builds dpdk.

Also, the 'sudo' flag was recently deprecated.  Drop it.

Suggested-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 13:55:26 +02:00
Ferruh Yigit
578505ef07 devtools: add git log checks for TPID, LACP and RETA
Add case check to TPID, LACP and RETA abbreviations.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-16 00:21:16 +02:00
David Marchand
3630757803 devtools: accept experimental symbol promotion
Currently, when symbols get promoted from the EXPERIMENTAL section to a
stable ABI section, the script complains they should go to the
EXPERIMENTAL section.

Example:
ERROR: symbol rte_devargs_add is added in the DPDK_19.05 section, but is
expected to be added in the EXPERIMENTAL section of the version map

This is legit.
Moving from a stable ABI to another is also allowed, but must have gone
through the proper process.

Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-04-16 00:12:22 +02:00
Jerin Jacob
01d1847987 config: add octeontx2 machine
Optimized configuration for Marvell octeontx2 SoC.
Updated meson build to support Marvell octeontx2 SoC.
Added meson cross build target for octeontx2.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2019-04-15 22:58:20 +02:00
Jerin Jacob
7286c9d723 config: add thunderx2 machine
Optimized configuration for Marvell thunderx2 SoC.
Updated meson build to support Marvell thunderx2 SoC.
Added meson cross compile target.

Product details are here:

https://www.marvell.com/server-processors/thunderx2-arm-processors/

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2019-04-15 22:57:29 +02:00
Pavan Nikhilesh
42c3cd0e6e meson: support Arm machine specific flags
Currently, RTE_* flags are set based on the implementer ID but there might
be some micro arch specific differences from the same vendor
eg. CACHE_LINESIZE. Add support to set micro arch specific flags.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-04-15 22:56:31 +02:00
Jerin Jacob
53a39551db mk: introduce helper to check compiler argument
Introduce rte_cc_has_argument() Makefile helper to
check a given argument is support by the compiler.

Example Usage:

include $(RTE_SDK)/mk/rte.helper.mk
MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)

This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS
if it is only supported by the compiler. The use case for such
scheme is to enable the mcpu optimization if the compiler
supports else it needs to compile the source code without
any errors.

This patch also moves inclusion of toolchain's rte.vars.mk
to before the machine's rte.vars.mk inclusion to make
correct CC available for the cross compile case.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-04-15 22:55:56 +02:00
Joyce Kong
90cb27276a test/ticketlock: fix autotest
Add ticketlock_autotest implementation in python.

Fixes: efbcdaa55b ("test/ticketlock: add test cases")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Tested-by: Phil Yang <phil.yang@arm.com>
2019-04-15 22:50:20 +02:00
Shahed Shaikh
ec749e8704 doc: add flow API to qede NIC features
Commit 267d32de46 ("net/qede: support generic flow API")
added a support for RTE_FLOW APIs but did not update the feature
support matrix.

Fixes: 267d32de46 ("net/qede: support generic flow API")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-04-12 19:39:53 +02:00
Stephen Hemminger
47ae571e01 doc: fix spelling in testpmd guide
Minor spelling errors found with aspell.

Fixes: e76d7a768c ("doc: fix syntax in testpmd user guide")
Fixes: fb73e09611 ("app/testpmd: enable device hotplug monitoring")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rami Rosen <ramirose@gmail.com>
2019-04-12 18:57:16 +02:00
Qiming Yang
59d151de66 net/ice: stop LLDP by default
This patch stopped LLDP by default to avoid the statistics error.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-04-12 17:11:37 +02:00
Rastislav Cernay
6435f9a0ac net/nfb: add new netcope driver
Added new net driver for Netcope nfb cards

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
2019-04-12 17:01:13 +02:00
Qi Zhang
756cea41e9 net/i40e: fix scattered Rx enabling
No need to add additional vlan tag size for max packet size, since
for i40e, the queue's Rx Max Frame Size (rxq->max_pkt_len) already
includes the vlan header size.

Fixes: a3c83a2527 ("net/i40e: enable runtime queue setup")
Fixes: 4861cde461 ("i40e: new poll mode driver")
Fixes: c1715402df ("i40evf: fix jumbo frame support")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2019-04-12 11:02:02 +02:00
Somnath Kotur
13856b7953 net/bnxt: fix big endian build
The result of the endian conversion was not being used incorrectly.

Fixes: b11cceb83a ("net/bnxt: support timesync")
Cc: stable@dpdk.org

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-04-12 11:02:02 +02:00
Hyong Youb Kim
6e54c8ac5c net/enic: fix VLAN inner type matching for old hardware
The vlan pattern handler currently assumes the NIC always strips vlan
header from the L2 buffer, regardless of the vlan strip setting. But,
with older VIC models, the vlan header is actually present in the L2
buffer if stripping is disabled. So in this case, the inner ether type
needs to be shifted by that much.

Fixes: 6ced137607 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2019-04-12 11:02:02 +02:00
Chenbo Xia
2b0e0eba2c app/testpmd: fix return value check
Fix unchecked return value issue for rte_eth_dev_configure.

Coverity issue: 195021
Fixes: 2a977b891f ("app/testpmd: fix DCB configuration")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
2019-04-12 11:02:02 +02:00
Wei Zhao
169a9fed1f app/testpmd: fix hex string parser support for flow API
There is need for users to set configuration of HEX number for RSS
key. The key byte should be pass down as hex number not as char
string. This patch enable cmdline flow parse HEX number,
in order to not using string which pass ASIC number.

Fixes: f4d623f961 ("app/testpmd: fix missing RSS fields in flow action")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-12 11:02:02 +02:00
Hyong Youb Kim
37b07be28a net/enic: fix raw item length check
Currently, the raw item is always preceded by a UDP header, and both
land in the L4 pattern buffer. So consider the UDP header size when
checking if the raw spec fits in the L4 buffer.

Coverity issue: 336796, 336850
Fixes: 477959e6ee ("net/enic: enable limited support for raw flow item")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
97d37d2c1f net/mlx4: remove device register remap
UAR (User Access Region) register does not need to be remapped for
primary process but it should be remapped only for secondary process.
UAR register table is in the process private structure in
rte_eth_devices[],
(struct mlx4_proc_priv *)rte_eth_devices[port_id].process_private

The actual UAR table follows the data structure and the table is used
for both Tx and Rx.

For Tx, BlueFlame in UAR is used to ring the doorbell.
MLX4_TX_BFREG(txq) is defined to get a register for the txq. Processes
access its own private data to acquire the register from the UAR table.

For Rx, the doorbell in UAR is required in arming CQ event. However, it
is a known issue that the register isn't remapped for secondary process.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
120dc4a7dc net/mlx5: remove device register remap
UAR (User Access Region) register does not need to be remapped for
primary process but it should be remapped only for secondary process.
UAR register table is in the process private structure in
rte_eth_devices[],
(struct mlx5_proc_priv *)rte_eth_devices[port_id].process_private

The actual UAR table follows the data structure and the table is used
for both Tx and Rx.

For Tx, BlueFlame in UAR is used to ring the doorbell.
MLX5_TX_BFREG(txq) is defined to get a register for the txq. Processes
access its own private data to acquire the register from the UAR table.

For Rx, the doorbell in UAR is required in arming CQ event. However, it
is a known issue that the register isn't remapped for secondary process.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
d5c900d1dd net/mlx5: remove redundant queue index
Queue index is redundantly stored for both Rx and Tx structures.
E.g. txq_ctrl->idx and txq->stats.idx. Both are consolidated to single
storage - rxq->idx and txq->idx.

Also, rxq and txq are moved to the beginning of its control structure
(rxq_ctrl and txq_ctrl) for cacheline alignment.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
227684feb8 net/mlx5: fix recursive inclusion of header file
mlx5.h includes mlx5_rxtx.h and mlx5_rxtx.h includes mlx5.h recursively.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Shahaf Shuler
3a0968c828 app/testpmd: map anonymous memory for devices
Mempools can be populated with anonymous memory when using command line
parameter --mp-alloc=anon.

Considering the mempools are going to be used by the net devices,
it is better to DMA map this memory.

This patch add such mapping now that we have the APIs in place[1].

[1] commit c33a675b62 ("bus: introduce device level DMA memory mapping")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-04-12 11:02:02 +02:00
Shahaf Shuler
59fcf854ed app/testpmd: support no IOVA contiguous mempools
providing a command line parameter to set the mempool flags accordingly.
This mode is relevant only when creating an empty mempool and then
populating with memory.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-04-12 11:02:02 +02:00
Shahaf Shuler
401b744da2 app/testpmd: fix mempool free on exit
Allocated mempools were never free. it is bad practice.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-04-12 11:02:02 +02:00
Qi Zhang
50cc9d2a6e net/ice: fix max frame size
Max frame size setup should consider double VLAN case.

Fixes: ae2bdd0219 ("net/ice: support MTU setting")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
b27669d691 net/mlx4: fix Tx doorbell register unmap
If rdma-core library doesn't support remapping UAR registers, the register
shouldn't be unmapped on device stop.

Fixes: 0203d33a10 ("net/mlx4: support secondary process")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Ori Kam
bbda883ca0 net/mlx5: fix build on Arm
In case of cross compilation on aarch64 we must add include for
stdlib in order to use the free function.

Fixes: cbb66daa3c ("net/mlx5: prepare Direct Verbs for Direct Rule")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Pavan Nikhilesh
1eab29b9b8 app/testpmd: fix packet headers in txonly mode
Fix ether header size calculation in Tx only mode.

Coverity issue: 337684
Fixes: 01b645dcff ("app/testpmd: move txonly prepare in separate function")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-12 11:02:02 +02:00
Andrew Rybchenko
bac46c6fef net/sfc: set min and max MTU
Advertise minimum and maximum MTU value in device information.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
701e0bfa84 net/nfp: fix resource leak on errors
Not closing the socket implies a resource leak.

Coverity issue: 336865
Fixes: 29a62d1476 ("net/nfp: add CPP bridge as service")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
8539ec0a40 net/nfp: fix memory leak
Coverity issue: 32806
Fixes: ef28aa96e5 ("net/nfp: support multiprocess")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
318e737d2d net/nfp: fix memory leak
If errors, release the allocated structure.

Coverity issue: 277222
Fixes: c7e9729da6 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
0fec453d58 net/nfp: check return value
Call to CPP read (nfp_cpp_readl()) can fail, return 0 on fail.

If the call to _nfp6000_cppat_mu_locality fails, the function needs
to return with an error.

If the nfp_cpp_readl() call fails just returns 0.

Coverity issue: 277209, 277215, 277225
Fixes: c7e9729da6 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00