Commit Graph

32162 Commits

Author SHA1 Message Date
David Marchand
48ff13ef37 test/mem: disable ASan when accessing unallocated memory
As described in bugzilla, ASan reports accesses to all memory segment as
invalid, since those parts have not been allocated with rte_malloc.
Move __rte_no_asan to rte_common.h and disable ASan on a part of the test.

Bugzilla ID: 880
Fixes: 6cc51b1293 ("mem: instrument allocator for ASan")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-05-11 14:05:30 +02:00
Stanislaw Kardach
af0892af42 test/hash: report non HTM numbers for single thread
In hash_readwrite_perf_autotest a single read and write operation is
benchmarked for both HTM and non HTM cases. However the result summary
only shows the HTM value. Therefore add the non HTM value for
completeness.

Fixes: 0eb3726ebc ("test/hash: add test for read/write concurrency")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
2022-05-11 14:01:03 +02:00
Beilei Xing
36db4a1ad4 maintainers: update for Intel i40e
Add Yuying as Intel i40e maintainer.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
2022-05-10 11:32:39 +02:00
Haiyue Wang
cbfcdb37af maintainers: update for Intel igc
Junfeng and Simei have been appointed the new maintainers for the igc
PMD. Update the MAINTAINERS file to reflect this.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Simei Su <simei.su@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
2022-05-10 11:32:37 +02:00
Haiyue Wang
f014ad9953 maintainers: update for Intel ixgbe
Qiming and Wenjun have been appointed the new maintainers for the ixgbe
PMD. Update the MAINTAINERS file to reflect this.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenjun Wu <wenjun1.wu@intel.com>
2022-05-10 11:32:36 +02:00
Haiyue Wang
789106f008 maintainers: update for Intel e1000
Simei and Wenjun have been appointed the new maintainers for the e1000
PMD. Update the MAINTAINERS file to reflect this.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Simei Su <simei.su@intel.com>
Acked-by: Wenjun Wu <wenjun1.wu@intel.com>
2022-05-10 11:32:31 +02:00
Jochen Behrens
df130d59cd maintainers: update for vmxnet3 driver
Make Jochen Behrens the maintainer of the net/vmxnet3 device
driver as Yong Wang is not working on vmxnet3 any more.

Signed-off-by: Jochen Behrens <jbehrens@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2022-05-10 11:32:29 +02:00
Konstantin Ananyev
5256a253e4 maintainers: update email address
Use new email address.

Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Acked-by: John McNamara <john.mcnamara@intel.com>
2022-05-10 11:32:27 +02:00
Raja Zidane
af676be9e6 examples/l2fwd-crypto: fix stats refresh rate
TIMER_MILLISECOND is defined as the number of cpu cycles per millisecond,
current definition is correct for cores with frequency of 2GHZ, for cores
with different frequency, it caused different periods between refresh,
(i.e. the definition is about 14ms on ARM cores).
The devarg that stated the period between stats print was not used,
instead, it was always defaulted to 10 seconds (on 2GHZ core).

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

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

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:48:30 +02:00
Mahipal Challa
a80ea5c082 compress/octeontx: support OCTEON TX2 SoC family
The octeontx2 9xxx SoC family support is added.

Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Acked-by: Ashish Gupta <ashishg@marvell.com>
2022-04-29 11:36:46 +02:00
Archana Muniganti
e689abaf8b test/crypto-perf: add vector file for AES-GCM
Added test vector file for AES-128-GCM for
64B and 512B length buffers.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:31:40 +02:00
Archana Muniganti
14864c4217 test/crypto-perf: populate mbuf in latency test
For decrypt, ICV mismatch can come as data is dummy and
latency will be calculated for error path. Hence populate
mbuf with test vector data.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:31:39 +02:00
Gagandeep Singh
c54fb3f7f7 common/dpaax: fix short MAC-I IV calculation for ZUC
Fixing the IV calculation for ZUC based short MAC-I
as per the HW security engine guidelines.

Fixes: 73a24060cd ("crypto/dpaa2_sec: add sample PDCP descriptor APIs")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
76da1b510c crypto/dpaa_sec: move cdb preparation to session create
Driver is preparing the shared descriptor of session while
attaching the session to a queue pair.
It should be prepared on session create.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
ba2f161cba bus/dpaa: remove unused thread-specific variables
There are some crypto driver related thread specific
variables which are no longer used, so removing them.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
04408e461e crypto/dpaa2_sec: fix operation status for simple FD
Driver is not filling the operation status on dequeue
in case the FD is simple.

So setting the status as per the results.

Fixes: 0a23d4b6f4 ("crypto/dpaa2_sec: support protocol offload IPsec")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
e3d264383b crypto/dpaa2_sec: fix crypto operation pointer
Driver is filling the crypto_op variable with an invalid value
for atomic and ordered events which can results into
segmentation fault.

This patch assigning the correct crypto_op and event buffer
pointers by extracting from FD.

Fixes: a77db24643 ("crypto/dpaa2_sec: support atomic queues")
Fixes: 4562de326d ("crypto/dpaa2_sec: support ordered queue")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
95af364bf0 crypto/dpaa2_sec: create fle pool per queue pair
Driver is creating a fle pool with a fixed number of
buffers for all queue pairs of a DPSECI object.
These fle buffers are equivalent to the number of descriptors.

In this patch, creating the fle pool for each queue pair
so that user can control the number of descriptors of a
queue pair using API rte_cryptodev_queue_pair_setup().

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Vanshika Shukla
96ec64f12d crypto/dpaa_sec: fix secondary process probing
DPAA hardware supports non-i/o performing secondary
applications only. So we do not have to probe crypto
devices in secondary applications.

Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Cc: stable@dpdk.org

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
882f253834 common/dpaax: remove obsolete code
Remove sec era 1 to 7 IPsec and caam operations code
as none of the NXP platform use it.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
c2e4aa0104 crypto/dpaa_sec: replace use of old build macros
Use the newer security macros defined by meson.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
8a3167dbe3 crypto/dpaa_sec: enable QI physically
To perform crypto operations on DPAA platform,
QI interface of HW must be enabled.
Earlier DPAA crypto driver was dependent on
kernel for QI enable. Now with this patch
there is no such dependency on kernel.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
46cc6dcc41 crypto/dpaa2_sec: fix chained FD length in raw datapath
DPAA2 sec raw driver is calculating the wrong lengths while
creating the FD for chain.
This patch fixes lengths for chain FD.

Fixes: aa6ec1fd84 ("crypto/dpaa2_sec: support authenc with raw buffer API")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:35 +02:00
Gagandeep Singh
b5e761fc6b crypto/dpaa_sec: fix chained FD length in raw datapath
DPAA sec raw driver is calculating the wrong lengths while
creating the FD for chain.
This patch fixes lengths for chain FD.

Fixes: 78156d38e1 ("crypto/dpaa_sec: support authonly and chain with raw API")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:27:19 +02:00
Gagandeep Singh
e2b70a309f crypto/dpaa2_sec: fix buffer pool ID check
Simple fd rely on bpid of the buffers whereas
other FD types can support buffers without bpid
of pool.

So moving the bpid check to simple fd to mbuf
conversion function.

Fixes: 8d1f3a5d75 ("crypto/dpaa2_sec: support crypto operation")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:20:09 +02:00
Gagandeep Singh
6a2b01a410 crypto/dpaa2_sec: fix fle buffer leak
Driver allocates a fle buffer for each packet
before enqueue and free the buffer on dequeue. But in case if
there are enqueue failures, then code should free the fle buffers.

Fixes: 4562de326d ("crypto/dpaa2_sec: support ordered queue")
Fixes: 3ffce51a1f ("crypto/dpaa2_sec: add enqueue retry timeout")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:19:22 +02:00
Kiran Kumar K
a538d1d2d0 test/crypto-perf: extend asymmetric crypto throughput test
Extended support for asymmetric crypto perf throughput test.
Added support for new modulus lengths.
Added new parameter --modex-len.
Supported lengths are 60, 128, 255, 448. Default length is 128.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-29 11:01:45 +02:00
Raja Zidane
146fe289de crypto/mlx5: fix login cleanup
In case of a probing failure caused by wrong devarg provided,
login isn't destroyed when exiting.

Destroy login on failure.

Fixes: ba707cdb6d ("crypto/mlx5: fix queue size configuration")
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-04-28 12:12:47 +02:00
Gowrishankar Muthukrishnan
59f8c378a1 crypto/cnxk: prevent out-of-bound access in capabilities
In a situation where crypto_caps elements are checked only for
RTE_CRYPTO_OP_TYPE_UNDEFINED until valid op defined, there is
possibility for an out of bound access. Add this array by one
element for current capabilities.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2022-04-28 12:09:35 +02:00
Anoob Joseph
c662a1f97c crypto/cnxk: use set ctx operation for session destroy
Usage of flush and invalidate would involve delays to account
for flush delay. Use set_ctx operation instead. When set_ctx fails,
fall back to flush + invalidate scheme.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 11:46:45 +02:00
Anoob Joseph
ed96337581 common/cnxk: add timeout for ctx write operation
Add busy wait and polling for ctx write operation
rather than waiting with 1 ms delay.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 11:46:23 +02:00
Anoob Joseph
6fb81d2670 crypto/cnxk: remove useless return code
The function doesn't return error. Remove return.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 11:46:15 +02:00
Archana Muniganti
e85982ab32 crypto/cnxk: support AES-GMAC
Added lookaside IPsec AES-GMAC support in CNXK PMD.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 11:46:09 +02:00
Archana Muniganti
b4409f2b3f crypto/cnxk: support AH mode
Added IPsec AH mode support in CN9K and CN10K PMD

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 11:45:50 +02:00
Anoob Joseph
99783e2121 security: fix SA lifetime comments
Fix comments to reflect the hard expiry fields.

Fixes: ad7515a39f ("security: add SA lifetime configuration")
Cc: stable@dpdk.org

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
2022-04-28 09:26:48 +02:00
Gagandeep Singh
841147ef97 crypto/dpaa_sec: fix digest size
DPAA crypto driver can support 64 bytes size digest size
for SHA512-HMAC.
This patch changes the value of macro max supported digest size to
64.

Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2022-04-28 08:54:50 +02:00
Gagandeep Singh
13ce268103 common/dpaax: remove dead code
This patch remove structural and logical dead code from
caamflib.

Coverity issue: 375251, 375258, 375261, 375267, 375269
Coverity issue: 375285, 373161, 375249, 375257

Fixes: 6127fff842 ("common/dpaax: remove outdated caamflib code")
Fixes: 81eb760d22 ("common/dpaax/caamflib: remove some inline keys")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2022-04-28 08:54:50 +02:00
Archana Muniganti
0e4cc24456 test/crypto: add AH AES-GMAC test vectors
Added AES_GMAC test vectors along with combined mode support.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 08:54:50 +02:00
Archana Muniganti
77f46cda07 test/crypto: add AH test vectors
Added tunnel and transport AH known test vectors for
SHA256 HMAC.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 08:54:50 +02:00
Archana Muniganti
663d78bec1 test/crypto: add AH under combined mode
Added auth only and null cipher + auth under combined mode
for following combinations.
1. Tunnel IPv4
2. Transport IPv4

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-04-28 08:54:50 +02:00
David Marchand
2261dbe944 ci: add MinGW cross-compilation in GHA
Add mingw cross compilation in our public CI so that users with their
own github repository have a first level of checks for Windows compilation
before submitting to the mailing list.
This does not replace our better checks in other entities of the CI.

Only the helloworld example is compiled (same as what is tested in
test-meson-builds.sh).

Note: the mingw cross compilation toolchain (version 5.0) in Ubuntu
18.04 was broken (missing a ENOMSG definition).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2022-05-09 09:08:18 +02:00
David Marchand
8fd9b631ad ci: switch to Ubuntu 20.04
Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent
tool(chain)s: for example, net/cnxk now builds fine and can be
re-enabled.

Note: Ubuntu 18.04 and 20.04 seem to preserve the same paths for the ARM
and PPC cross compilation toolchains, so we can use a single
configuration file (with the hope, future releases of Ubuntu will do the
same).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2022-05-09 09:08:15 +02:00
Tianhao Chai
28c5d60072 eal: fix C++ include for device event and DMA
Currently the "extern C" section ends right before rte_dev_dma_unmap
and other DMA function declarations, causing some C++ compilers to
produce C++ mangled symbols to rte_dev_dma_unmap instead of C symbols.
This leads to build failures later when linking a final executable
against this object.

Fixes: a753e53d51 ("eal: add device event monitor framework")
Cc: stable@dpdk.org

Signed-off-by: Tianhao Chai <cth451@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2022-05-05 11:48:33 +02:00
Anatoly Burakov
4d8bdd8b56 malloc: fix ASan handling for unmapped memory
Currently, when we free previously allocated memory, we mark the area as
"freed" for ASan purposes (flag 0xfd). However, sometimes, freeing a
malloc element will cause pages to be unmapped from memory and re-backed
with anonymous memory again. This may cause ASan's "use-after-free"
error down the line, because the allocator will try to write into
memory areas recently marked as "freed".

To fix this, we need to mark the unmapped memory area as "available",
and fixup surrounding malloc element header/trailers to enable later
malloc routines to safely write into new malloc elements' headers or
trailers.

Bugzilla ID: 994
Fixes: 6cc51b1293 ("mem: instrument allocator for ASan")
Cc: stable@dpdk.org

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-05-05 10:13:43 +02:00
Deepak Khandelwal
90bf3f89ed mem: skip attaching external memory in secondary process
Currently, EAL init in secondary processes will attach all fbarrays
in the memconfig to have access to the primary process's page tables.
However, fbarrays corresponding to external memory segments should
not be attached at initialization, because this will happen as part
of `rte_extmem_attach` [1] or `rte_malloc_heap_memory_attach` [2] calls.

1: https://doc.dpdk.org/api/rte__memory_8h.html#a2796da68de6825f8edf53759f8e4d230
2: https://doc.dpdk.org/api/rte__malloc_8h.html#af6360dea35bdf162feeb2b62cf149fd3

Fixes: ff3619d624 ("malloc: allow attaching to external memory chunks")
Cc: stable@dpdk.org

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Deepak Khandelwal <deepak.khandelwal@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2022-04-28 13:44:13 +02:00
Vladimir Medvedkin
a6699a6eb2 test/table: fix buffer overflow on lpm entry
This patch fixes stack buffer overflow reported by ASan.

Bugzilla ID: 820
Fixes: 5205954791 ("app/test: packet framework unit tests")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-04-28 12:39:11 +02:00
Michael Baum
7a99336865 net/mlx5: fix LRO configuration in drop Rx queue
The driver wrongly set the LRO configurations to the TIR of the DevX
drop queue even when LRO is not supported.
Actually, the LRO configuration is not relevant to the drop queue at
all.

This causes failure in the initialization of the device, which doesn't
support LRO where the drop queue is created.

Probably, the drop queue creation by DevX missed the fact that LRO is
set by default in the TIR creation function and didn't unset it in the
drop queue case like other cases that unset LRO.

Move the default LRO configuration to unset it and set it only in the
case of all the TIR queues configured with LRO.

Fixes: bc5bee028e ("net/mlx5: create drop queue using DevX")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-04-26 11:52:18 +02:00
Michael Baum
a213b86821 net/mlx5: fix LRO validation in Rx setup
The mlx5_rx_queue_setup() get LRO offload from user.

When LRO is configured, the LRO flag in rxq_data is set to 1.

This patch adds validation to make sure the LRO is supported.

Fixes: 17ed314 ("net/mlx5: allow LRO per Rx queue")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-04-26 11:52:18 +02:00
Dariusz Sosnowski
d2fa2632a4 net/mlx5: fix RSS hash types adjustment
When an indirect action was created with an RSS action configured to
hash on both source and destination L3 addresses (or L4 ports), it caused
shared hrxq to be configured to hash only on destination address
(or port).

This patch fixes this behavior by refining RSS types specified in
configuration before calculating hash types used for hrxq. Refining RSS
types removes *_SRC_ONLY and *_DST_ONLY flags if they are both set.

Fixes: 212d17b6a6 ("net/mlx5: fix missing shared RSS hash types")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-04-26 11:51:56 +02:00
Raja Zidane
773a7de21a net/mlx5: fix Rx/Tx stats concurrency
Queue statistics are being continuously updated in Rx/Tx burst
routines while handling traffic. In addition to that, statistics
can be reset (written with zeroes) on statistics reset in other
threads, causing a race condition, which in turn could result in
wrong stats.

The patch provides an approach with reference values, allowing
the actual counters to be writable within Rx/Tx burst threads
only, and updating reference values on stats reset.

Fixes: 87011737b7 ("mlx5: add software counters")
Cc: stable@dpdk.org

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-04-21 12:50:26 +02:00