Commit Graph

1973 Commits

Author SHA1 Message Date
Kevin Traynor
2c8490a88f examples/l2fwd-cat: fix build
<ctype.h> and <errno.h> need to be included for the build
since they were removed from <rte_common.h>.

examples/l2fwd-cat/cat.c: In function ‘parse_set’:
examples/l2fwd-cat/cat.c:66:16:
   warning: implicit declaration of function ‘isblank’
   66 |         while (isblank(*str))
      |                ^~~~~~~
examples/l2fwd-cat/cat.c:18:1:
   note: include ‘<ctype.h>’ or provide a declaration of ‘isblank’
   17 | #include "cat.h"
  +++ |+#include <ctype.h>
   18 |
examples/l2fwd-cat/cat.c:70:15:
   warning: implicit declaration of function ‘isdigit’
   70 |         if ((!isdigit(*str) && *str != '(') || *str == '\0')
      |               ^~~~~~~
examples/l2fwd-cat/cat.c:70:15:
   note: include ‘<ctype.h>’ or provide a declaration of ‘isdigit’
examples/l2fwd-cat/cat.c:75:17:
   error: ‘errno’ undeclared (first use in this function)
   75 |                 errno = 0;
      |                 ^~~~~
examples/l2fwd-cat/cat.c:18:1:
   note: ‘errno’ is defined in header ‘<errno.h>’;
   did you forget to ‘#include <errno.h>’?
   17 | #include "cat.h"
  +++ |+#include <errno.h>

Fixes: 72b452c5f2 ("eal: remove unneeded includes from a public header")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-10-06 12:33:43 +02:00
Amit Prakash Shukla
b269bd630e examples: fix Arm build with GCC 12
GCC-12 warns when a pointer of type union points to an array of same
defined size, as union internally gets paded with pad bytes.

../examples/common/neon/port_group.h:42:21: error: array subscript
	'union <anonymous>[0]' is partly outside array bounds of
	'uint16_t[5]' {aka 'short unsigned int[5]'}
	[-Werror=array-bounds]
   42 |                 pnum->u64 = gptbl[v].pnum;
      |                     ^~
../examples/common/neon/port_group.h:21:23: note: object 'pn' of
	size [0, 10]
   21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1
      |              ~~~~~~~~~^~~~~~~~~~~~~~~
../examples/common/neon/port_group.h:43:21: error: array subscript
	'union <anonymous>[0]' is partly outside array bounds of
	'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=array-bounds]
   43 |                 pnum->u16[FWDSTEP] = 1;
      |                     ^~

Fixes: 732115ce38 ("examples/l3fwd: move packet group function in common")
Cc: stable@dpdk.org

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
2022-10-06 12:28:58 +02:00
David Marchand
4ed8904955 remove prefix to some local macros in apps and examples
RTE_TEST_[RT]X_DESC_DEFAULT and RTE_TEST_[RT]X_DESC_MAX macros have been
copied in a lot of app/ and examples/ code.
Those macros are local to each program.

They are not related to a DPDK public header/API, drop the RTE_TEST_
prefix.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-10-05 21:34:40 +02:00
Harshad Narayane
ab492f943b examples/pipeline: fix file descriptor leak
Fix file close at pipeline code generation.

Coverity issue: 380860
Fixes: 9043f66a ("examples/pipeline: add command for code generation")

Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-10-05 14:40:06 +02:00
Harshad Narayane
b42f3e2f5b examples/pipeline: fix memory leak
Fix memory resource free for buffer allocation failure at pipeline
library build.

Coverity issue: 380863, 380866
Fixes: 6bc14d9f ("examples/pipeline: add command for shared library build")

Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-10-05 14:40:06 +02:00
Hamza Khan
9c20d0fdc5 examples/vm_power_manager: use safe list iterator
Currently, when vm_power_manager exits, we are using a LIST_FOREACH
macro to iterate over VM info structures while freeing them. This
leads to use-after-free error. To address this, replace all usages of
LIST_* with TAILQ_* macros, and use the RTE_TAILQ_FOREACH_SAFE macro
to iterate and delete VM info structures.

Fixes: e8ae9b6625 ("examples/vm_power: channel manager and monitor in host")
Cc: stable@dpdk.org

Signed-off-by: Hamza Khan <hamza.khan@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2022-10-05 14:15:37 +02:00
Akhil Goyal
2973dbf93b security: hide session structure
Structure rte_security_session is moved to internal
headers which are not visible to applications.
The only field which should be used by app is opaque_data.
This field can now be accessed via set/get APIs added in this
patch.
Subsequent changes in app and lib are made to compile the code.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
Tested-by: David Coyle <david.coyle@intel.com>
Tested-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
2022-10-04 22:37:54 +02:00
Akhil Goyal
3f3fc3308b security: remove private mempool usage
As per current design, rte_security_session_create()
unnecessarily use 2 mempool objects for a single session.

To address this, the API will now take only 1 mempool
object instead of 2. With this change, the library layer
will get the object from mempool and session priv data is
stored contiguously in the same mempool object.

User need to ensure that the mempool created in application
is big enough for session private data as well. This can be
ensured if the pool is created after getting size of session
priv data using API rte_security_session_get_size().

Since set and get pkt metadata for security sessions are now
made inline for Inline crypto/proto mode, a new member fast_mdata
is added to the rte_security_session.
To access opaque data and fast_mdata will be accessed via inline
APIs which can do pointer manipulations inside library from
session_private_data pointer coming from application.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
Tested-by: David Coyle <david.coyle@intel.com>
Tested-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
2022-10-04 22:37:00 +02:00
Akhil Goyal
2a440d6ab3 cryptodev: hide symmetric session structure
Structure rte_cryptodev_sym_session is moved to internal
headers which are not visible to applications.
The only field which should be used by app is opaque_data.
This field can now be accessed via set/get APIs added in this
patch.
Subsequent changes in app and lib are made to compile the code.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
Tested-by: David Coyle <david.coyle@intel.com>
Tested-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
2022-10-04 22:29:01 +02:00
Akhil Goyal
bdce2564db cryptodev: rework session framework
As per current design, rte_cryptodev_sym_session_create() and
rte_cryptodev_sym_session_init() use separate mempool objects
for a single session.
And structure rte_cryptodev_sym_session is not directly used
by the application, it may cause ABI breakage if the structure
is modified in future.

To address these two issues, the rte_cryptodev_sym_session_create
will take one mempool object that the session and session private
data are virtually/physically contiguous, and initializes both
fields. The API rte_cryptodev_sym_session_init is removed.

rte_cryptodev_sym_session_create will now return an opaque session
pointer which will be used by the app and other APIs.

In data path, opaque session pointer is attached to rte_crypto_op
and the PMD can call an internal library API to get the session
private data pointer based on the driver id.

Note: currently single session may be used by different device
drivers, given it is initialized by them. After the change the
session created by one device driver cannot be used or
reinitialized by another driver.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
Tested-by: David Coyle <david.coyle@intel.com>
Tested-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
2022-10-04 22:04:59 +02:00
Chengwen Feng
fbf006f7fe examples/dma: support dequeue when no packet received
Currently the example using DMA in asynchronous mode, which are:
	nb_rx = rte_eth_rx_burst();
	if (nb_rx == 0)
		continue;
	...
	dma_enqueue(); // enqueue the received packets copy request
	nb_cpl = dma_dequeue(); // get copy completed packets
	...

There are no waiting inside dma_dequeue(), and this is why it's called
asynchronus. If there are no packet received, it won't call
dma_dequeue(), but some packets may still in the DMA queue which
enqueued in last cycle. As a result, when the traffic is stopped, the
sent packets and received packets are unbalanced from the perspective
of the traffic generator.

The patch supports DMA dequeue when no packet received, it helps to
judge the test result by comparing the sent packets with the received
packets on traffic generator sides.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2022-10-03 18:24:24 +02:00
Bruce Richardson
3aaa46977d examples/kni: remove deprecated example
As part of the agreed process for deprecating KNI in DPDK, the example
app is scheduled for removal as part of the 22.11 release.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2022-10-03 18:24:24 +02:00
Srujana Challa
68d25915d2 security: remove user data get API
The API rte_security_get_userdata() was being unused by most of
the drivers and it was retrieving userdata from mbuf dynamic field.
Hence, the API was removed and the application can directly get the
userdata from dynamic field. This helps in removing extra checks
in datapath.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-02 20:33:24 +02:00
Wenwu Ma
40abb903fe examples/vhost: fix use after free
In async_enqueue_pkts(), the failed pkts will
be freed before return, but, the failed pkts may be
retried later, it will cause use after free. So,
we free the failed pkts after retry.

Fixes: 1907ce4bae ("examples/vhost: fix retry logic on Rx path")
Cc: stable@dpdk.org

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-09-29 10:13:22 +02:00
Pavan Nikhilesh
3a304711b6 examples: update event vector free routine
Update event vector free routine to account for element
offset while freeing elements.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2022-09-27 15:41:39 +02:00
Nithin Dabilpuram
58e2cf4cf7 examples/ipsec-secgw: update ether type using tunnel info
Update ether type for outbound SA processing based on tunnel header
information in both NEON functions for poll mode and event mode worker
functions.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-09-27 18:20:35 +02:00
Amit Prakash Shukla
dae3a7affc examples/ipsec-secgw: fix build with GCC 12
Typecasting uint32_t array to uint16_t and accessing it as max array
size(at time of declaration of uint32_t array) causes gcc-12 to
throw an error.

GCC 12 raises the following warning:

In function 'send_multi_pkts',
    inlined from 'route6_pkts_neon' at
../examples/ipsec-secgw/ipsec_lpm_neon.h:170:2,
    inlined from 'ipsec_poll_mode_wrkr_inl_pr' at
../examples/ipsec-secgw/ipsec_worker.c:1257:4:
../examples/ipsec-secgw/ipsec_neon.h:261:21: error: 'dst_port' may be used
uninitialized [-Werror=maybe-uninitialized]
  261 |                 dlp = dst_port[i - 1];
      |                 ~~~~^~~~~~~~~~~~~~~~~
In file included from ../examples/ipsec-secgw/ipsec_worker.c:16:
../examples/ipsec-secgw/ipsec_worker.c: In function
'ipsec_poll_mode_wrkr_inl_pr':
../examples/ipsec-secgw/ipsec_lpm_neon.h:118:17:
	note: 'dst_port' declared here
  118 |         int32_t dst_port[MAX_PKT_BURST];
      |                 ^~~~~~~~

Fixes: 6eb3ba0399 ("examples/ipsec-secgw: support poll mode NEON LPM lookup")
Fixes: dcbf9ad5fd ("examples/ipsec-secgw: move fast path helper functions")
Cc: stable@dpdk.org

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-09-27 17:16:52 +02:00
Nithin Dabilpuram
79c322caa1 examples/ipsec-secgw: fix IP header manipulation
Fix issue with IP header pointer computation to pick the right offset.

Fixes: 6eb3ba0399 ("examples/ipsec-secgw: support poll mode NEON LPM lookup")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-09-27 17:16:52 +02:00
Nithin Dabilpuram
4edcee19fc examples/ipsec-secgw: use Tx checksum offload conditionally
Use Tx checksum offload only when all the ports have it enabled as
the qconf for a particular lcore stores ipv4_offloads for all the
Tx ports and each lcore can Tx to any port.

Fixes: 03128be4cd ("examples/ipsec-secgw: allow disabling some Rx/Tx offloads")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-09-27 17:16:52 +02:00
Satheesh Paul
e3b8852693 examples/ipsec-secgw: fix flow pattern buffer overrun
This patch fixes the patterns buffer overrun issue reported
by Coverity.

Coverity issue: 379236
Fixes: b3a4baf87f ("examples/ipsec-secgw: support more flow patterns and actions")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Akhil Goyal <gakhil@marvell.com>
2022-09-27 17:16:52 +02:00
Ali Alnubani
327820af90 examples/pipeline: fix build with some compilers
Fixes the following build failure with gcc 5.4.0 because
of uninitialized variables:

[..]
examples/pipeline/cli.c:1801:10: error: 'idx' may be used
  uninitialized in this function [-Werror=maybe-uninitialized]
[..]
examples/pipeline/cli.c:1916:10: error: 'idx' may be used
  uninitialized in this function [-Werror=maybe-uninitialized]
[..]

Fixes: 83f58a7b7b ("examples/pipeline: add commands for direct registers")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
2022-09-25 16:02:25 +02:00
Cristian Dumitrescu
12eda78d3a examples/pipeline: add commands for direct meters
Add the CLI command support for managing direct meters.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:43 +02:00
Cristian Dumitrescu
83f58a7b7b examples/pipeline: add commands for direct registers
Add the CLI command support for reading/writing direct registers.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:39 +02:00
David Marchand
ec5ecd7e37 dev: introduce device accessors
Prepare for making the device object opaque by adding accessors.
Update existing "external" users.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
148c51a3de bus: introduce accessors
Add helpers to get a rte_bus object details.
This will be used externally.
Internal users may still dereference a rte_bus object.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
770ebc060e bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API.
Move it to rte_eal.h.
With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h.
Fix existing code that was relying on these implicit inclusions.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
d589a8a8a7 examples/ethtool: prefer device name
Rely on the generic device name rather than restrict to only supporting
PCI devices.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:33 +02:00
David Marchand
18bdf6ab8e kni: stop populating PCI info in examples
addr and id fields are deprecated and are not used in the kni library.
Stop populating them in the in-tree examples.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:33 +02:00
Cristian Dumitrescu
67f707b354 examples/pipeline: print output port packet drop counters
Print the output port pacet drop statistics counters.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-22 16:56:58 +02:00
Dmitry Kozlyuk
72b452c5f2 eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
because they are not used by this file.
Include the needed headers directly from the files that need them.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-21 15:31:03 +02:00
Cristian Dumitrescu
d5b39b6fe9 examples/pipeline: call code generation and build commands
Update the example CLI scripts with the commands for code generation
and shared object library build.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:51:51 +02:00
Cristian Dumitrescu
c055321919 examples/pipeline: remove obsolete tap command
Remove the tap CLI command, as the file descriptor I/O ports of the
pipeline are now configured trough the I/O specification file.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:51:48 +02:00
Cristian Dumitrescu
f31c80f833 examples/pipeline: rework link command
Rework the link CLI command for better alignment with the naming
conventions used in the pipeline I/O specification file. Use the
library linked list of devices and remove the application list.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:51:42 +02:00
Cristian Dumitrescu
b9559f943c examples/pipeline: use pipeline name query API
Convert the CLI commands to use the pipeline name query API and remove
the linked list of pipeline objects previously maintained by the
application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:51:34 +02:00
Cristian Dumitrescu
a8e12d0152 examples/pipeline: remove obsolete mirroring config command
The pipeline mirroring configuration is done through the I/O
specification file, so this CLI command is no longer needed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:51:08 +02:00
Cristian Dumitrescu
2099295abf examples/pipeline: remove obsolete port config commands
The pipeline I/O ports configuration is now done through the I/O
specification file, hence these CLI commands are no longer needed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:50:11 +02:00
Cristian Dumitrescu
aed1123e83 examples/pipeline: remove obsolete create command
The pipeline configuration is now done through the I/O specification
file, hence this CLI command is no longer needed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:49:59 +02:00
Cristian Dumitrescu
6bc14d9f24 examples/pipeline: add command for shared library build
Add CLI command for the shared object library build operation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:49:51 +02:00
Cristian Dumitrescu
9043f66a33 examples/pipeline: add command for code generation
Add CLI command for the pipeline code generation operation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:47:21 +02:00
Cristian Dumitrescu
68b95704a6 pipeline: add API for shared library-based pipeline build
Previously, the pipeline build operation was done based on the
specification file (typically produced by the P4 compiler), then the C
code with optimized functions for the pipeline actions and
instructions was generated, built into a shared object library, loaded
and installed into the pipeline in a completely hardcoded and
non-customizable way.

Now, this process is split into three explicit stages:
i) code generation (specification file -> C file);
ii) code build (C file -> shared object library);
iii) code installation (library load into the pipeline).

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:46:09 +02:00
Cristian Dumitrescu
d69c90c85d pipeline: add pipeline name
Add an unique name to every pipeline. This enables the library to
maintain a list of the existing pipeline objects, which can be
queried by the application.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-15 17:06:57 +02:00
Marcin Danilewicz
a61b319674 sched: enable congestion management at runtime
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.

By default CMAN code is enabled but not in use, when
there is no RED or PIE profile configured.

Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2022-08-25 16:18:06 +02:00
Raja Zidane
14d460b888 examples/link_status_interrupt: fix stats refresh rate
TIMER_MILLISECOND is defined as the number of CPU cycles per millisecond.
The current definition is correct only for cores with frequency of 2GHz.

Use DPDK API to get CPU frequency, and to define timer period.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Signed-off-by: Omar Awaysa <omara@nvidia.com>
2022-07-08 16:44:04 +02:00
Herakliusz Lipiec
0a666b8631 examples/vhost: update usage message
updating vhost usage message to be aligned with the documentation.

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-07-01 15:49:49 +02:00
Herakliusz Lipiec
25651c5647 examples/vhost: update makefile to match Meson build
Meson build system creates a vhost binary but Makefile
and docs reference same as vhost-switch. Updating makefile
to match meson and the docs accordingly.

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-07-01 15:49:49 +02:00
Yuan Wang
1907ce4bae examples/vhost: fix retry logic on Rx path
drain_eth_rx() uses rte_vhost_avail_entries() to calculate
the available entries to determine if a retry is required.
However, this function only works with split rings, and
calculating packed rings will return the wrong value and cause
unnecessary retries resulting in a significant performance penalty.

This patch fix that by using the difference between tx/rx burst
as the retry condition.

Fixes: be800696c2 ("examples/vhost: use burst enqueue and dequeue from lib")
Cc: stable@dpdk.org

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
2022-07-01 15:49:49 +02:00
Archana Muniganti
ad42b228c6 examples/fips_validation: fix print for zero length payload
NIST GCM decrypt result vectors expects to have following print
for zero length payload instead of having no print.
"pt" = ""

Fixes: b09aac2d6e ("examples/fips_validation: add JSON to GCM test")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
2022-07-04 19:22:56 +02:00
Radu Nicolau
577c85e996 examples/ipsec-secgw: fix fallback session create
Fix fallback session create for inline sessions.

Fixes: a8ade12123 ("examples/ipsec-secgw: create lookaside sessions at init")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Tested-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2022-07-04 19:22:56 +02:00
Gowrishankar Muthukrishnan
d5c247145c examples/fips_validation: add parsing for SHA
Added function to parse algorithm for SHA test.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2022-07-04 18:15:58 +02:00
Gowrishankar Muthukrishnan
f8e431ed8f examples/fips_validation: add parsing for AES-XTS
Added function to parse algorithm for AES XTS test.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2022-06-30 06:54:21 +02:00