dpdk.git
4 years agocommon/sfc_efx/base: add MAE definitions to MCDI
Andrew Rybchenko [Tue, 20 Oct 2020 09:12:41 +0000 (10:12 +0100)]
common/sfc_efx/base: add MAE definitions to MCDI

MAE stands for Match-Action-Engine and will be used to
support rte_flow API transfer rules.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agoapp/testpmd: fix bonding xmit balance policy command
Min Hu (Connor) [Tue, 20 Oct 2020 03:04:16 +0000 (11:04 +0800)]
app/testpmd: fix bonding xmit balance policy command

Currently there exists inconsistency about name of transmission
policy for a Link Bonding device. "xmit_balance_policy" is not
correct, which should be modified to "balance_xmit_policy".

Fixes: 2950a769315e ("bond: testpmd support")
Fixes: ac718398f477 ("doc: testpmd application user guide")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/softnic: fix out-of-bound access
Savinay Dharmappa [Mon, 19 Oct 2020 11:52:16 +0000 (12:52 +0100)]
net/softnic: fix out-of-bound access

This patch fixes out of bound access of an array.

Coverity issue: 363466, 363459
Fixes: b5dfa6703d49 ("net/softnic: update subport rate dynamically")
Cc: stable@dpdk.org
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agonet/ice: support ACL filter in DCF
Simei Su [Tue, 20 Oct 2020 11:32:42 +0000 (19:32 +0800)]
net/ice: support ACL filter in DCF

Add ice_acl_create_filter to create a rule and ice_acl_destroy_filter
to destroy a rule. If a flow is matched by ACL filter, filter rule
will be set to HW. Currently IPV4/IPV4_UDP/IPV4_TCP/IPV4_SCTP pattern
and drop action are supported.

Signed-off-by: Simei Su <simei.su@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: get PF VSI map
Simei Su [Tue, 20 Oct 2020 11:32:41 +0000 (19:32 +0800)]
net/ice: get PF VSI map

This patch gets PF vsi number when issuing ACL rule in DCF.

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/iavf: fix unchecked Tx cleanup error
Leyi Rong [Mon, 19 Oct 2020 05:42:53 +0000 (13:42 +0800)]
net/iavf: fix unchecked Tx cleanup error

Coverity complains of unchecked return value warning of
iavf_xmit_cleanup, while this cleanup is opportunistic and will not cause
problems if it fails. So instead of checking the return value of
iavf_xmit_cleanup and return in case of cleanup failure, we directly cast
it to void function to make the Coverity happy.

Coverity issue: 363045
Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")
Cc: stable@dpdk.org
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix SCTP RSS configuration
Junyu Jiang [Tue, 20 Oct 2020 08:50:51 +0000 (08:50 +0000)]
net/ice: fix SCTP RSS configuration

This patch configured RSS for sctp with IP address
and port as input set.

Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice/base: fix bitmap set function
Simei Su [Tue, 20 Oct 2020 08:46:39 +0000 (16:46 +0800)]
net/ice/base: fix bitmap set function

This patch corrects an upper limit value in for loop.

Fixes: dd4a3cef556a ("net/ice/base: introduce and use bitmap set API")
Cc: stable@dpdk.org
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/iavf: fix adding multicast MAC address
Guinan Sun [Thu, 15 Oct 2020 08:43:05 +0000 (08:43 +0000)]
net/iavf: fix adding multicast MAC address

When the multicast address list is added, it will flush
previous addresses first, and then add new ones.
If the number of multicast address in the list exceeds
the upper limit, it will cause failure, then need to
roll back previous addresses. This patch fixes the issue.

Fixes: 05e4c3aff35f ("net/iavf: support multicast configuration")
Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
4 years agonet/mlx5: support query of age action
Dekel Peled [Mon, 19 Oct 2020 13:52:50 +0000 (16:52 +0300)]
net/mlx5: support query of age action

Recent patch [1] adds to ethdev the API for query of age action.
This patch implements in MLX5 PMD the query of age action using
this API.

[1] https://mails.dpdk.org/archives/dev/2020-October/184864.html

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
4 years agonet/mlx5: log LRO minimal size
Dekel Peled [Thu, 15 Oct 2020 13:37:09 +0000 (16:37 +0300)]
net/mlx5: log LRO minimal size

Add debug printout showing HCA capability lro_min_mss_size - the
minimal size of TCP segment required for coalescing.
MLX5 PMD documentation is updated to note this condition.

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
4 years agonet/mlx5: fix use of atomic cmpset for age state
Dekel Peled [Thu, 15 Oct 2020 11:44:24 +0000 (14:44 +0300)]
net/mlx5: fix use of atomic cmpset for age state

According to documentation [1], function rte_atomic16_cmpset()
return value is non-zero on success; 0 on failure.
In existing code this function is called, and the return value
is compared to AGE_CANDIDATE, which is defined as 1.
Such comparison is incorrect and can lead to unwanted behavior.

This patch updates the calls to rte_atomic16_cmpset(), to check
that the return value is 0 or non-zero.

[1] https://doc.dpdk.org/api/rte__atomic_8h.html

Fixes: fa2d01c87d2b ("net/mlx5: support flow aging")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
4 years agonet/mlx5: enforce limitation on IPv6 next protocol
Dekel Peled [Thu, 15 Oct 2020 14:05:57 +0000 (17:05 +0300)]
net/mlx5: enforce limitation on IPv6 next protocol

Due to PRM requirement, the IPv6 header item 'proto' field, indicating
the next header protocol, should not be set as extension header.
This patch adds the relevant validation, and documents the limitation.

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agonet/mlx5: support match on IPv6 fragment extension
Dekel Peled [Thu, 15 Oct 2020 14:05:56 +0000 (17:05 +0300)]
net/mlx5: support match on IPv6 fragment extension

rte_flow update, following RFC [1], added to ethdev the rte_flow item
ipv6_frag_ext.
This patch adds to MLX5 PMD the option to match on this item type.

[1] http://mails.dpdk.org/archives/dev/2020-March/160255.html

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agonet/mlx5: support match on IPv6 fragment packets
Dekel Peled [Thu, 15 Oct 2020 14:05:55 +0000 (17:05 +0300)]
net/mlx5: support match on IPv6 fragment packets

This patch adds to MLX5 PMD the support of matching on IPv6
fragmented and non-fragmented packets, using the new field
has_frag_ext, added to rte_flow following RFC [1].

[1] https://mails.dpdk.org/archives/dev/2020-August/177257.html

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agonet/mlx5: support match on IPv4 fragment packets
Dekel Peled [Thu, 15 Oct 2020 14:05:54 +0000 (17:05 +0300)]
net/mlx5: support match on IPv4 fragment packets

This patch adds to MLX5 PMD the support of matching on IPv4
fragmented and non-fragmented packets, using the IPv4 header
fragment_offset field.

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agonet/mlx5: remove handling of ICMP fragmented packets
Dekel Peled [Thu, 15 Oct 2020 14:05:53 +0000 (17:05 +0300)]
net/mlx5: remove handling of ICMP fragmented packets

Commit [1] forced setting of match on 'frag' bit mask 1 and value 0.
Previous patch in this series added support of match on fragmented and
non-fragmented packets on L3 items, so this setting is now redundant.

This patch removes the changes done in [1].

[1] commit 85407db9f60d ("net/mlx5: fix matching for ICMP fragments")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agonet/mlx5/linux: fix Tx queue operations decision
Matan Azrad [Thu, 15 Oct 2020 06:38:13 +0000 (06:38 +0000)]
net/mlx5/linux: fix Tx queue operations decision

One of the conditions to create Tx queue object by DevX is to be sure
that the DPDK mlx5 driver is not going to be the E-Switch manager of
the device. The issue is with the default FDB flows managed by the
kernel driver, which are not created by the kernel when the Tx queues
are created by DevX.

The current decision is to create the Tx queues by Verbs when E-Switch
is enabled while the current behavior uses an opposite condition to
create them by DevX.

Create the Tx queues by Verbs when E-Switch is enabled.

Fixes: 86d259cec852 ("net/mlx5: separate Tx queue object creations")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
4 years agonet/mlx5: fix event queue number query
Matan Azrad [Thu, 15 Oct 2020 06:38:12 +0000 (06:38 +0000)]
net/mlx5: fix event queue number query

When a Rx\Tx queue is created by DevX, its CQ configuration should
include the EQ number of the interrupts.
The EQ is managed by the kernel and there is a glue API in order to
query the EQ number from the kernel.
The EQ query API gets a vector number specifies the kernel vector of
the interrupt handling.

The vector number was wrongly detected according to the configuration
CPU instead of using the device attributes of the supported vectors.
The CPU was wrongly detected by the rte_lcore_to_cpu_id API without any
check, and in case of non-EAL thread context the value was 0xFFFFFFFF
which caused a failure in the EQ number query API.

Use vector 0 for each EQ number query which must be supported by the
kernel.

Fixes: 08d1838f645a ("net/mlx5: implement CQ for Rx using DevX API")
Fixes: d133f4cdb706 ("net/mlx5: create clock queue for packet pacing")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
4 years agonet/mlx5: fix Tx queue release
Matan Azrad [Thu, 15 Oct 2020 06:38:11 +0000 (06:38 +0000)]
net/mlx5: fix Tx queue release

The HW objects of the Tx queue is created/destroyed in the device
start\stop stage while the ethdev configurations for the Tx queue
starts from the tx_queue_setup stage.
The PMD should save all the last configurations it got from the ethdev
and to apply them to the device in the dev_start operation.

Wrongly, last code added to mitigate the reference counters didn't take
into account the above rule and combined the configurations and HW
objects to be created\destroyed together.

This causes to memory leak and other memory issues.

Make sure the HW object is released in stop operation when there is no
any reference to it while the configurations stay saved.

Fixes: 17a57183c0eb ("net/mlx5: mitigate Tx queue reference counters")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
4 years agonet/mlx5: fix Rx queue release
Matan Azrad [Thu, 15 Oct 2020 06:38:10 +0000 (06:38 +0000)]
net/mlx5: fix Rx queue release

The HW objects of the Rx queue is created/destroyed in the device
start\stop stage while the ethdev configurations for the Rx queue
starts from the rx_queue_setup stage.
The PMD should save all the last configurations it got from the ethdev
and to apply them to the device in the dev_start operation.

Wrongly, last code added to mitigate the reference counters didn't take
into account the above rule and combined the configurations and HW
objects to be created\destroyed together.

This causes to memory leak and other memory issues.

Make sure the HW object is released in stop operation when there is no
any reference to it while the configurations stay saved.

Fixes: 24e4b650badc ("net/mlx5: mitigate Rx queue reference counters")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
4 years agometrics: fix memory leak on allocation failure
Ciara Power [Thu, 17 Sep 2020 15:03:41 +0000 (16:03 +0100)]
metrics: fix memory leak on allocation failure

If an error occurred when allocating memory for metrics or names,
the function returned without freeing allocated memory. This is now
fixed to avoid the resource leak in the case that either metrics or
names had been successfully allocated memory.

Coverity issue: 362053
Fixes: c5b7197f662e ("telemetry: move some functions to metrics library")
Cc: stable@dpdk.org
Reported-by: Gaurav Singh <gaurav1086@gmail.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agoeal: fix power intrinsics API description
Anatoly Burakov [Mon, 2 Nov 2020 12:57:36 +0000 (12:57 +0000)]
eal: fix power intrinsics API description

Currently, the intrinsics documentation refers to `rte_cpu_get_features`
as a check for whether these intrinsics are supported at runtime. This
is incorrect, because actually the user should use the
`rte_cpu_get_intrinsics_support` API to do said check. Fix the typo.

Fixes: 128021421256 ("eal: add intrinsics support check infrastructure")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
4 years agogso: fix mbuf freeing responsibility
Yi Yang [Mon, 26 Oct 2020 06:47:13 +0000 (14:47 +0800)]
gso: fix mbuf freeing responsibility

rte_gso_segment decreased refcnt of pkt by one, but
it is wrong if pkt is external mbuf, pkt won't be
freed because of incorrect refcnt, the result is
application can't allocate mbuf from mempool because
mbufs in mempool are run out of.

One correct way is application should call
rte_pktmbuf_free after calling rte_gso_segment to free
pkt explicitly. rte_gso_segment must not handle it, this
should be responsibility of application.

This commit changed rte_gso_segment in functional behavior
and return value, so the application must take appropriate
actions according to return values, "ret < 0" means it
should free and drop 'pkt', "ret == 0" means 'pkt' isn't
GSOed but 'pkt' can be transmitted as a normal packet,
"ret > 0" means 'pkt' has been GSOed into two or multiple
segments, it should use "pkts_out" to transmit these
segments. The application must free 'pkt' after call
rte_gso_segment when return value isn't equal to 0.

Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO")
Cc: stable@dpdk.org
Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoeal/windows: fix deadlock when setting alarm
Dmitry Kozlyuk [Fri, 30 Oct 2020 18:42:16 +0000 (21:42 +0300)]
eal/windows: fix deadlock when setting alarm

Windows alarms are both armed and executed from the interrupt thread.
rte_eal_alarm_set() dispatched alarm-arming code to that thread and
waited for its completion via a spinlock. However, if called from alarm
callback (i.e. from the interrupt thread), this caused a deadlock,
because arming could not be run until its dispatcher exits, but it could
only exit after it finished waiting for arming to complete.

Call arming code directly when running in the interrupt thread.

Fixes: f4cbdbc7fbd2 ("eal/windows: implement alarm API")

Reported-by: Pallavi Kadam <pallavi.kadam@intel.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal/windows: allow running as non-admin
Pallavi Kadam [Mon, 26 Oct 2020 18:44:58 +0000 (11:44 -0700)]
eal/windows: allow running as non-admin

Currently, since there is no runtime directory set, the code tries to
create a file in C:\ which is only writable with administrator
privileges. As a result, if the user is not admin, the application will
fail.
So, forcing no_shconf to 1 to prevent the code having to create files in
the runtime directory.

Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
4 years agomaintainers: resign from stack library
Gage Eads [Thu, 29 Oct 2020 14:52:26 +0000 (09:52 -0500)]
maintainers: resign from stack library

I'm moving on to a new position in November and won't be able to continue
as a stack library maintainer.

Thanks to fellow maintainer Olivier, and the rest of the DPDK community,
for the support over the past few years.

Signed-off-by: Gage Eads <gage.eads@intel.com>
4 years agoconfig/arm: add Graviton2
Vimal Chungath [Tue, 3 Nov 2020 18:06:45 +0000 (10:06 -0800)]
config/arm: add Graviton2

Add meson build configuration for Graviton2 platform
with 64-bit Arm Neoverse N1 cores. This patch makes the
following changes to generic Neoverse N1 config:

1. increase lcore limit to 64
2. increase memory support to 1TB
3. remove +crc from -march as that is default when setting armv8.2

For more information about Graviton2 platform, refer to:
https://aws.amazon.com/ec2/graviton/

Signed-off-by: Vimal Chungath <vcchunga@amazon.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agotest/crypto: disable wireless cases for CPU crypto API
Pablo de Lara [Thu, 22 Oct 2020 16:20:58 +0000 (16:20 +0000)]
test/crypto: disable wireless cases for CPU crypto API

SNOW3G, KASUMI and ZUC algorithms have been added to
aesni_mb PMD in this release. These algorithms are not supported
for the crypto synchronous API, so the crypto tests for these algorithms
are disabled.

Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9")
Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2")
Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agocrypto/aesni_mb: support Chacha-Poly in synchronous mode
Pablo de Lara [Thu, 22 Oct 2020 16:20:57 +0000 (16:20 +0000)]
crypto/aesni_mb: support Chacha-Poly in synchronous mode

Add support for Chacha20-Poly1305 in the CPU crypto synchronous API.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agoexamples/ipsec-secgw: fix session mempool initialisation
Vladimir Medvedkin [Tue, 27 Oct 2020 14:03:40 +0000 (14:03 +0000)]
examples/ipsec-secgw: fix session mempool initialisation

Creation of a session mempool may fail in the case of a single lcore
and a low number of SA.

In case when there is only one lcore and number of configures SA less
then (0.5 * CDEV_MP_CACHE_SZ) then creation of the mempool fails with
EINVAL. This is because the number of requested items is less than
(cache size * CDEV_MP_CACHE_MULTIPLIER).

Hence, the number of elements in mempool is increased in such cases.

Fixes: e30b2833c47c ("security: update session create API")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agocrypto/octeontx2: fix out-of-place support
Didier Pallard [Tue, 27 Oct 2020 15:20:58 +0000 (16:20 +0100)]
crypto/octeontx2: fix out-of-place support

Out of place with linear buffers is supported by octeontx2
while not advertised.

Fixes: 6aa9ceaddf1d ("crypto/octeontx2: add symmetric capabilities")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
4 years agocrypto/octeontx: fix out-of-place support
Didier Pallard [Tue, 27 Oct 2020 15:19:43 +0000 (16:19 +0100)]
crypto/octeontx: fix out-of-place support

Out of place with linear buffers is supported by octeontx
while not advertised.

Fixes: 0dc1cffa4d33 ("crypto/octeontx: add hardware init routine")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
4 years agodoc: update bcmfs guide
Vikas Gupta [Tue, 27 Oct 2020 05:29:22 +0000 (10:59 +0530)]
doc: update bcmfs guide

Update bcmfs.rst file with supported features and devices.

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: JP Lee <jongpil.lee@broadcom.com>
4 years agoapp/bbdev: dequeue full ring in offload test
Nicolas Chautru [Mon, 26 Oct 2020 17:48:10 +0000 (10:48 -0700)]
app/bbdev: dequeue full ring in offload test

update offload dequeue to retrieve the full ring to be
agnostic of implementation.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
4 years agoapp/bbdev: reduce duration of throughput test
Nicolas Chautru [Mon, 26 Oct 2020 17:48:09 +0000 (10:48 -0700)]
app/bbdev: reduce duration of throughput test

Reducing number of repetitions from 1000 to 100
to save time. Results are accurate enough with
100 loops.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
4 years agoapp/bbdev: skip bler test when compression is used
Nicolas Chautru [Mon, 26 Oct 2020 17:48:08 +0000 (10:48 -0700)]
app/bbdev: skip bler test when compression is used

bler test results are not valid when LLR compression
is used or for loopback scenarios. Skipping these.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Reviewed-by: Tom Rix <trix@redhat.com>
4 years agoapp/bbdev: define wait for offload
Nicolas Chautru [Mon, 26 Oct 2020 17:48:07 +0000 (10:48 -0700)]
app/bbdev: define wait for offload

Replacing magic number for default wait time for hw
offload.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
4 years agoapp/bbdev: include explicit HARQ preloading
Nicolas Chautru [Mon, 26 Oct 2020 17:48:06 +0000 (10:48 -0700)]
app/bbdev: include explicit HARQ preloading

Run preloading explicitly for unit tests. Load each code block
by reusing existing input op then restore for the actual test.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
4 years agoapp/bbdev: add explicit check for counters
Nicolas Chautru [Mon, 26 Oct 2020 17:48:05 +0000 (10:48 -0700)]
app/bbdev: add explicit check for counters

Adding explicit check in ut that the stats counters
have the expect values.
This was identified as a gap from code coverage.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
4 years agoapp/bbdev: add explicit test for latency vs validation
Nicolas Chautru [Mon, 26 Oct 2020 17:48:04 +0000 (10:48 -0700)]
app/bbdev: add explicit test for latency vs validation

Adding explicit different ut when testing for validation
or latency (early termination enabled or not).

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
4 years agodoc: recommend latest OpenSSL version
John McNamara [Fri, 23 Oct 2020 16:20:28 +0000 (16:20 +0000)]
doc: recommend latest OpenSSL version

Add recommendation to update to latest OpenSSL version when
using the OpenSSL PMD and to at least version 1.1.1g to avoid
known CVEs.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
4 years agocommon/qat: add missing kmod dependency info
Didier Pallard [Fri, 23 Oct 2020 15:44:57 +0000 (17:44 +0200)]
common/qat: add missing kmod dependency info

Dependency on kmod needed to manage crypto devices is missing
in qat crypto pmd.

Fixes: 0880c40113ef ("drivers: advertise kmod dependencies in pmdinfo")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/dpaa2_sec: remove dead code
David Marchand [Fri, 23 Oct 2020 07:43:04 +0000 (09:43 +0200)]
crypto/dpaa2_sec: remove dead code

RTE_LIBRTE_SECURITY_TEST never existed, the variable under this check is
never used.

Fixes: e117c18a1dbe ("crypto/dpaa2_sec: restructure session management")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agofips_validation: fix GCM test
Fan Zhang [Thu, 22 Oct 2020 09:59:27 +0000 (10:59 +0100)]
fips_validation: fix GCM test

This patch fixes FIPS GCM test of the redundant plaintext string
write and insufficient test case support check for some corner
cases.

Fixes: d09abf2d1007 ("examples/fips_validation: update GCM test")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
4 years agoexamples/fips_validation: fix missed version line
Fan Zhang [Thu, 22 Oct 2020 09:59:26 +0000 (10:59 +0100)]
examples/fips_validation: fix missed version line

This patch fixes the missing version line in the response file.

Fixes: 793650184099 ("examples/fips_validation: fix version compatibility")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
4 years agocrypto/octeontx2: fix multi-process
Ankur Dwivedi [Thu, 22 Oct 2020 07:50:00 +0000 (13:20 +0530)]
crypto/octeontx2: fix multi-process

During crypto device probe few functions should be called only
for the primary process. This patch fixes this issue.

Fixes: 818d138bcce9 ("crypto/octeontx2: add init sequence in probe")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
4 years agobaseband/acc100: remove useless checks
Nicolas Chautru [Mon, 19 Oct 2020 21:09:57 +0000 (14:09 -0700)]
baseband/acc100: remove useless checks

Coverity reported dead code for a few error
checks which are indeed not reachable.

Coverity issue: 363451, 363454, 363455
Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")
Fixes: f404dfe35cc3 ("baseband/acc100: support 4G processing")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
4 years agobaseband/turbo_sw: fix memory leak in error path
Yunjian Wang [Thu, 15 Oct 2020 13:45:45 +0000 (21:45 +0800)]
baseband/turbo_sw: fix memory leak in error path

In q_setup() allocated memory for the queue data, we should free
it when error happens, otherwise it will lead to memory leak.

Fixes: b8cfe2c9aed2 ("bb/turbo_sw: add software turbo driver")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Nicolas Chautru <nicolas.chautru@intel.com>
4 years agodoc: remove notice about AES-GCM IV and J0
Arek Kusztal [Wed, 14 Oct 2020 05:07:00 +0000 (06:07 +0100)]
doc: remove notice about AES-GCM IV and J0

This patch removes information about deprecation of AES-GCM/GMAC
API for IV without J0.

Fixes: fac52fb26a54 ("cryptodev: add option to support both IV and J0 for GCM")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
4 years agodoc: update VFIO usage in qat crypto guide
Adam Dybkowski [Tue, 13 Oct 2020 14:10:15 +0000 (15:10 +0100)]
doc: update VFIO usage in qat crypto guide

This patch marks the old igb-uio driver as unsecure when used
with the QAT PMD and updates all examples to recommend using
VFIO-PCI instead.
It also mentions security issues with the QAT CPM and provides
information about the new VFIO-PCI parameter 'disable_denylist'
available in Linux kernels 5.9 and later.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: fix driver names
Bruce Richardson [Tue, 3 Nov 2020 12:36:02 +0000 (12:36 +0000)]
doc: fix driver names

Since the built driver filenames have changed in DPDK 20.11, we need to
update the driver doc to match.

Most drivers start their section with the driver filename highlighted in
bold, while a number were missing the highlight. When updating the names,
add the markers for bold text to any missing it, so as to have things more
consistent.

Fixes: a20b2c01a7a1 ("build: standardize component names and defines")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agoethdev: include mbuf registration in Tx timestamp API
Thomas Monjalon [Mon, 2 Nov 2020 19:51:00 +0000 (20:51 +0100)]
ethdev: include mbuf registration in Tx timestamp API

Previously, the Tx timestamp field and flag were registered in testpmd,
as described in mlx5 guide.
For consistency between Rx and Tx timestamps,
managing mbuf registrations inside the driver, as properly documented,
is a simpler expectation.

The only driver to support this feature (mlx5) is updated
as well as the testpmd application.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: add Tx timestamp registration helper
Thomas Monjalon [Mon, 2 Nov 2020 19:36:22 +0000 (20:36 +0100)]
mbuf: add Tx timestamp registration helper

The function rte_mbuf_dyn_tx_timestamp_register()
can be used to register the required field and flag.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: remove deprecated timestamp field
Thomas Monjalon [Wed, 28 Oct 2020 13:21:00 +0000 (14:21 +0100)]
mbuf: remove deprecated timestamp field

As announced in the deprecation note, the field timestamp
is removed to give more space to the dynamic fields.
The related offload flag PKT_RX_TIMESTAMP is also removed.

This is how the mbuf layout looks like (pahole-style):

word  type                              name                byte  size
 0    void *                            buf_addr;         /*   0 +  8 */
 1    rte_iova_t                        buf_iova          /*   8 +  8 */
      /* --- RTE_MARKER64               rearm_data;                   */
 2    uint16_t                          data_off;         /*  16 +  2 */
      uint16_t                          refcnt;           /*  18 +  2 */
      uint16_t                          nb_segs;          /*  20 +  2 */
      uint16_t                          port;             /*  22 +  2 */
 3    uint64_t                          ol_flags;         /*  24 +  8 */
      /* --- RTE_MARKER                 rx_descriptor_fields1;        */
 4    uint32_t             union        packet_type;      /*  32 +  4 */
      uint32_t                          pkt_len;          /*  36 +  4 */
 5    uint16_t                          data_len;         /*  40 +  2 */
      uint16_t                          vlan_tci;         /*  42 +  2 */
 5.5  uint64_t             union        hash;             /*  44 +  8 */
 6.5  uint16_t                          vlan_tci_outer;   /*  52 +  2 */
      uint16_t                          buf_len;          /*  54 +  2 */
 7    uint64_t                          dynfield0[1];     /*  56 +  8 */
      /* --- RTE_MARKER                 cacheline1;                   */
 8    struct rte_mempool *              pool;             /*  64 +  8 */
 9    struct rte_mbuf *                 next;             /*  72 +  8 */
10    uint64_t             union        tx_offload;       /*  80 +  8 */
11    struct rte_mbuf_ext_shared_info * shinfo;           /*  88 +  8 */
12    uint16_t                          priv_size;        /*  96 +  2 */
      uint16_t                          timesync;         /*  98 +  2 */
12.5  uint32_t                          dynfield1[7];     /* 100 + 28 */
16    /* --- END                                             128      */

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoethdev: add doxygen comment for Rx timestamp API
Thomas Monjalon [Mon, 2 Nov 2020 19:53:44 +0000 (20:53 +0100)]
ethdev: add doxygen comment for Rx timestamp API

The offload flag DEV_RX_OFFLOAD_TIMESTAMP had no documentation.
After switching to dynamic mbuf flag and field,
it becomes even more important to explicit the feature behaviour.

A doxygen comment for the timesync API was mentioning
the deprecated timestamp field, so it is also updated.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoexamples/rxtx_callbacks: switch timestamp to dynamic field
Thomas Monjalon [Thu, 29 Oct 2020 07:29:40 +0000 (08:29 +0100)]
examples/rxtx_callbacks: switch timestamp to dynamic field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoapp/testpmd: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 08:10:33 +0000 (09:10 +0100)]
app/testpmd: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/pcap: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 07:17:35 +0000 (08:17 +0100)]
net/pcap: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/octeontx2: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 06:48:48 +0000 (07:48 +0100)]
net/octeontx2: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced.

The registration of field and flag is done in both
otx2_nix_dev_start() and otx2_nix_timesync_enable().

The dynamic offset and flag are stored in struct otx2_timesync_info
to favor cache locality.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/nfb: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 06:17:15 +0000 (07:17 +0100)]
net/nfb: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/mlx5: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 03:53:38 +0000 (04:53 +0100)]
net/mlx5: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced.

The dynamic offset and flag are stored in struct mlx5_rxq_data
to favor cache locality.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/mlx5: fix dynamic mbuf offset lookup check
Thomas Monjalon [Thu, 29 Oct 2020 03:14:59 +0000 (04:14 +0100)]
net/mlx5: fix dynamic mbuf offset lookup check

The functions rte_mbuf_dynfield_lookup() and rte_mbuf_dynflag_lookup()
can return an offset starting with 0 or a negative error code.

In reality the first offsets are probably reserved forever,
but for the sake of strict API compliance,
the checks which considered 0 as an error are fixed.

Fixes: efa79e68c8cd ("net/mlx5: support fine grain dynamic flag")
Fixes: 3172c471b86f ("net/mlx5: prepare Tx queue structures to support timestamp")
Fixes: 0febfcce3693 ("net/mlx5: prepare Tx to support scheduling")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/dpaa2: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 03:02:58 +0000 (04:02 +0100)]
net/dpaa2: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agonet/ark: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Thu, 29 Oct 2020 02:26:41 +0000 (03:26 +0100)]
net/ark: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related dynamic mbuf flag is set, although was missing previously.

The timestamp is set if configured for at least one device.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agolatency: switch Rx timestamp to dynamic mbuf field
Thomas Monjalon [Wed, 28 Oct 2020 23:55:16 +0000 (00:55 +0100)]
latency: switch Rx timestamp to dynamic mbuf field

The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced with the dynamic one.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: add Rx timestamp flag and helpers
Thomas Monjalon [Wed, 28 Oct 2020 13:20:44 +0000 (14:20 +0100)]
mbuf: add Rx timestamp flag and helpers

There is already a dynamic field for timestamp,
used only for Tx scheduling with the dedicated Tx offload flag.
The same field can be used for Rx timestamp filled by drivers.

A new dynamic flag is defined for Rx usage.
A new function wraps the registration of both field and Rx flag.
The type rte_mbuf_timestamp_t is defined for the API users.

After migrating all Rx timestamp usages, it will be possible
to remove the deprecated timestamp field.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoeventdev: remove software Rx timestamp
Thomas Monjalon [Wed, 28 Oct 2020 23:22:58 +0000 (00:22 +0100)]
eventdev: remove software Rx timestamp

This a revert of the commit 569758758dcd ("eventdev: add Rx timestamp").
If the Rx timestamp is not configured on the ethdev port,
there is no reason to set one.
Also the accuracy  of the timestamp was bad because set at a late stage.
Anyway there is no trace of the usage of this timestamp.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoregex/octeontx2: fix driver name
Thomas Monjalon [Fri, 23 Oct 2020 17:41:30 +0000 (19:41 +0200)]
regex/octeontx2: fix driver name

Following the recent alignment of all driver names,
this new driver get unaligned:
librte_regex_octeontx2_regex.so

The 'fmt_name' must be "octeontx2_regex", and if not provided,
is taken from the 'name' variable.
But the variable 'name' should not be overwritten,
to keep the automatic value from the directory name.

The library name will be composed of the class directory
and the driver directory name:
librte_regex_octeontx2.so

Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoevent/dlb: add timeout ticks entry point
Timothy McDaniel [Sun, 1 Nov 2020 23:30:15 +0000 (17:30 -0600)]
event/dlb: add timeout ticks entry point

Adds the timeout ticks conversion function.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add queue and port release
Timothy McDaniel [Sun, 1 Nov 2020 23:30:14 +0000 (17:30 -0600)]
event/dlb: add queue and port release

These entry points are NO-OPS. DLB does not support
reconfiguring individual queues or ports. The entire device
must be reconfigured.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add self-tests
Timothy McDaniel [Sun, 1 Nov 2020 23:30:13 +0000 (17:30 -0600)]
event/dlb: add self-tests

Add a variety of self-tests for both ldb and directed
ports/queues, as well as configure, start, stop, link, etc...

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add token pop API
Timothy McDaniel [Sun, 1 Nov 2020 23:30:12 +0000 (17:30 -0600)]
event/dlb: add token pop API

The PMD uses a public interface to allow applications to
control the token pop mode. Supported token pop modes are
as follows, and they impact core scheduling affinity for
ldb ports.

AUTO_POP: Pop the CQ tokens immediately after dequeueing.
DELAYED_POP: Pop CQ tokens after (dequeue_depth - 1) events
     are released. Supported on load-balanced ports
     only.
DEFERRED_POP: Pop the CQ tokens during next dequeue operation.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add eventdev stop and close
Timothy McDaniel [Sun, 1 Nov 2020 23:30:11 +0000 (17:30 -0600)]
event/dlb: add eventdev stop and close

Add support for eventdev stop and close entry points.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add dequeue and its burst variants
Timothy McDaniel [Sun, 1 Nov 2020 23:30:10 +0000 (17:30 -0600)]
event/dlb: add dequeue and its burst variants

Add support for dequeue, dequeue_burst, ...

DLB does not currently support interrupts, but instead uses
umonitor/umwait if supported by the processor. This allows
the software to monitor and wait on writes to a cache-line.

DLB supports normal and sparse cq mode. In normal mode the
hardware will pack 4 QEs into each cache line. In sparse cq
mode, the hardware will only populate one QE per cache line.
Software must be aware of the cq mode, and take the appropriate
actions, based on the mode.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add enqueue and its burst variants
Timothy McDaniel [Sun, 1 Nov 2020 23:30:09 +0000 (17:30 -0600)]
event/dlb: add enqueue and its burst variants

Add support for enqueue and its variants.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add eventdev start
Timothy McDaniel [Sun, 1 Nov 2020 23:30:08 +0000 (17:30 -0600)]
event/dlb: add eventdev start

Add support for the eventdev start entry point.
DLB delays setting up single link resources until
eventdev start, because it is only then that it can
ascertain which ports have just one linked queue.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add port unlink and unlinks in progress
Timothy McDaniel [Sun, 1 Nov 2020 23:30:07 +0000 (17:30 -0600)]
event/dlb: add port unlink and unlinks in progress

Add supports for the port unlink(s) eventdev entry points.
The unlink operation is an asynchronous operation executed by
a control thread, and the unlinks-in-progress function reads
a counter shared with the control thread. Port QE and memzone
memory is freed here.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add port link
Timothy McDaniel [Sun, 1 Nov 2020 23:30:06 +0000 (17:30 -0600)]
event/dlb: add port link

Add port link entry point. Directed queues are identified and created
at this stage. Their setup deferred until link-time, at which
point we know the directed port ID. Directed queue setup
will only fail if this queue is already setup or there are
no directed queues left to configure.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add port setup
Timothy McDaniel [Sun, 1 Nov 2020 23:30:05 +0000 (17:30 -0600)]
event/dlb: add port setup

Configure the load balanced (ldb) or directed (dir) port.
The consumer queue (CQ) and producer port (PP) are also
set up here.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add queue setup
Timothy McDaniel [Sun, 1 Nov 2020 23:30:04 +0000 (17:30 -0600)]
event/dlb: add queue setup

Load balanced (ldb) queues are setup here.
Directed queues are not set up until link time, at which
point we know the directed port ID. Directed queue setup
will only fail if this queue is already setup or there are
no directed queues left to configure.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add queue and port default conf
Timothy McDaniel [Sun, 1 Nov 2020 23:30:03 +0000 (17:30 -0600)]
event/dlb: add queue and port default conf

Add support for getting the queue and port default configuration.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add infos get and configure
Timothy McDaniel [Sun, 1 Nov 2020 23:30:02 +0000 (17:30 -0600)]
event/dlb: add infos get and configure

Add support for configuring the DLB hardware.
In particular, this patch configures the DLB
hardware's scheduling domain, such that it is provisioned with
the requested number of ports and queues, provided sufficient
resources are available. Individual queues and ports are
configured later in port setup and eventdev start.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add xstats
Timothy McDaniel [Sun, 1 Nov 2020 23:30:01 +0000 (17:30 -0600)]
event/dlb: add xstats

Add support for DLB xstats.  Perform initialization and add
standard xstats entry points

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add probe-time hardware init
Timothy McDaniel [Sun, 1 Nov 2020 23:30:00 +0000 (17:30 -0600)]
event/dlb: add probe-time hardware init

This commit adds probe-time low level hardware
initialization.  It also adds probe-time init for both
primary and secondary DPDK processes.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add flexible interface
Timothy McDaniel [Sun, 1 Nov 2020 23:29:59 +0000 (17:29 -0600)]
event/dlb: add flexible interface

This commit introduces the flexible interface. This
interface allows the core code to operate in PF mode (direct
hardware access) or bifurcated mode (hardware configured via
kernel driver). This driver currently only supports PF modei,
but bifurcated mode will be added in a future patch-set.
Note that the flexible interface is not used for data path
operations, and thus there are no performance concerns
related to the use of function pointers.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add eventdev probe
Timothy McDaniel [Sun, 1 Nov 2020 23:29:58 +0000 (17:29 -0600)]
event/dlb: add eventdev probe

Add the eventdev portion of probe, and parse command line
options, but do not initialize hardware.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add inline functions
Timothy McDaniel [Sun, 1 Nov 2020 23:29:57 +0000 (17:29 -0600)]
event/dlb: add inline functions

Add miscellaneous inline functions that may be called
from multiple files.  These functions include inline
assembly of new x86 instructions, such as movdir64b,
since they are not available as builtin functions in
the minimum supported GCC version.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add definitions shared with LKM or shared code
Timothy McDaniel [Sun, 1 Nov 2020 23:29:56 +0000 (17:29 -0600)]
event/dlb: add definitions shared with LKM or shared code

Add headers containing structs and constants shared between
the PMD and the shared code.  The term shared code refers to
the code that implements the hardware interface. The shared code
is introduced in the probe patch, and then is extended as
additional eventdev PMD entry points are added to the patchset.
In the case of the bifurcated PMD (to be introduced in the
future), the shared code is contained in the Linux kernel
module itself.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add private data structures and constants
Timothy McDaniel [Sun, 1 Nov 2020 23:29:55 +0000 (17:29 -0600)]
event/dlb: add private data structures and constants

Add headers used internally by the PMD.  They include constants,
macros for device resources, structure definitions for hardware interfaces
and software state, and various forward-declarations.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add dynamic logging
Timothy McDaniel [Sun, 1 Nov 2020 23:29:54 +0000 (17:29 -0600)]
event/dlb: add dynamic logging

This commit adds base support for dynamic logging.
The default log level is NOTICE. Dynamic logging
is used exclusively throughout this patchset.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb: add documentation and build infrastructure
Timothy McDaniel [Sun, 1 Nov 2020 23:29:53 +0000 (17:29 -0600)]
event/dlb: add documentation and build infrastructure

Note that config/rte_config.h contains several configuration
switches, providing for fine control of the PMD's
runtime behaviour.

The meson infrastructure is expanded as additional files are
added to this patchset.

Adds announcement of availability of the new driver
for Intel Dynamic Load Balancer 1.0 hardware.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add timeout ticks entry point
Timothy McDaniel [Sun, 1 Nov 2020 23:38:03 +0000 (17:38 -0600)]
event/dlb2: add timeout ticks entry point

Adds the timeout ticks conversion function.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add queue and port release
Timothy McDaniel [Sun, 1 Nov 2020 23:38:02 +0000 (17:38 -0600)]
event/dlb2: add queue and port release

DLB does not support reconfiguring individual queues
or ports on the fly. The entire device must be reconfigured.
Previously allocated port QE and memzone memory
is freed in this patch.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add self-tests
Timothy McDaniel [Sun, 1 Nov 2020 23:38:01 +0000 (17:38 -0600)]
event/dlb2: add self-tests

Add a variety of self-tests for both ldb and directed
ports/queues, as well as configure, start, stop, link, etc...

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add token pop API
Timothy McDaniel [Sun, 1 Nov 2020 23:38:00 +0000 (17:38 -0600)]
event/dlb2: add token pop API

The PMD uses a public interface to allow applications to
control the token pop mode. Supported token pop modes are
as follows, and they impact core scheduling affinity for
ldb ports.

AUTO_POP: Pop the CQ tokens immediately after dequeueing.
DELAYED_POP: Pop CQ tokens after (dequeue_depth - 1) events
             are released. Supported on load-balanced ports
             only.
DEFERRED_POP: Pop the CQ tokens during next dequeue operation.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add eventdev stop and close
Timothy McDaniel [Sun, 1 Nov 2020 23:37:59 +0000 (17:37 -0600)]
event/dlb2: add eventdev stop and close

Add support for eventdev stop and close entry points.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add dequeue and its burst variants
Timothy McDaniel [Sun, 1 Nov 2020 23:37:58 +0000 (17:37 -0600)]
event/dlb2: add dequeue and its burst variants

Add support for dequeue, dequeue_burst, ...

DLB2 does not currently support interrupts, but instead use
umonitor/umwait if supported by the processor. This allows
the software to monitor and wait on writes to a cache-line.

DLB2 supports normal and sparse cq mode. In normal mode the
hardware will pack 4 QEs into each cache line. In sparse cq
mode, the hardware will only populate one QE per cache line.
Software must be aware of the cq mode, and take the appropriate
actions, based on the mode.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add enqueue and its burst variants
Timothy McDaniel [Sun, 1 Nov 2020 23:37:57 +0000 (17:37 -0600)]
event/dlb2: add enqueue and its burst variants

Add support for enqueue and its variants.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add eventdev start
Timothy McDaniel [Sun, 1 Nov 2020 23:37:56 +0000 (17:37 -0600)]
event/dlb2: add eventdev start

Add support for the eventdev start entry point.
We delay initializing some resources until
eventdev start, since the number of linked queues can be
used to determine if we are dealing with a ldb or dir resource.
If this is a device restart, then the previous configuration
will be reapplied.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>