This patch adds ability to run unit tests in cpu crypto mode
for AESNI MB cryptodev.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
An incorrect flag check was done, using "&&" instead of "&".
Fixes: 2717246ecd ("cryptodev: replace mbuf scatter gather flag")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Realloc did not have bad parameter autotest. Add them.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Due to the fact that the rte_realloc() test depends on the layout of
underlying memory, it can sometimes fail due to fragmentation of the
memory. To address this, make it so that the realloc autotests are run
using a newly created external memory heap instead of main memory.
Bugzilla ID: 424
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Extend test_ring_autotest with new test-cases for RTS/HTS sync modes.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Introduce new test case to test MT peek API.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Introduce new test case to test HTS ring mode under contention.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Introduce new test case to test RTS ring mode under contention.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
To make these preparations two main things are done:
- Change from *single* to *sync_type* to allow different
synchronisation schemes to be applied.
Mark *single* as deprecated in comments.
Add new functions to allow user to query ring sync types.
Replace direct access to *single* with appropriate function call.
- Move actual rte_ring and related structures definitions into a
separate file: <rte_ring_core.h>. It allows to refer contents
of <rte_ring_elem.h> from <rte_ring.h> without introducing a
circular dependency.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Introduce stress test for ring enqueue/dequeue operations.
Performs the following pattern on each slave worker:
dequeue/read-write data from the dequeued objects/enqueue.
Serves as both functional and performance test of ring
enqueue/dequeue operations under high contention
(for both over committed and non-over committed scenarios).
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
There is a common macro __rte_unused, avoiding warnings,
which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
There is a macro __rte_always_inline, forcing functions to be inlined,
which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
There is a common macro __rte_packed for packing structs,
which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Currently, in the case to use bitmap as resource allocator, after
bitmap creation, all the bitmap bits should be set to indicate the
bit available. Every time when allocate one bit, search for the set
bits and clear it to make it in use.
Add a new rte_bitmap_init_with_all_set() function to have a quick
fill up the bitmap bits.
Comparing with the case create the bitmap as empty and set the bitmap
one by one, the new function costs less cycles.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Meson is detecting the path /proc/sys/vm/nr_hugepages in the call to cat
in app/test/meson.build and then adding it as a build dependency.
This causes build loop if the timestamp of this file keeps changing.
It is fixed by hiding hugepage check in a shell script.
Fixes: 77784ef0fb ("test: allow no-huge mode for fast-tests")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Remove setting ALLOW_EXPERIMENTAL_API individually for each Makefile and
meson.build. Instead, enable ALLOW_EXPERIMENTAL_API flag across app, lib
and drivers.
This changes reduces the clutter across the project while still
maintaining the functionality of ALLOW_EXPERIMENTAL_API i.e. warning
external applications about experimental API usage.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Modification to vectors parameters used for unit test
for coverage and performance test of bbdev drivers
across all devices.
Updating and reducing list for focused coverage on relevant
code blocks for 4G and 5G. Less focus on 4G TB mode as there is
some question how to best support this with mbuf limitations and
if effect are not used.
Removing scenarios with negative LLR assumptions which are not
used with any PMDs and historical only.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Adding support for the offload latency tests when
using the LDPC encoder and decoder operations.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Adding missing implementation for the interrupt tests
for LDPC encoder and decoders.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Includes support for BLER (Block Error Rate) wireless
performance test with new arguments for SNR and number
of iterations for 5G. This generates LLRs for a given
SNR level then measures the ratio of code blocks being
successfully decoded or not.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Adding functionality to validate HARQ for different
devices implementation.
Adding capacity to fetch HARQ data when required as
part of this validation.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Self-contained and cosmetic renaming of macro
so that to be more explicit for future extension.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This is to support cases when the input data for
decoding a code block is larger than 64kB and would
not fit as a contiguous block of data into one
mbuf. In that case the length from the operation
supersedes the mbuf default structure.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch adds crypto J0 test case to AES-GCM
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Segfault was observed when running ipsec unit test:
+ TestCase [10] : test_ipsec_replay_inb_repeat_null_null_wrapper
succeeded
+ TestCase [11] : test_ipsec_replay_inb_inside_burst_null_null_wrapper
succeeded
+ TestCase [12] : test_ipsec_crypto_inb_burst_2sa_null_null_wrapper
succeeded
+ TestCase [13] : test_ipsec_crypto_inb_burst_2sa_4grp_null_null_wrapper
succeeded
Segmentation fault
Data corruption happens due to incorrect destroy of session. Security
session needs process different from crypto session.
Destroy corresponding sessions according to different security actions.
Fixes: 05fe65eb66 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch adds test vectors for AES-256 and sets QAT as the
target PMD.
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Change format for uint64_t to %"PRIu64" to make compiler happy.
Fixes: 103809d032 ("app/test-fib: add test application for FIB")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Compiler can throw warning message for routes and lookup files.
Fixes: 103809d032 ("app/test-fib: add test application for FIB")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
When the input string is "key=[", the ending '\0' is replaced
by a ',', leading to a heap buffer overflow.
Check the content of ctx1 to avoid this problem.
Fixes: cc0579f233 ("kvargs: support list value")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
The return was not properly placed, and only the first test case
was validated.
Fixes: e495f54355 ("kvargs: add test case in app/test")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Empty elements passed to the kvargs parser are silently
ignored. Examples of valid strings:
""
","
",,,,,,key=val,,,,"
Fix the unit tests to conform to this behavior.
Note: the test_invalid_kvargs() function is currently broken, which
explain why the tests were not failing. It is fixed in the next commit.
Fixes: e495f54355 ("kvargs: add test case in app/test")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
In environments where hugepage are not available, such as
containers, many cases in fast-tests suite should also run
if no-huge EAL option is used.
Flag is appended to each case in fast-tests suite to indicate
whether it lives with no-huge mode.
With the flag, fast-tests suite can be generated based on
detected hugepage availability of building environment.
All cases will be valid if hugepage is available, whereas
only applicable cases will be added if environment has no
hugepage support.
Suggested-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
When running with '--no-huge' flag, tests failed with messages as:
ACL context creation with invalid NUMA should have failed!
fbk hash creation should have failed
test_table_pipeline: Check pipeline invalid params failed.
These cases test against invalid socket ID as input parameter, and
expect error return. But function calls return success because
invalid sock ID is overwritten to SOCKET_ID_ANY when in no-huge mode.
The tests against invalid socket ID are skipped in no-huge mode.
Fixes: 5640171c52 ("malloc: fix external heap allocation in no-huge mode")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Concatenating to test_args if event_eth_tx_adapter_autotest is executed
makes all subsequent tests inherit from the drivers loading while this
is unneeded.
Fixes: 207b1c813f ("test: fix build without ring PMD")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
This patch adds the new flow item RTE_FLOW_ITEM_TYPE_PFCP to flow API to
match a PFCP header.
Add sample PFCP rules for testpmd guide. Since Session Endpoint
Identifier (SEID) only will be present in PFCP Session header and PFCP
Session headers shall be identified when the S field is equal to 1, when
create rules for PFCP Session header with certain SEID the S field need
be set 1.
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Add AH and AH SPI to testpmd rte flow command line.
Add note and sample AH rules in testpmd guide.
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.
Fixes: 48f31ca50c ("app/pipeline: packet framework benchmark")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.
Fixes: 08e0c75814 ("test/fib: add performance autotests")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
This patch adds top level SPDX license identifiers for some of the DPDK
source and scripts, where the copyright owners have not yet agreed to
replace the full BSD-3 license plate.
This patch also add SPDX license tag for a file with no
previous license plates. (DPDK is BSD-3)
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The function parse_port_list() is designed to return
unsigned int value. After sanitizing the inputs,
it is returning -1. Changed it to return 0.
Fixes: 2df00d562d ("app/testpmd: add --portlist option")
Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Identifier for new port may contain white list options,
and white list options will not fit into 128 from STR_TOKEN_SIZE,
instead having 4096 char from STR_MULTI_TOKEN_SIZE will provide
better and more options
Fixes: edab33b1c0 ("app/testpmd: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Coverity complains about out of bound access, which is a false positive.
The return value of the 'parse_port_list()' can't be bigger than
'maxsize' because of the logic in the function. ('value >= (int)maxsize'
check and 'marked[]' usage.)
But this is not explicitly clear, causing coverity warning and same
question can be rise by reviews later.
Adding a redundant check to highlight the access is in range, this is
done by replacing existing redundant check.
This is also good to protect against out out bound access in case
'parse_port_list()' behaviour changes later unexpectedly.
Coverity issue: 354229
Fixes: 2df00d562d ("app/testpmd: add --portlist option")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
The name of the static function check_cryptodev_capablity()
is fixed for the word "capability".
There is no functional change.
The same typo is fixed in a comment in ip_fragmentation example.
Fixes: 05fe65eb66 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The macros RTE_MIN and RTE_MAX can be used in DPDK applications.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Introduce new application to provide user to evaluate and perform
custom functional and performance tests for FIB library.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Some unit tests has dependency on RING PMD,
so this patch is trying to fix those and other
closely related issues.
1)pdump, latency, bitrate, ring PMD and test_event_eth_tx_adapter
unit tests are dependent on ring PMD, so compile those
tests only when ring PMD is enabled else ignore.
2)get rid of make file error which was added by bond unit test
for ring PMD disabled case which is not necessary.
3)Tx adapter UT is dependent on RING PMD, but it was
observed that it was missing from the run in meson
build, so added it. TX adapter UT uses 'sw event and
'null' pmd drivers, so for shared builds the drivers .so
path has to be passed to the test args of meson UT run.
Fixes: 086eb64db3 ("test/pdump: add unit test for pdump library")
Fixes: fdeb30fa71 ("test/bitrate: add unit tests for bitrate library")
Fixes: 1e3676a06e ("test/latency: add unit tests for latencystats library")
Fixes: 46cf97e4bb ("eventdev: add test for eth Tx adapter")
Fixes: d23e09e0ef ("app/test: link with ring pmd when needed")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: Nikhil Rao <nikhil.rao@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Currently, Rx offload capabilities and max_rx_pkt_len in the struct
variable named rte_port are not updated after setting mtu successfully
in port_mtu_set function by 'port config mtu <port_id> <value>' command.
This may lead to reconfig mtu to the initial value in the driver when
recalling rte_eth_dev_configure API interface.
This patch updates Rx offload capabilities and max_rx_pkt_len after
setting mtu successfully when configuring mtu.
Fixes: ae03d0d18a ("app/testpmd: command to configure MTU")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
There is a possible race condition in the hotplug path
in rmv_port_callback(). If a port is created between
close_port(port_id) and detach_port_device(port_id),
then the port_id will have been reallocated to a different
device which will be wrongly detached.
Since a check was added in detach_port_device() for
manual detach case, the hotplug path was even more broken.
It became impossible to run because the new check prevented
to run detach_port_device() after the port is closed.
The solution for both issues is to not rely on the port_id
for detaching the rte_device.
The function detach_port_device() is split to allow calling
detach_device() directly with the rte_device pointer, saved
before closing the port.
Fixes: 43d0e30498 ("app/testpmd: fix invalid port detaching")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
There is a function detach_port_device() which takes a port_id,
and a function detach_device() which takes a devargs string.
In order to add a third function accepting a rte_device pointer,
the function detach_device() is renamed into detach_devargs().
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
User may try to run "port detach <port_id>"
for an already detached device.
It has been decided to protect from such usage in testpmd,
so a check was added to detach_port_device() in DPDK 19.11.
This check might be removed to allow hotplug path detaching
the device of a closed port.
Whatever will be decided in future, this check is also added
before the call to detach_port_device().
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
In current version, we are setting the ports
using portmask. With portmask, we can use only
up to 64 ports. This portlist option enables the user
to use more than 64 ports.
Now we can specify the ports in 2 different ways
- Using portmask (-p [0x]nnn): mask must be in hex format
- Using portlist in the following format
--portlist <p1>[-p2][,p3[-p4],...]
--portmask 0x2 is same as --portlist 1
--portmask 0x3 is same as --portlist 0-1
Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
The testpmd application in txonly forwarding mode has an option
to generate the packet flows by varying the destination IP address.
The patch increments the IP for each packet sent, this improves
the entropy and RSS distribution on the peer receiving size
is getting more uniform.
Fixes: 01b645dcff ("app/testpmd: move txonly prepare in separate function")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch adds ability to run unit tests in cpu crypto mode for AESNI
GCM cryptodev.
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch replaces an existing test vector with a new one containing
public domain text only. This is to avoid any potential issues
re-licensing content as BSD-3 which has no clear original license.
Fixes: b06aa643ca ("test/compress: add initial unit tests")
Cc: stable@dpdk.org
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Mellanox owns Tilera and EZchip, so the copyrights can be converted.
At the same time, the license header is switched to SPDX tag format,
and a typo is fixed in another copyright line.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Add new test-case to improve test coverage for 32-bit range fields.
Suggested-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The header file rte_config.h is always included by make or meson.
If required in an exported API header file, it must be included
in the public header file for external applications.
In the internal files, explicit include of rte_config.h is useless,
and can be removed.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
This patch adds unit test for the mbufs allocated from
the special pool with pinned external data buffers.
The pinned buffer mbufs are tested in the same way as
regular ones with taking into account some specifics
of cloning/attaching.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Clang checks indentation and found incorrect indentation in pdump.
app/pdump/main.c:598:3: error: misleading indentation;
statement is not part of the previous 'if'
[-Werror,-Wmisleading-indentation]
Fixes: caa7028276 ("app/pdump: add tool for packet capturing")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Three warnings are commonly disabled in DPDK with make and meson:
* address-of-packed-member
always disabled
* missing-field-initializers
disabled with meson
disabled with make + clang or make + gcc < 4.7
disabled with make + gcc <= 5 for test files and event drivers
* packed-not-aligned
disabled with meson
This change is removing exceptions for missing-field-initializers.
As it is always disabled, some redundant configs are cleaned up.
Now the situation is:
* address-of-packed-member
always disabled
* missing-field-initializers
always disabled
* packed-not-aligned
disabled with meson
It could alternatively be decided to disable missing-field-initializers
only for old gcc (< 6).
The warning packed-not-aligned is not modified in this change.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit adds cycle-count mode to the compression perf tool.
The new mode enhances the compression performance tool to allow
cycle-count measurement of both hardware and softwate PMDs.
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch refactors most of unit tests to be contained in one
combined array, and run depending on the PMD capabilities instead of
providing multiple array with tests for individual PMDs.
Only a subset of unit tests was merged into one array - it combines
all tests originally meant to be run on these PMDs:
null, aesni_mb, aesni_gcm, openssl, qat, sw_snow3g, sw_kasumi, sw_zuc.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Tested-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch adds capability checks to many tests meant to be run
in the future on various PMDs. This way the code is prepared for
more thorough refactoring in order to create one big central
unit tests array.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Tested-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch gets rid of individual functions that all call
test_blockcipher_all_tests separately for every PMD and instead
provides just one set universal for all PMDs that's basing on the
driver id from the global variable gbl_driver_id.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Tested-by: Akhil Goyal <akhil.goyal@nxp.com>
Only a part of members in the local structure variable named pfc_conf
are initialized in the function named cmd_priority_flow_ctrl_set_parsed
when typing "set pfc_ctrl..." command, and others are random values.
However, those uninitialized members may cause failure.
This patch adds clearing zero operation before calling the API named
rte_eth_dev_priority_flow_ctrl_set API with pfc_conf as the input
parameter.
Fixes: 9b53e542e9 ("app/testpmd: add priority flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Xuan Li <lixuan47@hisilicon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Currently, the initial values of the local structure variable named
rx_tx_onoff_2_lfc_mode and rx_tx_onoff_2_pfc_mode are different in the
similar part of these two following functions:
cmd_link_flow_ctrl_set_parsed
cmd_priority_flow_ctrl_set_parsed
1) The code snippset in cmd_link_flow_ctrl_set_parsed function:
static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
};
if (!cmd || cmd == &cmd_link_flow_control_set_rx)
rx_fc_en = (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0;
if (!cmd || cmd == &cmd_link_flow_control_set_tx)
tx_fc_en = (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0;
fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];
<...>
ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf);
<...>
2) The code snippset in cmd_priority_flow_ctrl_set_parsed function:
static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
{RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
};
rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
pfc_conf.fc.mode =
rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
<...>
ret = rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf);
<...>
The initial value of rx_tx_onoff_2_pfc_mode is wrong, it should be the
same as rx_tx_onoff_2_lfc_mode.
Fixes: 9b53e542e9 ("app/testpmd: add priority flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Xuan Li <lixuan47@hisilicon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
When working with testpmd and setting the dynflag name, we copy the
name given by the cmd to the dynflag name.
The issue is that the size of the dynflag name is smaller then the
string used by testpmd.
This commit solves this issue by checking that the length of the requested
flag name is not too long.
Coverity issue: 353610
Fixes: b57b66a97e ("app/testpmd: support mbuf dynamic flag")
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Some of the members of the MPLS struct are not initialized.
This commit init the uninitialized members.
Coverity issue: 325735
Fixes: 3e77031be8 ("app/testpmd: add MPLSoGRE encapsulation")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The previous patch to change default IP addresses for tx only
mode got the wrong values (typo).
Fixes: bf5b2126bf ("app/testpmd: add ability to set Tx IP and UDP parameters")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add lock-free reader writer concurrency functional tests.
These tests will provide the same coverage that non lock-free
APIs have.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
hash_readwrite test was taking too much time to complete in Travis.
Test is split into functional and perf test.
perf test is being moved under perf testsuites in meson.
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
API makes think that rte_cryptodev_info_get() cannot return
a value >= 3 (RTE_CRYPTO_AEAD_LIST_END in 19.11).
20.02-rc1 was returning 3 (RTE_CRYPTO_AEAD_CHACHA20_POLY1305).
So the ABI compatibility contract was broken.
It could be solved with some function versioning,
but because a lack of time, the feature is reverted for now.
This reverts following commits:
- 6c9f3b347e ("cryptodev: add Chacha20-Poly1305 AEAD algorithm")
- 2c512e64d6 ("crypto/qat: support Chacha Poly")
- d55e01f579 ("test/crypto: add Chacha Poly cases")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Use RTE_DIM macro to calculate array size.
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
The new mbuf pool type is added to testpmd. To engage the
mbuf pool with externally attached data buffers the parameter
"--mp-alloc=xbuf" should be specified in testpmd command line.
The objective of this patch is just to test whether mbuf pool
with externally attached data buffers works OK. The memory for
data buffers is allocated from DPDK memory, so this is not
"true" external memory from some physical device (this is
supposed the most common use case for such kind of mbuf pool).
The user should be aware that not all drivers support the mbuf
with EXT_ATTACHED_BUF flags set in newly allocated mbuf (many
PMDs just overwrite ol_flags field and flag value is getting
lost).
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Meson versions 0.52 and 0.53 are being overly smart and detecting the path
"/sys/devices/system/cpu/present" in the call to cat in
app/test/meson.build and then adding it as a dependency to the build
configuration. This causes issues on systems where the timestamp of that
file always returns the current time, since it means that the build.ninja
file is always out of date, and therefore needs to be rebuilt.
We can fix this by just using a simple shell script to return the coremask
appropriately for BSD and Linux, and removing that code logic from meson -
thereby hiding the use of the /sys file.
Fixes: c70622ac6f ("test: detect number of cores with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
New flow dump CLI to dump device internal representation information
of flows into screen.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
This patch adds CLI option to enter the msg_type value for GTP
flow pattern item.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
DPDK now supports registration of dynamic flags (dynf) to the mbuf.
dynf can be given any name, and can be used with a supporting PMD or
supporting application.
Due to the generic concept of the dynf, it is impossible and
meaningless, to define register set/get function for each flag.
This commit introduce a generic way to register and set/clear such
flags.
The basic syntax:
port config <port id> dynf <name> <set|clear>
The first step the new flag is registered. Regardless if the action is
set or clear.
There is no way to unregister the flag, after registering it.
The second step, if the action is set then we set the requested flag.
If this is the first flag that is enabled we also register a call back
for the Tx. In this call back we set the flag.
If the action is clear the requested flag is cleared, and if there
are no more flags that are set, the call back is removed.
The reason that the set is only applied in Tx is that in case of Rx
it is assumed that the value comes from the PMD.
If log is enabled the name of the flag, and value will be printed
in the packet info.
In order for the log to work correctly the registration of the flag
must be done before setting verbose.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
print function name in port_flow_complain()
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
add ITEM_ESP
add ITEM_ESP_SPI
update release notes for testpmd changes
add sample ESP rules in testpmd guide
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
This patch adds the new flow item RTE_FLOW_ITEM_TYPE_L2TPV3OIP to
flow API to match a L2TPv3 over IP header. This patch supports only
L2TPv3 over IP header format which is different to L2TPv2/L2TPv3
over UDP. The difference in header formats between L2TPv3 over IP
and L2TP over UDP require a separate implementation for each.
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: Dariusz Jagus <dariuszx.jagus@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Previous patch added support of GENEVE pattern item in flow rule.
Function flow_item_default_mask() was not updated, so using it with
GENEVE item returns null.
Using testpmd command "set raw_decap" or "set raw_encap" with
GENEVE item, without specifying any parameters, results in
segmentation fault.
This patch updates function flow_item_default_mask(),
adding case to handle GENEVE item.
Fixes: 0f4203fe9d ("app/testpmd: support GENEVE pattern item in flow rules")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
For some overlay network, such as VXLAN, the DSCP field in the new outer
IP header after VXLAN decapsulation may need to be updated accordingly.
This commit introduce the DSCP modify action for IPv4 and IPv6.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ori Kam <orika@mellanox.com>
The rte_eal_cleanup code is not exercised by testpmd which
is the most used DPDK test tool. Add a call at end of program.
This helps exercise free and close paths which can
be checked with tools like valgrind.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
The multicast set list function now has a return value, which is checked
by the calling functions. A rollback occurs on detection of failure, to
realign local config with the device config.
The error print statement in the function had included the port_id and
mc_addr_nb values in the wrong order, these are now swapped.
Fixes: 8fff667578 ("app/testpmd: new command to add/remove multicast MAC addresses")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Patch adds a runtime function to display the unicast and
multicast MAC addresses added to a port.
Syntax:
show port (port_id) macs|mcast_macs
Usage:
testpmd> show port 0 macs
Number of MAC address added: 1
B0:26:28:7F:F5:C1
testpmd>
testpmd> show port 0 mcast_macs
Number of Multicast MAC address added: 0
testpmd>
testpmd> mac_addr add 0 B0:26:28:7F:22:33
testpmd> mac_addr add 0 B0:26:28:7F:22:34
testpmd> show port 0 macs
Number of MAC address added: 3
B0:26:28:7F:F5:C1
B0:26:28:7F:22:33
B0:26:28:7F:22:34
testpmd>
testpmd> mac_addr remove 0 B0:26:28:7F:22:33
testpmd> show port 0 macs
Number of MAC address added: 2
B0:26:28:7F:F5:C1
B0:26:28:7F:22:34
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Adjust the performance test cases to test rte_ring_xxx_elem APIs.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Add basic infrastructure to test rte_ring_xxx_elem APIs.
Adjust the existing test cases to test for various ring
element sizes.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Use division instead of modulo operation to calculate more
accurate cycle count.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This patch adds unit tests for QAT PMD for mixed encrypted-digest
cases, involving SNOW3G UIA2, ZUC EIA3, AES CMAC and NULL auth
algorithms together with SNOW3G UEA2, ZUC EEA3, AES CTR and NULL
cipher algorithms in various combinations.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Add test vectors and verify routines for
asymmetric operation, EC Point Multiplication.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
This patch adds ECDSA sign and verify test
routine and test vectors.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
This patch adds checking of the symmetric crypto operation status
that was silently skipped before. It fixes the wireless algorithms
session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
data for the verification by PMD. Also fixed the missing aad padding
issue revealed after op status checking was introduced.
Fixes: c0f87eb525 ("cryptodev: change burst API to be crypto op oriented")
Fixes: 77a217a19b ("test/crypto: add AES-CCM tests")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
Virtual eventdevice should only be created when there is no existing
device with the same name.
Fixes: e0f4a0ed42 ("test: skip tests when missing requirements")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
We recently started to get random failures on the common_autotest ut with
clang on Ubuntu 16.04.6.
Example: https://travis-ci.com/DPDK/dpdk/jobs/263177424
Wrong rte_log2_u64(0) val 0, expected ffffffff
Test Failed
The ut passes 0 to log2() to get an expected value.
Quoting log2 / log(3) manual:
If x is zero, then a pole error occurs, and the functions return
-HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.
rte_log2_uXX helpers handle 0 as a special value and return 0.
Let's have dedicated tests for this case.
Fixes: 05c4345ef5 ("test: add unit test for integer log2 function")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Replacing full license text with SPDX tag.
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
This commit fixes a sporadic failure of the service_autotest
unit test, as seen in the DPDK CI. The failure occurs as the main test
thread did not wait on the service-thread to return, and allowing it
to read a flag before the service was able to write to it.
The fix changes the wait API call to specific the service-core ID,
and this waits for cores with both ROLE_RTE and ROLE_SERVICE.
The rte_eal_mp_wait_lcore() call does not (and should not) wait
for service cores, so must not be used to wait on service-cores.
Fixes: f038a81e1c ("service: add unit tests")
Cc: stable@dpdk.org
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Following [1], testpmd memory consumption has skyrocketted.
The rte_port structure has gotten quite fat.
struct rte_port {
[...]
struct rte_eth_rxconf rx_conf[65536]; /* 266280 3145728 */
/* --- cacheline 53312 boundary (3411968 bytes) was 40 bytes ago --- */
struct rte_eth_txconf tx_conf[65536]; /* 3412008 3670016 */
/* --- cacheline 110656 boundary (7081984 bytes) was 40 bytes ago --- */
[...]
/* size: 8654936, cachelines: 135234, members: 31 */
[...]
testpmd handles RTE_MAX_ETHPORTS ports (32 by default) which means that it
needs ~256MB just for this internal representation.
The reason is that a testpmd rte_port (the name is quite confusing, as
it is a local type) maintains configurations for all queues of a port.
But where you would expect testpmd to use RTE_MAX_QUEUES_PER_PORT as the
maximum queue count, the rte_port uses MAX_QUEUE_ID set to 64k.
Prefer the ethdev maximum value.
After this patch:
struct rte_port {
[...]
struct rte_eth_rxconf rx_conf[1025]; /* 8240 49200 */
/* --- cacheline 897 boundary (57408 bytes) was 32 bytes ago --- */
struct rte_eth_txconf tx_conf[1025]; /* 57440 57400 */
/* --- cacheline 1794 boundary (114816 bytes) was 24 bytes ago --- */
[...]
/* size: 139488, cachelines: 2180, members: 31 */
[...]
With this, we can ask for less memory in test-null.sh.
[1]: https://git.dpdk.org/dpdk/commit/?id=436b3a6b6e62
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
The RTE_FOREACH_MATCHING_DEV iterator requires that
if a break is done before the end of the loop,
the function rte_eth_iterator_cleanup() must be called.
Fixes: 55e51c9624 ("app/testpmd: add device related commands")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
In AEAD decrypt (verify mode), test data should point to
cipher text instead of plain text
Fixes: 5b2b0a740f ("app/crypto-perf: overwrite mbuf when verifying")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
When HW is available but the mode mismatches, it is better
to skip the test case.
Fixes: aa026482ba ("test/event_crypto: no service core when HW support available")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Added the missed code to avail the mempool entries before
pool free.
Fixes: 24054e3640 ("test/crypto: use separate session mempools")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
The IV was not set, which was causing HW based SEC on DPAA1
to fail.
Fixes: b2196237eb ("test/event_crypto: change cipher algo")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Remove trailing blank lines. They serve no purpose and are just
editor leftovers.
These can cause git to complain about whitespace errors during merges.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
If the RTE_MAX_LCORE is less than 10, a compilation error is generated:
app/test/test_rcu_qsbr.c:234:10: error: comparison of integer
expressions of different signedness: ‘unsigned int’ and ‘int’
[-Werror=sign-compare]
The cause is (RTE_MAX_LCORE - 10) results in a negative value.
To fix, use rte_rand() to find a number between 0 and RTE_MAX_LCORE.
Fixes: b87089b0bb ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
The port was not validated before detaching.
Ignore port detach operation when the port is not valid.
Fixes: f8e5baa266 ("app/testpmd: check not detaching device twice")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
We currently do not check that a non option string has been passed to
testpmd.
Example:
$ ./master/app/testpmd --no-huge -m 512 --vdev net_null0 \
--vdev net_null1 -- -i nb-cores=2 --total-num-mbuf 2048
[...]
testpmd> show config fwd
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support
enabled, MP allocation mode: native
Logical Core 1 (socket 0) forwards packets on 2 streams:
RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
Here nb-cores=2 is just ignored, while the (probably sleepy) user did not
notice this.
Validate that all strings passed to testpmd are part of a known option.
After this patch:
$ ./master/app/testpmd --no-huge -m 512 --vdev net_null0 \
--vdev net_null1 -- -i nb-cores=2 --total-num-mbuf 2048
[...]
Invalid parameter: nb-cores=2
EAL: Error - exiting with code: 1
Cause: Command line incorrect
While at it, when passing an unknown option, print the string that gets
refused by getopt_long to help the user.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Commit in fixes tag removed the match_metadata Tx offload.
This patch removes the option to select this offload from testpmd
menu, help text and documentation.
It also modifies the cmd_show_tx_metadata_parsed() function, to
display the value correctly, and the dump_pkt_burst() function to
display the relevant (Tx/Rx) metadata only.
Fixes: 9bf26e1318 ("ethdev: move egress metadata to dynamic field")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
As per current support, Scatter Gather is only supported
for out of place input and output buffers.
This patch add support for Scatter Gather for in-place buffers.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Caught while investigating timeouts on a ARM64 server.
Stracing a test process running the eal_flags_autotest, we can see that
the fork helper is checking all possible file descriptors from
getdtablesize() to 2, and close the existing ones.
We can do better by inspecting this forked process /proc/self/fd
directory.
Besides, checking file descriptors via /proc/self/fd only makes sense for
Linux. This code was a noop on FreeBSD.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #ifdef.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This patch implements use of the API for LRO aggregated packet
max size.
It adds command-line and runtime commands to configure this value,
and adds option to show the supported value.
Documentation is updated accordingly.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Disable packey type parsing on port init, user can enable ptype parsing
by issuing set ptype command.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf:#️⃣:rss`.
PMDs notify the validity of `rte_mbuf:#️⃣rss` to the application
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
Also update testpmd rx_offload command to include RSS_HASH
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
All the other testpmd commands block access to devices that
are owned. Looks like xstat got overlooked.
Fixes: bfd5051b43 ("app/testpmd: new command to get extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
This commit introduce the hairpin queues to the testpmd.
the hairpin queue is configured using --hairpinq=<n>
the hairpin queue adds n queue objects for both the total number
of TX queues and RX queues.
The connection between the queues are 1 to 1, first Rx hairpin queue
will be connected to the first Tx hairpin queue
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The IP's next protocol will be specified by user when set IP-in-IP
tunnel header via set raw decap/encap commands.
Currently this field is wrongly set to zero if there is no upper layer.
This leads to the encapsulated IP-in-IP tunnel header is not correct.
This next protocol field should be leave it as-is if there is no upper
layer or value is already set.
Fixes: 30626def03 ("app/testpmd: support raw encap/decap actions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Adding support to check TX and RX descriptor status.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The dynamic mbuf fields were introduced by [1]. The egress metadata is
good candidate to be moved from statically allocated field tx_metadata to
dynamic one. Because mbufs are used in half-duplex fashion only, it is
safe to share this dynamic field with ingress metadata.
The shared dynamic field contains either egress (if application going to
transmit mbuf with tx_burst) or ingress (if mbuf is received with rx_burst)
metadata and can be accessed by RTE_FLOW_DYNF_METADATA() macro or with
rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper
routines. PKT_TX_DYNF_METADATA/PKT_RX_DYNF_METADATA flag will be set
along with the data.
The mbuf dynamic field must be registered by calling
rte_flow_dynf_metadata_register() prior accessing the data.
The availability of dynamic mbuf metadata field can be checked with
rte_flow_dynf_metadata_avail() routine.
DEV_TX_OFFLOAD_MATCH_METADATA offload and configuration flag is removed.
The metadata support in PMDs is engaged on dynamic field registration.
Metadata feature is getting complex. We might have some set of actions
and items that might be supported by PMDs in multiple combinations,
the supported values and masks are the subjects to query by perfroming
trials (with rte_flow_validate).
[1] http://patches.dpdk.org/patch/62040/
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
Currently, metadata can be set on egress path via mbuf tx_metadata field
with PKT_TX_METADATA flag and RTE_FLOW_ITEM_TYPE_META matches metadata.
This patch extends the metadata feature usability.
1) RTE_FLOW_ACTION_TYPE_SET_META
When supporting multiple tables, Tx metadata can also be set by a rule and
matched by another rule. This new action allows metadata to be set as a
result of flow match.
2) Metadata on ingress
There's also need to support metadata on ingress. Metadata can be set by
SET_META action and matched by META item like Tx. The final value set by
the action will be delivered to application via metadata dynamic field of
mbuf which can be accessed by RTE_FLOW_DYNF_METADATA() macro or with
rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper
routines. PKT_RX_DYNF_METADATA flag will be set along with the data.
The mbuf dynamic field must be registered by calling
rte_flow_dynf_metadata_register() prior to use SET_META action.
The availability of dynamic mbuf metadata field can be checked
with rte_flow_dynf_metadata_avail() routine.
If application is going to engage the metadata feature it registers
the metadata dynamic fields, then PMD checks the metadata field
availability and handles the appropriate fields in datapath.
For loopback/hairpin packet, metadata set on Rx/Tx may or may not be
propagated to the other path depending on hardware capability.
MARK and METADATA look similar and might operate in similar way,
but not interacting.
Initially, there were proposed two metadata related actions:
- RTE_FLOW_ACTION_TYPE_FLAG
- RTE_FLOW_ACTION_TYPE_MARK
These actions set the special flag in the packet metadata, MARK action
stores some specified value in the metadata storage, and, on the packet
receiving PMD puts the flag and value to the mbuf and applications can
see the packet was threated inside flow engine according to the appropriate
RTE flow(s). MARK and FLAG are like some kind of gateway to transfer some
per-packet information from the flow engine to the application via
receiving datapath. Also, there is the item of type RTE_FLOW_ITEM_TYPE_MARK
provided. It allows us to extend the flow match pattern with the capability
to match the metadata values set by MARK/FLAG actions on other flows.
From the datapath point of view, the MARK and FLAG are related to the
receiving side only. It would useful to have the same gateway on the
transmitting side and there was the feature of type RTE_FLOW_ITEM_TYPE_META
was proposed. The application can fill the field in mbuf and this value
will be transferred to some field in the packet metadata inside the flow
engine. It did not matter whether these metadata fields are shared because
of MARK and META items belonged to different domains (receiving and
transmitting) and could be vendor-specific.
So far, so good, DPDK proposes some entities to control metadata inside
the flow engine and gateways to exchange these values on a per-packet basis
via datapaths.
As we can see, the MARK and META means are not symmetric, there is absent
action which would allow us to set META value on the transmitting path.
So, the action of type:
- RTE_FLOW_ACTION_TYPE_SET_META was proposed.
The next, applications raise the new requirements for packet metadata.
The flow ngines are getting more complex, internal switches are introduced,
multiple ports might be supported within the same flow engine namespace.
From the DPDK points of view, it means the packets might be sent on one
eth_dev port and received on the other one, and the packet path inside
the flow engine entirely belongs to the same hardware device. The simplest
example is SR-IOV with PF, VFs and the representors. And there is a
brilliant opportunity to provide some out-of-band channel to transfer
some extra data from one port to another one, besides the packet data
itself. And applications would like to use this opportunity.
It is supposed for application to use trials (with rte_flow_validate)
to detect which metadata features (FLAG, MARK, META) actually supported
by PMD and underlying hardware. It might depend on PMD configuration,
system software, hardware settings, etc., and should be detected
in run time.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
Change the type of burst mode information from bit field to free string
data, so that each PMD can describe the Rx/Tx busrt functions flexibly.
Fixes: eb5902504a ("ethdev: add API for getting burst mode information")
Fixes: 6b6609f68c ("net/i40e: support Rx/Tx burst mode info")
Fixes: e9a10e6c21 ("net/ice: support Rx/Tx burst mode info")
Fixes: 7fe108edcf ("app/testpmd: show Rx/Tx burst mode description")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Ray Kinsella <ray.kinsella@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
A tag is a transient data which can be used during flow match. This can be
used to store match result from a previous table so that the same pattern
need not be matched again on the next table. Even if outer header is
decapsulated on the previous match, the match result can be kept.
Some device expose internal registers of its flow processing pipeline and
those registers are quite useful for stateful connection tracking as it
keeps status of flow matching. Multiple tags are supported by specifying
index.
Example testpmd commands are:
flow create 0 ingress pattern ... / end
actions set_tag index 2 value 0xaa00bb mask 0xffff00ff /
set_tag index 3 value 0x123456 mask 0xffffff /
vxlan_decap / jump group 1 / end
flow create 0 ingress pattern ... / end
actions set_tag index 2 value 0xcc00 mask 0xff00 /
set_tag index 3 value 0x123456 mask 0xffffff /
vxlan_decap / jump group 1 / end
flow create 0 ingress group 1
pattern tag index is 2 value spec 0xaa00bb value mask 0xffff00ff /
eth ... / end
actions ... jump group 2 / end
flow create 0 ingress group 1
pattern tag index is 2 value spec 0xcc00 value mask 0xff00 /
tag index is 3 value spec 0x123456 value mask 0xffffff /
eth ... / end
actions ... / end
flow create 0 ingress group 2
pattern tag index is 3 value spec 0x123456 value mask 0xffffff /
eth ... / end
actions ... / end
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
The rte_security lib has introduced replay_win_sz,
so it can be removed from the rte_ipsec lib.
The relevant tests, app are also update to reflect
the usages.
Note that esn and anti-replay fileds were earlier used
only for ipsec library, they were enabling the libipsec
by default. With this change esn and anti-replay setting
will not automatically enabled libipsec.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch enables short buffer and 12 bit IV AES-CTR cases
for dpaax_sec pmds.
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
IPSec Multi buffer library supports encryption on multiple segments.
When dealing with chained buffers (multiple segments), as long as
the operation is in-place, the destination buffer does not have to
be contiguous (unlike in the case of out-of-place operation).
Therefore, the limitation of not supporting in-place chained mbuf
can be removed.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Coverity reported about two division by zero:
*** CID 350344: Incorrect expression (DIVIDE_BY_ZERO)
Although in fact these dividers will never be equal to 0,
adding explicit checks in lookup() to make coverity happy
will not affect the execution speed.
Fixes: 908be0651a ("app/test-sad: add test application for IPsec SAD")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The constants like AF_INET are in sys/socket.h in FreeBSD.
The #ifdef macro __FreeBSD__ is replaced with RTE_EXEC_ENV_FREEBSD
in order to be consistent across DPDK files, and allow to grep
for EXEC_ENV among other benefits.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized. This patch silences these
warnings.
Exemplary compiler warning to suppress (with LTO enabled):
error: ‘stats.greatest_free_size’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
return len - overhead;
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized. This patch silences these
warnings.
Exemplary compiler warning to suppress (with LTO enabled):
error: ‘service_id’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
ret = evt_service_setup(service_id);
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
The test works by creating a token comprised of random data
and a CRC8 value, using the rte_atomicXX_exchange to exchange
the new token for a previously generated token, and then
verifying that the exchanged data is intact (i.e. the CRC8
is still correct for the data).
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Split slow part of rib_autotest into rib_slow_autotest
Fixes: b35df4dd66 ("test/rib: add autotests")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
The ret variable, initialized to -1, is changed to 0 during the test,
making the test successful in some cases where it should return a
failure.
Fix this by always using the GOTO_ERR() macro that sets the ret
variable before doing the goto.
Fixes: 923ceaeac1 ("test/mempool: add unit test cases")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Replaced strncpy and strcpy with strlcpy.
Also replaced snprintf with strlcpy where applicable.
Using strlcpy is safe practice when copying strings, as it will include
a null terminator.
Fixes: 2deb6b5246 ("app/procinfo: add collectd format and host id")
Fixes: 8a37f37fc2 ("app/procinfo: add --show-port")
Cc: stable@dpdk.org
Reported-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Rather than dereference the mem_config internal structure, we can rely
on the rte_memzone_walk API and count memzones.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Let's avoid exporting structures without an identified usecase.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
In some scenarios, the raw_encap/raw_decap actions could be multiple in
one single flow (e,g. hirepin flow):
... actions raw_decap / raw_encap / raw_decap / raw_encap / ...
This requires the testpmd supports multiple raw_encap/raw_decap data
settings as well.
With the multiple raw_encap/raw_decap settings, the testpmd commands –
set raw_encap / set raw_decap will become:
set raw_encap <index> <item pattern>
set raw_decap <index> <item pattern>
And the actions – raw_encap/raw_decap also could optionally choose which
global raw_encap/raw_decap confs to be used by index:
... actions raw_decap index 1 / raw_encap index 2 / ...
If there is no `index` specified, the default index is 0:
set raw_encap <item pattern>
... actions raw_decap / raw_encap / ...
which will use raw_encap index 0.
In addition to the set raw_encap/raw_decap commands,
show <raw_encap/raw_decap> <index>
show <raw_encap/raw_decap> all
are also introduced into in order to check which index is set and to
what.
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
This patch fixed the TX checksum value problem when enabled TSO in
tunnel packets, because outer UDP checksum calculation depend on
the TSO configuration.
Fixes: 0f62d63593 ("app/testpmd: support tunneled TSO in checksum engine")
Cc: stable@dpdk.org
Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
The VXLAN related definitions and structures are moved from
rte_ether.h to a new header file: rte_xvlan.h.
Also introducing a new define macro for VXLAN default port id:
RTE_VXLAN_DEFAULT_PORT
Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
Fixes: 0f4203fe9d ("app/testpmd: support GENEVE pattern item in flow rules")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Enable testpmd to forward GTP packet in csum fwd mode.
A GTP header structure (without optional fields and extension header)
is defined in new rte_gtp.h.
A parser function in testpmd is added. GTPU and GTPC packets are both
supported, with respective UDP destination port and GTP message type.
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Many features require to store data inside the mbuf. As the room in mbuf
structure is limited, it is not possible to have a field for each
feature. Also, changing fields in the mbuf structure can break the API
or ABI.
This commit addresses these issues, by enabling the dynamic registration
of fields or flags:
- a dynamic field is a named area in the rte_mbuf structure, with a
given size (>= 1 byte) and alignment constraint.
- a dynamic flag is a named bit in the rte_mbuf structure.
The typical use case is a PMD that registers space for an offload
feature, when the application requests to enable this feature. As
the space in mbuf is limited, the space should only be reserved if it
is going to be used (i.e when the application explicitly asks for it).
The registration can be done at any moment, but it is not possible
to unregister fields or flags.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Multiple global variable are defined in multiple unit test files with
same name, but all unit test files are linked into single executable,
which means those variables share same storage which is not the
intention, fixed by making global variables 'static'.
Issue has been detected by '-fno-common' gcc flag.
Fixes: fdeb30fa71 ("test/bitrate: add unit tests for bitrate library")
Fixes: c3eabff124 ("distributor: add unit tests")
Fixes: 0e925aef27 ("app/test: add EFD functional and perf tests")
Fixes: 359e17bf08 ("app/test: improve hash unit tests")
Fixes: c7eb0972e7 ("test/hash: add lock-free r/w concurrency")
Fixes: 1e3676a06e ("test/latency: add unit tests for latencystats library")
Fixes: 0cc67a96e4 ("test/member: add functional and perf tests")
Fixes: e6a14121f4 ("test/rcu: remove arbitrary limit on max core count")
Fixes: 104dbec208 ("test/rcu: increase size of core numbers")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Some flow config related global variables are defined in a header file
which was causing multiple definitions of the variables, fixed it by
moving them to the .c file.
Issue has been detected by '-fno-common' gcc flag.
Also while being there,
removed duplicated 'ACTION_RAW_ENCAP_MAX_DAT definition,
moved 'vxlan_encap_conf' & 'nvgre_encap_conf' initialization to
'cmdline_flow.c' which is better location than 'testpmd.c'
relocated 'action_raw_encap_data' & 'action_raw_decap_data' struct
definitions slightly within the file
Fixes: 1960be7d32 ("app/testpmd: add VXLAN encap/decap")
Fixes: dcd962fc6b ("app/testpmd: add NVGRE encap/decap")
Fixes: a1191d39cb ("app/testpmd: add MPLSoUDP encapsulation")
Fixes: 3e77031be8 ("app/testpmd: add MPLSoGRE encapsulation")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Modify tests function to allow different subports of the same port
to have different configuration in terms of number of pipes, pipe
queue sizes, etc.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Max queue indices ACTION_RSS_QUEUE_NUM , which limits testpmd actions
rss queue size, has worked for a long time.
As more powered PMD is merged, more RSS queues are supported(e.g. Intel
ice driver FDIR supports up to 128 RSS queue numbers).
The original max queue indices number doesn't satisfy PMD's requirement
and it needs to become bigger.
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Add new rte_flow_item_higig2_hdr in order to match higig2 header.
It is a layer 2.5 protocol and used in Broadcom switches.
Header format is based on the following document.
http://read.pudn.com/downloads558/doc/comm/2301468/HiGig_protocol.pdf
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The testpmd --help option did not show all possible choices for port
topology previously. The loop topology option is now added.
Fixes: 3e2006d618 ("app/testpmd: add loopback topology")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This patch adds cmdline support for extended rss types configuration.
Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
This patch fixed the bug that a failure appeared when config
rx_offload crc_strip using command "port config all crc-strip
on|off". The reason is that this command was removed in Commit
e5db17a1e5. The current command is "port config <port_id>
rx_offload keep_crc on|off" instead.
In this patch, some codes left over about 'crc_strip' are
removed to make the current command clearer.
Fixes: e5db17a1e5 ("app/testpmd: remove duplicated Rx offload commands")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Add the 'Burst mode' section into command 'show rxq|txq info <port_id>
<queue_id>' to show the Rx/Tx burst mode description like:
"Burst mode: Vector AVX2 Scattered"
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Segregate QinQ from Extend Offload and support QinQ offload
in vlan set command. Merge all port wise rx vlan offloads in
command line help and documentation for a cleaner structure.
Fix port info display to distinguish between qinq strip and
extend offloads. Flatten all VLAN offload info into a single
line to reduce info length.
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Patch adds a runtime function to display port supported ptypes
in different layers.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Fixes: 76d29903f5 ("bond: support link status interrupt")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
On rare situation test_link_bonding test case fail due to timespec
tv_nsec overflow, which causes pthread_cond_timedwait to return EINVAL
and test to fail.
Fixes: 76d29903f5 ("bond: support link status interrupt")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Traffic bps statistics is very useful for performance testing.
Add bits per second statistics for Rx and Tx.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Moti Haimovsky <motih@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Sanity test could spuriously fail with reporting flush count error.
It was caused by worker stat coherent issue between distributor and
worker thread.
Fix this issue by using atomic operations to update worker stat.
Fixes: c3eabff124 ("distributor: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
This patch adds tests for encrypted digest AES-CTR + AES CMAC using
mixed auth-cipher algorithm functions. Tests allow easy
extending with new cases, check in-place and
out-of-place operations and use linear and sgl
buffers as input/output.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
This commit adds RSA tests to Intel QuickAssist Technology pmd
and OpenSSL pmd test suite for session and session-less cases
when PADDING_NONE selected
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Introduce new application to provide user to evaluate and perform
custom functional and performance tests for IPsec SAD implementation.
According to our measurements on SKX for 1M entries average lookup
cost is ~80 cycles, average add cost ~500 cycles.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
add unittests for ipsec SAD library
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Added unit test to check out-of-space recoverable feature.
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch add the SNOW and ZUC cipher only
and auth only test cases.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch add support for case when there is auth only
header and auth only tailroom present simultaneously.
This simulates the case of IPSEC ESN.
This patch also enable the new test case for openssl and
NXP dpaa_sec and dpaa2_sec platforms.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
dpaa_sec and dpaa2_sec testsuite are added with more
cases which are valid.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
session_priv_mpool should be used instead of session pool
Fixes: d883e6e713 ("test/crypto: add PDCP C-Plane encap cases")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
total_time needs to be reset to measure the cycles for delete API.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Tested-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
This patch implements following new test cases:
- test_call4: test case to verify if stack corruption occurs
across with multiple function calls.
- test_jump2: test case with a default packet in memory, parse
the packet and check if dest ip is part of a subnet.
- test_call5: test case with string data in the stack and
calling string comaprision.
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>