This patch adds support for DOCSIS and PDCP security protocols to the
pmd-cyclecount mode of the crypto performance tool. Adding this support
involves freeing the correct session type (i.e. security or cryptodev
session) when the test ends, depending on the op_type specified.
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Set the source mbuf data and packet lengths correctly for DOCSIS
performance tests.
Fixes: d4a131a949 ("test/crypto-perf: support DOCSIS protocol")
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
test_delay_us_sleep registers sleep based delay for testing.
This changes the default delay function of testing environment.
It is not expected.
Restore default delay function after the test to fix the issue.
Fixes: a51639cc72 ("eal: add nanosleep based delay function")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Prepare for python2 removal in 20.11.
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
Use of the print function required for python3 compatibility.
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
When using --lcores option, there is a limit of CPU_SETSIZE.
Currently that allows 0..1023 on Linux.
Check it is caught when this limit is exceeded.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
blockcipher cases are either returning TEST_SUCCESS
or TEST_FAILED as status, but the test may not be
supported by the PMD which is also a success case
for the PMD. Hence checking for status == TEST_FAILED
for setting the overall status as failed.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
This patch fix the error line break in the output format of flow query
Fixes: bdb1d61690 ("app/testpmd: support RSS config in flow query")
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The RTE_CRYPTODEV_FF_SECURITY feature was disabled through the
ff_disable device configuration option for all crypto performance tests,
including security related tests. This patch updates the crypto
performance tool to not disable RTE_CRYPTODEV_FF_SECURITY for DOCSIS and
PDCP security tests.
Fixes: d4a131a949 ("test/crypto-perf: support DOCSIS protocol")
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The RTE_CRYPTODEV_FF_SECURITY feature was disabled through the
ff_disable device configuration option for all cryptodev tests,
including security related tests. This patch updates the cryptodev unit
tests to not disable RTE_CRYPTODEV_FF_SECURITY for DOCSIS and PDCP
security tests.
Fixes: ea31f2b4f5 ("test/crypto: add DOCSIS security cases")
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The AESNI-MB CPU test cases, which are executed via the
cryptodev_cpu_aesni_mb_autotest command, aborted when it tried to run
the DOCSIS security tests as these are not CPU type tests. The abort
happened at the following line in process_crypto_request():
RTE_VERIFY(gbl_action_type != RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO);
The tests have been updated not to run the DOCSIS (or PDCP) security
tests during cryptodev_cpu_aesni_mb_autotest, with the decision based on
improved PMD security capability checks.
Fixes: ea31f2b4f5 ("test/crypto: add DOCSIS security cases")
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
In the IPSEC ESN test vector the cipher offset for encryption
should be 8 bytes which is the size of esp header.
This patch also changes the ciphertext and the digest reference
data against which the operation result is validated.
Fixes: 699741912d ("test/crypto: add case for auth only trailer")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The hairpin queue is the one that start from normal rxq,
and will be less than nr_queues where nr_queues is the
sum of normal and hairpin.
Fixes: bf3688f1e8 ("app/flow-perf: add insertion rate calculation")
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Reviewed-by: Asaf Penso <asafp@mellanox.com>
In order to verify offloading of eCPRI protocol via flow rules, the
command line of flow creation should support the parsing of the eCPRI
pattern.
Based on the specification, one eCPRI message will have the common
header and payload. Payload format is various based on the type field
of the common header. Fixed strings will be used instead of integer
to make the CLI easy for auto-completion.
The testpmd command line examples of flow to match eCPRI item are
listed below:
1. flow create 0 ... pattern eth / ecpri / end actions ...
This is to match all eCPRI messages.
2. flow create 0 ... pattern eth / ecpri common type rtc_ctrl / end actions ...
This is to match all eCPRI messages with the type #2 - "Real-Time
Control Data".
3. flow create 0 ... pattern eth / ecpri common type iq_data pc_id is [U16Int] / end actions ...
This is to match eCPRI messages with the type #0 - "IQ Data", and
the physical channel ID 'pc_id' of the messages is a specific
value. Since the sequence ID is changeable, there is no need to
match that field in the flow.
Currently, only type #0, #2 and #5 will be supported.
Since eCPRI could be over Ethernet layer (or after .1Q) and UDP
layer, it is the PMD driver's responsibility to check whether eCPRI
is supported and which protocol stack is supported. Network byte
order should be used for eCPRI header, the same as other headers.
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
The new 5-tuple swap engine swaps:
source and destination mac address,
source and destination address in ipv4/ipv6,
source and destination port in UDP/TCP.
The forwarding engine will parse each layer
and swap it, and will stop when the next
layer doesn't match.
The mentioned headers of ICMP/ARP/Multicast
packets will be swapped as well according to
matching layers.
usage: --forward-mode=5tswap
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
for applications and examples. Because they don't define
'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
This patch is preparation for future '__rte_internal' usage.
At first place, applications/examples should not include
'rte_ethdev_driver.h', this is happening because of PMD public header
files include 'rte_ethdev_driver.h' by mistake.
Updated PMD public header files to not include internal header files.
But for unit test application, 'app/test', enable accessing internal
APIs, since some unit tests need them.
Fixes: ffc905f3b8 ("ethdev: separate driver APIs")
Fixes: ec0dec44ec ("net/atlantic: enable MACsec configuration")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit adds testpmd capability to provide timestamps on the packets
being sent in the txonly mode. This includes:
- SEND_ON_TIMESTAMP support
new device Tx offload capability support added, example:
testpmd> port config 0 tx_offload send_on_timestamp on
- set txtimes, registers field and flag, example:
testpmd> set txtimes 1000000,0
This command enables the packet send scheduling on timestamps if
the first parameter is not zero, generic format:
testpmd> set txtimes (inter),(intra)
where:
inter - is the delay between the bursts in the device clock units.
If "intra" (next parameter) is zero, this is the time between the
beginnings of the first packets in the neighbour bursts, if "intra"
is not zero, "inter" specifies the time between the beginning of
the first packet of the current burst and the beginning of the last
packet of the previous burst. If "inter"parameter is zero the send
scheduling on timestamps is disabled (default).
intra - is the delay between the packets within the burst specified
in the device clock units. The number of packets in the burst is
defined by regular burst setting. If "intra" parameter is zero no
timestamps provided in the packets excepting the first one in the
burst.
As the result the bursts of packet will be transmitted with
specific delay between the packets within the burst and specific
delay between the bursts. The rte_eth_read_clock() is supposed to
be engaged to get the current device clock value and provide the
reference for the timestamps. If there is no supported
rte_eth_read_clock() there will be no provided send scheduling on
the device.
- show txtimes, displays the timing settings
- txonly burst time pattern
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
In txonly and flowgen forwarding mode, calculating CPU per packets with
total received packets is not accurate. Use total transmitted packets
for these cases.
The error output under txonly mode:
testpmd> show fwd stats all
---------------------- Forward statistics for port 0 -------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 3582891927 TX-dropped: 401965824 TX-total: 3984857751
TX-bursts : 86381636 [0% of 0 pkts + 85% of 64 pkts + 15% of 32 pkts]
-------------------------------------------------------------------------
---------------------- Forward statistics for port 1 -------------------
RX-packets: 1 RX-dropped: 394351696 RX-total: 394351697
TX-packets: 3582890632 TX-dropped: 401965568 TX-total: 3984856200
TX-bursts : 86381679 [0% of 0 pkts + 85% of 64 pkts + 15% of 32 pkts]
-------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++
RX-packets: 1 RX-dropped: 394351696 RX-total: 394351697
TX-packets: 7165782559 TX-dropped: 803931392 TX-total: 7969713951
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CPU cycles/packet=54984156291.00 \
(total cycles=54984156291 / total RX packets=1) at 200 MHz Clock
Fixes: 53324971a1 ("app/testpmd: display/clear forwarding stats on demand")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Softnic can be used like other virtual devices without
needing any special mode. Therefore, remove softnic mode
from testpmd app. Documentation is updated as well.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This patch support RSS action in flow query.
It can display the RSS configuration of the specified rule.
For example:
we can create an RSS rule by command "flow create 0 ingress
pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp
l3-src-only l4-dst-only end queues end func symmetric_toeplitz
/ end" and then query it "flow query 0 0 rss"
the log will be follow
RSS:
queues: none
function: symmetric_toeplitz
types:
ipv4-tcp
l3-src-only
l4-dst-only
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
The legacy filter API will be superseded. This patch use
private api to change the implementation of commands
global_config <port_id> gre-key-len <key_len> and
show port fdir <port_id>
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
There is no need to return the defer queue handle in rte_lpm_rcu_qsbr_add,
since enough flexibility has been provided to configure the defer queue.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Add performance tests for RCU integration. The performance
difference with and without RCU integration is very small
(~1% to ~2%) on both Arm and x86 platforms.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Add positive and negative tests for API rte_lpm_rcu_qsbr_add.
Also test LPM library behavior when RCU QSBR is enabled.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
The number of empty polls provides information about available
CPU head room in the presence of continuous polling.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
The burst % calculation can over flow due to multiplication.
Fix the multiplication and increase the size of variables to
64b.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
The throughput calculation requires a counter that measures
passing of time. However, the kernel saves and restores the PMU
state when a thread is unscheduled and scheduled. This ensures
that the PMU cycles are not counted towards a thread that is
not scheduled. Hence, when RTE_ARM_EAL_RDTSC_USE_PMU is enabled,
the PMU cycles do not represent the passing of time.
This results in incorrect calculation of throughput numbers.
Use clock_gettime system call to calculate the time passed since
last call.
Bugzilla ID: 450
Fixes: 0e10698030 ("app/testpmd: show throughput in port stats")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Add testpmd cmdline support for GTPU, it could be used to configure
gtpu teid hash. The commands as below:
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
ipv4 / end actions rss types gtpu end key_len 0 queues end / end
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This patch adds testpmd cmdline support for PPPoE.
Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The rte_service_lcore_reset_all function stops execution of services
on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE.
However the thread loop for slave lcores (eal_thread_loop) distincts these
roles to set lcore state after processing delegated function.
It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE.
So changing the role to RTE before stopping work in slave lcores
causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait
must be run after rte_service_lcore_reset_all to bring back lcores to
launchable (WAIT) state.
This has been fixed in test app and clarified in API documentation.
Setting the state to WAIT in rte_service_runner_func is premature
as the rte_service_runner_func function is still a part of the lcore
function delegated to slave lcore. The state is overwritten anyway in
slave lcore thread loop. This premature setting state to WAIT might
however cause rte_eal_lcore_wait, that was called by the application,
to return before slave lcore thread set the FINISHED state. That's
why it is removed from librte_eal rte_service_runner_func function.
Bugzilla ID: 464
Fixes: 21698354c8 ("service: introduce service cores concept")
Fixes: f038a81e1c ("service: add unit tests")
Cc: stable@dpdk.org
Reported-by: Sarosh Arif <sarosh.arif@emumba.com>
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Add a new option for PDCP cases to enable use of session
based fixed HFN value instead of per packet HFN which was
enabled by hfn override feature.
By default HFN override is enabled and if session based
fixed HFN need to be tested, add "--pdcp-ses-hfn-en" in the
command line.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
As per current framework of PDCP testing, app can only support
either HFN override or fixed session HFN values but not both.
Now to enable both, either we duplicate all PDCP cases(>100)
for both override and fixed HFN. It will look clumsy as the
number of cases will be very high without much value addition.
Now to overcome this, we can do HFN override for Downlink cases
and fixed HFN for uplink cases. This way we will not loose the
test coverage and there will not be duplicacy in the test cases.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This patch enables the generic crypto tests for OCTEON TX and
OCTEON TX2 PMDs. Removes the PMD specific tests.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch removes the OCTEON TX and OCTEON TX2 PMDs specific
test cases related to null cipher.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Add unit tests for DOCSIS capabilitity checks.
Signed-off-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Add uplink and downlink DOCSIS unit test cases and vectors, to test
the combined DOCSIS Crypto-CRC support that has been added to the
rte_security library.
Signed-off-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This patch fixes the element size of the mempool used
for allocating asym crypto sessions and their private data.
Fixes: 2c6dab9cd9 ("test/crypto: add RSA and Mod tests")
Cc: stable@dpdk.org
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>
The multiprocess feature has been implicitly enabled so far.
Applications might want to explicitly disable like when using the
non-EAL threads registration API.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Add a helper to iterate all lcores.
The iterator callback is read-only wrt the lcores list.
Implement a dump function on top of this for debugging.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
DPDK components and applications can have their say when a new lcore is
initialized. For this, they can register a callback for initializing and
releasing their private data.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
DPDK allows calling some part of its API from a non-EAL thread but this
has some limitations.
OVS (and other applications) has its own thread management but still
want to avoid such limitations by hacking RTE_PER_LCORE(_lcore_id) and
faking EAL threads potentially unknown of some DPDK component.
Introduce a new API to register non-EAL thread and associate them to a
free lcore with a new NON_EAL role.
This role denotes lcores that do not run DPDK mainloop and as such
prevents use of rte_eal_wait_lcore() and consorts.
Multiprocess is not supported as the need for cohabitation with this new
feature is unclear at the moment.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The test checks that the service may be active API works
when there are two cores: a non-service lcore and a service one.
The API notes to take care when checking the status of a running
service, but the test setup allows for a safe usage in that case.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
This commit fixes the setting of relative rpath on dpdk-test for
drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
($prefix$libdir/dpdk/pmd-$abiver).
Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
RTE_TRACE_POINT_DEFINE and RTE_TRACE_POINT_REGISTER must come in pairs.
Merge them and let RTE_TRACE_POINT_REGISTER handle the constructor part.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>