Tomasz Jozwiak [Fri, 14 Dec 2018 11:19:30 +0000 (12:19 +0100)]
common/qat: remove check of valid firmware response
This reverts commit
d09973f6c4df ("common/qat: fix for invalid
response from firmware") due to incorrectly reporting failures
on some older firmware versions.
Fixes:
d09973f6c4df ("common/qat: fix for invalid response from firmware")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Arek Kusztal [Wed, 12 Dec 2018 19:59:04 +0000 (20:59 +0100)]
crypto/qat: fix message for NULL algo setting unused counter
NULL algo algo does not to set counter flag so it should be zeroed.
Fixes:
db0e952a5c01 ("crypto/qat: add NULL capability")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Arek Kusztal [Wed, 12 Dec 2018 19:59:03 +0000 (20:59 +0100)]
crypto/qat: fix message for CCM when setting unused counter
AES-CCM algo does not to set counter flag so it should be zeroed.
Fixes:
ab56c4d9ed9a ("crypto/qat: support AES-CCM")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Arek Kusztal [Wed, 12 Dec 2018 19:59:02 +0000 (20:59 +0100)]
crypto/qat: fix block size error handling
Error code of qat_hash_get_block_size needs to be handle properly.
Fixes:
10b49880e3c5 ("crypto/qat: make the session struct variable in size")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Kamil Chalupnik [Wed, 5 Dec 2018 10:40:04 +0000 (11:40 +0100)]
bb/turbo_sw: update for FlexRAN 18.09
Update BBDEV Turbo SW driver and download/build instructions for
FlexRAN 18.09 release
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Kamil Chalupnik [Mon, 3 Dec 2018 13:48:11 +0000 (14:48 +0100)]
bb/turbo_sw: fix dynamic linking
Building Turbo Software as shared library for AVX512 failed
due to wrong order of library in the library list (LDLIBS)
Fixes:
b8cfe2c9aed2 ("bb/turbo_sw: add software turbo driver")
Cc: stable@dpdk.org
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Kamil Chalupnik [Fri, 7 Dec 2018 15:15:34 +0000 (16:15 +0100)]
app/bbdev: enhance interrupt test
Improvements added to interrupt test:
- test is run in loop (number of iterations is specified by
TEST_REPETITIONS define) which ensures more accurate results
- mapping cores to thread parameteres was put in order.
Master core is always set at first index. It fixes problem with
running test for only one core
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Kamil Chalupnik [Fri, 7 Dec 2018 15:15:33 +0000 (16:15 +0100)]
bbdev: support bigger transport block
Test application and Turbo Software driver were adapted
to support chained-mbuf for bigger TB sizes.
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Kamil Chalupnik [Fri, 7 Dec 2018 15:15:32 +0000 (16:15 +0100)]
bbdev: enhance throughput test
Improvements added to throughput test:
- test is run in loop (number of iterations is specified by
TEST_REPETITIONS define) which ensures more accurate results
- length of input data is calculated based on amount of CBs in TB
- maximum number of decoding iterations is gathered from results
- added new functions responsible for printing results
- small fixes for memory management
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Kamil Chalupnik [Fri, 7 Dec 2018 15:15:31 +0000 (16:15 +0100)]
bbdev: enhance offload cost test
Offload cost test was improved in order to collect
more accurate results.
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Lee Daly [Tue, 27 Nov 2018 15:10:24 +0000 (15:10 +0000)]
compressdev: fix structure comment
Fixes incorrect comment on compressdev rte_comp_op structure element.
Comment needed to be updated to be compliant with the use of
chained mbufs.
Fixes:
f87bdc1ddcf4 ("compressdev: add compression specific data")
Cc: stable@dpdk.org
Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Akash Saxena [Fri, 23 Nov 2018 12:10:59 +0000 (12:10 +0000)]
crypto/openssl: remove useless check before freeing
Remove if() condition prior to calling BN_free() as
BN_free(a) does nothing if a is NULL.
Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Fiona Trahe [Mon, 19 Nov 2018 22:10:11 +0000 (22:10 +0000)]
test/compress: use bulk free operation API
Use the new rte_comp_op_bulk_free API.
Add trace to catch any mempool elements not freed at test end.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Fiona Trahe [Mon, 19 Nov 2018 22:10:10 +0000 (22:10 +0000)]
compressdev: add bulk free operation API
There's an API to bulk allocate operations,
this adds a corresponding bulk free API.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Lee Daly [Mon, 19 Nov 2018 13:52:53 +0000 (13:52 +0000)]
test/compress: improve debug trace setup
This removes the magic number from the assignment of the engine variable,
which is used in the debug trace.
Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Nikhil Rao [Mon, 17 Dec 2018 04:39:41 +0000 (10:09 +0530)]
eventdev: fix eth Tx adapter queue count checks
rte_event_eth_tx_adapter_queue_add() - add a check
that returns an error if the ethdev has zero Tx queues
configured.
rte_event_eth_tx_adapter_queue_del() - remove the
checks for ethdev queue count, instead check for
queues added to the adapter which maybe different
from the current ethdev queue count.
Fixes:
a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Gage Eads [Mon, 3 Dec 2018 20:05:04 +0000 (14:05 -0600)]
eventdev: fix xstats documentation typo
The eventdev extended stats documentation referred to two non-existent
functions, rte_eventdev_xstats_get and rte_eventdev_get_xstats_by_name.
Fixes:
3ed7fc039a ("eventdev: add extended stats")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
Erik Gabriel Carrillo [Mon, 3 Dec 2018 17:48:14 +0000 (11:48 -0600)]
app/eventdev: detect deadlock for timer event producer
If timer events get dropped for some reason, the thread that launched
producer and worker cores will never exit, because the deadlock check
doesn't currently apply to the event timer adapter case. This commit
fixes this.
Fixes:
d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Erik Gabriel Carrillo [Thu, 29 Nov 2018 19:45:26 +0000 (13:45 -0600)]
eventdev: remove redundant timer adapter function prototypes
Fixes:
6750b21bd6af ("eventdev: add default software timer adapter")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Nikhil Rao [Thu, 29 Nov 2018 08:00:17 +0000 (13:30 +0530)]
eventdev: fix error log in eth Rx adapter
strerror() input parameter should be > 0.
Coverity issue: 302864
Fixes:
3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jiayu Hu [Mon, 17 Dec 2018 06:05:39 +0000 (14:05 +0800)]
gro: fix overflow of payload length calculation
When the packet length is smaller than the header length,
the calculated payload length will be overflowed and result
in incorrect reassembly behaviors.
Fixes:
1e4cf4d6d4fb ("gro: cleanup")
Fixes:
9e0b9d2ec0f4 ("gro: support VxLAN GRO")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Anatoly Burakov [Tue, 13 Nov 2018 15:54:44 +0000 (15:54 +0000)]
eal: clean up unused files on initialization
When creating process data structures, EAL will create many files
in EAL runtime directory. Because we allow multiple secondary
processes to run, each secondary process gets their own unique
file. With many secondary processes running and exiting on the
system, runtime directory will, over time, create enormous amounts
of sockets, fbarray files and other stuff that just sits there
unused because the process that allocated it has died a long time
ago. This may lead to exhaustion of disk (or RAM) space in the
runtime directory.
Fix this by removing every unlocked file at initialization that
matches either socket or fbarray naming convention. We cannot be
sure of any other files, so we'll leave them alone. Also, remove
similar code from mp socket code.
We do it at the end of init, rather than at the beginning, because
secondary process will use primary process' data structures even
if the primary itself has died, and we don't want to remove those
before we lock them.
Bugzilla ID: 106
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Luca Boccassi [Wed, 5 Dec 2018 14:25:45 +0000 (14:25 +0000)]
doc: fix garbage text in generated HTML guides
If the user has MAKEFLAGS set in the environment when building the
documentation, the doc/guides/conf.py script which calls "make"
exclusively to get the project version might pick up garbage from
stdout, like:
<title>FAQ — Data Plane Development Kit make[2]:
Entering directory '/build/1st/dpdk-18.11/doc/guides'
18.11.0
make[2]: Leaving directory '/build/1st/dpdk-18.11'
documentation</title>
Override MAKEFLAGS in the Python subprocess call to avoid this issue.
Fixes:
f7aaae2fe6f7 ("doc: add copyright and version")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Stephen Hemminger [Wed, 5 Dec 2018 22:02:30 +0000 (14:02 -0800)]
bus/dpaa: do nothing if bus not present
The DPAA bus support code put out messages like:
dpaax: read_memory_node(): Unable to glob device-tree memory node:
(/proc/device-tree/memory[@0-9]*/reg)(3)
dpaax: PA->VA translation not available;
dpaax: Expect performance impact.
These are unnecessary and likely to confuse the end user.
Fix this by doing nothing if bus is empty.
Fixes:
5a7dbb934d75 ("dpaa: enable dpaax library")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Stephen Hemminger [Wed, 5 Dec 2018 22:11:59 +0000 (14:11 -0800)]
bus/vmbus: debug subchannel setup
Add more instrumentation to subchannel setup to help diagnose
startup issues.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Stephen Hemminger [Wed, 5 Dec 2018 22:11:58 +0000 (14:11 -0800)]
net/netvsc: disable multi-queue on older servers
NDIS multi-queue support is only in WS2012 or later. Check the NDIS
version to limit to single queue on older versions. Similar code
exists in Linux driver.
Fixes:
4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Stephen Hemminger [Wed, 5 Dec 2018 22:11:57 +0000 (14:11 -0800)]
net/netvsc: enable SR-IOV
Make DPDK enable SRIOV flag in same way as Linux and FreeBSD.
Fixes:
dc7680e8597c ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Stephen Hemminger [Wed, 5 Dec 2018 22:11:56 +0000 (14:11 -0800)]
bus/vmbus: fix race in subchannel creation
When using multiple queues, there was a race with the kernel
in setting up the second channel. This regression is due to a kernel change
which does not allow accessing sysfs files for Hyper-V channels that are not opened.
The fix is simple, just move the logic to detect not ready
sub channels earlier in the existing loop.
Fixes:
831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Cc: stable@dpdk.org
Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
David Marchand [Tue, 4 Dec 2018 08:28:31 +0000 (09:28 +0100)]
log: add missing experimental tag
When rte_log_register_type_and_pick_level() has been introduced, it has
been correctly added to the EXPERIMENTAL section of the eal map and the
symbol itself has been marked at its definition.
However, the declaration of this symbol in rte_log.h is missing the
__rte_experimental tag.
Because of this, a user can try to call this symbol without being aware
this is an experimental api (neither compilation nor link warning).
Fixes:
b22e77c02620 ("eal: register log type and pick level from args")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Jeff Shaw [Fri, 14 Dec 2018 16:40:00 +0000 (08:40 -0800)]
eal: remove unnecessary dirent.h include
Prior to this patch, the two affected .c files include <dirent.h>
unnecessarily. This commit removes the include lines.
Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tiwei Bie [Mon, 3 Dec 2018 02:58:57 +0000 (10:58 +0800)]
pdump: remove deprecated APIs
We already changed to use generic IPC in pdump since below commit:
commit
660098d61f57 ("pdump: use generic multi-process channel")
The `rte_pdump_set_socket_dir()`, the `path` parameter of
`rte_pdump_init()` and the `enum rte_pdump_socktype` have been
deprecated since then. This commit removes these deprecated
APIs and also bumps the pdump ABI.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Timothy Redaelli [Tue, 27 Nov 2018 19:35:32 +0000 (20:35 +0100)]
mk: do not install meson.build in usertools
In commit
7dd34c71de2a ("usertools: install with meson") meson.build was
added in usertools directory and so it's copied to $(datadir)/usertools
with "make install".
This patch avoids to copy meson.build when installing usertools with
"make install".
Fixes:
7dd34c71de2a ("usertools: install with meson")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Gavin Hu [Tue, 11 Dec 2018 03:55:50 +0000 (11:55 +0800)]
config: enable C11 memory model for armv8 with meson
This patch makes the configuration based on makefile and the
configuration based on meson to be the same.
Fixes:
c6e536e38437 ("build: add more implementers IDs and PNs for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jerin Jacob [Sun, 16 Dec 2018 15:43:25 +0000 (15:43 +0000)]
maintainers: update Cavium email ids
Following Marvell's acquisition of Cavium, we need to update all the
Cavium maintainer's entries to point to our new e-mail addresses.
Update maintainers as they are no longer working for Cavium.
Thanks to Harish Patil for his support and development of our various
dpdk drivers.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Thomas Monjalon [Mon, 26 Nov 2018 20:26:59 +0000 (21:26 +0100)]
pkg: remove RPM recipe
This RPM recipe is not well maintained and probably not used a lot.
Each distribution has its own constraints and recipes.
It may not be a good idea to try maintaining packaging recipes in
the project itself.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Zhirun Yan [Thu, 13 Dec 2018 12:49:28 +0000 (12:49 +0000)]
net/i40e: remove redundant reset of queue number
Before this patch, there are two functions will call
i40e_dev_free_queues to free queues. For rte_eth_dev_close(), its
redundant because of duplication. For rte_eth_dev_reset() its
redundant because of not necessary, since following dev_configure
is required after dev_reset and it will be updated correctly.
This patch removes redundant code in i40e_dev_free_queues().
Fixes:
6b4537128394 ("i40e: free queue memory when closing")
Cc: stable@dpdk.org
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Didier Pallard [Tue, 11 Dec 2018 17:25:01 +0000 (18:25 +0100)]
net/i40e: revert fix offload not supported mask
This reverts
commit
09a62d75691f ("net/i40e: fix offload not supported mask")
Contrary to what is said in above patch commit log,
I40E_TX_OFFLOAD_NOTSUP_MASK is the mask of Tx offload bits that are part
of PKT_TX_OFFLOAD_MASK but not included in I40E_TX_OFFLOAD_MASK.
Above patch erroneously includes all PKT_RX_OFFLOAD_ bits in the
I40E_TX_OFFLOAD_NOTSUP_MASK, this is not what is expected.
Restore the initial xor that gives the expected result.
Fixes:
09a62d75691f ("net/i40e: fix offload not supported mask")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Fan Zhang [Tue, 11 Dec 2018 15:09:51 +0000 (15:09 +0000)]
examples/vhost_crypto: fix bracket
This patch fixes a missed bracket bug in the code.
Fixes:
e1d90eaa83ff ("examples/vhost_crypto: fix zero copy")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ilya Maximets [Wed, 5 Dec 2018 15:09:26 +0000 (18:09 +0300)]
vhost: fix double read of descriptor flags
Flags could be updated in a separate process leading to the
inconsistent check.
Additionally, read marked as 'volatile' to highlight the shared
nature of the variable and avoid such issues in the future.
Fixes:
d3211c98c456 ("vhost: add helpers for packed virtqueues")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ilya Maximets [Mon, 3 Dec 2018 16:20:13 +0000 (19:20 +0300)]
net/virtio: move bytes accounting to common function
There is no need to count 'bytes' separately.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Maxime Coquelin [Tue, 27 Nov 2018 10:54:27 +0000 (11:54 +0100)]
net/virtio: allocate vrings on device NUMA node
When a guest is spanned on multiple NUMA nodes and
multiple Virtio devices are spanned onto these nodes,
we expect that their ring memory is allocated in the
right memory node.
Otherwise, vCPUs from node A may be polling Virtio rings
allocated on node B, which would increase QPI bandwidth
and impact performance.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Maxime Coquelin [Tue, 27 Nov 2018 09:54:51 +0000 (10:54 +0100)]
vhost: fix crash after mmap failure
If mmap() call fails in vhost_user_set_mem_table, dev->mem
is set to NULL. If later, qva_to_vva() is called, a segfault
occurs.
Fixes:
8f972312b8f4 ("vhost: support vhost-user")
Cc: stable@dpdk.org
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Didier Pallard [Tue, 11 Dec 2018 13:00:28 +0000 (14:00 +0100)]
drivers/net: fix several Tx prepare functions
Since below commit, several tx_prep functions are broken, they fail to
pass supported Tx offload features check:
PKT_TX_IPVx must be set when any PKT_TX_L4 checksum is requested,
but these values are not present in the mask of supported Tx offloads
of several drivers that advertise PKT_TX_L4_MASK.
So any packet sent to those drivers with a L4 checksum request and
one of PKT_TX_IPVx bit set is rejected by the tx prepare function.
Fixes:
1037ed842c37 ("mbuf: fix Tx offload mask")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Alejandro Lucero [Tue, 11 Dec 2018 12:01:59 +0000 (12:01 +0000)]
net/nfp: support multiprocess
This patch introduces changes for supporting multiprocess support.
This is trivial for VFs but comes with some limitations for the PF.
Due to restrictions when using NFP CPP interface, just one secondary
process is supported by now for the PF.
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Hyong Youb Kim [Mon, 10 Dec 2018 18:28:55 +0000 (10:28 -0800)]
net/enic: support multicast filtering
The VIC hardware has 64 MAC filters per vNIC, which can be either
unicast or multicast. Use one half for unicast and the other half for
multicast, as the VIC kernel drivers for Linux and Windows do.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Mon, 10 Dec 2018 18:28:54 +0000 (10:28 -0800)]
net/enic: add handler to return firmware version
Cisco VIC adapters run firmware. Add the fw_version_get handler to
help diagnostics.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Hyong Youb Kim [Mon, 10 Dec 2018 18:28:53 +0000 (10:28 -0800)]
net/enic: release port upon close
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so rte_eth_dev_close() can
later free port resources including mac_addrs.
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Rahul Lakkireddy [Thu, 6 Dec 2018 10:13:20 +0000 (15:43 +0530)]
net/cxgbe: fix control queue mbuf pool naming convention
When multiple Chelsio adapters are present, the current naming
convention of using underlying physical port number of the adapter
creates conflicts when allocating control queue mbuf pool for
multiple adapters and hence results in allocation failure. Fix by
using port_id from rte_eth_dev_data, instead of physical port number.
Fixes:
3a3aaabc7c77 ("net/cxgbe: add control queue to communicate filter requests")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Dekel Peled [Thu, 6 Dec 2018 12:06:14 +0000 (14:06 +0200)]
doc: fix flow action command names in testpmd guide
testpmd actions set_tp_src and set_tp_dst documentation adds the
of_ prefix to action names, while the implementation doesn't add it.
This patch removes the prefix from action names in testpmd
documentation.
Fixes:
9ccc94919500 ("ethdev: add flow API actions to modify TCP/UDP port numbers")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Rami Rosen [Wed, 5 Dec 2018 17:05:04 +0000 (19:05 +0200)]
doc: fix a typo in testpmd guide
This patch fixes a typo in testpmd guide (should be ICMP and not IMCP).
Fixes:
ac718398f477 ("doc: testpmd application user guide")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Dekel Peled [Tue, 4 Dec 2018 13:52:02 +0000 (15:52 +0200)]
app/testpmd: fix MPLSoGRE encapsulation
In function cmd_set_mplsogre_encap_parsed(), MPLS label value was
set in mplsogre_encap_conf struct without the required offset.
As a result the value was copied incorrectly into
rte_flow_item_mpls struct.
This patch sets MPLS label value in appropriate location at
mplsogre_encap_conf struct, so it is correctly copied to
rte_flow_item_mpls struct.
Fixes:
3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Dekel Peled [Tue, 4 Dec 2018 13:51:33 +0000 (15:51 +0200)]
app/testpmd: fix MPLSoUDP encapsulation
In function cmd_set_mplsoudp_encap_parsed(), MPLS label value was
set in mplsoudp_encap_conf struct without the required offset.
As a result the value was copied incorrectly into
rte_flow_item_mpls struct.
This patch sets MPLS label value in appropriate location at
mplsoudp_encap_conf struct, so it is correctly copied to
rte_flow_item_mpls struct.
Fixes:
a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Yaroslav Brustinov [Mon, 3 Dec 2018 09:54:04 +0000 (11:54 +0200)]
ethdev: fix typo in queue setup error log
'=' should be '>=" for '[rt]x_desc_lim.nb_min' check.
Fixes:
386c993e95f1 ("ethdev: add a missing sanity check for Tx queue setup")
Fixes:
80a1deb4c77a ("ethdev: add API to retrieve queue information")
Cc: stable@dpdk.org
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Dekel Peled [Wed, 28 Nov 2018 09:16:17 +0000 (11:16 +0200)]
net/mlx5: fix validation of Rx queue number
Function mlx5_ctrl_flow_vlan() is used to set the rss rule in
MLX5 PMD, using priv->reta_idx_n as number of Rx queues.
This number is passed to mlx5_flow_validate_action_rss(), which
attempts to access the Rx queues at priv->rxqs.
In case priv->rxqs_n is 0, priv->rxqs is empty, and
mlx5_flow_validate_action_rss() will crash with segmentation fault.
priv->reta_idx_n can never be 0, even if priv->rxqs_n is set to 0.
But when priv->rxqs_n is set to 0, setting the rss rule is invalid.
This patch updates mlx5_ctrl_flow_vlan(), if priv->rxqs_n is 0 the
function will fail with EINVAL errno.
Fixes:
8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Zhirun Yan [Mon, 10 Dec 2018 14:08:58 +0000 (14:08 +0000)]
net/i40e: fix port close
Port reset will call i40evf_uninit_vf() to release resource. It wants
to call i40evf_dev_close() to release resources. Before this patch,
hw->adapter_stopped was used to mark the status about start/stop and
close. So it will never call i40evf_dev_close() after stopping the port.
This patch added hw->adapter_closed flag in i40evf_dev_close() and
i40e_dev_close() to control the status of close.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Xiaoyun Li [Tue, 4 Dec 2018 04:37:57 +0000 (12:37 +0800)]
net/ixgbe: fix overwriting RSS RETA
When starting the device, the RSS table is initialized. So the RSS
update before device_start would be overwritten. This patch allows users
to update the RSS reta table before device_start.
Fixes:
db5b65301dde ("ethdev: allow to set RSS hash computation flags and/or key")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Xiaoyun Li [Mon, 3 Dec 2018 08:26:32 +0000 (16:26 +0800)]
net/i40e: fix overwriting RSS RETA
When starting the device, the RSS table is initialized. So the RSS
update before dev_start would be overwritten. This patch allows users
to update the RSS reta table before dev_start and adjusts the order
to set entries sequentially.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Xiaoyun Li [Mon, 3 Dec 2018 07:07:46 +0000 (15:07 +0800)]
net/i40e: fix using recovery mode firmware
Device can't function properly with a firmware that is in recovery
mode.
Check the firmware status at initialization time. If the firmware is
in recovery mode, alert the user to check it.
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wei Zhao [Fri, 30 Nov 2018 07:50:30 +0000 (15:50 +0800)]
net/ixgbe: fix Rx LRO capability offload for x550
X550 does support LRO offload.
Fixes:
8eecb3295aed ("ixgbe: add LRO support")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Qiming Yang [Fri, 30 Nov 2018 09:05:58 +0000 (17:05 +0800)]
net/i40e: fix getting RSS configuration
RSS hash configure get API (i40e_dev_rss_hash_conf_get()) didn't check
the return value of i40e_get_rss_key().
i40e_dev_rss_hash_conf_get() will return success even getting RSS hash
key failed. This patch fixes the issue.
Fixes:
d0a349409bd7 ("i40e: support AQ based RSS config")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaolong Ye [Thu, 29 Nov 2018 08:22:19 +0000 (16:22 +0800)]
net/ifcvf: fix typo on struct name
The struct should be ifcvf_net_config other than ifcvf_net_device_config
The variable is used as named opaque variable, struct fields are not
accessed at all, so using wrong struct type has no effect but it should
be fixed.
Fixes:
a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Asaf Penso [Thu, 29 Nov 2018 11:39:32 +0000 (11:39 +0000)]
net/mlx5: fix function documentation
tso and vlan parameters were removed from the signature
of txq_mbuf_to_swp function.
The documentation of the function was not updated accordingly.
Remove the tso and vlan documentation to match the function signature.
Fixes:
8f6d9e13a98c ("net/mlx5: remove redundant checks")
Cc: stable@dpdk.org
Signed-off-by: Asaf Penso <asafp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Radu Nicolau [Wed, 14 Nov 2018 12:19:09 +0000 (12:19 +0000)]
examples/bond: fix crash when there is no active slave
If bond_ethdev_rx_burst() called more times with no active slaves
the active slave index will point out of bounds, resulting in a
segfault.
The configured slaves needs to be checked, and if none became active
there is no point going further.
Do not start the packet processing threads until all configured
slaves become active.
Fixes:
cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
Radu Nicolau [Tue, 13 Nov 2018 16:46:04 +0000 (16:46 +0000)]
examples/bond: fix initialization order
Queue setup will fail if called before adding slaves.
Fixes:
7a0665940fa8 ("net/bonding: inherit descriptor limits from slaves")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
Saleh Alsouqi [Wed, 21 Nov 2018 14:47:24 +0000 (14:47 +0000)]
app/testpmd: fix MPLS BoS bit default value
The Bottom-of-Stack (bos) bit of MPLS indicates
whether its the last MPLS layer (1) or not (0).
Indicating that the encapsulating MPLS is the
last MPLS layer in the packet as the default
behavior is more appropriate since multiple
encapsulation actions is not supported.
Fixes:
3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
Fixes:
3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
Fixes:
a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
cc: stable@dpdk.org
Signed-off-by: Saleh Alsouqi <salehals@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Stephen Hemminger [Tue, 20 Nov 2018 21:13:51 +0000 (13:13 -0800)]
net/vdev_netvsc: get rid of unnecessary debug log message
If vdev_netvsc is run with debug logging enabled, then the
log output will fill with:
net_vdev_netvsc: interface lo is non-ethernet device
Remove the message since it is not useful.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
Rasesh Mody [Sat, 17 Nov 2018 09:37:40 +0000 (09:37 +0000)]
net/bnx2x: cleanup info logs
Reduced number of INFO logs in BNX2X PMD by converting some INFO
logs to DEBUG and few NOTICE logs to INFO, removing extra new lines,
printing banner bar once for the adapter and device specific info.
Fixes:
ba7eeb035a5f ("net/bnx2x: fix logging to include device name")
Fixes:
540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Tom Barbette [Fri, 23 Nov 2018 08:03:37 +0000 (09:03 +0100)]
net/mlx5: report imissed statistics
The imissed counters (number of packets dropped because the queues were
full) were actually reported through xstats as "rx_out_of_buffer"
but was not reported through stats.
Following a recent discussion on the ML, as there is no way to tell the
user if a counter is implemented or not, this should be considered a
bug. For example, user looking at imissed will think the packets are
lost before reaching the device.
Signed-off-by: Tom Barbette <barbette@kth.se>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Luca Boccassi [Tue, 20 Nov 2018 11:27:12 +0000 (11:27 +0000)]
net/ixgbe/base: add LHA ID
ixgbe is able to recognize 1G SX and LX id, but it is missing the LHA.
Add it, so that it can handle LHA SFP plugin.
Fixes:
d2e72774e58c ("ixgbe/base: support X550")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Timmons C. Player [Mon, 19 Nov 2018 14:48:54 +0000 (14:48 +0000)]
net/igb: fix LSC interrupt when using MSI-X
Take the 'other interrupt' into account when setting up
MSI-X interrupts and use the proper mask when enabling it.
Also, rearm the MSI-X vector after the LSC interrupt fires.
This change allows both LSC and RXQ interrupts to work at
the same time when using MSI-X interrupts.
Cc: stable@dpdk.org
Signed-off-by: Timmons C. Player <timmons.player@spirent.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
David Marchand [Fri, 30 Nov 2018 12:32:02 +0000 (13:32 +0100)]
devtools: fix symbol check when adding experimental section
The incriminated commit did relax the condition to catch all sections
but dropped the + removal which can trigger false detection of the
special EXPERIMENTAL section when adding symbols and the section in the
same patch.
Fixes:
7281cf520f89 ("devtools: relax rule for identifying symbol section")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Marchand [Fri, 30 Nov 2018 12:32:01 +0000 (13:32 +0100)]
devtools: report the incorrect section when complaining
It does not hurt reporting the incriminated section.
Before:
ERROR: symbol rte_plop is added in a section other than the EXPERIMENTAL
section of the version map
After:
ERROR: symbol rte_plop is added in the DPDK_19.02 section, but is
expected to be added in the EXPERIMENTAL section of the version map
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Thomas Monjalon [Wed, 28 Nov 2018 14:52:40 +0000 (15:52 +0100)]
doc: improve release notes template
Some comments are added to encourage classifying API and ABI changes
with scope labels.
The section "removed items" is moved just after the "new features".
The sample for shared library versions is replaced with foo/bar names.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Wed, 28 Nov 2018 14:52:39 +0000 (15:52 +0100)]
version: 19.02-rc0
Start version numbering for a new release cycle,
and introduce a template file for release notes.
The release notes comments are updated to mandate
a scope label for API and ABI changes.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Mon, 26 Nov 2018 17:17:01 +0000 (18:17 +0100)]
version: 18.11.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
John McNamara [Mon, 26 Nov 2018 10:51:01 +0000 (10:51 +0000)]
doc: update release notes for 18.11
Fix grammar, spelling and formatting of DPDK 18.11 release notes.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Mon, 26 Nov 2018 17:51:14 +0000 (18:51 +0100)]
fix dpdk.org URLs
The DPDK website has a new URL scheme since June 2018.
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Mon, 26 Nov 2018 17:03:25 +0000 (18:03 +0100)]
fix indentation in symbol maps
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
Anatoly Burakov [Mon, 26 Nov 2018 10:57:03 +0000 (10:57 +0000)]
mem: fix division by zero in no-NUMA mode
When RTE_EAL_NUMA_AWARE_HUGEPAGES is set to "n", not all memtypes
will be valid, because we skip some due to not supporting other
NUMA nodes, leading to a division by zero error down the line
because the necessary memtype fields weren't populated.
Fix it by limiting number of memtypes to number of memtypes we
have actually created.
Fixes:
1dd342d0fdc4 ("mem: improve segment list preallocation")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
Thomas Monjalon [Sun, 25 Nov 2018 20:19:19 +0000 (21:19 +0100)]
version: 18.11-rc5
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Darek Stojaczyk [Fri, 23 Nov 2018 15:43:28 +0000 (16:43 +0100)]
eal: fix devargs reference after probing failure
Even if a device failed to plug, it's still a device
object that references the devargs. Those devargs will
be freed automatically together with the device, but
freeing them any earlier - like it's done in the hotplug
error handling path right now - will give us a dangling
pointer and a segfault scenario.
Consider the following case:
* secondary process receives the hotplug request IPC message
* devargs are either created or updated
* the bus is scanned
* a new device object is created with the latest devargs
* the device can't be plugged for whatever reason,
bus->plug returns error
* the devargs are freed, even though they're still referenced
by the device object on the bus
For PCI devices, the generic device name comes from
a buffer within the devargs. Freeing those will make
EAL segfault whenever the device name is checked.
This patch just prevents the hotplug error handling
path from removing the devargs when there's a device
that references them. This is done by simply exiting
early from the hotplug function. As mentioned in the
beginning, those devargs will be freed later, together
with the device itself.
Fixes:
7e8b26650146 ("eal: fix hotplug add / remove")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Darek Stojaczyk [Fri, 23 Nov 2018 14:11:07 +0000 (15:11 +0100)]
eal: fix devargs leak on multi-process detach request
Device detach triggered through IPC leaked some memory.
It allocated a devargs objects just to use it for
parsing the devargs string in order to retrieve the
device name. Those devargs weren't passed anywhere
and were never freed.
First of all, let's put those devargs on the stack,
so they doesn't need to be freed. Then free the
additional arguments string as soon as it's allocated,
because we won't need it.
Fixes:
ac9e4a17370f ("eal: support attach/detach shared device from secondary")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Darek Stojaczyk [Fri, 23 Nov 2018 14:58:24 +0000 (15:58 +0100)]
eal: fix multi-process hotplug if attached in secondary
Consider the following scenario:
1) primary process (A) starts, probes the bus
2) a secondary process (B) starts, probes the bus
3) yet another secondary process (C) starts
4) (C) registers the pci driver and hotplugs the device
* an IPC attach req is sent to the primary (A)
* (A) ignores the -EEXIST from process-local probe
* (A) propagates the request to all secondary processes
* (B) responds with -EEXIST
* (A) replies to the original request with the -EEXIST
return code
* the -EEXIST is returned back to the user, although the
device was successfully attached both locally and in
all other processes
This patch makes the primary process reply with rc=0 even if
there was another secondary process with the device already
attached. The primary process already didn't reply with -EEXIST
when the device was attached locally, so now this behavior is
even more consistent. Looking by the code, this seems to be the
originally intended behavior.
Fixes:
ac9e4a17370f ("eal: support attach/detach shared device from secondary")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Darek Stojaczyk [Fri, 23 Nov 2018 21:26:40 +0000 (22:26 +0100)]
eal: fix multi-process hotplug if already probed
When primary process receives an IPC attach request
of a device that's already locally-attached, it
doesn't setup its variables properly and is prone to
segfaulting on a subsequent rollback.
`ret = local_dev_probe(req->devargs, &dev)`
The above function will set `dev` pointer to the
proper device *unless* it returns with error. One of
those errors is -EEXIST, which the hotplug function
explicitly ignores. For -EEXIST, it proceeds with
attaching the device and expects the dev pointer to
be valid.
This patch makes `local_dev_probe` set the dev pointer
even if it returns -EEXIST.
Fixes:
ac9e4a17370f ("eal: support attach/detach shared device from secondary")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Darek Stojaczyk [Wed, 21 Nov 2018 19:05:07 +0000 (20:05 +0100)]
eal: fix multi-process hotplug rollback
If a device fails to attach before it's plugged,
the subsequent rollback will still try to detach it,
causing a segfault. Unplugging a device that wasn't
plugged isn't really supported, so this patch adds
an extra error check to prevent that from happening.
While here, fix this also for normal (non-rollback)
detach, which could also theoretically segfault on
non-plugged device.
Fixes:
244d5130719c ("eal: enable hotplug on multi-process")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Darek Stojaczyk [Wed, 21 Nov 2018 18:41:32 +0000 (19:41 +0100)]
vfio: do not needlessly setup device in secondary process
Setting up a device that wasn't setup in the primary
process will possibly break the primary process. That's
because the IPC message to retrieve the group fd in the
primary will also *open* that group if it wasn't opened
before. Even though the secondary process closes that fd
soon after as a part of its error handling path, the
primary process leaks it.
What's worse, opening that fd on the primary will
increment the process-local counter of opened groups.
If it was 0 before, then the group will never be added
to the vfio container, nor dpdk memory will be ever
mapped.
This patch moves the proper error checks earlier in the
code to fully prevent setting up devices in secondary
processes that weren't setup in the primary process.
Fixes:
2f4adfad0a69 ("vfio: add multiprocess support")
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ferruh Yigit [Fri, 23 Nov 2018 00:29:45 +0000 (00:29 +0000)]
bus/pci: fix allocation of device path
The pci_resource_by_index called strlen() on uninitialized
memory which would lead to the wrong size of memory allocated
for the path portion of the resource map. This would either cause
excessively large allocation, or worse memory corruption.
Coverity issue: 300868
Fixes:
ea9d56226e72 ("pci: introduce function to map uio resource by index")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ilya Maximets [Fri, 23 Nov 2018 15:39:20 +0000 (18:39 +0300)]
net/virtio: avoid annoying IOPL error log
In case of running with not enough capabilities, i.e. running as
non-root user any application linked with DPDK prints the message
about IOPL call failure even if it was just called like
'./testpmd --help'. For example, this breaks most of the OVS unit
tests if it built with DPDK support.
Let's register the virtio driver unconditionally and print error
message while probing the device. Silent iopl() call left in the
constructor to have privileges as early as possible as it was before.
Fixes:
565b85dcd9f4 ("eal: set iopl only when needed")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ilya Maximets [Fri, 23 Nov 2018 15:39:19 +0000 (18:39 +0300)]
eal/bsd: fix possible IOPL fd leak
If rte_eal_iopl_init() will be called more than once we'll leak
the file descriptor.
Fixes:
b46fe31862ec ("eal/bsd: fix virtio on FreeBSD")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Yipeng Wang [Wed, 21 Nov 2018 17:42:51 +0000 (09:42 -0800)]
doc: improve hash library guide
This commit improves the programmer guide of the hash
library to be more accurate on new features introduced
in 18.11.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Sameh Gobriel <sameh.gobriel@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Tiwei Bie [Thu, 22 Nov 2018 02:51:38 +0000 (10:51 +0800)]
doc: remove old options from pdump guide
The --server-socket-path and --client-socket-path options
have already been removed. So also remove them from the doc
to avoid confusion.
Fixes:
09f4aa2b955f ("app/pdump: remove unused socket path options")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
David Hunt [Fri, 26 Oct 2018 09:37:41 +0000 (10:37 +0100)]
doc: suggest to keep doc and code in same patch
Add a paragraph to the patch contribution guide suggesting that developers
keep doc updates in the same patch as the code, rather than one big
doc update as the final patch in a patch set.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Marko Kovacevic [Mon, 17 Sep 2018 15:24:29 +0000 (16:24 +0100)]
doc: add note about bool into coding style
Added a note into the coding style to
highlight the use of a bool within a struct
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon [Sat, 24 Nov 2018 18:21:31 +0000 (19:21 +0100)]
doc: announce Linux support change
It was agreed by the Technical Board to increase the minimal
supported Linux version, and written in Linux guide.
An announce was missing in the deprecation notices.
Fixes:
8c58f1b83759 ("doc: note minimun Linux version increase for 19.02")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Jasvinder Singh [Wed, 14 Nov 2018 15:36:42 +0000 (15:36 +0000)]
doc: announce API change for sched library
There will be change in API functions because of mbuf sched field
updates, outlined in deprecation note of mbuf->hash.sched.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Konstantin Ananyev [Thu, 11 Oct 2018 14:20:24 +0000 (15:20 +0100)]
doc: announce API change for cryptodev sym session
Below are details and reasoning for proposed changes.
1.rte_cryptodev_sym_session_init()/ rte_cryptodev_sym_session_clear()
operate based on cytpodev device id, though inside
rte_cryptodev_sym_session device specific data is addressed
by driver id (not device id).
That creates a problem with current implementation when we have
two or more devices with the same driver used by the same session.
Consider the following example:
struct rte_cryptodev_sym_session *sess;
rte_cryptodev_sym_session_init(dev_id=X, sess, ...);
rte_cryptodev_sym_session_init(dev_id=Y, sess, ...);
rte_cryptodev_sym_session_clear(dev_id=X, sess);
After that point if X and Y uses the same driver,
then sess can't be used by device Y any more.
The reason for that - driver specific (not device specific)
data per session, plus there is no information
how many device instances use that data.
Probably the simplest way to deal with that issue -
add a reference counter per each driver data.
2.rte_cryptodev_sym_session_set_user_data() and
rte_cryptodev_sym_session_get_user_data() -
with current implementation there is no defined way for the user to
determine what is the max allowed size of the private data.
rte_cryptodev_sym_session_set_user_data() just blindly copies
user provided data without checking memory boundaries violation.
To overcome that issue propose to add 'uint16_t priv_size' into
rte_cryptodev_sym_session structure.
3.rte_cryptodev_sym_session contains an array of variable size for
driver specific data.
Though number of elements in that array is determined by static
variable nb_drivers, that could be modified by
rte_cryptodev_allocate_driver().
That construction seems to work ok so far, as right now users register
all their PMDs at startup, though it doesn't mean that it would always
remain like that.
To make it less error prone propose to add 'uint16_t nb_drivers'
into the rte_cryptodev_sym_session structure.
At least that allows related functions to check that provided
driver id wouldn't overrun variable array boundaries,
again it allows to determine size of already allocated session
without accessing global variable.
4.#2 and #3 above implies that now each struct rte_cryptodev_sym_session
would have sort of readonly type data (init once at allocation time,
keep unmodified through session life-time).
That requires more changes in current cryptodev implementation:
Right now inside cryptodev framework both rte_cryptodev_sym_session
and driver specific session data are two completely different sctrucures
(e.g. struct cryptodev_sym_session and struct null_crypto_session).
Though current cryptodev implementation implicitly assumes that driver
will allocate both of them from within the same mempool.
Plus this is done in a manner that they override each other fields
(reuse the same space - sort of implicit C union).
That's probably not the best programming practice,
plus make impossible to have readonly fields inside both of them.
To overcome that situation propose to changed an API a bit, to allow
to use two different mempools for these two distinct data structures.
5. Add 'uint64_t userdata' inside struct rte_cryptodev_sym_session.
I suppose that self-explanatory, and might be used in a lot of places
(would be quite useful for ipsec library we develop).
The new proposed layout for rte_cryptodev_sym_session:
struct rte_cryptodev_sym_session {
uint64_t userdata;
/**< Can be used for external metadata */
uint16_t nb_drivers;
/**< number of elements in sess_data array */
uint16_t priv_size;
/**< session private data will be placed after sess_data */
__extension__ struct {
void *data;
uint16_t refcnt;
} sess_data[0];
/**< Driver specific session material, variable size */
};
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Konstantin Ananyev [Wed, 14 Nov 2018 11:23:31 +0000 (11:23 +0000)]
doc: announce ABI change for security session
Add 'uint64_t opaque_data' inside struct rte_security_session.
That allows upper layer to easily associate some user defined
data with the session.
Proposed new layout for:
struct rte_security_session {
void *sess_private_data;
/**< Private session material */
+ uint64_t opaque_data;
+ /**< Opaque user defined data */
};
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Ian Stokes [Thu, 22 Nov 2018 12:09:09 +0000 (12:09 +0000)]
doc: announce ethdev ABI change for MTU limits info
Maximum and minimum MTU values vary between hardware devices. In
hardware agnostic DPDK applications access to such information would
allow a more accurate way of validating and setting supported MTU values on
a per device basis rather than using a defined default for all devices.
The following solution was proposed:
http://mails.dpdk.org/archives/dev/2018-September/110959.html
This patch adds a depreciation notice for ``rte_eth_dev_info`` as new
members will be added to represent min and max MTU values. These can be
added to fit a hole in the existing structure for amd64 but not for 32 bit,
as such ABI change will occur as size of the structure will be impacted.
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Shreyansh Jain [Thu, 15 Nov 2018 13:29:27 +0000 (13:29 +0000)]
doc: announce deprecation of dpaa2 exposed mem structure
rte_dpaa2_memsegs is no more required once the dpaax (pa-va) translation
library has been introduced. This can be made internal (for fallback
operations) in subsequent release.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Thomas Monjalon [Thu, 22 Nov 2018 10:32:23 +0000 (11:32 +0100)]
doc: announce kvargs API change
After processing a kvlist in rte_kvargs_process(),
it may be needed to loop again over kvlist in order to know
whether the key is matched or not.
In order to simplify implementation of kvargs checks,
a new pointer parameter may be used to get the match count.
The change of the function prototype would be as below:
int
rte_kvargs_process(const struct rte_kvargs *kvlist,
const char *key_match,
+ int *match_count,
arg_handler_t handler,
void *opaque_arg)
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>