In case action handle destroy fails, the job memory was not freed
properly. This commit fixes the possible memory leak in the action
handle destruction failed case.
Fixes: c9dc038408 ("ethdev: add indirect action async query")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
This patch clarifies the handling of following cases
in the ethdev API docs:
- If rte_eth_dev_start() returns (-EAGAIN) for some port,
it cannot be started right now and start operation
must be retried.
- If rte_eth_dev_stop() returns (-EBUSY) for some port,
it cannot be stopped in the current state.
When stopping the port in testpmd fails,
port's state is switched back to STARTED
to allow users to manually retry stopping the port.
No additional changes in testpmd are required to handle
failures to start the port.
If rte_eth_dev_start() fails, port's state is switched to STOPPED
and users are allowed to retry the operation.
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
This local variable hides the more global one.
The original intent was probably to use the global one.
Fixes: 0cc67a96e4 ("test/member: add functional and perf tests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
This local variable hides the more global one.
The original intent was probably to use the global one.
Fixes: 0e925aef27 ("app/test: add EFD functional and perf tests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
This variable is not used and has been copy/pasted in a lot of other
code.
Fixes: 938a184a18 ("app/testpmd: implement basic support for flow API")
Fixes: 55509e3a49 ("app/testpmd: support shared flow action")
Fixes: 04cc665fab ("app/testpmd: add flow template management")
Fixes: c4b3887334 ("app/testpmd: add flow table management")
Fixes: ecdc927b99 ("app/testpmd: add async flow create/destroy operations")
Fixes: d906fff518 ("app/testpmd: add async indirect actions operations")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
This variable is used to create some artificial load.
Fixes: 3c156061b9 ("app/testpmd: add noisy neighbour forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Currently the performance application creates a device session per lcore.
This was not reflected in how many session objects were available
in the mempool, when using a scheduler device.
The number of lcores is now taken into consideration when calculating
how many sessions are needed for the scheduler.
Fixes: 09fcf99dca ("test/crypto-perf: fix number of scheduler sessions")
Reported-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
This patch remove incorrect bitwise and operator used in the
return function of sw snow3g testcase
Fixes: 24342ade2c ("test/crypto: check SNOW3G when digest is encrypted")
Cc: stable@dpdk.org
Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Reset the crypto device after asym tests so that the state from
asymmetric tests won't affect the tests executed later.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
This patch support Rx/Tx descriptor dump
The command is like:
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx --
--show-rx-descriptor queue_id:offset:num
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx --
--show-tx-descriptor queue_id:offset:num
queue_id: A queue identifier on this port.
offset: The offset of the descriptor starting from tail.
num: The number of the descriptors to dump.
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
This patch add support for module eeprom info dump.
The command is like:
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-module-eeprom
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
This patch add support for RSS reta dump.
The command is like:
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --show-rss-reta
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Add support for dump ethdev firmware version.
The command is like:
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --firmware-version
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Add support for dump dpdk version.
The command is like:
dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=xxx -- --version
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
This code is to do cleanup for the wrong doxygen syntax comments
The DPDK API is documented using doxygen comment annotations in the
header files. The procinfo code seems no need to use doxygen comment.
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
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>