Commit Graph

1991 Commits

Author SHA1 Message Date
Nithin Dabilpuram
3f04555589 examples/l3fwd: fix MTU configuration with event mode
MTU configuration is missing for ethdev when using eventmode
when user provides it via "--max-pkt-len" config. It is only
done in poll mode setup. Fix the event mode setup code to
do the same.

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

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-10-11 01:34:07 +02:00
Sean Morrissey
8bcfa9cba3 examples/l3fwd: fix crash after packet match
This patch fixes a core dump which occurs on 32-bit-builds
after sending a matched packet due to overrunning an array.

Fixes: 6de0ea50e9 ("examples/l3fwd: merge l3fwd-acl example")
Cc: stable@dpdk.org

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
2022-10-11 01:34:07 +02:00
Tadhg Kearney
10db2a5b87 examples/l3fwd-power: add options for uncore frequency
Add option for setting uncore frequency min/max/index, through uncore API.
This will be set for each package and die on the SKU.
On exit, uncore min and max frequency will be reverted back
to previous frequencies.

Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2022-10-10 14:53:40 +02:00
Rahul Bhansali
ae279ac99b examples/ipsec-secgw: free event vector mbufs
Free mbufs from event vector list when enqueue operation fails
and during event port flush for cleanup.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 19:46:11 +02:00
Gowrishankar Muthukrishnan
0b65d54f3a examples/fips_validation: fix JSON buffer size
In asym op, while parsing test interim info, existing buffer of size
256 bytes is not sufficient, hence setting it to maximum that a test
would need.

Fixes: 58cc98801e ("examples/fips_validation: add JSON parsing")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 19:46:11 +02:00
Gowrishankar Muthukrishnan
8bc8ba4373 examples/fips_validation: fix SHA hash size calculation
Added function to calculate hash size for a given SHA hash algorithm.

Fixes: d5c247145c ("examples/fips_validation: add parsing for SHA")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 19:46:11 +02:00
Gowrishankar Muthukrishnan
0bd998fb4b examples/fips_validation: add interim parse writeback
Asym tests need a callback to write interim info in expected output.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:23:25 +02:00
Gowrishankar Muthukrishnan
d36e76e5ed examples/fips_validation: fix parsing test group info
If a test group does not have expected key, it should not crash.
This patch fixes parsing test group info to continue further
when a key does not exist (as in asym tests).

Fixes: 58cc98801e ("examples/fips_validation: add JSON parsing")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:22:19 +02:00
Gowrishankar Muthukrishnan
ce7ced4eed examples/fips_validation: fix crash in SHA MCT
In case of FIPS 140-2 format of test vectors in MCT test, msg is
not given in the test vector, hence pt will be NULL which test
function has to handle correctly.

Fixes: d5c247145c ("examples/fips_validation: add parsing for SHA")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Tested-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:07:55 +02:00
Gowrishankar Muthukrishnan
64569ffa0f examples/fips_validation: add TDES parsing
Added function to parse algorithm for TDES CBC and ECB tests in JSON.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:06:42 +02:00
Gowrishankar Muthukrishnan
0f42f3d603 examples/fips_validation: share callback with multiple keys
Make use of key param in test callbacks so that,
test callback can be shared with multiple keys.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:06:35 +02:00
Gowrishankar Muthukrishnan
6ea24fc7b8 examples/fips_validation: fix SHA test type parsing
Store SHA test type in its own interim info struct instead of AES.

Fixes: d5c247145c ("examples/fips_validation: add parsing for SHA")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Tested-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:00:06 +02:00
Gowrishankar Muthukrishnan
e9ec7f61da examples/fips_validation: fix memory allocation in AES MCT
Instead of allocating memory in every external iteration, do once
in the beginning of AES MCT tests and free at the end.

Fixes: 8b8546aaed ("examples/fips_validation: add parsing for AES-CBC")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 10:58:21 +02:00
Nicolas Chautru
e70212cc24 bbdev: allow operation type enum for growth
Updated the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_SIZE_MAX.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 08:44:58 +02:00
Olivier Matz
7dcd73e379 drivers/bus: set device NUMA node to unknown by default
The dev->device.numa_node field is set by each bus driver for
every device it manages to indicate on which NUMA node this device lies.

When this information is unknown, the assigned value is not consistent
across the bus drivers.

Set the default value to SOCKET_ID_ANY (-1) by all bus drivers
when the NUMA information is unavailable. This change impacts
rte_eth_dev_socket_id() in the same manner.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2022-10-06 21:26:55 +02:00
Xuan Ding
8d54b1ec4a ethdev: remove Rx header split port offload
As announced in the deprecation note, remove the Rx offload flag
'RTE_ETH_RX_OFFLOAD_HEADER_SPLIT' and 'split_hdr_size' field from
the structure 'rte_eth_rxmode'. Meanwhile, the place where the examples
and apps initialize the 'split_hdr_size' field, and where the drivers
check if the 'split_hdr_size' value is 0 are also removed.

User can still use `RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT` for per-queue packet
split offload, which is configured by 'rte_eth_rxseg_split'.

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 11:20:04 +02:00
Min Zhou
d971cf02cd examples/l3fwd: add vector stubs for LoongArch
Add missing em_mask_key() implementation to enable the l3fwd to be
run on LoongArch.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
2022-10-06 12:45:05 +02:00
Min Zhou
29631ee5c8 eal/loongarch: support LoongArch architecture
Add all necessary elements for DPDK to compile and run EAL on
LoongArch64 Soc.

This includes:

- EAL library implementation for LoongArch ISA.
- meson build structure for 'loongarch' architecture.
  RTE_ARCH_LOONGARCH define is added for architecture identification.
- xmm_t structure operation stubs as there is no vector support in
  the current version for LoongArch.

Compilation was tested on Debian and CentOS using loongarch64
cross-compile toolchain from x86 build hosts. Functions were tested
on Loongnix and Kylin which are two Linux distributions supported
LoongArch host based on Linux 4.19 maintained by Loongson
Corporation.

We also tested DPDK on LoongArch with some external applications,
including: Pktgen-DPDK, OVS, VPP.

The platform is currently marked as linux-only because there is no
other OS than Linux support LoongArch host currently.

The i40e PMD driver is disabled on LoongArch because of the absence
of vector support in the current version.

Similar to RISC-V, 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.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
2022-10-06 12:45:05 +02:00
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