Commit Graph

1998 Commits

Author SHA1 Message Date
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
Gowrishankar Muthukrishnan
757771668b examples/fips_validation: add AES-CBC in the enum
Add algorithm enum specifically for AES_CBC instead of relying on
AES as such.

Fixes: 8b8546aaed ("examples/fips_validation: add parsing for AES-CBC")

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
Gowrishankar Muthukrishnan
0fab142833 examples/fips_validation: handle empty payload
Allocate at least onebyte to handle empty payload in a test vector
when defined.

Fixes: 3d0fad56b7 ("examples/fips_validation: add crypto FIPS application")
Cc: stable@dpdk.org

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
Rahul Bhansali
6eb3ba0399 examples/ipsec-secgw: support poll mode NEON LPM lookup
This adds the support of NEON based LPM lookup along with
multi packet processing for burst send in packets routing.

Performance impact:
On cn10k, with poll mode inline protocol, outbound performance
increased by ~8% and inbound performance increased by ~6%.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-30 06:54:21 +02:00
Rahul Bhansali
732115ce38 examples/l3fwd: move packet group function in common
This will make the packet grouping function common, so
that other examples can utilize as per need.

For each architecture sse/neon/altivec, port group
headers will be created under examples/common/<arch>.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Tested-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
2022-06-30 06:54:21 +02:00
Radu Nicolau
65bd9c7abc examples/ipsec-secgw: fix Tx checksum offload flag
For the inline crypto path set the Tx checksum offload flag
only if the device supports it.

Fixes: d24471e578 ("examples/ipsec-secgw: disable Tx checksum for inline")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-30 06:42:46 +02:00
Satheesh Paul
b3a4baf87f examples/ipsec-secgw: support more flow patterns and actions
Added support to create flow rules with count, mark and
security actions and mark pattern.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-28 10:17:02 +02:00
Abdullah Ömer Yamaç
29c1e90e65 examples/distributor: fix distributor on Rx core
This patch fixes the syntax error when using the single-core
for both Rx and distributor functions.

Fixes: 4a7f40c0ff ("examples/distributor: add dedicated core")
Cc: stable@dpdk.org

Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Tested-by: David Hunt <david.hunt@intel.com>
2022-06-26 23:30:41 +02:00
Bruce Richardson
c9d54b82c6 examples/l3fwd: add include for macro definition
The header files "l3fwd_em.h" and "l3fwd_em_sequential.h" use the
"__rte_always_inline" macro but don't directly include "rte_common.h" to
get the definition of it. This inclusion is not necessary for
compilation, but the lack of it can confuse some indexers - such as
those in eclipse, which reports the lines:

"static __rte_always_inline uint16_t"

as possible definitions of a variable called "uint16_t". This confusion
leads to uint16_t being flagged as an unknown type in all other parts of
the project being indexed, e.g. across all of DPDK code.

Adding in the include of rte_common.h makes it clear to the indexer that
those lines are  part of a function definition, and that allows eclipse
to correctly recognise uint16_t as a type from stdint.h

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-06-26 10:44:38 +02:00
Stephen Hemminger
64e14b8b07 remove unnecessary null checks
Found by nullfree.cocci.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[David: for lpm parts:]
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
[David: for vdpa/mlx5 parts:]
Acked-by: Matan Azrad <matan@nvidia.com>
[David: for dma/dpaa2, raw/ifpga, vdpa/mlx5:]
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
[David: reran cocci.sh and updated common/mlx5 and cryptodev asym test]
Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-06-24 14:51:09 +02:00
Yuan Wang
4cc4f3ee12 examples/vhost: support clear in-flight for async dequeue
This patch allows vring_state_changed() to clear in-flight
dequeue packets. It also clears the in-flight packets in
a thread-safe way in destroy_device().

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
2022-06-17 15:19:58 +02:00
Pavan Nikhilesh
31edfc4af9 examples: use mempool cache for vector pool
Use mempool cache for vector mempool as vectors are freed by the Tx
routine, also increase the minimum pool size to 512 to avoid resource
contention on Rx.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-06-13 07:58:25 +02:00
David Marchand
8d70a19417 examples/fips_validation: fix link to libjansson
When compiling this example out of DPDK, linking the executable fails
with:

  ## Building fips_validation
  /usr/bin/ld: /tmp/ccQjeHBg.o: in function `fips_test_init':
  fips_validation.c:(.text+0x7ab): undefined reference to `json_loadf'
  /usr/bin/ld: /tmp/ccQjeHBg.o: in function
     `fips_test_parse_one_json_vector_set':
  fips_validation.c:(.text+0xc2e): undefined reference to `json_object_get'
  /usr/bin/ld: fips_validation.c:(.text+0xc36): undefined reference to
     `json_string_value'
  /usr/bin/ld: /tmp/ccQjeHBg.o: in function `fips_test_parse_one_json_group':
  fips_validation.c:(.text+0xd00): undefined reference to `json_object_get'
  /usr/bin/ld: fips_validation.c:(.text+0xd14): undefined reference to
     `json_integer_value'
  ...

Code in an example can't rely on RTE_HAS_JANSSON, because it only
indicates that the jansson library was available at the time of dpdk
compilation.

Prefer a local build flag (like what is done in vm_power_manager).
And add linking to libjansson, if available.

Fixes: f556293fd5 ("examples/fips_validation: add JSON info to header")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
2022-06-21 20:04:50 +02:00
Radu Nicolau
82df99aa46 examples/ipsec-secgw: fix packet type parsing
Add new packet type flags instead of overwriting.

Fixes: d04bb1c526 ("examples/ipsec-secgw: use HW parsed packet type in poll mode")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-21 20:04:49 +02:00
Volodymyr Fialko
5401bdc17b examples/ipsec-secgw: add option for descriptors per QP
Added option to configure number of queue pair descriptors via command
line (--desc-nb NUMBER_OF_DESC).

When the crypto processing takes longer durations, small queue pair size
would result in cryptodev enqueue failures. Larger queue pair size would
allow more packets to stay in flight simultaneously and reduce enqueue
failures.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-21 20:04:49 +02:00
Radu Nicolau
3e534bc81a examples/ipsec-secgw: fix ESN setting
Fix ESN option flag and initial value for the rte_ipsec library path.

Fixes: 560029d5cf ("examples/ipsec-secgw: define initial ESN value")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2022-06-21 20:04:49 +02:00
Radu Nicolau
5051dc42a1 examples/ipsec-secgw: fix NAT-T header fields
Use the proper IP protocol (UDP instead of ESP) and set the ports when
UDP encapsulation is enabled.

Fixes: 9ae86b4cfc ("examples/ipsec-secgw: support UDP encap for inline crypto")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2022-06-21 20:04:49 +02:00
Cristian Dumitrescu
a1b2afe431 pipeline: rework optimization pattern for header generation
The P4 language requires marking a header as valid before any of the
header fields are written as opposed to after the writes are done.
Hence, the optimization of replacing the sequence of instructions to
generate a header by reading it from the table action data with a
single DMA internal instruction are reworked from "mov all + validate
-> dma" to "validate + mov all -> dma".

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-06-20 16:14:50 +02:00
Sean Morrissey
6de0ea50e9 examples/l3fwd: merge l3fwd-acl example
l3fwd-acl contains duplicate functions to l3fwd.
For this reason we merge l3fwd-acl code into l3fwd
with '--lookup acl' cmdline option to run ACL.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2022-06-08 12:09:05 +02:00
Stanislaw Kardach
3cc977704b examples/l3fwd: add vector stubs for RISC-V
Add missing em_mask_key() implementation and fix l3fwd_common.h
inclusion in FIB lookup functions to enable the l3fwd to be run on
RISC-V.

Sponsored-by: Frank Zhao <frank.zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
2022-06-08 11:26:34 +02:00
Michal Mazurek
f22e705ebf eal/riscv: support RISC-V architecture
Add all necessary elements for DPDK to compile and run EAL on SiFive
Freedom U740 SoC which is based on SiFive U74-MC (ISA: rv64imafdc)
core complex.

This includes:

- EAL library implementation for rv64imafdc ISA.
- meson build structure for 'riscv' architecture. RTE_ARCH_RISCV define
  is added for architecture identification.
- xmm_t structure operation stubs as there is no vector support in the
  U74 core.

Compilation was tested on Ubuntu and Arch Linux using riscv64 toolchain.
Clang compilation currently not supported due to issues with missing
relocation relaxation.

Two rte_rdtsc() schemes are provided: stable low-resolution using rdtime
(default) and unstable high-resolution using rdcycle. User can override
the scheme by defining RTE_RISCV_RDTSC_USE_HPM=1 during compile time of
both DPDK and the application. The reasoning for this is as follows.
The RISC-V ISA mandates that clock read by rdtime has to be of constant
period and synchronized between all hardware threads within 1 tick
(chapter 10.1 in version 20191213 of RISC-V spec).
However this clock may not be of high-enough frequency for dataplane
uses. I.e. on HiFive Unmatched (FU740) it is 1MHz.
There is a high-resolution alternative in form of rdcycle which is
clocked at the core clock frequency. The drawbacks are that it may be
disabled during sleep (WFI), its frequency might change due to DVFS and
it is core-local and therefore cannot be used as a wall-clock. It can
however be used for micro-benchmarking user applications, similarly to
Aarch64's PMCCNTR PMU counter.

The platform is currently marked as linux-only because rte_cycles
implementation uses the timebase-frequency device-tree node read through
the proc file system. Such approach was chosen because Linux kernel
depends on the presence of this device-tree node.

The i40e PMD driver is disabled on RISC-V as the rv64gc ISA has no vector
operations.

The compilation of following modules has been disabled by this commit
and will be re-enabled in later commits as fixes are introduced:
net/ixgbe, net/memif, net/tap, example/l3fwd.

Sponsored-by: Frank Zhao <frank.zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Michal Mazurek <maz@semihalf.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
2022-06-08 11:26:20 +02:00
Bruce Richardson
013b4c52c7 replace zero-length arrays with flexible ones
This patch replaces instances of zero-sized arrays i.e. those at the end
of structures with "[0]" with the more standard syntax of "[]".
Replacement was done using coccinelle script, with some revert and
cleanup of whitespace afterwards.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-06-07 16:44:21 +02:00
Ali Alnubani
77dd857d30 examples/pipeline: fix build
This patch fixes the following build failure seen on Ubuntu 16.04
with gcc 5.4.0 because of uninitialized variable:
  [..]
  examples/pipeline/cli.c:2853:9: error: 'session_id' may be used
    uninitialized in this function [-Werror=maybe-uninitialized]
  [..]

Fixes: 172254555f ("examples/pipeline: support packet mirroring")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-06-07 13:12:19 +02:00
Chengwen Feng
bebbf07219 examples/dma: add force minimal copy size parameter
This patch adds force minimal copy size parameter
(-m/--force-min-copy-size), so when do copy by CPU or DMA, the real copy
size will be the maximum of mbuf's data_len and this parameter.

This parameter was designed to compare the performance between CPU copy
and DMA copy. User could send small packets with a high rate to drive
the performance test.

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-06-06 23:32:32 +02:00
Chengwen Feng
7d3cb76fba examples/dma: fix Tx drop statistics
The Tx drop statistic was designed to be collected by
rte_eth_dev_tx_buffer mechanism, but the application uses
rte_eth_tx_burst to send packets and this lead the Tx drop statistic
was not collected.

This patch removes rte_eth_dev_tx_buffer mechanism to fix the problem.

Fixes: 632bcd9b5d ("examples/ioat: print statistics")
Cc: stable@dpdk.org

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-06-06 23:31:33 +02:00
Huisong Li
e0e95de2be examples/dma: fix MTU configuration
The MTU in dma App can be configured by 'max_frame_size' parameters which
have a default value(1518). It's not reasonable to use it directly as MTU.
This patch fix it.

Fixes: 1bb4a528c4 ("ethdev: fix max Rx packet length")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
2022-06-06 23:31:31 +02:00
Yuan Wang
6f3d83c7f2 examples/vhost: fix crash when no VMDq
If the VMDq limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.

Fixes: d19533e86f ("examples/vhost: copy old vhost example")
Cc: stable@dpdk.org

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-06-01 11:50:10 +02:00
Andy Pei
d549914998 examples/vdpa: support virtio block device
Add virtio blk device support to vDPA example.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-06-01 11:50:10 +02:00
Xuan Ding
a543dcb70c examples/vhost: support async dequeue data path
This patch adds the use case for async dequeue API. Vswitch can
leverage DMA device to accelerate vhost async dequeue path.

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Tested-by: Yvonne Yang <yvonnex.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-06-01 11:50:09 +02:00
Kevin Laatz
59f2853c4c examples/l3fwd_power: add configuration options
Add CLI options to l3fwd_power to utilize the new power APIs introduced in
this patchset. These CLI options allow the user to configure the
heuritstics made available through the new API via the l3fwd_power
application options.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-06-04 22:41:24 +02:00
Gagandeep Singh
76fbba2856 examples/l2fwd-crypto: add signal handler for exit
Handle SIGINT and SIGTERM signals.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:35 +02:00
Gagandeep Singh
923b5f2765 examples/ipsec-secgw: support XCBC-MAC/DES-CBC
ipsec-secgw application is updated to support
DES-CBC ciphering and XCBC-MAC authentication
based IPsec functionality.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:35 +02:00
Gowrishankar Muthukrishnan
8b8546aaed examples/fips_validation: add parsing for AES-CBC
Added function to parse algorithm for AES_CBC test.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
07da56a68d examples/fips_validation: add parsing for CMAC
Added function to parse algorithm for CMAC test.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
d3b50557f9 examples/fips_validation: implement JSON CMAC test
Implemented JSON support for the CMAC test.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
443c93d804 examples/fips_validation: add JSON for HMAC
Added JSON support for the HMAC algorithm.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
b09aac2d6e examples/fips_validation: add JSON to GCM test
Added JSON-specific testing and writeback functions which allows
the user to test AES-GCM vector sets.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
89be27e3ff examples/fips_validation: allow JSON file as input
Added the ability to use the JSON format as the input
and output of the example application.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
58cc98801e examples/fips_validation: add JSON parsing
Added functions to parse the required information from a vector set
given in the new JSON format.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
f556293fd5 examples/fips_validation: add JSON info to header
Added JSON-specific functions and other information needed to
test the new FIPS test vectors.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Brandon Lo
1230526d13 examples/fips_validation: add jansson dependency
Added a check for RTE_HAS_JANSSON into the meson
configuration file for JSON support.

Signed-off-by: Brandon Lo <blo@iol.unh.edu>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
2022-06-01 16:26:35 +02:00
Nithin Dabilpuram
23d3a468c4 examples/ipsec-secgw: fix promiscuous mode option
Currently default value of promiscuous mode flag is true and
even there is command line argument to set it to true.
So it never is in non-promiscuous mode. Fix it by
changing default value to false.

Fixes: d299106e8e ("examples/ipsec-secgw: add IPsec sample application")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Volodymyr Fialko
a8ade12123 examples/ipsec-secgw: create lookaside sessions at init
In event lookaside mode same session could be handled with multiple
cores, and session creation in datapath will cause situation where
multiple cores will try to create same session simultaneously.
To avoid such case and enable event lookaside mode in future, lookaside
sessions are now created at initialization in sa_add_rules().

All sessions(inline and lookaside) now created during init process, so
session pool information was removed from ipsec context. Core id was
added to obtain correct crypto device queue pair for the current core.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Volodymyr Fialko
8e814e18c1 examples/ipsec-secgw: destroy lookaside sessions
Lookaside mode also creates security and crypto sessions that needs to
be destroyed after they are no longer used.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Volodymyr Fialko
0b512a92b7 examples/ipsec-secgw: fix uninitialized memory access
rte_flow_validate and rte_flow_create not always initialize flow error.
Using error.message in some error cases will cause read from
uninitialized memory.

Fixes: 6738c0a956 ("examples/ipsec-secgw: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Nithin Dabilpuram
0d76e22d11 examples/ipsec-secgw: add poll mode worker for inline proto
Add separate worker thread when all SA's are of type
inline protocol offload and librte_ipsec is enabled
in order to make it more optimal for that case.
Current default worker supports all kinds of SA leading
to doing lot of per-packet checks and branching based on
SA type which can be of 5 types of SA's.

Also make a provision for choosing different poll mode workers
for different combinations of SA types with default being
existing poll mode worker that supports all kinds of SA's.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Nithin Dabilpuram
4fbfa6c7c9 examples/ipsec-secgw: update eth header during route lookup
Update ethernet header during route lookup instead of doing
way later while performing Tx burst. Advantages to doing
is at route lookup is that no additional IP version checks
based on packet data are needed and packet data is already
in cache as route lookup is already consuming that data.

This is also useful for inline protocol offload cases
of v4inv6 or v6inv4 outbound tunnel operations as
packet data will not have any info about what is the tunnel
protocol.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Nithin Dabilpuram
c7e6d808e5 examples/ipsec-secgw: get security context from lcore conf
Store security context pointer in lcore Rx queue config and
get it from there in fast path for better performance.
Currently rte_eth_dev_get_sec_ctx() which is meant to be control
path API is called per packet basis. For every call to that
API, ethdev port status is checked.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Nithin Dabilpuram
a2b445b810 examples/ipsec-secgw: allow larger burst size for vectors
Allow larger burst size of vector event mode instead of restricting
to 32. Also restructure traffic type struct to have num pkts first
so that it is always in first cacheline. Also cache align
traffic type struct. Since MAX_PKT_BURST is not used by
vector event mode worker, define another macro for its burst
size so that poll mode perf is not effected.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:34 +02:00
Nithin Dabilpuram
d04bb1c526 examples/ipsec-secgw: use HW parsed packet type in poll mode
Use HW parsed packet type when ethdev supports necessary protocols.
If packet type is not supported, then register ethdev callbacks
for parse packet in SW. This is better for performance as it
effects fast path.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:33 +02:00
Nithin Dabilpuram
d24471e578 examples/ipsec-secgw: disable Tx checksum for inline
Enable Tx IPv4 checksum offload only when Tx inline crypto, lookaside
crypto/protocol or cpu crypto is needed.
For Tx Inline protocol offload, checksum computation
is implicitly taken care by HW.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
2022-06-01 16:26:33 +02:00
Nithin Dabilpuram
dcbf9ad5fd examples/ipsec-secgw: move fast path helper functions
Move fast path helper functions to header file for easy access.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-06-01 16:26:33 +02:00
Cristian Dumitrescu
d65c56c443 examples/pipeline: support hash functions
Add example for hash function operation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-06-01 16:09:46 +02:00
Cristian Dumitrescu
80dd28aff8 examples/pipeline: improve learner table timers
Added the rearm counter to the statistics. Updated the learner table
example to the new learner table timer operation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-06-01 15:22:41 +02:00
Cristian Dumitrescu
49b3e173c7 examples/pipeline: add packet recirculation example
Add example program to illustrate packet recirculation.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-06-01 15:04:34 +02:00
Cristian Dumitrescu
5e54e2e004 examples/pipeline: add packet mirroring example
Add example program to illustrate packet mirroring.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-06-01 15:04:34 +02:00
Cristian Dumitrescu
172254555f examples/pipeline: support packet mirroring
Add CLI commands for packet mirroring.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-06-01 15:04:34 +02:00
Thomas Monjalon
64fcadeac0 avoid AltiVec keyword vector
The AltiVec header file is defining "vector", except in C++ build.
The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector",
so we will be able to #undef vector after including AltiVec header.

Later it may become possible to #undef vector in rte_altivec.h
with a compatibility breakage.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
2022-05-25 11:49:39 +02:00
Stanislaw Kardach
a137eb2b25 examples/l3fwd: fix scalar LPM
The lpm_process_event_pkt() can either process a packet using an
architecture specific (defined for X86/SSE, ARM/Neon and PPC64/Altivec)
path or a scalar one. The choice is however done using an ifdef
pre-processor macro. Because of that the scalar version was apparently
not widely exercised/compiled.
Due to some copy/paste errors, the scalar logic in
lpm_process_event_pkt() retained a "continue" statement where it should
utilize rfc1812_process() and return the port/BAD_PORT.

Fixes: 99fc91d180 ("examples/l3fwd: add event lpm main loop")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-05-23 15:26:09 +02:00
Pavan Nikhilesh
aae4f5e06f examples: use event port quiescing
Quiesce event ports used by the workers core on exit to free up
any outstanding resources.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:30 +02:00
Pavan Nikhilesh
22bfcba4f9 examples/ipsec-secgw: cleanup worker state before exit
Event ports are configured to implicitly release the scheduler contexts
currently held in the next call to rte_event_dequeue_burst().
A worker core might still hold a scheduling context during exit as the
next call to rte_event_dequeue_burst() is never made.
This might lead to deadlock based on the worker exit timing and when
there are very less number of flows.

Add a cleanup function to release any scheduling contexts held by the
worker by using RTE_EVENT_OP_RELEASE.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:24 +02:00
Pavan Nikhilesh
622ebb6b4a examples/l2fwd-event: clean up worker state before exit
Event ports are configured to implicitly release the scheduler contexts
currently held in the next call to rte_event_dequeue_burst().
A worker core might still hold a scheduling context during exit, as the
next call to rte_event_dequeue_burst() is never made.
This might lead to deadlock based on the worker exit timing and when
there are very less number of flows.

Add clean up function to release any scheduling contexts held by the
worker by using RTE_EVENT_OP_RELEASE.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:22 +02:00
Pavan Nikhilesh
55b22fb3e9 examples/l3fwd: clean up worker state before exit
Event ports are configured to implicitly release the scheduler contexts
currently held in the next call to rte_event_dequeue_burst().
A worker core might still hold a scheduling context during exit, as the
next call to rte_event_dequeue_burst() is never made.
This might lead to deadlock based on the worker exit timing and when
there are very less number of flows.

Add clean up function to release any scheduling contexts held by the
worker by using RTE_EVENT_OP_RELEASE.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:19 +02:00
Pavan Nikhilesh
d80176a071 examples/eventdev: clean up worker state before exit
Event ports are configured to implicitly release the scheduler contexts
currently held in the next call to rte_event_dequeue_burst().
A worker core might still hold a scheduling context during exit, as the
next call to rte_event_dequeue_burst() is never made.
This might lead to deadlock based on the worker exit timing and when
there are very less number of flows.

Add clean up function to release any scheduling contexts held by the
worker by using RTE_EVENT_OP_RELEASE.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-05-17 16:43:17 +02:00
David Marchand
e4b12ba5d5 vhost: refactor messages handlers declaration
Move message handler description and callbacks into a single array and
remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-05-09 21:39:42 +02:00
Xuan Ding
a548f7d53a examples/vhost: use API to check in-flight packets
In async data path, call rte_vhost_async_get_inflight_thread_unsafe()
API to directly return the number of in-flight packets instead of
maintaining a local variable.

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-05-09 21:15:38 +02:00
Raja Zidane
af676be9e6 examples/l2fwd-crypto: fix stats refresh rate
TIMER_MILLISECOND is defined as the number of cpu cycles per millisecond,
current definition is correct for cores with frequency of 2GHZ, for cores
with different frequency, it caused different periods between refresh,
(i.e. the definition is about 14ms on ARM cores).
The devarg that stated the period between stats print was not used,
instead, it was always defaulted to 10 seconds (on 2GHZ core).

Use DPDK API to get CPU frequency, to define TIMER_MILLISECOND.
Use the refresh period devarg instead of defaulting to 10s always.

Fixes: 387259bd6c ("examples/l2fwd-crypto: add sample application")
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:48:30 +02:00
Mattias Rönnblom
03382cf411 examples/bond: fix invalid use of trylock
The conditional rte_spinlock_trylock() was used as if it is an
unconditional lock operation in a number of places.

Fixes: cc7e8ae84f ("examples/bond: add example application for link bonding mode 6")
Cc: stable@dpdk.org

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2022-04-14 14:38:20 +02:00
Rahul Bhansali
0490d69d58 examples/l3fwd: fix buffer overflow in Tx
This patch fixes the stack buffer overflow error reported
from AddressSanitizer.
Function send_packetsx4() tries to access out of bound data
from rte_mbuf and fill it into TX buffer even in the case
where no pending packets (len = 0).
Performance impact:- No

ASAN error report:-
==819==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xffffe2c0dcf0 at pc 0x0000005e791c bp 0xffffe2c0d7e0 sp 0xffffe2c0d800
READ of size 8 at 0xffffe2c0dcf0 thread T0
 #0 0x5e7918 in send_packetsx4 ../examples/l3fwd/l3fwd_common.h:251
 #1 0x5e7918 in send_packets_multi ../examples/l3fwd/l3fwd_neon.h:226

Fixes: 96ff445371 ("examples/l3fwd: reorganise and optimize LPM code path")
Cc: stable@dpdk.org

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2022-03-15 01:14:56 +01:00
Tianli Lai
2e7997ce58 examples/kni: add missing trailing newline in log
Add CR character at print link state information.

Fixes: db4e81351f ("examples: use new link status print format")
Cc: stable@dpdk.org

Signed-off-by: Tianli Lai <laitianli@tom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-03-08 14:27:11 +01:00
Wenwu Ma
1c839246f9 examples/multi_process: make RSS and checksum optional
The default values of rx mq_mode and rx offloads for port
will cause symmetric_mp startup failure if the port do not
support rss or csum. This patch makes the app to reconfigure
the NIC without them. Only quit the app if the second
reconfiguration fails.

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
2022-03-08 14:20:11 +01:00
Chuanshe Zhang
750c177980 examples/flow_classify: fix failure message
Fixes: bab16ddaf2 ("examples/flow_classify: add sample application")
Cc: stable@dpdk.org

Signed-off-by: Chuanshe Zhang <zhangchuanshe@icloudshield.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2022-03-08 14:17:27 +01:00
Honnappa Nagarahalli
e7f6d1289b examples/distributor: reduce Tx queue number to 1
Distributor application creates one Tx queue per core. However
the transmit is done only from a single core. Hence creating
one Tx queue is enough.

Fixes: 07db4a9750 ("examples/distributor: new sample app")
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-08 12:38:39 +01:00
Honnappa Nagarahalli
8efffaec56 examples/l3fwd: make Rx and Tx queue size configurable
Make Rx and Tx queue sizes configurable from the command line.
This helps DTS write better test cases.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-08 10:22:12 +01:00
Honnappa Nagarahalli
e7a7add13a examples/l3fwd: share queue size variables
nb_rxd and nb_txd are used in polling mode and event mode of
operation. nb_rxd and nb_txd are already global in polling mode
but are not visible to event mode code. Make them visible to all
parts of the application.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Yingya Han < yingyax.han@intel.com>
2022-03-08 10:21:49 +01:00
Sean Morrissey
e7e6dd6430 examples/l3fwd: support config file for EM
Add support to define ipv4 and ipv6 forwarding tables
from reading from a config file for EM with a format
similar to l3fwd-acl one.

Users can now use the default hardcoded route tables
or optionally config files for 'l3fwd_em'. Default
config files have been provided for use with EM.

Related l3fwd docs have been updated to reflect these
changes.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2022-03-08 09:59:53 +01:00