Previous implementations support dump all the flows. Add new arg
rte_flow in rte_flow_dev_dump to dump one flow.
Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
add meter profile packet_mode to the ethernet device.
One example:
add port meter profile rfc2697 (port_id) (profile_id)
(cir) (cbs) (ebs) (packet_mode)
Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Initialize TCP data offset field with TCP header length, this
field is used to derive L4 header length and by hardware to
validate a TCP header.
Fixes: 41f72ec940 ("test: add packet burst generator functions")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch changes the experimental raw data path dequeue burst API.
Originally the API enforces the user to provide callback function
to get maximum dequeue count. This change gives the user one more
option to pass directly the expected dequeue count.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
This patch adds closing of the PMD after running the benchmark.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
This patch adds closing of the PMD after running the tests.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Using explicit enum instead of ambiguous integer value
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
In current design, legacy parser rte_devargs_parse() saved scratch
buffer to devargs.args while new parser rte_devargs_layers_parse() saved
to devargs.data. Code using devargs had to know the difference and
cleaned up memory accordingly - error prone.
This patch unifies scratch buffer to data field, introduces
rte_devargs_reset() function to wrap the memory clean up logic.
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Reviewed-by: Gaetan Rivet <grive@u256.net>
This is a new type of reader-writer lock that provides better fairness
guarantees which better suited for typical DPDK applications.
A pflock has two ticket pools, one for readers and one
for writers.
Phase-fair reader writer locks ensure that neither reader nor writer will
be starved.
Neither reader or writer are preferred, they execute in alternating
phases.
All operations of the same type (reader or writer) that acquire the lock
are handled in FIFO order.
Write operations are exclusive, and multiple read operations can be run
together (until a write arrives).
A similar implementation is in Concurrency Kit package in FreeBSD.
For more information see:
"Reader-Writer Synchronization for Shared-Memory Multiprocessor
Real-Time Systems",
http://www.cs.unc.edu/~anderson/papers/ecrts09b.pdf
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The measure_perf function should be executed after worker threads exit
to collect correct perf data. Otherwise, while workers are running, the
main thread may get incomplete data from workers.
In the meanwhile, remove unnecessary barrier in the test.
For signal variables "ldata.done" and "ldata.start", no operations
should keep the order that being executed after them. So the wmb after
them can be moved.
Fixes: 16a277a24c ("test/trace: add performance test cases")
Cc: stable@dpdk.org
Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
While having the ability to run a test based off the DPDK_TEST
environment variable is useful, it's sometimes more convenient to
specify the test name as a commandline parameter to a test binary.
This patch adds support for checking all parameters after the EAL ones, and
running all valid autotests requested - either from DPDK_TEST or on the
commandline. This also allows multiple tests to be run in a single
automated session, which is useful for working with components which have
multiple test suites.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Add event vector support in pipeline tests. By default this mode
is disabled, it can be enabled by using the option --enable_vector.
example:
dpdk-test-eventdev -l 7-23 -s 0xff00 -- --prod_type_ethdev
--nb_pkts=0 --verbose 2 --test=pipeline_atq --stlist=a
--wlcores=20-23 --enable_vector
Additional options to configure vector size and vector timeout are
also implemented and can be used by specifying --vector_size and
--vector_tmo_ns
This patch also adds a new option to set the number of Rx queues
configured per event eth rx adapter.
example:
dpdk-test-eventdev -l 7-23 -s 0xff00 -- --prod_type_ethdev
--nb_pkts=0 --verbose 2 --test=pipeline_atq --stlist=a
--wlcores=20-23 --nb_eth_queues 4
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add tests to arm and cancel periodic timer.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Round timeout ticks when converting from nanoseconds, this prevents
loss of accuracy and deviation from requested timeout value.
Fixes: d008f20bce ("app/eventdev: add event timer adapter as a producer")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Remove event/dlb driver from DPDK code base.
Updated release note's removal section to reflect the same.
Also updated doc/guides/rel_notes/release_20_11.rst to fix the
the missing link issue due to removal of doc/guides/eventdevs/dlb.rst
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Round timeout ticks when converting from nanoseconds, this prevents
loss of accuracy and deviation from requested timeout value.
Fixes: d1f3385d00 ("test: add event timer adapter auto-test")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
When using decap actions it's been set to the data to decap
into the encap_data instead of decap_data, as a results we end
up with bad encap and decap data in many cases.
Fixes: 0c8f1f4ab9 ("app/flow-perf: support raw encap/decap actions")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
Starting from this commit the app will always
report the first flow latency.
This is useful in debugging to check the first
flow insertion before any caching effect.
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
Currently the memset() will not set a correct src ip that represent
the incremental value of the counter.
This commit will fix this and each flow will have correct IPv6.src
that it's incremental from previous flow and equal to the decimal
values.
Fixes: bf3688f1e8 ("app/flow-perf: add insertion rate calculation")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
Take into consideration that the user may call portmask for
any run, thus the app should always check if port is needed
to collect and report or not.
Fixes: 070316d01d ("app/flow-perf: add multi-core rule insertion and deletion")
Fixes: d8099d7ecb ("app/flow-perf: split dump functions")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
create_flow and create_meter are not correct names since those
are records that contain creation and deletion, which makes
them more of a record for such data.
Fixes: d8099d7ecb ("app/flow-perf: split dump functions")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
Current support for unique data is to compile with config.h
var FIXED_VALUES as 0, and this is only supported on
compilation time, as a result the user may use only single
mode for each compilation.
Starting with this commit the user will have the ability to
use this feature on the fly by using this new option:
--unique-data
Example of unique data usage:
Insert many rules with different encap data for a flows that
have encap action in it.
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
rdtsc() is x86 related, while this might fail for other archs,
so it's better to use more generic API for cycles measurement.
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
Add support for rte_flow_action_nvge_encap as a sample action.
The example of test-pmd command:
1. set nvgre ip-version ... tni ... ip-src ... ip-dst ...
set raw_encap 1 eth src... / ipv4... /...
set sample_actions 2 nvgre / port_id id 0 / end
flow create 0 ... pattern eth / end actions
sample ratio 1 index 2 / raw_encap index 1 / port_id id 0...
The flow will result in all the matched egress packets will be
encapsulated and sent to wire, and also mirrored the packets
using NVGRE encapsulation data and sent to wire.
Signed-off-by: Salem Sol <salems@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add support for rte_flow_action_vxlan_encap as a sample action.
The example of test-pmd command:
1. set vxlan ip-version ... vni ... udp-src ...
set raw_encap 1 eth src.../ ipv4.../...
set sample_actions 2 vxlan_encap / port_id id 0 / end
flow create 0 ... pattern eth / end actions
sample ratio 1 index 2 / raw_encap index 1 / port_id id 0...
The flow will result in all the matched egress packets will be
encapsulated and sent to wire, and also mirrored the packets
using VXLAN encapsulation data and sent to wire.
Signed-off-by: Salem Sol <salems@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
With the current code the VXLAN/NVGRE parsing routine
stored the configuration of the header on stack, this
might lead to overwriting the data on the stack.
Currently having VXLAN/NVGRE encap as sample actions
is done using RAW_ENCAP, for example:
1. set raw_encap 1 eth src.../ vxlan vni.../ ipv4.../ ...
set sample_actions 0 raw_encap / port_id id 0 / end
flow create 0 ... pattern eth / end actions
sample ration 1 index 0 / jump group 1 / end
The goal is to utilize the rte_flow_action_vxlan_encap
and rte_flow_action_nvgre_encap for sample actions.
This patch prepares storing the external data of vxlan and
nvgre encap into global data as a pre-step to supporting
vxlan and nvgre encap as a sample actions.
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The options help text was including an incomplete and redundant
summary of the options before explaining each. The summary is dropped.
The details of the option --hairpin-mode had an extra space,
breaking the alignment with the next line.
There were some mismatches between options in the usage text
sed -rn 's/.*\(" *--([a-z-]*)[=: ].*/\1/p' app/test-pmd/parameters.c
and the options declared in lgopts array
sed -rn 's/.*\{.*"(.*)",.*,.*,.*},.*/\1/p' app/test-pmd/parameters.c
The misses were:
--no-numa
--enable-scatter
--tx-ip
--tx-udp
--noisy-lkup-num-reads-writes
The option --ports was not implemented.
Fixes: 01817b10d2 ("app/testpmd: change hairpin queues setup")
Fixes: 3c156061b9 ("app/testpmd: add noisy neighbour forwarding mode")
Fixes: bf5b2126bf ("app/testpmd: add ability to set Tx IP and UDP parameters")
Fixes: 0499793854 ("app/testpmd: add scatter enabling option")
Fixes: 999b2ee0fe ("app/testpmd: enable NUMA support by default")
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
The usage syntax help includes the program name which was fake.
It is replaced with the real name from argv.
Fixes: de06137cb2 ("app/regex: add RegEx test application")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Some applications were printing useless messages with rte_exit()
after showing the help. Using exit() is enough in this case.
Some applications were using a redundant printf or fprintf() before
calling rte_exit(). The messages are unified in a single rte_exit().
Some rte_exit() calls were missing a line feed or returning a wrong code.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Add checks on log levels:
- default values for rte_log_register and RTE_LOG_REGISTER,
- level changes with rte_log_set_level and consorts
Signed-off-by: David Marchand <david.marchand@redhat.com>
rte_timer_subsystem_init() may return -EALREADY if the timer subsystem
was already initialized. This can happen i.e. in PMD code (see
eth_ena_dev_init). This is not an error, rather a notification as the
initialization function simply returns without any action taken.
Fixes: 50247fe03f ("test/timer: exercise new APIs in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
This patch adds more err info for Tx/Rx descriptor query command.
Fixes: fae9aa717d ("app/testpmd: support checking descriptor status")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
For NVGRE protocol, the default value of 'c_k_s_rsvd0_ver'
must be 0x2000, and protocol type must be 0x6558 in the NVGRE
header.
This patch updates these two configurations while parsing the nvgre
encap.
Fixes: dcd962fc6b ("app/testpmd: add NVGRE encap/decap")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
- When running the default configuration of autotest of the make test
it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
Failed for a specific device test that is not supported on the
system under test.
- Adding the checking for those tests, print out as "Skipped [Not Run]"
quickly return and continue for next test
Fixes: da0af48a67 ("test: add skipped return result")
Cc: stable@dpdk.org
Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
1/ Improve portability by avoiding use of non-standard 'uint'.
Use uint8_t for hash_key_len as rss_key_len is a uint8_t type.
This solves following build error when building with musl libc:
app/test-pmd/testpmd.h:813:29: error: unknown type name 'uint'
2/ In musl libc, stdout is of type (FILE * const).
Because of the const qualifier, a dark magic cast
must be achieved through uintptr_t.
Fixes: 8205e241b2 ("app/testpmd: add missing type to RSS hash commands")
Fixes: e977e4199a ("app/testpmd: add commands to load/unload BPF filters")
Cc: stable@dpdk.org
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
The feature macro _GNU_SOURCE is defined globally,
but there was some remaining useless settings.
The internal definition in config/meson.build is kept,
all other internal definitions of _GNU_SOURCE are removed,
except in examples, which can be built as external applications.
Note: external applications do not inherit of _GNU_SOURCE.
Fixes: 5d7b673d5f ("mk: build with _GNU_SOURCE defined by default")
Fixes: 28188cee2a ("build: enable BSD features visibility for FreeBSD")
Fixes: e6cdc54cc0 ("net/mlx5: add socket server for external tools")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
The library execinfo and its header file can be installed on Alpine Linux
where the backtrace feature is not part of musl libc:
apk add libexecinfo-dev
As a consequence, this library should not be restricted to BSD only.
At the same time, the library and header are detected once and added
globally to be linked with any application, internal or external.
Fixes: 9065b1fac6 ("build: fix dependency on execinfo for BSD meson builds")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
This patch updates kvargs parser to support value of multiple lists or
ranges:
k1=v[1,2]v[3-5]
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This patch checks return value for rte_eth_dev_info_get() in show_macs().
Coverity issue: 353629
Fixes: e1d44d0ad6 ("app/testpmd: show MAC addresses added to a port")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Provide a bit more diagnostics information when port start fails.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Add support for forced ethernet speed setting.
Currently testpmd tries to configure the Ethernet port in autoneg mode.
It is not possible to set the Ethernet port to a specific speed while
starting testpmd. In some cases capability to configure a forced speed
for the Ethernet port during initialization may be necessary. This patch
tries to add this support.
The patch assumes full duplex setting and does not attempt to change that.
So speeds like 10M, 100M are not configurable using this method.
The command line to configure a forced speed of 10G:
dpdk-testpmd -c 0xff -- -i --eth-link-speed 10000
The command line to configure a forced speed of 50G:
dpdk-testpmd -c 0xff -- -i --eth-link-speed 50000
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Rename PKT_RX_EIP_CKSUM_BAD to PKT_RX_OUTER_IP_CKSUM_BAD and
deprecate the original name. The new name is better aligned
with existing PKT_RX_OUTER_* flags, which should help reduce
confusion about its use.
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
only for rx_vxlan_port. The unnecessary cmd check will cause uninit
coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.
Coverity issue: 366155
Fixes: bd948f20d6 ("app/testpmd: VXLAN packet identification")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
"show port cap all|<port_id>" was to display offload configuration of
port(s).
But later two other commands added to show same information in more
accurate way:
show port (port_id) rx_offload configuration
show port (port_id) tx_offload configuration
These new commands can both show port and queue level configuration,
also with their capabilities counterparts easier to see offload
capability and configuration of the port in similar syntax.
So the functionality is duplicated and removing this version, to favor
the new commands.
Another problem with this command is it requires each new offload to be
added into the function to display them, and there were missing offloads
that are not displayed, this requirement for sure will create gaps by
time as new offloads added.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
The tx_queue member of the fwd_lcore struct is unused as it is already
part of the fwd_stream structure. Deleting helps improve code readability.
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Add support for displaying the count of used (filled by hardware
but not yet processed by the driver) descriptors on a receive
queue in order to allow the rte_eth_dev rx_queue_count() API to
be exercised and tested.
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>