Commit Graph

11783 Commits

Author SHA1 Message Date
Shahaf Shuler
cd230a3ed9 net/mlx5: fix CRC strip capability query
IBV_WQ_FLAGS_SCATTER_FCS is a WQ flag to be used to configure the CRC
strip on a queue upon creation.

Using IBV_RAW_PACKET_CAP_SCATTER_FCS instead to query to capability.
Even though this is RAW_QP capability, it is being used by rdma-core to
indicate for both RAW_QP and WQ.

Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org

Reported-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-02-05 13:42:53 +01:00
Nélio Laranjeiro
c3299d7686 net/mlx5: fix flow priority on queue action
A single queue should have the same verbs priority as an RSS one.

Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-02-05 13:42:53 +01:00
Nélio Laranjeiro
f07f9bcdb4 net/mlx5: fix port stop by verify flows are still present
priv_flow_stop() may be called several times, in such situation flows are
already removed from the NIC and thus all associated objects are no present
in the flow object (ibv_flow, indirection tables, ....).

Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-02-05 13:42:53 +01:00
Adrien Mazarguil
ff20ecbf2a net/mlx4: fix drop flow resources leak
Resources allocated for drop flow rules are not freed properly. This causes
a memory leak and triggers an assertion failure on a reference counter when
compiled in debug mode.

This issue can be reproduced with testpmd by entering the following
commands:

 flow create 0 ingress pattern eth / end actions drop / end
 port start all
 port stop all
 port start all
 port stop all
 quit

The reason is additional references are taken when re-enabling existing
flow rules, a common occurrence when rehashing configuration.

Fixes: d3a7e09234 ("net/mlx4: allocate drop flow resources on demand")
Cc: stable@dpdk.org

Reported-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-02-05 13:42:53 +01:00
Kirill Rybalchenko
e0e45bdc1e doc: fix DDP usage in testpmd
Documentation and help string more clear describe meaning of
arguments for DDP add del function.

Fixes: 856ceb331b ("app/testpmd: enable DDP remove profile feature")
Cc: stable@dpdk.org

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-02-05 13:42:25 +01:00
Beilei Xing
4ab831449a net/i40e: fix interrupt conflict with multi-driver
There's interrupt conflict when using DPDK and Linux i40e
on different ports of the same Ethernet controller, this
patch fixes it by switching from IntN to Int0 if multiple
drivers are used.

Fixes: be6c228d4d ("i40e: support Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-02-05 13:40:11 +01:00
Beilei Xing
cfdfca493c net/i40e: fix multiple driver support
This patch provides the option to disable writing some global registers
in PMD, in order to avoid affecting other drivers, when multiple drivers
run on the same NIC and control different physical ports. Because there
are few global resources shared among different physical ports.

Fixes: ec246eeb5d ("i40e: use default filter input set on init")
Fixes: 98f0557076 ("i40e: configure input fields for RSS or flow director")
Fixes: f05ec7d77e ("i40e: initialize flow director flexible payload setting")
Fixes: e536c2e328 ("net/i40e: fix parsing QinQ packets type")
Fixes: 19b16e2f64 ("ethdev: add vlan type when setting ether type")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-02-05 13:40:11 +01:00
Beilei Xing
bc66b9717c net/i40e: add debug logs when writing global registers
Add debug logs when writing global registers.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-02-05 13:40:11 +01:00
Beilei Xing
399c635c39 net/i40e: warn when writing global registers
Add warnings when writing global registers.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-02-05 13:40:11 +01:00
Xiaoyun Li
745d58e0df net/i40e: fix CRC strip enabling
New testpmd will get CRC strip offload from rx_offload_capa. I40evf
cannot disable CRC strip. And in fact, it is enabled by PF. This
patch solves the issue by adding CRC strip flag into rx_offload_capa
in i40e and i40evf.

Fixes: 8b9bd0efe0 ("app/testpmd: disable Rx VLAN offloads by default")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-02-05 13:40:10 +01:00
Beilei Xing
04d4f5d2e0 net/i40e: update Rx checksum offload
HW supports outer IP Rx checksum offload, this patch updates Rx
checksum offload for both PF and VF.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2018-02-05 13:40:10 +01:00
Ivan Malov
bfa8d5990c net/sfc: support meson build
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-02-05 14:51:38 +01:00
Ivan Malov
7106c99cb8 net/sfc: rename version map file
The version map filename does not comply with the format
used by meson build rules for drivers (i.e. on the upper
level) and needs to be revisited. This patch removes efx
postfix from the driver title in the filename.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-05 13:14:36 +01:00
Bruce Richardson
9d6cc2d30a test/kni: fix dependency for BSD meson build
The KNI library is not built on FreeBSD, so it needs to be an
optional rather than a mandatory dependency for building the autotest
binary.

Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-02 11:52:37 +01:00
Bruce Richardson
7ae096c46c test/power: fix dependency for BSD meson build
The power library is not built on FreeBSD, so it needs to be an
optional rather than a mandatory dependency for building the autotest
binary.

Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-02 11:48:48 +01:00
Bruce Richardson
0ea2dd4409 test: skip when required lib not available
The power management and KNI libraries are not compiled on a FreeBSD
platform, which means that the tests can't run. Add in stub code for
these cases, allowing the tests to still be compiled, but to report
as skipped in those cases.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2018-02-02 11:37:52 +01:00
Bruce Richardson
9065b1fac6 build: fix dependency on execinfo for BSD meson builds
The binaries and apps in DPDK all need to be linked against the
execinfo library on FreeBSD so add this as a dependency in cases
where it is found. It's available by default on BSD, but not
at all on Linux

Fixes: 16ade738fd ("app/testpmd: build with meson")
Fixes: 89f0711f9d ("examples: build some samples with meson")
Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")
Fixes: 2ff67267b0 ("app/eventdev: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-02 11:31:36 +01:00
Bruce Richardson
2f90543f23 eal/bsd: fix kernel modules build with meson
The kernel module source file directory passed via VPATH was wrong,
which caused the source files to be not found via make. Rather than
explicitly passing VPATH, make use of the fact that the full path
to the source files is passed by meson, so split that into directory
part - to be used as VPATH - and file part - to be used as the source
filename.

Fixes: 610beca42e ("build: remove library special cases")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-02 11:28:52 +01:00
Bruce Richardson
bb17466d09 net/i40e: fix dependencies for AVX2 build with meson
The AVX2 code path includes files from the ethdev, hash and kvargs libs.
These are not listed as dependencies in the case where AVX2 is not in
the default instruction set for the build e.g. machine=nehalem. This
leads to compiler errors as the header files needed cannot be found.

Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-01 12:45:49 +01:00
Anatoly Burakov
c76a10ec15 usertools/devbind: fix kernel module reporting
lspci reports kernel modules in "Module" string, but devbind
expects it to be "Module_str". Fix it up similar to how we fix
up "Driver" to be "Driver_str".

Fixes: c3ce205d57 ("usertools: optimize lspci invocation")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-02-06 02:18:45 +01:00
Anatoly Burakov
02e157e4a8 usertools/devbind: remove unused function
Fixes: 629395b063 ("igb_uio: remove PCI id table")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-02-06 02:18:37 +01:00
Hemant Agrawal
bf0513fafd test/mempool: get best pool via the new API
This patch replaces the uses of default mempool ops API
with newly supported best_mempool_ops API.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-02-06 01:59:02 +01:00
Anatoly Burakov
5c45e0fded test/memzone: handle previously allocated memzones
Currently, memzone autotest expects there to be no memzones
present by the time the test is run. Some hardware drivers
will allocate memzones for internal use during initialization,
resulting in tests failing due to unexpected memzones being
allocated before the test was run.

Fix this by making sure all memzones allocated by this test
have a common prefix, and making callback increment a counter
on encountering memzones with this prefix. Also, separately
increment another counter that will count total number of
memzones left after test, and compares it to previously stored
number of memzones, to ensure that we didn't accidentally
allocated/freed any memzones we weren't supposed to. This
also doubles as a test for correct operation of memzone_walk().

Fixes: 71330483a1 ("test/memzone: fix memory leak")
Cc: stable@dpdk.org

Signed-off-by: Phil Yang <phil.yang@arm.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
2018-02-06 01:51:15 +01:00
Anatoly Burakov
8ce2905695 test/memzone: add test for count in EAL config
Ensure that memzone count in eal mem config is incremented and
decremented whenever memzones are allocated and freed.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
2018-02-06 01:51:06 +01:00
Anatoly Burakov
995eec6190 test: clean up memory for function reentrancy test
Function reentrancy test limits maximum number of iterations based
on the number of memzones and cores, however it doesn't free the
memzones after the fact, so on a machine with big amount of cores
the tests will fail due to running out of memzones.

Fix this by introducing cleanup functions for ring and mempool
reentrancy tests.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2018-02-06 01:51:04 +01:00
Bruce Richardson
ac7f4af813 pmdinfogen: fix resource leak of file object
Coverity flags an issue where the resources used by the FILE object for
the temporary input file are leaked. This is a very minor issue, but is
easily fixed, while also avoiding later problems where we try to close
an invalid file descriptor in the failure case.

The fix is to use "dup()" to get a new file descriptor number rather than
using the value directly from fileno. This allows us to close the file
opened with tmpfile() within in scope block, while allowing the duplicate
to pass to the outer block and be closed when the function terminates.

As a side-effect I/O in the function is therefore changed from using stdio
fread/fwrite to read/write system calls.

Coverity issue: 260399
Fixes: 0d68533617 ("pmdinfogen: allow using stdin and stdout")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-02-06 01:15:14 +01:00
Nipun Gupta
028e4b1dbc mbuf: fix logic of user mempool ops API
The existing rte_eal_mbuf_default mempool ops can return the compile time
default ops name if the user has not provided command line inputs for
mempool ops name. It will break the logic of best mempool ops as it will
never return platform hw mempool ops.

This patch introduces a new API to just return the user mempool ops only.

Fixes: 8b0f7f4341 ("mbuf: maintain user and compile time mempool ops name")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2018-02-06 01:02:12 +01:00
Andrew Rybchenko
ce42ae42bc mempool: fix physical contiguous check
There is not specified dependency between rte_mempool_populate_default()
and rte_mempool_populate_iova(). So, the second should not rely on the
fact that the first adds capability flags to the mempool flags.

Fixes: 65cf769f5e ("mempool: detect physical contiguous objects")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-02-06 00:51:19 +01:00
Nipun Gupta
5b8526445d event/dpaa: fix portal allocation
Checking if portal has been allocated is now required at the
caller of rte_dpaa_portal_init() API. This patch adds check
in the dpaa eventdev driver.

Fixes: 5d944582d0 ("bus/dpaa: check portal presence in the caller function")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-02-06 00:43:32 +01:00
Nipun Gupta
49f6d96510 event/dpaa: rename vdev with dpaa1
DPAA2 eventdev is named as event_dpaa2 which conflicts with
event_dpaa when both are compiled in together. So event_dpaa
is required to renamed.

Fixes: 1ee9569576 ("config: enable dpaaX drivers for generic ARMv8")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-02-06 00:41:54 +01:00
Nipun Gupta
0c5fd10dec bus/dpaa: fix mempool ops registration
Fixes: 2bd0d5b951 ("bus/dpaa: register platform HW mempool on runtime")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <Shreyansh.jain@nxp.com>
2018-02-06 00:40:29 +01:00
Nipun Gupta
285c5616e6 bus/fslmc: fix mempool ops registration
Fixes: 8824b74d8f ("bus/fslmc: register platform HW mempool on runtime")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-02-06 00:37:56 +01:00
Moti Haimovsky
9576ded31e bus/vdev: continue probing after a device failure
This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.

Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
2018-02-06 00:37:45 +01:00
Marko Kovacevic
117eaa7058 eal: add error check for core options
Error information on current core usage list, mask or map
were incomplete. Added states to differentiate core usage
and to inform user.

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-06 00:37:44 +01:00
Tonghao Zhang
b6af6f317b igb_uio: print IRQ as decimal number
The kernel uses the '%d' or '%ld' to print irq num.
But igb_uio may use the '%lx', then the log may confuse
the user what irq num has been used. The log is show as
below.

igb_uio 0000:00:03.0: irq 24 for MSI/MSI-X
igb_uio 0000:00:03.0: uio device registered with irq 18

kernel version: 3.10.0-514.16.1.el7

For avoiding to be confused, change the igb_uio irq
print type.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
2018-02-06 00:37:42 +01:00
Marko Kovacevic
c36fddd437 mk: fix external build
Code commit for 'make -f' support, breaks the build in cases where
entries in $(MAKEFILE_LIST) are absolute paths. This commit uses
notdir and firstword to ensure that only the local filename is used.

Fixes: 3a5c339d51 ("mk: support renamed Makefile in external project")
Cc: stable@dpdk.org

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-02-05 23:39:04 +01:00
Zhiyong Yang
d98fac4dae net/tap: fix icc build
The following error is reported when compiling 18.02-rc2 using ICC,
"transfer of control bypasses initialization of".
The patch fixes the issue.

Fixes: 1911c5edc6 ("net/tap: fix eBPF RSS map key handling")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-02-01 10:31:18 +01:00
Thomas Monjalon
78f1468e21 version: 18.02-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 03:31:52 +01:00
Marko Kovacevic
20d469eff3 doc: add procinfo restriction with vdev
Note added to outline that using
proc_info for virtual devices is not supported

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2018-02-01 03:31:52 +01:00
Vipin Varghese
6d5b32a3cb doc: add procinfo restriction with shared library
added note category to procinfo guide, to intimate users in shared
library mode. Procinfo requires same NIC libraries to probe the NIC
devices as Primary Application.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2018-02-01 03:31:52 +01:00
Junjie Chen
deedc8d991 doc: add a restriction to multi-process support
This patch add a restriction to multi-process support: secondary
processes should only run alongside primary process with same DPDK
version, so that secondary processes can use the same hugepage mmap
layout as primary process.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2018-02-01 03:31:52 +01:00
Bruce Richardson
e07a3ed786 event/opdl: fix license header and SPDX tags
This patch ensures that the OPDL files all contain correct SPDX tags.
The following changes were made to achieve this:
* replace license text with SPDX tag
* correct occurences where SPDX tag was not on first line of file
* ensure license years were correct

Fixes: 4236ce9bf5 ("event/opdl: add OPDL ring infrastructure library")
Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")
Fixes: d548ef513c ("event/opdl: add unit tests")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
2018-02-01 02:48:55 +01:00
Bruce Richardson
b7237870ba doc: replace license text with SPDX tags on SVG images
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-01 02:42:25 +01:00
Bruce Richardson
e67a1a5e35 config: replace Intel license headers with SPDX tags
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-02-01 02:39:40 +01:00
Olivier Matz
85c73894b9 test: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:20 +01:00
Olivier Matz
7faa7292cd app/testpmd: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:20 +01:00
Olivier Matz
c2cc55c111 net/ixgbe: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:04 +01:00
Olivier Matz
009c327c88 net/failsafe: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:04 +01:00
Olivier Matz
acfe2bd440 net/tap: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:04 +01:00
Olivier Matz
05e34de298 net/af_packet: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:04 +01:00