Commit Graph

3195 Commits

Author SHA1 Message Date
Aakash Sasidharan
900ac630ca test/crypto: add 3DES IPsec cases
Add IPsec test cases for cipher algorithm 3DES.

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
2022-11-08 06:20:57 +01:00
Anoob Joseph
1f5cfe964e app/security-perf: add session performance test
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>
2022-11-03 13:48:37 +01:00
Srikanth Yalavarthi
a62ac101fe app/bbdev: use helper function to set IOVA address
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>
2022-11-03 08:03:24 +01:00
Volodymyr Fialko
6776a58173 app/eventdev: fix timestamp with crypto producer
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>
2022-11-07 19:12:22 +01:00
Volodymyr Fialko
a5a548792f app/eventdev: fix asymmetric last stage handling
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>
2022-11-07 19:12:13 +01:00
Volodymyr Fialko
eff29c4537 app/eventdev: setup crypto adapter before sessions
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>
2022-11-07 19:11:45 +01:00
Volodymyr Fialko
5f111f924f app/eventdev: fix limits in error message
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>
2022-11-07 15:12:49 +01:00
Suanming Mou
6d736e0568 app/testpmd: flush flow templates when port is removed
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>
2022-11-14 10:25:45 +01:00
David Marchand
ecf7518017 build: list selected applications
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>
2022-11-14 11:30:02 +01:00
Vladimir Medvedkin
521171cf2a test/hash: fix bulk lookup check
Check return value after bulk lookup.

Coverity issue: 357746
Fixes: 14b8ab5762 ("hash: add bulk lookup with signatures array")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-11-14 11:06:06 +01:00
Vladimir Medvedkin
e5408325f3 test/hash: remove dead code in extendable bucket test
Remove unnecessary variable assignment.

Coverity issue: 336800
Fixes: 3f9aab961e ("test/hash: check lock-free extendable bucket")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2022-11-14 11:05:09 +01:00
Hanumanth Pothula
4f04edcda7 app/testpmd: support multiple mbuf pools per Rx queue
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>
2022-11-10 11:30:36 +01:00
Yuan Wang
54a0f4d756 app/testpmd: fix protocol header list for Rx buffer split
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>
2022-11-10 09:52:25 +01:00
Alexander Kozyrev
f4f7ba1ad2 app/testpmd: fix flow list with async flow API
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>
2022-11-10 07:52:00 +01:00
Stephen Hemminger
4c243bd4a8 app/testpmd: make quit flag volatile
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>
2022-11-10 07:40:22 +01:00
Huisong Li
7c06f1ab3b app/testpmd: update bonding configuration for new slave
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>
2022-11-07 06:33:37 +01:00
Gregory Etelson
236bc417e2 app/testpmd: fix MAC header in checksum forward engine
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>
2022-11-06 10:48:08 +01:00
Zhangfei Gao
8799d66e65 test/crypto: support UADK PMD
Updated test application to run autotest for uadk crypto PMD.
Example:
sudo dpdk-test --vdev=crypto_uadk --log-level=6
RTE>>cryptodev_uadk_autotest
RTE>>quit

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Nithin Dabilpuram
3edd1197a6 test/security: add multi-segment inline IPsec cases
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>
2022-10-29 13:01:41 +02:00
Ciara Power
09fcf99dca test/crypto-perf: fix number of scheduler sessions
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>
2022-10-29 13:01:41 +02:00
Nicolas Chautru
0acdb98667 test/bbdev: add FFT operations cases
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>
2022-10-29 13:01:41 +02:00
Anoob Joseph
8cbe74f191 test/crypto: fix PDCP vectors
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>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
757bb46138 test/crypto: add custom UDP ports cases
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>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
7c4d45d278 test/crypto: add DES and MD5 cases
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>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
2eddc5942f test/crypto: check anti-replay capability in ingress
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>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
0f2748a096 test/security: update anti-replay cases for event mode
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>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
5a23f6ea39 test/security: add MD5 cases
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>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
d70018639e test/security: add DES and 3DES cases
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>
2022-10-29 13:01:40 +02:00
Nicolas Chautru
c1407bfa05 baseband/acc200: add PF configuration
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>
2022-10-29 13:01:39 +02:00
Nicolas Chautru
dcf43d2412 baseband/acc: rename directory from acc100 to acc
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>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
32e8b7ea35 baseband/acc100: refactor to segregate common code
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>
2022-10-29 13:01:38 +02:00
Ciara Power
63e1fbc343 test/crypto: add remaining blockcipher SGL cases
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>
2022-10-29 13:01:38 +02:00
Ciara Power
8e71da225e test/crypto: add OOP SNOW3G SGL cases
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>
2022-10-29 13:01:38 +02:00
Ciara Power
dc3f6c5347 test/crypto: fix wireless auth digest segment
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>
2022-10-29 13:01:38 +02:00
Michael Baum
86fe1b01fa ethdev: add structure for indirect flow age update
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>
2022-10-28 12:41:03 +02:00
Michael Baum
966eb55e9a ethdev: add queue-based API to report aged flow rules
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>
2022-10-28 12:41:03 +02:00
Michael Baum
dcc9a80c20 ethdev: add strict queue to pre-configuration flow hints
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>
2022-10-28 12:41:03 +02:00
Markus Theil
ab2bb5044c build: select applications to build
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>
2022-10-28 14:27:48 +02:00
Chengwen Feng
020dbb4c2a app/testpmd: remove jumbo offload
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>
2022-10-20 09:20:55 +02:00
Yuan Wang
23f2dfd3ca app/testpmd: remove unused parameter in Rx header split
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>
2022-10-17 10:34:03 +02:00
Suanming Mou
886e7f1328 app/testpmd: fix flow template table argument name
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>
2022-10-17 09:51:16 +02:00
Qiming Yang
e9351eaa4c app/testpmd: skip port reset in secondary process
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>
2022-10-17 09:47:08 +02:00
Kalesh AP
eb0d471a89 ethdev: add proactive error handling mode
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>
2022-10-17 08:27:18 +02:00
Chengwen Feng
0d5c38bac7 ethdev: add error handling mode to device info
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>
2022-10-17 08:26:36 +02:00
Leyi Rong
fe61babe0b test/member: fix float types
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>
2022-10-26 17:13:44 +02:00
Olivier Matz
011c617ca2 test/pmd_perf: fix test on devices with no socket ID
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>
2022-10-24 13:33:49 +02:00
Stephen Hemminger
eeb6cad431 app/dumpcap: add file-prefix option
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>
2022-10-21 15:13:25 +02:00
Arshdeep Kaur
7f3623a17e app/dumpcap: fix select interface
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>
2022-10-21 14:54:26 +02:00
Stephen Hemminger
117e3b6492 app/dumpcap: fix pathname for output file
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>
2022-10-21 14:54:26 +02:00
Stephen Hemminger
1835ea9905 app/dumpcap: fix crash on cleanup
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>
2022-10-21 14:54:26 +02:00