Add performance application to test security session create & destroy
rates supported by the security enabled cryptodev PMD. The
application would create specified number of sessions and captures the
time taken for the same before proceeding to destroy of the same. When
operating on multi-core, the number of sessions would be evenly
distributed across all cores.
The application would test with all combinations of cipher & auth
algorithms supported by the PMD.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Use helper function rte_mbuf_iova_set to set IOVA address
to fix compilation failures.
Below error was observed:
app/test-bbdev/test_bbdev_perf.c: In function ‘init_op_data_objs’:
app/test-bbdev/test_bbdev_perf.c:1145:11: error:
‘struct rte_mbuf’ has no member named ‘buf_iova’
1145 | m_head->buf_iova = rte_malloc_virt2iova(data);
| ^~
Fixes: 0acdb98667 ("test/bbdev: add FFT operations cases")
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
With symmetric crypto producer and enabled `--fwd_latency` we will
treat rte_mbuf as perf_elt which will lead to rte_mbuf header
corruption. Use rte_mbuf data to store time stamp information.
For asymmetric add space in result data for time stamp.
Fixes: de2bc16e1b ("app/eventdev: add crypto producer mode")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
For asymmetric crypto producer check for event type in
`process_crypto_request` will not pass in case of multiple stages, due
to overwrite of event type during event forward. Use producer type to
dispatch.
Fixes: 8f5b549502 ("app/eventdev: support asym ops for crypto adapter")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Setup crypto adapter and add queue pairs before assigning them in
session metadata. Session metadata may use queue pair configuration
parameters, so queue pair should be added before meta assignment.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Swap min and max values to match their labels.
Fixes: 2eaa37b866 ("app/eventdev: add vector mode in pipeline test")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add explicit flushing of template tables, pattern and actions templates,
when a port is closed or detached.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
With the addition of enable/disable_apps meson options, it is a bit
harder to figure out which application is built, and why.
Display the list of applications in the same way we do for drivers and
libraries.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Markus Theil <markus.theil@secunet.com>
Some of the HW has support for choosing memory pools based on
the packet's size. The pool sort capability allows PMD/NIC to
choose a memory pool based on the packet's length.
On multiple mempool support enabled, populate mempool array
accordingly. Also, print pool name on which packet is received.
Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
The "show config rxhdrs" cmd displays the configured protocol headers
that are used for protocol-based buffer split.
However, it shows inner-ipv6 as inner-ipv4.
This patch fixes that by redefining rx_pkt_hdr_protos to hold
the full ptypes, and the show and set commands therefore
remain symmetrical.
Fixes: 52e2e7edcf ("app/testpmd: add protocol-based buffer split")
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Flows created with the new asynchronous flow API lack attributes
(direction, priority, group number). These attributes are part of
a template table for flows created via rte_flow_async_create().
When testpmd tries to list all the flows it accesses flow
attributes via pointer and crashes. Save flow attributes during
the template table creation and use them in the "flow list" output.
Fixes: ecdc927b99 ("app/testpmd: add async flow create/destroy operations")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Since f_quit is set in a signal handler it needs to be marked
volatile. Otherwise, compiler is allowed to optimize the loop because
it can assume the value never changes. The flag can also be made local
to the file it is used in.
Fixes: d9a191a00e ("app/testpmd: fix quitting in container")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Some capabilities (like, rx_offload_capa and tx_offload_capa) of bonding
device in dev_info is zero when no slave is added. And its capability will
be updated when add a new slave device.
The capability to update dynamically may introduce some problems if not
handled properly. For example, the reconfig() is called to initialize
bonding port configurations when create a bonding device. The global
tx_mode is assigned to dev_conf.txmode. The DEV_TX_OFFLOAD_MBUF_FAST_FREE
which is the default value of global tx_mode.offloads in testpmd is removed
from bonding device configuration because of zero rx_offload_capa.
As a result, this offload isn't set to bonding device.
Generally, port configurations of bonding device must be within the
intersection of the capability of all slave devices. If use original port
configurations, the removed capabilities because of adding a new slave may
cause failure when re-initialize bonding device.
So port configurations of bonding device need to be updated because of the
added and removed capabilities. In addition, this also helps to ensure
consistency between testpmd and bonding device.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Min Hu (Connor) <humin29@huawei.com>
MLX5 SR-IOV Tx engine will not transmit Ethernet frame
if destination MAC address matched local port address. The frame ether
looped-back to Rx or dropped, depending on the port configuration.
Application running over MLX5 SR-IOV port cannot transmit packet
polled from Rx queue as is. The packet Ethernet destination address
must be changed.
Add new run-time configuration parameter to the `csum` forwarding
engine to control MAC addresses configuration:
testpmd> csum mac-swap on|off <port_id>
`mac-swap on` replace MAC addresses.
`mac-swap off` keep Ethernet header unchanged.
Fixes: 9b4ea7ae77 ("app/testpmd: revert MAC update in checksum forwarding")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Add support to run multi-seg inline ipsec test using
new test command `inline_ipsec_sg_autotest`
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
The scheduler PMD needs 1 session header,
along with a session per worker.
After the session rework, this change was made to other apps,
for example l2fwd-crypto, but was missed in test-crypto-perf.
Fixes: bdce2564db ("cryptodev: rework session framework")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Added support for bbdev level unit test
for the FFT operations and for Soft-Output options.
Also added 2 small test vectors for the FFT operation.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The existing PDCP vectors have a deviation from the PDCP header
specification. The reserved fields are set to 0 in the PDCP headers and
D/C bits are updated as per the use case. The MAC-I for the
corresponding vectors are also updated.
Fixes: d883e6e713 ("test/crypto: add PDCP C-Plane encap cases")
Fixes: cca7d1f785 ("test/crypto: add PDCP U-Plane encap with integrity cases")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
Added unit test for custom UDP ports with UDP encapsulation.
Verified UDP header in egress path for all unit tests.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Added unit test cases for auth algo MD5.
Added unit test cases for cipher DES-CBC.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Antireplay is supported only for ingress.
Check this capability only for ingress.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
When event mode is enabled,
send and receive packets via event dev.
Updated the antireplay cases to enable event mode.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Add unit test cases for MD5 auth algo.
Add the test vectors for MD5 auth algo.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Add unit test cases and test vectors for DES-CBC
and 3DES-CBC.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Added configure function notably to configure the device from
the PF within DPDK and bbdev-test (without external dependency).
That function is kept common to all ACC devices.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Hernan Vargas <hernan.vargas@intel.com>
Used a common directory for the ACC PMDs
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Refactored shareable common code to be used by future PMD
(including ACC200 in this patchset) and
following PMDs in roadmap) by gathering such structures or inline methods.
No functionality change.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The current blockcipher test function only has support for two types of
SGL test, INPLACE or OOP_SGL_IN_LB_OUT. These types are hardcoded into
the function, with the number of segments always set to 3.
To ensure all SGL types are tested, blockcipher test vectors now have
fields to specify SGL type, and the number of segments.
If these fields are missing, the previous defaults are used,
either INPLACE or OOP_SGL_IN_LB_OUT, with 3 segments.
Some AES and Hash vectors are modified to use these new fields, and new
AES tests are added to test the SGL types that were not previously
being tested.
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
More tests are added to test variations of OOP SGL for SNOW3G.
This includes LB_IN_SGL_OUT and SGL_IN_LB_OUT.
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The segment size for some tests was too small to hold the auth digest.
This caused issues when using op->sym->auth.digest.data for comparisons
in AESNI_MB PMD after a subsequent patch enables SGL.
For example, if segment size is 2, and digest size is 4, then 4 bytes
are read from op->sym->auth.digest.data, which overflows into the memory
after the segment, rather than using the second segment that contains
the remaining half of the digest.
Fixes: 11c5485bb2 ("test/crypto: add scatter-gather tests for IP and OOP")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Add a new structure for indirect AGE update.
This new structure enables:
1. Update timeout value.
2. Stop AGE checking.
3. Start AGE checking.
4. restart AGE checking.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
When application use queue-based flow rule management and operate the
same flow rule on the same queue, e.g create/destroy/query, API of
querying aged flow rules should also have queue id parameter just like
other queue-based flow APIs.
By this way, PMD can work in more optimized way since resources are
isolated by queue and needn't synchronize.
If application do use queue-based flow management but configure port
without RTE_FLOW_PORT_FLAG_STRICT_QUEUE, which means application operate
a given flow rule on different queues, the queue id parameter will
be ignored.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
The data-path focused flow rule management can manage flow rules in more
optimized way than traditional one by using hints provided by
application in initialization phase.
In addition to the current hints we have in port attr, more hints could
be provided by application about its behaviour.
One example is how the application do with the same flow rule ?
A. create/destroy flow on same queue but query flow on different queue
or queue-less way (i.e, counter query)
B. All flow operations will be exactly on the same queue, by which PMD
could be in more optimized way then A because resource could be
isolated and access based on queue, without lock, for example.
This patch add flag about above situation and could be extended to cover
more situations.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Makes apps configurable from meson, like already possible for drivers.
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The jumbo offload was removed from patch [1], but testpmd still exist
jumbo offload related code, this patch removes it, and also updates
the rst file.
[1] ethdev: remove jumbo offload flag
Fixes: b563c14212 ("ethdev: remove jumbo offload flag")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Protocol header sequence checking is supported in the ethdev library,
the application does not need to do it again.
Coverity issue: 381396
Fixes: 52e2e7edcf ("app/testpmd: add protocol-based buffer split")
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
There should be no spaces in flow command arguments name.
This commit removes incorrect arguments name in queue based table
template.
Fixes: ecdc927b99 ("app/testpmd: add async flow create/destroy operations")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
As stop action has been forbidden in secondary process, so
the reset action should also not be allowed.
Fixes: a550baf24a ("app/testpmd: support multi-process")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Some PMDs (e.g. hns3) could detect hardware or firmware errors, one
error recovery mode is to report RTE_ETH_EVENT_INTR_RESET event, and
wait for application invoke rte_eth_dev_reset() to recover the port,
however, this mode has the following weaknesses:
1) Due to different hardware and software design, some NIC port recovery
process requires multiple handshakes with the firmware and PF (when the
port is VF). It takes a long time to complete the entire operation for
one port, If multiple ports (for example, multiple VFs of a PF) are
reset at the same time, other VFs may fail to be reset. (Because the
reset processing is serial, the previous VFs must be processed before
the subsequent VFs).
2) The impact on the application layer is great, and it should stop
working queues, stop calling Rx and Tx functions, and then call
rte_eth_dev_reset(), and re-setup all again.
This patch introduces proactive error handling mode, the PMD will try
to recover from the errors itself. In this process, the PMD sets the
data path pointers to dummy functions (which will prevent the crash),
and also make sure the control path operations failed with retcode
-EBUSY.
Because the PMD recovers automatically, the application can only sense
that the data flow is disconnected for a while and the control API
returns an error in this period.
In order to sense the error happening/recovering, three events were
introduced:
1) RTE_ETH_EVENT_ERR_RECOVERING: used to notify the application that it
detected an error and the recovery is being started. Upon receiving the
event, the application should not invoke any control path APIs until
receiving RTE_ETH_EVENT_RECOVERY_SUCCESS or
RTE_ETH_EVENT_RECOVERY_FAILED event.
2) RTE_ETH_EVENT_RECOVERY_SUCCESS: used to notify the application that
it recovers successful from the error, the PMD already re-configures the
port, and the effect is the same as that of the restart operation.
3) RTE_ETH_EVENT_RECOVERY_FAILED: used to notify the application that it
recovers failed from the error, the port should not usable anymore. The
application should close the port.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Currently, the defined error handling modes include:
1) NONE: it means no error handling modes are supported by this port.
2) PASSIVE: passive error handling, after the PMD detect that a reset
is required, the PMD reports RTE_ETH_EVENT_INTR_RESET event, and
application invoke rte_eth_dev_reset() to recover the port.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Fix incorrect expression by cast division operand to type double
to match ceil() and fabs() definitions.
Coverity issue: 381398, 381401, 381402
Fixes: db354bd2e1 ("member: add NitroSketch mode")
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
If the socket ID of a device is unknown, rte_eth_dev_socket_id(portid)
now returns -1 instead of 0 since commit 7dcd73e379 ("drivers/bus: set
device NUMA node to unknown by default").
This change breaks the pmd_perf test on environment where the device
socket ID is unknown. The test fails with the following error, because
it does not find a lcore on socket -1:
> No avail lcore to run test
Take the new behavior in account in the pmd_perf test: in this
environment, the test can now run on any lcore, and not only those from
socket 0 (this was the old behavior).
Bugzilla ID: 1105
Fixes: 7dcd73e379 ("drivers/bus: set device NUMA node to unknown by default")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
When using dumpcap in container environment or with multiple
DPDK processes, it is useful to be able to specify file prefix.
This version only accepts the long format option used by
other commands. If no prefix is specified then the default
is used.
Suggested-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
The change to do argument process before EAL init broke
the support of select-interface option. Fix by setting flag
and doing select-interface later.
Fixes: a8dde09f97 ("app/dumpcap: allow help/version without primary process")
Cc: stable@dpdk.org
Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
When dumpcap is run with a longer path name such as when
testing, the file prefix would be computed incorrectly.
Also, print out the resulting filename which is similar to
what wireshark program does.
Fixes: cbb44143be ("app/dumpcap: add new packet capture application")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
At end of program there is call to rte_free() which is passing
a bogus value. There is no "bpf_filter" defined in this application;
it ends up being a text address inside pcap library.
Fixes: cbb44143be ("app/dumpcap: add new packet capture application")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>