Increase the default RX/TX ring sizes to 1024/1024 to
accommodate for NICs with higher throughput (25G, 40G etc)
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Increase the default RX/TX ring sizes to 1024/1024 to
accommodate for NICs with higher throughput (25G, 40G etc)
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Command used for querying node or level capabilities requires
argument which specifies which set of capabilities to show.
Thus trying to show node/level capabilities using current
documentation will not work. Fix that by adding missing
arguments to command documentation.
Fixes: 5b590fbe09 ("app/testpmd: add traffic management forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Since METER action is supported by the testpmd application
suitable entry should exist in flow actions information table.
Without that testpmd will return error on adding a new flow to
the list of flows attached to a given port.
Fixes: 30ffb4e67e ("app/testpmd: add commands traffic metering and policing")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This patch moves the definition of 3 variables in testpmd.h
into the respective .c file. The idea behind this move is
to allow external applications to compile against testpmd
without throwing compilation errors related to multiple
definition of variables.
Also, an extern dcb_q_mapping in testpmd.h is removed
since it appears that this variable is not defined
elsewhere in the tree.
Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
Introduced a run time command to change the
log level for a given log type. Added the
necessary documentation.
Signed-off-by: Elza Mathew <elza.mathew@intel.com>
The word size of port_id is now 16 bits, but there were parsing directives
that assumed it was still of type UINT8, resulting in incorrect commandline
parse results.
Fixes: f14a210a65 ("app: fix port id type")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
In current design, we can't enable SW checksum calculation
for the devices which don't have checksum offloading abilities
via the command "csum set ip|tcp|udp|sctp|outer-ip sw <port_id>".
But SW checksum calculation shouldn't depend on HW offloading
abilities. This patch is to fix this issue.
Fixes: 3926dd2b66 ("app/testpmd: enforce offload capabilities check")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
Removed the hardcoded preconfigured Rx VLAN offload configuration
from testpmd and changed the Rx offload command line parameters from
disable to enable.
It has been decided by the Technical Board that testers who wish to
use these offloads will now have to explicitly write them in the
command-line when running testpmd.
The agreement is to keep two exceptions enabled by default in 18.02:
Rx CRC strip and Tx fast free.
Motivation:
Some PMDs such at the mlx4 may not implement all the offloads.
After the offload API rework assuming no offload is enabled by default,
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API") trying
to enable a not supported offload is clearly an error which will cause
configuration failing.
Considering that testpmd is an application to test the PMD, it should
not fail on a configuration which was not explicitly requested.
The behavior of this test application is then turned to an opt-in
model.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Using registration to all ports includes also the ports which should not
be used by the application.
It is nice to print each port event by testpmd but in case of RMV
event, testpmd tries to detach the port and this case is problematic
when the port should not be used by the application.
Check the port validation before detach API calling.
Fixes: 4fb82244b3 ("app/testpmd: extend event printing")
Signed-off-by: Matan Azrad <matan@mellanox.com>
rte_eth_dev_is_valid_port() API validates each valid port from ethdev
point of view and may validate ports which should not be used by the
application.
Testpmd should use only the ports available through the
RTE_ETH_FOREACH_DEV iterator.
Replace rte_eth_dev_is_valid_port() usage by RTE_ETH_FOREACH_DEV
iterator usage for testpmd ports validation.
Fixes: 7d89b26103 ("app/testpmd: use ethdev iterator to list devices")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Fail-safe PMD sub devices management is based on ethdev port mechanism.
So, the sub-devices management structures are exposed to other DPDK
entities which may use them in parallel to fail-safe PMD.
Use the new port ownership mechanism to avoid multiple managments of
fail-safe PMD sub-devices.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Call dedicated ethdev API to free port in remove time as was done in
other fail-safe places.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Ethernet port allocation was not thread safe, means 2 threads which tried
to allocate a new port at the same time might get an identical port
identifier and caused to memory overwrite.
Actually, all the port configurations were not thread safe from ethdev
point of view.
The port ownership mechanism added to the ethdev is a good point to
redefine the synchronization rules in ethdev:
1. The port allocation and port release synchronization will be
managed by ethdev.
2. The port usage synchronization will be managed by the port owner.
3. The port ownership synchronization will be managed by ethdev.
Add port allocation synchronization to complete the new rules.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The ownership of a port is implicit in DPDK.
Making it explicit is better from the next reasons:
1. It will define well who is in charge of the port usage synchronization.
2. A library could work on top of a port.
3. A port can work on top of another port.
Also in the fail-safe case, an issue has been met in testpmd.
We need to check that the application is not trying to use a port which
is already managed by fail-safe.
A port owner is built from owner id(number) and owner name(string) while
the owner id must be unique to distinguish between two identical entity
instances and the owner name can be any name.
The name helps to logically recognize the owner by different DPDK
entities and allows easy debug.
Each DPDK entity can allocate an owner unique identifier and can use it
and its preferred name to owns valid ethdev ports.
Each DPDK entity can get any port owner status to decide if it can
manage the port or not.
The mechanism is synchronized for both the primary process threads and
the secondary processes threads to allow secondary process entity to be
a port owner.
Add a synchronized ownership mechanism to DPDK Ethernet devices to
avoid multiple management of a device by different DPDK entities.
The current ethdev internal port management is not affected by this
feature.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
rte_eth_dev_find_free_port() found a free port by state checking.
The state field are in local process memory, so other DPDK processes
may get the same port ID because their local states may be different.
Replace the state checking by the ethdev port name checking,
so, if the name is an empty string the port ID will be detected as
unused.
Fixes: d948f596fe ("ethdev: fix port data mismatched in multiple process model")
Cc: stable@dpdk.org
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
rte_eth_dev_data structure is allocated per ethdev port and can be
used to get a data of the port internally.
rte_eth_dev_attach_secondary tries to find the port identifier using
rte_eth_dev_data name field comparison and may get an identifier of
invalid port in case of this port was released by the primary process
because the port release API doesn't reset the port data.
So, it will be better to reset the port data in release time instead of
allocation time.
Move the port data reset to the port release API.
Fixes: d948f596fe ("ethdev: fix port data mismatched in multiple process model")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This commit adds eBPF system call definitions for ARM architecture.
Old Linux header files may not define eBPF system call numbers.
In order to successful compile eBPF on all Linux platforms - the
missing ARM system call definition is explicitly added.
Fixes: b02d85e1 ("net/tap: add eBPF API")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
The coverity issue was not completely fixed, since strncpy
should not be called with max length.
Instead, snprintf is used as a safer option.
Coverity issue: 143431
Fixes: d040aca671 ("crypto/scheduler: fix strings not null terminated")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Added a check on rte_bbdev_stats_get() return before
printing out the statistics results.
Coverity issue: 257018
Fixes: 1ffee690ea ("examples/bbdev: add sample app")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
xstats and xstats_names buffers were allocated for
the purpose of printing eth_xstats, but were not
freed before exit.
A fix is added to free before exit points.
Coverity issue: 257013
Fixes: 1ffee690ea ("examples/bbdev: add sample app")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
eth_address was improperly accessed in bbdev example
app, this patch removes the use of port_id, it is
irrelevant here.
Coverity issue: 257021
Fixes: 1ffee690ea ("examples/bbdev: add sample app")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
add check for rte_bbdev_callback_register() retun
Coverity issue: 257027
Fixes: f714a18885 ("app/testbbdev: add test application for bbdev")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
check that iter > 0 before division
Coverity issue: 257027, 257038, 257014
Fixes: f714a18885 ("app/testbbdev: add test application for bbdev")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
use snprintf instead of strncpy to ensure null termination when
copying test_vector_filename from cmd arguments.
Coverity issue: 257001
Fixes: f714a18885 ("app/testbbdev: add test application for bbdev")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Skeleton rawdevice test cases are part of driver layer. This patch
allows test cases to be executed using 'rawdev_autotest' command
in test framework.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Patch introduces rawdev unit testcase for validation against the
Skeleton rawdev dummy PMD implementation.
Test cases are added along with the skeleton driver implementation.
It can be enabled by using vdev argument to any DPDK binary:
--vdev="rawdev_skeleton,self_test=1"
In case 'self_test=1' is not provided, autotest doesn't execute the
test cases but the vdev is still available for application use.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Skeleton rawdevice driver, on the lines of eventdev skeleton, is for
showcasing the rawdev library. This driver implements some of the
operations of the library based on which a test module can be
developed.
Design of skeleton involves a virtual device which is plugged into
VDEV bus on initialization.
Also, enable compilation of rawdev skeleton driver.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Some generic operations for firmware management can loading, unloading,
starting, stopping and querying firmware of a device.
This patch adds support for such generic operations.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Generic rawdev library cannot define a pre-defined set of stats
for devices which are yet to be defined.
This patch introduces the xstats support for rawdev so that any
implementation can create its own statistics.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Introduce handlers for raw buffer enqueue and dequeue. A raw buffer
is essentially a void object which is transparently passed via the
library onto the driver.
Using a context field as argument, any arbitrary meta information
can be passed by application to the driver/implementation. This can
be any data on which driver needs to define the operation semantics.
For example, passing along a queue identifier can suggest the driver
the queue context to perform I/O on.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
A rawdevice can have various attributes. This patch introduce support
for transparently setting attribute value or getting current attribute
state. This is done by allowing an opaque set of key and value to be
passed through rawdev library.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Each device in DPDK has a type associated with it - ethernet, crypto,
event etc. This patch introduces 'rawdevice' which is a generic
type of device, not currently handled out-of-the-box by DPDK.
A device which can be scanned on an installed bus (pci, fslmc, ...)
or instantiated through devargs, can be interfaced using
standardized APIs just like other standardized devices.
This library introduces an API set which can be plugged on the
northbound side to the application layer, and on the southbound side
to the driver layer.
The APIs of rawdev library exposes some generic operations which can
enable configuration and I/O with the raw devices. Using opaque
data (pointer) as API arguments, library allows a high flexibility
for application and driver implementation.
This patch introduces basic device operations like start, stop, reset,
queue and info support.
Subsequent patches would introduce other operations like buffer
enqueue/dequeue and firmware support.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
This patch supports batch processing of multiple packets
in the Rx side
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
In the I/O path we were calling rte_dpaa_portal_init which
internally checks if a portal is affined to the core.
But this lead to calling of that non-static API in every call.
Instead check the portal affinity in the caller itself for
performance reasons
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Use the optimized routine for phy to virt conversion,
when the mempool is allocated from physical contiguous memory.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
While scanning for devices, the order in which devices appear is
different as compared to MAC sequence.
This can cause confusion for users and automated scripts.
This patch create a sorted list of devices.
Fixes: 919eeaccb2 ("bus/dpaa: introduce NXP DPAA bus driver skeleton")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
A caller may/may not pass the flags in qman enqueue multi API.
This patch adds a check on that flag and only accesses it if passed
by the caller.
Fixes: 43797e7b47 ("bus/dpaa: support event dequeue and consumption")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
vceqzq_u32() is being used by mlx5 PMD but added since gcc 4.9.
Fixes: 570acdb1da ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This patch fixes compile failure with old kernels which have no
VIRTIO_F_ANY_LAYOUT defined.
Fixes: 5a8bb6e902 ("vhost: claim to support any layout feature")
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This patch adds software prefetching of the annotation which is
accessed by the driver to fetch the parsing results. The changes
also include as many instructions in between prefetching memory
and using it.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>