Received a note the other day from the Linux Foundation governance board
for DPDK indicating that several files I have copyright on need to be
relicensed to be compliant with the DPDK licensing guidelines. I have
some concerns with some parts of the request, but am not opposed to
other parts. So, for those pieces that we are in consensus on, I'm
proposing that we change their license from BSD 2 clause to 3 clause.
I'm also updating the files to use the SPDX licensing scheme
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Added examples in lcore index for better explanation on
various examples, Sited examples for lcore id.
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Add information to explain applications using multiple instances of sw
crypto with example.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Added note section to update information for use cases working with
multiple crypto devices.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The PTP Client application requires IEEE1588 to be supported
by the network driver used, which needs full Tx data path
to be used.
Fixes: b960219b0d ("examples/ptpclient: convert to new ethdev offloads API")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The default adapter configuration callback is invoked when a Rx
queue is added to the adapter and the adapter detects that a SW
service is needed. The adapter needs to re-configure the device
with an additional port and to do do, it needs to stop the
device and restart it after it is done reconfiguring it. This
patch adds code to check the return code of
rte_event_dev_start() for both when the reconfiguration fails
and when it succeeds and introduces a new error code (-EIO)
for the first case.
Coverity issue: 257000
Fixes: 9c38b704d2 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Report error message if clearing O_NONBLOCK flag will fail,
then return from function.
Coverity issue: 143439
Fixes: ef53b60300 ("net/virtio-user: support LSC")
Cc: stable@dpdk.org
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Should be not possible to load conflicting DDP profiles. Only DDP
profiles of the same group (not 0) can be loaded together. If DDP
profile group is 0, it is exclusive, i.e. it cannot be loaded with
any other DDP profile. If DDP profile groups are different, these
profiles cannot be loaded together.
Fixes: b319712f53 ("net/i40e: extended list of operations for DDP processing")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
The port_conf for the DCB configuration should
inherit the same configuration of the port.
Fixes: 0074d02fca ("app/testpmd: convert to new Rx offloads API")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Get rid of global static ring variable and don't reuse rings
between test runs.
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Fixes: 4e32101f9b ("ring: support freeing")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Add a teardown function that frees allocated resources.
Fixes: d0c9b58d71 ("app/test: new reorder unit test")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
The timer_period option specified by users via config file
should have unit of 1 millisecond. However timer_period is
internally converted to unit of 10 millisecond.
Fixes: 4e14069328 ("examples/ip_pipeline: measure CPU utilization")
Cc: stable@dpdk.org
Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
User can pass portmask with any value, even invalid mask. The code
checks against actual portmask.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This patch fixes shared library compilation due to undefined
reference to an exported variable 'bbdev_logtype'.
Fixes: 4935e1e9f7 ("bbdev: introduce wireless base band device lib")
Fixes: b8cfe2c9ae ("bb/turbo_sw: add software turbo driver")
Fixes: 7dc2b15894 ("bb/null: add null base band device driver")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
When querying either the name or the value of a stat using the xstats
APIs, a check is done to see if the regular stats API or the xstats APIs
for the driver need to be used. However, the id of the stat requested is
checked to see if it is greater than the number of basic stats, rather
than checking for greater-or-equal, meaning that the xstat with the lowest
id gets incorrectly treated as a basic stat.
This problem manifests itself when you call proc_info using "--xstats-id"
for the first xstat, you get no name of the stat printed, and a random(ish)
stat value.
Fixes: 4773152f85 ("ethdev: optimize xstats by ids APIs")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Fix dpaa bus returning IOVA as PA even when it is not running on dpaa
platform.
Fixes: 1ee9569576 ("config: enable dpaaX drivers for generic ARMv8")
Fixes: d5a4e3a00c ("bus/dpaa: set IOVA mode as physical")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Fix the following build error with latest glibc-headers(
Part of aarch64-linux-gnu-gcc-7.3.0 toolchain)
In file included from drivers/bus/fslmc/mc/fsl_mc_sys.h:30:0,
from drivers/bus/fslmc/mc/dpmng.c:7:
/usr/aarch64-linux-gnu/usr/include/libio.h:21:2: error:
#warning "<libio.h> is deprecated; use <stdio.h> instead." [-Werror=cpp]
Fixes: 3af733ba8d ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
A new function was added to get a Tx port index as a function of the
topology mode and the Rx port index.
Use this function to get the Tx port index of simple stream.
Signed-off-by: Matan Azrad <matan@mellanox.com>
The testpmd user can configure port topology mode to define the port
topology between the testpmd forward ports(paired, chained and loop).
When multi-queue ports are configured by the user, the testpmd
streams are created by rss_fwd_config_setup() function, this function
doesn't take into account the chained topology mode and configures the
forward streams with paired topology mode in this case.
Configure the stream Tx port by dedicated function which calculates
a valid Tx port index as a function of the topology mode and the Rx
port index.
Fixes: af75078 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
When multi-queue ports are configured by the user, the testpmd streams
are created by rss_fwd_config_setup() function.
This function may configure to the streams either invalid Rx ports or
invalid Tx ports.
An invalid Tx port is configured when the number of ports is odd.
In this case, the last Tx port will be always invalid.
An invalid Rx port is configured when NUMA support is configured by the
user and the number of forward ports is much smaller than the number of
all ports. In this case, also the Tx port is invalid.
Change calculations to get valid ports.
Fixes: af75078 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
'+' sign was missing from librawdev library which is added
in this release.
Fixes: a9bb0c44c7 ("doc: add rawdev library guide and doxygen page")
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Device can only be started if firmware is loaded, as per Skeleton
rawdev driver semantics. This patch fixes original implementation
which attempted to start the device without loading firmware.
Fixes: 55ca1b0f21 ("raw/skeleton: add test cases")
Cc: shreyansh.jain@nxp.com
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
1) Add native PN option '-march=native' to allow automatic detection.
Set 'arm_force_native_march' to 'true' in config/arm/meson.build
to use native PN option.
2) Add implementer_pn option for part num selection in cross compile
3) Add known Arm cortex PN support
4) Add known implementers' IDs (use generic flags/archs by default)
5) Sync build options with config/common_armv8a_linuxapp
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
This patch updates the user guidance of example application of
flow_filtering, with more details of Tx queues configuration.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ori Kam <orika@mellanox.com>
priv_tx_uar_remap() is wrongly considering the queue is already configured
and thus present in the queue array of the device.
Fixes: f8b9a3bad4 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
An RSS configuration without a key is valid according to the
rte_eth_rss_conf API definition.
Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Reported-by: Yuanhan Liu <yliu@fridaylinux.org>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Since rdma-core glue libraries are intrinsically tied to their respective
PMDs and used as internal plug-ins, their presence in the default search
path among other system libraries for the dynamic linker is not necessarily
desired.
This commit enables their installation and subsequent look-up at run time
in RTE_EAL_PMD_PATH if configured to a nonempty string. This path can also
be overridden by environment variables MLX[45]_GLUE_PATH.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
When built as separate objects, these libraries do not have unique names.
Since they do not maintain a stable ABI, loading an incompatible library
may result in a crash (e.g. in case multiple versions are installed).
This patch addresses the above by versioning glue libraries, both on the
file system (version suffix) and by comparing a dedicated version field
member in glue structures.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
For consistency since these includes are already pulled by others.
Fixes: 4eba244b78 ("net/mlx4: move rdma-core calls to separate file")
Fixes: 0e83b8e536 ("net/mlx5: move rdma-core calls to separate file")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This code should catch mistakes early if a glue structure member is added
without a corresponding implementation in the library.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The timestamp flag needs to be set in the offload flags
for the received pkt in case of PTP offload.
Fixes: b11cceb83a ("net/bnxt: support timesync")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
virtio_dev_free_mbufs was recently modified to free the
virtqueues but failed to check whether the array was
allocated. Added a check to ensure vqs was non-null.
Fixes: bdb32afbb6 ("net/virtio: rationalize queue flushing")
Signed-off-by: David Harton <dharton@cisco.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The eBPF classifier (section "cls_q" in tap_bpf_program.c) is tracing
marked packets in which skb->cb[1] contains an RSS queue number, and
redirects those packets to the matched queue.
It is expected that skb->cb[1] has been previously set with a valid RSS
queue number during an eBPF action (section "l3_l4" in tap_bpf_program.c).
However, for non-RSS flows, skb->cb[1] may contain a random unset value,
which could falsely be interpreted as a valid RSS queue.
To avoid this potential error, tap_bpf_program.c has been updated as
follows:
1. After calculating the RSS queue number, it is added a unique offset in
order to uniquely identify it as a valid RSS queue number.
2. After matching an RSS queue to a packet, skb->cb[1] is set to 0.
Fixes: cdc07e83bb ("net/tap: add eBPF program file")
Fixes: aabe70df73 ("net/tap: add eBPF bytes code")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
TAP device is supporting multi segments Tx, however this capability is
not reported when querying the TAP device.
This commit adds this capability report.
Fixes: 818fe14a98 ("net/tap: use new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
In case vhost_user_iotlb_miss returns an error, the pending IOTLB
entry has to be removed from the list as no IOTLB update will be
received.
Fixes: fed67a20ac ("vhost: introduce guest IOVA to backend VA helper")
Cc: stable@dpdk.org
Suggested-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
In the unlikely case the IOTLB memory pool runs out of memory,
an issue may happen if all entries are used by the IOTLB cache,
and an IOTLB miss happen. If the iotlb pending list is empty,
then no memory is freed and allocation fails a second time.
This patch fixes this by doing an IOTLB cache random evict if
the IOTLB pending list is empty, ensuring the second allocation
try will succeed.
In the same spirit, the opposite is done when inserting an
IOTLB entry in the IOTLB cache fails due to out of memory. In
this case, the IOTLB pending is flushed if the IOTLB cache is
empty to ensure the new entry can be inserted.
Fixes: d012d1f293 ("vhost: add IOTLB helper functions")
Fixes: f72c2ad63a ("vhost: add pending IOTLB miss request list and helpers")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Failsafe reported Tx offloads capabilities are the AND result of its
default capabilities and those of its sub-devices.
In the corrupted code failsafe default Tx capabilities were set to 0.
As a result when running testpmd with "--tx-offloads=0x8000" parameter
(request for multi segments offload) - an error was returned:
PMD: net_failsafe:
Some Tx offloads are not supported, requested 0x8000 supported 0x0
To fix this, failsafe default Tx offload capabilities are set to
DEV_TX_OFFLOAD_MULTI_SEGS |
DEV_TX_OFFLOAD_IPV4_CKSUM |
DEV_TX_OFFLOAD_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM,
Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>