GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.
Fixes: be1e533238 ("examples/qos_sched: add TC and queue config flexibility")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.
Fixes: 3d1b33e44a ("examples/eventdev: move common data into pipeline common")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.
Fixes: c19beb3f38 ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
This patch adds top level SPDX license identifiers for some of the DPDK
source and scripts, where the copyright owners have not yet agreed to
replace the full BSD-3 license plate.
This patch also add SPDX license tag for a file with no
previous license plates. (DPDK is BSD-3)
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Removed redundant function call of 'rte_eth_dev_info_get()' since it has
already been called earlier.
Coverity issue: 349922
Fixes: 2bb43bd435 ("examples/tep_term: add TSO offload configuration")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
The NIST test vectors use the string 'PTlen' to denote text lengths
in case of encrypt & decrypt operations. So the same string needs to be
used while parsing PT and CT.
Fixes: 2adb3b4e7e ("examples/fips_validation: fix AES-GCM cipher length parsing")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This patch extends creation of inline session to all the algorithms.
Previously the inline session was enabled only for AES-GCM cipher.
Fixes: 3a690d5a65 ("examples/ipsec-secgw: fix first packet with inline crypto")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The name of the static function check_cryptodev_capablity()
is fixed for the word "capability".
There is no functional change.
The same typo is fixed in a comment in ip_fragmentation example.
Fixes: 05fe65eb66 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The functions to lookup IPv4 and IPv6 were both using opaque
pointers (void *) when they should use a typed pointer instead.
The IP headers are not modified during lookup.
Get rid of unnecessary cast on the return from the function.
Replace complex trigraph expression with simple if to improve
readability.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
The initial route setup array is unmodified by the lpm code
and can be made constant. This depends on earlier patch to
fix the rte_lpm6 to use const.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Skip master lcore when assigning cores to rx_queues as it is only used
to print stats.
Fixes: 4ff457986f ("examples/l2fwd-event: add default poll mode routines")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn't exist the unlink fails and
it's ok to ignore. The second one is that unlink fails to remove
file but the next bind() would fail too.
Coverity issue: 350589, 158663
Fixes: c19beb3f38 ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Add missing BSD-3 license tag to inline fallback testing scripts.
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch fixes the cipher len keyword typo.
Fixes: 07f5e45532 ("examples/fips_validation: fix cipher length for AES-GCM")
Suggested-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Since all related queues' interrupts are turned on before epoll, we need
to turn off all the interrupts after wakeup. This patch fixes the issue
of only turning off the interrupted queues.
Fixes: b736d64787 ("examples/l3fwd-power: disable Rx interrupt when waking up")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Liang Ma <liang.j.ma@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
SIGTERM handling is added for graceful application exit.
Useful when application is terminated without specifying
any signal on 'kill' command.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
When a VM sends a command through virtio-serial to enable/disable
turbo, it is successfully enabled or disabled, yet the response to the
VM is NACK. This is because all the library frequency change APIs return
1 for success (change in frequency), 0 for success (no change in
frequency) and -1 for failure. However the turbo enable/disable APIs just
return 0 for success and -1 for failure.
Fix the handling of the return code to treat ">= 0" as success, and
send an ACK. Only send NACK when < 0 (failure).
Fixes: 0de94bcac7 ("examples/vm_power: send confirmation cmd to guest")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
The return value of the get link function call was not checked, and
could return a negative value indicating a failure. This meant the
link_status of the link being checked is invalid, because the link was
not filled with data. The return value is now checked, and if the return
value is not 0 for success, the loop continues with the next port.
To avoid confusion between variable names, the existing retval variable
is renamed to link_status, to better represent its use.
Coverity issue: 350348
Fixes: c8e6ceeceb ("examples/ioat: add new sample app for ioat driver")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The nb_dq return value from the ioat dequeue is negative in failure
cases, however the variable was an unsigned int, causing the condition
where nb_dq <= 0 to never be true. This is now cast to a signed int,
which will successfully reflect the -1 value to be used in this
conditional check.
Coverity issue: 350342
Coverity issue: 350349
Fixes: 92c981637f ("examples/ioat: handle failure case for ioat dequeue")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
patch checks the return value of function rte_eth_dev_info_get,
if return value is negative error message printed on the console.
Coverity issue: 350361
Fixes: c8e6ceeceb ("examples/ioat: add new sample app for ioat driver")
Cc: stable@dpdk.org
Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This checks the return value from the function
rte_eth_dev_set_vlan_offload.
Coverity issue: 350358
Fixes: bda68ab9d1 ("examples/ethtool: add user-space ethtool sample application")
Cc: stable@dpdk.org
Signed-off-by: Gargi Sau <gargi.sau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Enable cpu-crypto mode testing by adding dedicated environmental
variable CRYPTO_PRIM_TYPE. Setting it to 'type cpu-crypto' allows
to run test scenario with cpu crypto acceleration.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Add support for CPU accelerated crypto. 'cpu-crypto' SA type has
been introduced in configuration allowing to use abovementioned
acceleration.
Legacy mode is not currently supported.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
AES XTS support is added to fips application. Parse test-vectors
from input files, populate AES XTS tests and prepare AES XTS
operations for fips validation.
Signed-off-by: Abed Kamaluddin <akamaluddin@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Cipher length need to be updated in case of AES-GCM decryption.
Fixes: 4aaad2995e ("examples/fips_validation: support GCM parsing")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Set mbuf ptype in prepare_one_packet() after parsing ether_type.
Use mbuf ptype after to recognize packet's address family.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Introduce SAD cache.
Stores the most recent SA in a per lcore cache.
Cache represents flat array containing SA's indexed by SPI.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Get rid of maximum SP limitation.
Keep parsed SP's into the sorted by SPI value array.
Use binary search in the sorted SP array to find appropriate SP
for a given SPI.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Get rid of maximum SA limitation.
Keep parsed SA's into the sorted by SPI value array.
Use binary search in the sorted SA array to find appropriate SA
for a given SPI.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Integrate ipsec SAD support into secgw app:
1. Use SAD library for inbound SA lookup
2. Changes in struct sa_ctx:
- sa array allocates dynamically depending on number of configured sa
- All SA's are kept one by one without using SPI2IDX
3. SP's userdata now contain index of SA in sa_ctx instead of SPI
4. Get rid of SPI2IDX macro
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Add initial support for librte_ipsec SAD library
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Use RTE_DIM macro to calculate array size.
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Add graceful teardown that addresses both event mode and poll mode.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add em main loop for handling events based on capabilities of the
event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add lpm main loop for handling events based on capabilities of the
event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add service core setup when eventdev and Rx/Tx adapter don't have
internal port capability.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add event eth Rx/Tx adapter setup for both generic and internal port
event device pipelines.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add event device queue and port setup based on event eth Tx adapter
capabilities.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add ethernet port Rx/Tx queue setup for event device which are later
used for setting up event eth Rx/Tx adapters.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add event device configuration based on the capabilities of the
probed event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add infra to split eventdev framework based on event Tx adapter
capability.
If event Tx adapter has internal port capability then we use
`rte_event_eth_tx_adapter_enqueue` to transmitting packets else
we use a SINGLE_LINK event queue to enqueue packets to a service
core which is responsible for transmitting packets.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add framework to enable event device as a producer of packets.
To switch between event mode and poll mode the following options
have been added:
`--mode="eventdev"` or `--mode="poll"`
Allow the user to select the schedule type to be either
RTE_SCHED_TYPE_ORDERED, RTE_SCHED_TYPE_ATOMIC or RTE_SCHED_TYPE_PARALLEL
through:
`--eventq-sched="ordered"` or `--eventq-sched="atomic"` or
`--eventq-sched="parallel"`
Allow the user to specify the number of Rx queues to be connected to
event queue using:
`--event-eth-rxqs`
Poll mode is still the default operation mode.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Mempool ops may register in different order when compiling. The default
ops index is always zero but the wanted ops is ring_mp_mc. This patch
sets best mempool ops before generating mbuf pool to fix this issue.
Fixes: 5194299d6e ("examples/ntb: support more functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
If algo is NULL set the status to error and return. This change
prevent crashing of ipsec-secgw application when a specific
cipher/auth/aead algo are not supported by application.
Fixes: 0d547ed037 ("examples/ipsec-secgw: support configuration file")
Cc: stable@dpdk.org
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Always enable implicit release since we don't support explicit release
in datapath.
Master lcore is used only for printing stats so don't allocate event
port for it.
Fix service launch for event device without distributed scheduling.
Fixes: bcb6f841d4 ("examples/l2fwd-event: setup service core")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>