Commit Graph

18818 Commits

Author SHA1 Message Date
Michael Santana
9b1c025cfe test: allow running shared build without installing
Currently many unit tests fail when running tests under shared builds.
This happens because of missing driver dependencies. This is fixed by
explicitly linking in missing drivers for the test application.

before and after (clang):
https://travis-ci.com/Maickii/dpdk-2/jobs/212329160#L623
https://travis-ci.com/Maickii/dpdk-2/jobs/212335912#L620

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-08-02 23:53:25 +02:00
David Marchand
04b83f8f45 test/eal: fix command array sizes
Following removal of -c and -n options, the array should have been
shrunk to avoid launch_proc to access unitialised strings.

Fixes: b4dbacdb1a ("test/eal: set core mask/list config only in dedicated test")
Fixes: 501fa9a402 ("test/eal: set memory channel config only in dedicated test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
2019-08-02 22:47:07 +02:00
David Marchand
0c573f39e5 test: remove link to ixgbe/i40e with meson
The tests do not depend on ixgbe or i40e drivers, just remove this
explicit link that likely comes from a copy/paste from testpmd.

Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-08-02 22:45:58 +02:00
Aaron Conole
5924381221 acl: fix undefined behavior of bit shifts
Left-shift of an integer constant is represented as 'int' type, but a left
shift of 1 by 31 bits in 'int' is undefined.  Use the U suffix to force
a representation as unsigned.

Caught while running with ubsan under gcc.

Fixes: dc276b5780 ("acl: new library")
Cc: stable@dpdk.org

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-08-02 22:07:07 +02:00
Jerin Jacob
786e0c74e6 doc: fix link in release notes
Fix the following doc build warning by correcting path.

doc/guides/rel_notes/release_18_05.rst:285:
WARNING: unknown document: ../rawdevs/ifpga_rawdev

Fixes: 473c88f9b3 ("drivers/raw: remove rawdev from directory names")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2019-08-02 21:58:59 +02:00
Thomas Monjalon
0bbc72e599 version: 19.08-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-07-31 00:22:33 +02:00
Aaron Conole
0d36f32ed2 test/flow_classify: fix undefined behavior
The unit test for the flow classify introduced undefined behavior by using
a corrupted list.  Remove these tests as the invalid data is impossible to
detect with the current API.

Fixes: 9c9befea4f ("test: add flow classify unit tests")
Cc: stable@dpdk.org

Signed-off-by: Aaron Conole <aconole@redhat.com>
2019-07-31 00:22:33 +02:00
Olivier Matz
4a4a20c477 devtools: support FreeBSD
- As "readlink -e" and "readlink -m" do not exist on freebsd,
  use "readlink -f", it should not have any impact in these cases.
- "sed -ri" is invalid on freebsd and should be replaced by
  "sed -ri=''"
- Use gmake instead of make.

This fixes the following command:
  SYSDIR=/usr/src/sys ./devtools/test-build.sh \
    -j4 x86_64-native-freebsd-gcc

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-07-31 00:22:33 +02:00
Jerin Jacob
7f12dfdcae devtools: fix building kernel component tags
Update devtools/build-tags.sh to account the kernel
components under in kernel directory.

Fixes: acaa9ee991 ("move kernel modules directories")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-07-31 00:22:33 +02:00
Andrius Sirvys
53f293c9a7 usertools: replace unsafe input function
LGTM static code analysis tool reports that the function 'input' is
unsafe. Changed to use raw_input which then converts it using
ast.literal_eval() which is safe.

Fixes: d1b94da4a4 ("usertools: add client script for telemetry")
Cc: stable@dpdk.org

Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2019-07-31 00:22:33 +02:00
Anatoly Burakov
2804529fe0 usertools: print binding errors to stderr
Bring consistency to error messages and output them to stderr.
Also, whenever the script tells the user to "check usage", don't
tell the user to do it and just display usage instead.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-07-31 00:22:33 +02:00
Anatoly Burakov
681a672886 usertools: check if module is loaded before binding
Currently, if an attempt is made to bind a device to a driver that
is not loaded, a confusing and misleading error message appears.
Fix it so that, before binding to the driver, we actually check if
it is loaded in the kernel first.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-07-31 00:22:33 +02:00
Anatoly Burakov
15f6aac759 usertools: add error on missing driver to bind
A common user error is to forget driver to which the PCI devices should
be bound to. Currently, the error message in this case looks unhelpful
misleading and indecipherable to anyone but people who know how devbind
works.

Fix this by checking if the driver string is actually a valid device
string. If it is, we assume that the user has just forgot to specify the
driver, and display appropriate error. We also assume that no one will
name their driver in a format that looks like a PCI address, but that
seems like a reasonable assumption to make.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-07-31 00:22:33 +02:00
John McNamara
99ad894dbd doc: update release notes for 19.08
Fix grammar, spelling and formatting of DPDK 19.08 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2019-07-31 00:22:33 +02:00
Wenjie Li
8ac60cac36 doc: add tested Intel platforms with Intel NICs
Add tested Intel platforms with Intel NICs to v19.08 release note.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2019-07-31 00:22:33 +02:00
Thomas Monjalon
8cd3a39938 doc: update features supported by mlx
Flow control was not documented as a supported feature
since the first fill of features matrix for mlx drivers.

Flow API and CRC offload flag support in mlx4 were missing in the
feature matrix when they were implemented (see below commits).

Fixes: 46d5736a70 ("net/mlx4: support basic flow items and actions")
Fixes: ce07b1514d ("net/mlx4: fix CRC stripping capability report")
Fixes: e86b85ca75 ("doc: fill nics features matrix for mlx")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-31 00:22:33 +02:00
Thomas Monjalon
b6e3d7a61e doc: remove unused maintainer role from guide
The backup maintainer role is not explicitly used in the file MAINTAINERS.
Listing names in a priority order is preferred and more flexible
than explicit named roles.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2019-07-30 23:28:22 +02:00
Jasvinder Singh
d27966edf1 maintainers: add co-maintainer to sched library
Add myself as a co-maintainer to dpdk sched library.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2019-07-30 23:13:59 +02:00
David Marchand
b6be16acfe eal: fix control thread affinity with --lcores
The ctrl thread cpu affinity setting has been broken when using --lcores.

Using -l/-c options makes each lcore associated to a physical cpu in a 1:1
fashion.
On the contrary, when using --lcores, each lcore cpu affinity can be set
to a list of any online cpu on the system.

To handle both cases, each lcore cpu affinity is considered and removed
from the process startup cpu affinity.

Introduced macros to manipulate dpdk cpu sets in both Linux and FreeBSD.

Examples on a 8 cores Linux system:

$ cd /sys/fs/cgroup/cpuset/
$ mkdir dpdk
$ cd dpdk
$ echo 4-7 > cpuset.cpus
$ echo 0 > cpuset.mems
$ echo $$ > tasks

Before the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

8427	cpu_list=4-5,7	testpmd
8428	cpu_list=4-6	eal-intr-thread
8429	cpu_list=4-6	rte_mp_handle
8430	cpu_list=4-5,7	lcore-slave-7

$ taskset -c 7 \
 ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Failed to create thread for interrupt handling
EAL: FATAL: Cannot init interrupt-handling thread
EAL: Cannot init interrupt-handling thread
PANIC in main():
Cannot init EAL

After the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

15214	cpu_list=4-5,7	testpmd
15215	cpu_list=6	eal-intr-thread
15216	cpu_list=6	rte_mp_handle
15217	cpu_list=4-5,7	lcore-slave-7

$ taskset -c 7 \
 ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
 --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048

15297	cpu_list=4-5,7	testpmd
15298	cpu_list=4-5,7	eal-intr-thread
15299	cpu_list=4-5,7	rte_mp_handle
15300	cpu_list=4-5,7	lcore-slave-7

Bugzilla ID: 322
Fixes: c3568ea376 ("eal: restrict control threads to startup CPU affinity")
Cc: stable@dpdk.org

Reported-by: Johan Källström <johan.kallstrom@ericsson.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-07-30 23:11:19 +02:00
Hariprasad Govindharajan
d7f936190e examples/l3fwd: fix unaligned memory access on x86
Fix unaligned memory access when reading IPv6 header which
leads to segmentation fault by changing aligned memory read
to unaligned memory read.

Bugzilla ID: 279
Fixes: 64d3955de1 ("examples/l3fwd: fix ARM build")
Cc: stable@dpdk.org

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Tested-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
2019-07-30 22:05:00 +02:00
Kalesh AP
1868b17b57 net/bnxt: set checksum flags in vector Rx
Fixed to return the checksum status of rx packets by setting
"ol_flags" correctly in vector mode receive.

These changes have been there for non vector mode receive.
In vector mode receive also indicate inner and outer checksum
errors individually in "ol_flag" to indicate L3 and L4 error.

Fixes: bc4a000f2f ("net/bnxt: implement SSE vector mode")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-30 19:39:39 +02:00
Kalesh AP
02cc2b439e net/bnxt: fix context memory allocation
There is a bug in context memory allocation because of which
it results in reusing the context memory allocated for the first
port while allocating memory for next ports.

Fix it by passing the port id in the name field while
allocating context memory.

Fixes: f8168ca0e6 ("net/bnxt: support thor controller")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-30 19:39:39 +02:00
Jerin Jacob
198cce7110 net/virtio: fix build
Add extern to variable declaration to avoid some compiler treating it
as variable definition.

build error log:

lib/librte_pmd_virtio.a(vhost_kernel.o):(.rodata+0x110):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here
lib/librte_pmd_virtio.a(virtio_user_dev.o):(.rodata+0xe8):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here

Fixes: 33d24d65fe ("net/virtio-user: abstract backend operations")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-07-30 19:46:11 +02:00
Bruce Richardson
54dcfdee85 drivers/raw: standardize naming
The driver names for rawdevs were both different in make and meson builds
and were non-standard in the make version in that some included "rawdev" in
the name while others didn't.

Therefore, for global consistency of naming, we can use "rte_rawdev" rather
than "rte_pmd" for the prefix for the libraries. While most other driver
categories use "rte_pmd" as a prefix, there is precedent for this in the
mempool drivers use "rte_mempool" as a prefix.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-07-30 15:36:35 +02:00
Bruce Richardson
473c88f9b3 drivers/raw: remove rawdev from directory names
The ifpga and skeleton rawdev drivers included "rawdev" in their directory
names, which was superfluous given that they were in the drivers/raw
directory. Shorten the names via this patch.

For meson builds, this will rename the final library .so/.a files
produced, but those will be renamed again later via a patch to
standardize rawdev names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-07-30 15:20:41 +02:00
Ruifeng Wang
6420da3140 test/rcu: remove redundant header file
RCU library now includes stdbool.h header itself.
There is no need to include this header file in RCU user files.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2019-07-30 11:34:47 +02:00
Michael Santana
168fd260d5 test/table: decrease memory requirement
This patch reduces the memory footprint of tables for the unit test.
Lower memory footprint means the test now passes when trying to allocate
the tables. This patch is mainly to make table_autotest pass in CI.

Signed-off-by: Michael Santana <msantana@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2019-07-30 11:34:21 +02:00
Vamsi Attunuru
ae0976c37b test/eal: fix --socket-mem option
eal flag autotest fails when multiple mem size flags are passed to
--socket-mem option irrespective of RTE_MAX_NUMA_NODES and the number of
available sockets on the test system.

Fixes: 45f1b6e868 ("app: add new tests on eal flags")
Cc: stable@dpdk.org

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Vamsi Attunuru <vattunuru@marvell.com>
Tested-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-30 11:22:49 +02:00
Anatoly Burakov
cef26406ba test: enable installing app with meson
Currently, the test app is not being installed by default when
built and installed with meson build system. Fix that to enable
installation of the test app alongside other DPDK apps.

Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-30 11:22:19 +02:00
Harman Kalra
6f327ba1a3 examples/rxtx_callbacks: fix HW timestamp config
Since all PMDs doesn't implement per queue offload capabilities but
supports RX timestamping and also since rx_offload_capa includes all
rx_queue_offload_capa's. Hence moving the logic to enable HW timestamp
via DEV_RX_OFFLOAD_TIMESTAMP flag before device configuration so that
this application can work with all PMDs.

Fixes: cd1dadeb9b ("examples/rxtx_callbacks: support HW timestamp")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-07-30 11:21:49 +02:00
Jasvinder Singh
7f394eebbb examples/qos_sched: add more TC to red configuration
Add RED configuration to more traffic classes in app configuration
files.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2019-07-30 10:19:08 +02:00
Anatoly Burakov
79a0bbe5b6 eal: pick IOVA as PA if IOMMU is not available
When IOMMU is not available, /sys/kernel/iommu_groups will not be
populated. This is happening since at least 3.6 when VFIO support
was added. If the directory is empty, EAL should not pick IOVA as
VA as the default IOVA mode.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-07-30 10:09:13 +02:00
Harman Kalra
376aa383e7 examples/ptpclient: fix delay request message
Observed an issue with the length and domain number of the
delay request message sent out by the client. Due to which delay
response from master was not received.

Fixes: ab129e9065 ("examples/ptpclient: add minimal PTP client")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-07-30 00:11:42 +02:00
Sunil Kumar Kori
ed553e3db4 examples/ip_frag: remove Tx fast free offload flag
Application uses different pool to allocate direct and indirect
mbufs which are further spliced together to consturct a fragmented
packet and same is transmitted over the port which is configured
with DEV_TX_OFFLOAD_MBUF_FAST_FREE enabled i.e. all segments
must belong to the same pool. But constructed packet violates
the conditions.

So fixing DEV_TX_OFFLOAD_MBUF_FAST_FREE flag during device
configuration.

Fixes: fdb9eff67f ("examples/ip_fragmentation: convert to new offloads API")
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-07-29 23:47:29 +02:00
David Marchand
5e16d9447a app/testpmd: rename ambiguous VF config variable
Caught while looking at the rx offloads code.

rx_mode is a global variable for the default rx configuration.
Rename the local rx_mode variable in cmd_set_vf_rxmode_parsed.

Fixes: 7741e4cf16 ("app/testpmd: VMDq and DCB updates")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-29 23:38:30 +02:00
David Marchand
3e6b0d5f69 app/testpmd: fix eth packet dump for small buffers
In the rather unlikely case where the first segment is too small to
contain an ethernet header, we can't go and directly dereference the
mbuf data buffer.

Using rte_pktmbuf_read is a little more expensive but this is still
acceptable for a debugging feature.

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

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-29 23:30:33 +02:00
Liang Ma
96c343868d distributor: fix livelock on flush
The Distributor autotest can lock if ran enough times. Worker and
distributor threads get into a livelock situation waiting on each
other.

To repeat:
`while sudo sh -c "echo 'distributor_autotest' |
		./build/app/test/dpdk-test"; do :; done`

The root cause is where we are flushing on exit, and do not wait for
all worker packets to be returned before exiting.
Add a delay on flush so that all worker packets are returned before
completing the flush.

Bugzilla ID: 316
Fixes: 775003ad2f ("distributor: add new burst-capable library")
Cc: stable@dpdk.org

Reported-by: Michael Santana <msantana@redhat.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Michael Santana <msantana@redhat.com>
2019-07-29 23:23:37 +02:00
Xiaolong Ye
54ad947eda doc: add SPDX tag for OPDL guide
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-29 22:59:37 +02:00
Jerin Jacob
12e10bd068 doc: replace license text with SPDX tag
Replace mvasm and mvpp2 Marvell PMD driver
documentation license text with SPDX tag.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Liron Himi <lironh@marvell.com>
2019-07-29 22:57:28 +02:00
Hemant Agrawal
86c3cb2245 eal: replace license text with SPDX tag
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-07-29 22:55:14 +02:00
David Marchand
e27071744d service: remove experimental banner in API description
This was missed when promoting this API to stable.

Fixes: 7a0ac7cdb4 ("service: promote experimental functions to stable")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gage Eads <gage.eads@intel.com>
2019-07-29 22:38:50 +02:00
David Marchand
e2769068e5 eal: sort experimental symbols per release
Sort the experimental symbols per release to make it easier/quicker to
check for how long we have them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michael Santana <msantana@redhat.com>
2019-07-29 22:26:10 +02:00
Sean Morrissey
9f83b62f55 eal: revert parsing option --telemetry
This reverts commit debacba029.

Reverting this patch as it currently breaks the initialization of
telemetry, more investigation is ongoing to fix the issue for the
printed error message for unrecognized argument.

Fixes: debacba029 ("eal: fix parsing option --telemetry")
Cc: stable@dpdk.org

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
2019-07-29 22:24:59 +02:00
Ferruh Yigit
c96bbbd010 igb_uio: fix build on Linux 5.3 for fall through
build error:
kernel/linux/igb_uio/igb_uio.c:
   In function ‘igbuio_pci_enable_interrupts’:
   kernel/linux/igb_uio/igb_uio.c:230:6:
   error: this statement may fall through
   [-Werror=implicit-fallthrough=]
  230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
kernel/linux/igb_uio/igb_uio.c:240:2: note: here
  240 |  case RTE_INTR_MODE_MSI:
      |  ^~~~

The build error is caused by Linux kernel commit in 5.3 that enables the
"-Wimplicit-fallthrough=3" gcc flag.
Commit a035d552a93b ("Makefile: Globally enable fall-through warning")

To fix the error, either a gcc attribute can be provided [1] or a code
comment with some defined syntax need to be provided [2], since there is
already comments, updated them slightly to match the required syntax to
fix the build error.

[1]
"__attribute__ ((fallthrough));"

[2]
[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?

Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-29 22:18:57 +02:00
Jerin Jacob
5077d88879 common/octeontx2: prevent STP instruction fissure
OTX2 AP core can sometimes fissure STP instructions when it is more
optimal to send such writes into the pipeline as 2 separate
instructions. However registers should be excluded from such
optimization. This commit ensures that no CSR write is ever fissured
by introducing zero cost workaround by setting STP pre-index by zero to
make sure OTX2 AP core prevent fissure.

Fixes: 8a4f835971 ("common/octeontx2: add IO handling APIs")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-29 22:18:41 +02:00
Harman Kalra
9f741506f8 drivers/octeontx2: fix recursive interrupts
In case of QINT interrupt occurrence, SW fails to clear the QINT
line resulting in recursive interrupts because currently interrupt
handler gets the cause of the interrupt by reading
NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT but does not write 1 to clear
RQ[SQ/CQ/ERR]_INT field in respective NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT
registers.

Fixes: dc47ba15f6 ("net/octeontx2: handle queue specific error interrupts")
Fixes: 50b95c3ea7 ("mempool/octeontx2: add NPA IRQ handler")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 22:18:01 +02:00
Pavan Nikhilesh
ef9f8bb6d5 event/octeontx2: fix null dereference
Fix NULL dereference after rte_realloc and add extra NULL checks.
Fix few memory leak with kvargs.

Coverity issue: 345023, 345022, 345009, 345011, 345026, 344997, 344990
Fixes: ffa4ec0b60 ("event/octeontx2: allow adapters to resize inflight buffers")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-29 22:17:29 +02:00
Viacheslav Ovsiienko
5a93e173b8 net/mlx5: fix Tx completion request generation
The packets transmitting in mlx5 is performed by building
Tx descriptors (WQEs) and sending last ones to the NIC.
The descriptor can contain the special flags, telling the NIC
to generate Tx completion notification (CQEs). At the beginning
of tx_burst() routine PMD checks whether there are some Tx
completions and frees the transmitted packet buffers.

The flags to request completion generation must be set once
per specified amount of packets to provide uniform stream
of completions and freeing the Tx queue in uniform fashion.
The previous implementation sets the completion request
generation once per burst, if burst size if big enough it may
latency in CQE generation and freeing large amount of buffers
in tx_burst routine on multiple completions which also
affects the latency and even causes the Tx queue overflow
and Tx drops.

This patches enforces the completion request will be set
in the exact Tx descriptor if specified amount of packets
is already sent.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29 18:05:10 +02:00
Viacheslav Ovsiienko
9f350504bb net/mlx5: fix ConnectX-4LX minimal inline data limit
Mellanox ConnectX-4LX NIC in configurations with disabled
E-Switch can operate without minimal required inline data
into Tx descriptor. There was the hardcoded limit set to
18B in PMD, fixed to be no limit (0B).

Fixes: 38b4b397a5 ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29 18:05:10 +02:00
Viacheslav Ovsiienko
318ea4cfa1 net/mlx5: fix Tx completion descriptors fetching loop
This patch limits the amount of fetched and processed
completion descriptors in one tx_burst routine call.

The completion processing involves the buffer freeing
which may be time consuming and introduce the significant
latency, so limiting the amount of processed completions
mitigates the latency issue.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29 18:05:10 +02:00