The memcpy operation overwrites the device info fields set
by ethdev API and leaves the device field undefined.
Thus, replaces memcpy by only updating the required fields
at the driver layer.
error log: testpmd> show port info 1
**** Infos for port 1 ****
MAC address: 00:00:00:00:00:00
Device name: net_softnic0
Segmentation fault.
port_infos_display (port_id=1) at /dpdk/app/test-pmd/config.c:418
if (dev_info.device->devargs && dev_info.device->devargs->args)
Fixes: cc6d421574 ("net/softnic: add softnic PMD")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
DEFERRED state replaced by ownership concept and it is no more used as
code comment states.
ethdev ABI broken on this release use this opportunity to remove
DEFERRED state.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
This patch fixes the mismatch keyword in vhost_crypto sample
application guide.
Fixes: 709521f4c2 ("examples/vhost_crypto: support multi-core")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
DCR is Intel internal information, no need to be in public code.
Fixes: de2cd512b1 ("net/i40e/base: new AQ commands for cloud filter")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Some kernel drivers are not able to handle the link status correctly
after DPDK application sets the PHY to link down.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Following APIs are not currently implemented by any of the
drivers, so marking them as rte_experimental again.
Fixes: 1a81dce780 ("security: remove experimental tag")
rte_security_get_userdata;
rte_security_session_stats_get;
rte_security_session_update;
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
When running dpdk applications on cores whose ids are bigger
than original max_core setting, eal error as below:
EAL: Detected 104 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: invalid core list
-l CORELIST core indexes between 0 and 128
The fix is to increase max_core to 256 on arm64 platform.
Fixes: b3ce00e5 ("mk: introduce ARMv8 architecture")
Cc: stable@dpdk.org
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
In the eth Rx adapter SW service function,
move the return to after the spinlock unlock.
Coverity issue: 302857
Fixes: a66a837446 ("eventdev: fix Rx SW adapter stop")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
When compiling with -O1, this error can appear:
app/test-eventdev/test_pipeline_common.c:332:6: error:
‘ret’ may be used uninitialized in this function
If there is no device, then ret is returned without being initialized.
It is fixed by setting 0 as initial value.
Fixes: 032a965a8f ("app/eventdev: support Tx adapter")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
When compiling with -O1, this error can appear:
lib/librte_eventdev/rte_event_eth_tx_adapter.c:705:6: error:
‘ret’ may be used uninitialized in this function
If tx_queue_id is -1 and nb_queues is 0, then ret is returned
without being initialized.
It is fixed by setting 0 as initial value.
Fixes: a3bbf2e097 ("eventdev: add eth Tx adapter implementation")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
When compiling with gcc -O1, this error appears:
drivers/net/mlx4/mlx4_ethdev.c: In function ‘mlx4_rxmode_toggle’:
rte_log.h:321:3: error:
‘mode’ may be used uninitialized in this function
The function mlx4_rxmode_toggle is never called with a value which
is not in the switch block, but GCC complains about it with -O1.
So the default case is "fixed" by setting string "undefined".
Fixes: eacaac7bae ("net/mlx4: restore promisc and allmulti support")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
This error can be raised:
lib/librte_kni/rte_kni.c:531:15: error:
'req' may be used uninitialized in this function
It should not happen because kni_fifo_get() would return 0 if
req is not initialized, so the function would return before using req.
But GCC complains about it in -O1 optimization,
and a NULL initialization is harmless here.
Fixes: 3fc5ca2f63 ("kni: initial import")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
In case of optimized compilation, RTE_BUILD_BUG_ON use an external
variable which is neither defined, nor used.
It seems not optimized out in case of OPDL compiled with clang -O1:
opdl_ring.c: undefined reference to `RTE_BUILD_BUG_ON_detected_error'
clang-6.0: fatal error: linker command failed with exit code 1
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Rename rte_bsf64 to rte_bsf64_safe (this is a "safe" version in
that it prevents undefined behavior by checking if incoming
parameter is zero) and move it to common header.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
RTE_BITMAP_OPTIMIZATIONS was never set to 0 and makes no sense
anyway, so remove all code related to it. Also, drop the "likely"
for bsf64 code, because it's a generic function and we cannot
make any assumptions about likely values of incoming arguments.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Previous fix for rte_panic has moved setting of alarm before
sending the message. This means that whether we send a message,
the alarm would still trigger. The comment noted that cleanup
would happen in the alarm handler, but that's not what actually
happened - instead, in the event of failed send we freed the
memory in-place, before putting the request on the queue.
This works OK when the message is sent, but when sending the
message fails, the alarm would still trigger with a pointer
argument that points to non-existent memory, and cause
memory corruption.
There probably is a "proper" fix for this issue, with correct
handling of sent vs. unsent requests, however it would be
simpler just to sacrifice the sent request in the (extremely
unlikely) event of alarm set failing. The other process would
still send a response, but it will be ignored by the sender.
Fixes: 45e5f49e87 ("ipc: remove panic in async request")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
If there aren't any devices of a particular category on user's
system, we still display them, which is bad for usability. Fix
devbind to not print out a category unless there are devices in
it.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Updated the doc on how packets are marked to identify
their timestamp as valid and considered for latency
measurement.
Suggested-by: Bao-Long Tran <longtb5@viettel.com.vn>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
This patch fixes a typo in flow_filtering.rst. There is no
method named generate_ipv4_rule in DPDK, it should be generate_ipv4_flow.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Fixed formatting an extra header was added making it an extra
section when it was not intended.
Fixes: d0dff9ba44 ("doc: sample application user guide")
Cc: stable@dpdk.org
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add more info to the docs on how to set environmental variable to
correctly build the vm_power_manager sample app in a cross compile
or multilib environment by setting PKG_CONFIG_LIBDIR.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Updating platform doc with steps to build when using Cavium OCTEON TX
SDK. SDK would be required for using crypto offload block.
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
The library for handling NUMA is not libnuma-devel, but numactl-devel
in Red Hat/Fedora and libnuma-dev in Debian/Ubuntu.
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
If the devices used for DPDK are bound to the "uio_pci_generic" kernel
module, the IOMMU should be disabled in order not to break the IO
transmission because of the virtual / physical address mapping.
The patch clarifies the IOMMU configurations on both x86_64 and arm64
systems.
Signed-off-by: Tone Zhang <tone.zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Rami Rosen <roszenrami@gmail.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Updating docs to reflect decision made at the techboard
that the min kernel version should be bumped from 3.2 to
the latest longterm stable release (3.16), but that
compatibility for commonly used distribution kernels should
be kept also.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
ninja does not recognize 'DEST_DIR'.
Fixes: 9c3adc289c ("doc: add instructions on build using meson")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Meson can generate the list of private dependencies of libraries
automatically for the pkgconfig file only since version 0.46.0.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Commit a9460a0b2e ("kni: fix build on Linux 4.19") disables some
ethtool commands because they are removed in newer (4.19) kernels.
This patch documents removed functionality.
Fixes: a9460a0b2e ("kni: fix build on Linux 4.19")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Commit 89397a01ce ("kni: set default carrier state of interface")
changes the KNI interface default carrier status. Which prevents traffic
flow by default and may break some existing usage / testing.
Document this behavior change in release notes.
Fixes: c6fd54f28c ("kni: add function to set link state on kernel interface")
Fixes: 89397a01ce ("kni: set default carrier state of interface")
Fixes: 724beb913b ("examples/kni: monitor and update link state continually")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add the new module parameter for the KNI kernel module, the new command
line flag for the KNI sample application, and the new API function
'rte_kni_update_link()' to the release note.
Fixes: c6fd54f28c ("kni: add function to set link state on kernel interface")
Fixes: 89397a01ce ("kni: set default carrier state of interface")
Fixes: 724beb913b ("examples/kni: monitor and update link state continually")
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
On some distributions (such as CentOS 7) lspci may not be installed
by default, causing exceptions which are difficult to interpret.
Fix devbind script to check if lspci is installed at script startup.
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Rami Rosen <roszenrami@gmail.com>
The regex to determine the end of the map file chunk in a patch seems to
be wrong, It was using perl regex syntax, which awk doesn't appear to
support (I'm still not sure how it was working previously). Regardless,
it wasn't triggering and as a result symbols were getting added to the
mapdb that shouldn't be there.
Fix it by converting the regex to use traditional posix syntax, matching
only on the negation of the character class [^map]
Tested and shown to be working on the ip_frag patch set provided by
doucette@bu.edu
Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org
Reported-by: Cody Doucette <doucette@bu.edu>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Need to release the port and the ring resources after test. Otherwise,
it will cause failure to allocate memory when reentry the test.
Fixes: ea764af ("app/test: add performance test for ring driver")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
power_kvm_vm_autotest should run on kvm vm and
virtio-ports should exist, if not test should skip.
Hence changed return as TEST_SKIPPED.
Fixes: 0ea2dd4409 ("test: skip when required lib not available")
Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Fixed the interrupt type using error.
Check valid alarm should use TEST_INTERRUPT_HANDLE_VALID_ALARM.
Fixes: 493b8e173f ("eal: add device event handle in interrupt thread")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Before 18.05, DPDK could not release memory back to the system
neither at runtime nor before shutting down. Over the course of
18.05 up to 18.11, code was introduced to release memory at
runtime, as well as an rte_eal_cleanup() function that is supposed
to release all EAL-allocated memory before shutting down DPDK.
When 3f9e31d71d ("test: clean up on exit") was introduced, the
test application started to use rte_eal_cleanup() to release all
used memory after execution. However, the EAL flags autotest
still relies on the old behavior of leaving stuff behind in the
hugetlbfs.
The fix is twofold. First, the test to check for leftover files
in hugetlbfs is no longer valid as it is, because test application
now removes all files from hugetlbfs after exit. However, if we
use the --legacy-mem option, then old behavior of leaving files
in hugetlbfs after execution is restored. So the first fix is to
add --legacy-mem to all the tests that expect files in hugetlbfs
to be leftover.
However, we also need to test if default memory mode *doesn't*
leave any files behind, so we also extend the test to check for
these scenarios as well. So, both memtest1 and memtest2 are run
in legacy and default mem modes, and are checked for any leftover
files that are or are not supposed to be there.
Fixes: 3f9e31d71d ("test: clean up on exit")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
The ipv4_multicast sample application was dropping packets
when using mbuf clone. When creating an L2 header and copying
metadata from the source packet, the ol_flags were also copied
along with all the other metadata. Because the cloned packet
had IND_ATTACHED_MBUF flag set in its ol_flags,
this caused the packets to never be freed when using rte_pktmbuf_free.
Since copying ol_flags from the cloned packet is
not necessary in the first place, just don't do it.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Reported-by: Dong Wang <dong1.wang@intel.com>
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Dong Wang <dong1.wang@intel.com>
port_id size should be uint16_t,
fix where it is defined as uint8_t
Fixes: f8244c6399 ("ethdev: increase port id range")
Cc: stable@dpdk.org
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
This patch checks the return value of function
rte_eth_bond_8023ad_agg_selection_set() in bond_ethdev_configure
for error return value.
Fixes: 6d72657ce3 ("net/bonding: add other aggregator modes")
Cc: stable@dpdk.org
Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Private vdev was the way previously, when pdump developed, now with
shared device mode on virtual devices, pcap data path in secondary
is not working.
When secondary adds a virtual device, related data transferred to
primary and primary creates the device and shares device back with
secondary. When pcap device created in primary, pcap handlers
(pointers) are process local and they are not valid for secondary
process. This breaks secondary.
So we can't directly share the pcap handlers, but need to create a new
set of handlers for secondary, that's what we done in this patch.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
This is prework for data path enabling for secondary process.
To prevent pcap handler opened by one process be overwritten by
another process, each process should have their private copy,
`rte_eth_dev->process_private` is exactly what we needed.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tx offload mask is updated in following commit 1037ed842c
("mbuf: fix Tx offload mask"). Currently, the new added offload
flags are not supported in PMD and application will fail to call
PMD transmit prepare function.
This patch updates AVF_TX_OFFFLOAD_MASK.
Fixes: 1037ed842c ("mbuf: fix Tx offload mask")
Cc: stable@dpdk.org
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>