Commit Graph

19193 Commits

Author SHA1 Message Date
David Marchand
db4092276a bus/pci: fix leak with multiple bus scan
The addition of the bus_info field did not account for the fact that the
PCI bus can be scanned multiple times (like for device hotplug and other
uses in SPDK).
Indeed, during pci_scan_one() for devices that were already registered,
the pci_common_set() overwrites the bus_info field, leaking the
previously allocated memory.

Since the bus_info content is fixed for a PCI device, we can simply skip
allocation if dev->bus_info is already set.

Fixes: 8f4de2dba9 ("bus/pci: fill bus specific information")

Reported-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-11-22 16:07:56 +01:00
Thomas Monjalon
abb98ed0b3 drivers: remove unused build variable
The variable fmt_name has been removed from DPDK 21.02-rc1.
Then some drivers were integrated in the same year with this variable.
Of course it has no effect, so it is cleaned up.

Fixes: 832a4cf1d1 ("compress/mlx5: introduce PMD")
Fixes: a7c86884f1 ("crypto/mlx5: introduce Mellanox crypto driver")
Fixes: 5e7596ba7c ("vdpa/sfc: introduce Xilinx vDPA driver")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-11-22 13:35:32 +01:00
Fei Qin
b22af30045 net/nfp: fix return path in TSO processing
When enable TSO, nfp_net_nfdk_tx_tso() fills segment information in Tx
descriptor. However, the return path for TSO is lost and the LSO related
fields of Tx descriptor is filled with zeros which prevents packets from
being sent.

This patch fixes the return path in TSO processing function to make sure
TSO works fine.

Fixes: c73dced48c ("net/nfp: add NFDk Tx")
Cc: stable@dpdk.org

Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
2022-11-22 02:59:21 +01:00
Chaoyong He
7aa745d788 net/nfp: fix Rx descriptor DMA address for VNIC
When using flower firmware application, and the ctrl vNIC receiving a
packet that is larger than the mbuf size, the Rx function will break the
receive loop and sent a free list descriptor with random DMA address.

Fix this by moving the increment of the free list descriptor counter
to after the packet size have been checked and acted on.

Fixes: a36634e87e ("net/nfp: add flower ctrl VNIC Rx/Tx")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 15:00:01 +01:00
Chaoyong He
3fd6400393 net/nfp: fix Rx descriptor DMA address for PF
When using flower firmware application, and the PF receiving a packet
that is larger than the mbuf size, the Rx function will break the
receive loop and sent a free list descriptor with random DMA address.

Fix this by moving the increment of the free list descriptor counter
to after the packet size have been checked and acted on.

Fixes: cf559c2a1d ("net/nfp: add flower PF Rx/Tx")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 15:00:01 +01:00
Chaoyong He
0c48f5ad44 net/nfp: fix Rx descriptor DMA address
When receiving a packet that is larger than the mbuf size, the Rx
function will break the receive loop and sent a free list descriptor
with random DMA address.

Fix this by moving the increment of the free list descriptor counter
to after the packet size have been checked and acted on.

Fixes: bb340f56fc ("net/nfp: fix memory leak in Rx")
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 15:00:01 +01:00
Chaoyong He
860d735d32 net/nfp: fix mask table free
The free process of mask table has problem, should use
'rte_hash_free()' rather than 'rte_free()'.

Fixes: ac09376096 ("net/nfp: add structures and functions for flow offload")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 13:40:24 +01:00
Dariusz Sosnowski
8e82ebe265 net/mlx5: document E-Switch limitations with HWS
This patch adds the following limitations to the mlx5 PMD guide:

- With HW Steering and E-Switch enabled, transfer proxy port must
  be started before any port representor.
- With HW Steering and E-Switch enabled, all representors
  must be stopped before transfer proxy port is stopped.

Documentation of mlx5 PMD's implementations of
rte_eth_dev_start() and rte_eth_dev_stop() is updated accordingly:

- rte_eth_dev_start() returns (-EAGAIN) when transfer proxy port
  cannot be started.
- rte_eth_dev_stop() returns (-EBUSY) when port representor
  cannot be stopped.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-11-21 23:47:33 +01:00
Dariusz Sosnowski
f359b71525 net/mlx5: fix log level of transfer proxy stop failure
This patch increases log level for error reporting when stopping
the transfer proxy port failed. Stopping can fail with EBUSY when
related representor ports are still running.

Fixes: 483181f7b6 ("net/mlx5: support device control of representor matching")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-11-21 23:14:26 +01:00
Raslan Darawsheh
559014f232 compress/mlx5: add Bluefield-3 device ID
This adds the Bluefield-3 device ID to the list of
supported NVIDIA devices that run the MLX5 compress PMD.
The device is still in development stage.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
2022-11-21 20:44:12 +01:00
Michael Baum
ef4ece4dbb net/mlx5: fix port closing
The shared IB device (sh) has per port data updated in port creation.
In port closing this port data is updated even when the SH still exist.

However, this updating is happened after SH has been released and for
last port it actually accesses to freed memory.

This patch updates the port data before SH releasing.

Fixes: 13c5c09390 ("net/mlx5: fix port event cleaning order")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-11-20 13:07:14 +01:00
Dariusz Sosnowski
7e59e875cb net/mlx5: fix modify field action validation
This patch removes the following checks from validation
of modify field action:

- rejection of ADD operation,
- offsets should be aligned to 4 bytes.

These limitations were removed in
commit 0f4aa72b99 ("net/mlx5: support flow modify field with HWS"),
but non-HWS validation was not updated.

Notes about these limitations are removed from mlx5 PMD docs.
On top of that, the current offsetting behavior in modify field action
is clarified in the mlx5 docs.

Fixes: 0f4aa72b99 ("net/mlx5: support flow modify field with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-11-20 13:07:14 +01:00
Gregory Etelson
a23640047c net/mlx5: fix maximum LRO message size
The PMD analyzes each Rx queue maximal LRO size and selects one that
fits all queues to configure TIR LRO attribute.
TIR LRO attribute is number of 256 bytes chunks that match the
selected maximal LRO size.

PMD used `priv->max_lro_msg_size` for selected maximal LRO size and
number of TIR chunks.

Fixes: b9f1f4c239 ("net/mlx5: fix port initialization with small LRO")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-11-20 13:07:02 +01:00
Dariusz Sosnowski
28ffc4bbab net/mlx5: fix VLAN push action mask iteration
Before this patch, during translation of OF_PUSH_VLAN actions iterator
was moved forward to the position of OF_SET_VLAN_VID or
OF_SET_VLAN_PCP, but masks iterator was not updated.
As a result, the following actions were incorrectly translated,
because iterators were not aligned.

This patch fixes this behavior by properly adjusting masks iterator
alognside actions iterator.

Fixes: 773ca0e91b ("net/mlx5: support VLAN push/pop/modify with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-11-20 10:04:42 +01:00
Suanming Mou
44864503a5 net/mlx5: fix GENEVE resource management
The item translation split causes GENEVE TLV option resource register
function flow_dev_geneve_tlv_option_resource_register() to be called
twice incorrectly both in spec and mask translation.

In SWS mode the refcnt will only be decreased by 1 in flow release.
The refcnt will never be 0 again, it causes the resource be leaked.
In HWS mode the resource is allocated as global, the refcnt should
not be increased after the resource be allocated. And the resource
should be released during PMD exists.

This commit fixes GENEVE resource management.

Fixes: 75a00812b1 ("net/mlx5: add hardware steering item translation")
Fixes: cd4ab74206 ("net/mlx5: split flow item matcher and value translation")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-11-17 15:47:55 +01:00
Michael Baum
c10643c4ab net/mlx5: fix error log in async flow destruction
The flow_hw_async_flow_destroy() function fills the error structure in
case of failure.

The error log reported by function is "fail to create rte flow" while
the correct failure is in destruction.

This patch changes the error log to report "fail to destroy rte flow".

Fixes: c40c061a02 ("net/mlx5: add basic flow queue operation")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-11-17 15:47:46 +01:00
Beilei Xing
8c6ef17e1f net/idpf: fix checks in multi-queue config and stop
There's core dump when launching l3fwd with 1 queue 1 core. It's
because NULL pointer is used if fail to configure device.
This patch removes incorrect check during device configuration,
and checks NULL pointer when executing VIRTCHNL2_OP_DEALLOC_VECTORS.

Fixes: 549343c25d ("net/idpf: support device initialization")
Fixes: 70675bcc3a ("net/idpf: support RSS")
Fixes: 37291a68fd ("net/idpf: support write back based on ITR expire")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-18 19:05:53 +01:00
Beilei Xing
10114eff6d net/idpf: add supported packet types
Failed to launch l3fwd, the log shows:
port 0 cannot parse packet type, please add --parse-ptype
This patch adds dev_supported_ptypes_get ops.

Fixes: 549343c25d ("net/idpf: support device initialization")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
2022-11-18 18:58:10 +01:00
Beilei Xing
477512896b net/idpf: fix port start
Port can't start successfully if stopping port and starting port
again.
This patch fixes port start by initialization.

Fixes: e9ff6df15b ("net/idpf: stop before closing device")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-17 13:27:27 +01:00
Olivier Matz
21e471abb5 net/ixgbevf: fix promiscuous and allmulti
The configuration of allmulti and promiscuous modes conflicts
together. For instance, if we enable promiscuous mode, then enable and
disable allmulti, then the promiscuous mode is wrongly disabled.

Fix this behavior by:
- doing nothing when we set/unset allmulti if promiscuous mode is on
- restorting the proper mode (none or allmulti) when we disable
  promiscuous mode

Fixes: 1f4564ed76 ("net/ixgbevf: enable promiscuous mode")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wenjun Wu <wenjun1.wu@intel.com>
2022-11-17 13:23:30 +01:00
Zhichao Zeng
1408993082 net/iavf: support VXLAN-GPE tunnel offload
Add support for Vxlan-GPE tunnel packet checksum offloading by adding
the VXLAN_GPE flag during processing of Tx context descriptor.

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Ke Xu <ke1.xu@intel.com>
2022-11-17 13:04:42 +01:00
David Marchand
a63553111a net/ice: fix build with clang 15
This variable is not used.

Fixes: 0d8d7bd720 ("net/ice: support DDP dump switch rule binary")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2022-11-21 11:19:21 +01:00
David Marchand
d9298902d8 net/dpaa2: fix build with clang 15
This variable is not used.

Fixes: 4690a6114f ("net/dpaa2: enable error queues optionally")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2022-11-21 11:19:16 +01:00
David Marchand
f25fa03ad1 net/atlantic: fix build with clang 15
This variable is not used.

Fixes: 2b1472d715 ("net/atlantic: implement Tx path")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2022-11-21 11:19:14 +01:00
David Marchand
6d58990561 bus/dpaa: fix build with clang 15
This variable is not used.

Fixes: f38f61e982 ("bus/dpaa: add BMAN hardware interfaces")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2022-11-21 11:19:10 +01:00
Taekyung Kim
903ec2b1b4 vdpa/ifc: handle data path update failure
Stop and return the error code when update_datapath fails.
update_datapath prepares resources for the vdpa device.
The driver should not perform any further actions
if update_datapath returns an error.

Fixes: a3f8150eac ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org

Signed-off-by: Taekyung Kim <kim.tae.kyung@navercorp.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Andy Pei <andy.pei@intel.com>
2022-11-10 07:23:29 +01:00
Abhishek Maheshwari
518a27ef6b vdpa/ifc/base: wait for disabling before saving queue state
Some ifc hardware require synchronization between disabling a queue and
saving queue-state from LM registers. When queue is disabled from vDPA
driver, ifc device stops executing new virtio-cmds and then updates LM
registers with used/avail index. Before saving the queue-state, vDPA
driver should wait until the queue is disabled from backend.

Fixes: 5d75517bef ("vdpa/ifc/base: access block device registers")
Cc: stable@dpdk.org

Signed-off-by: Abhishek Maheshwari <abhishek.maheshwari@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Mandal Purna Chandra <purna.chandra.mandal@intel.com>
2022-11-10 07:11:54 +01:00
Luca Boccassi
bdab530919 drivers: fix typos found by Lintian
Signed-off-by: Luca Boccassi <bluca@debian.org>
2022-11-15 17:17:14 +01:00
Beilei Xing
e9ff6df15b net/idpf: stop before closing device
This patch stops device at the beginning of idpf_dev_close.

Fixes: 14aa6ed8f2 ("net/idpf: support device start and stop")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-15 15:05:24 +01:00
Stephen Hemminger
742d8aaa81 drivers/net: remove unnecessary null checks
The function rte_free() already handles NULL argument;
therefore the checks in this code are unnecessary.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-11-15 15:04:22 +01:00
David Marchand
1094dd940e cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated
a lot of discrepancies about inclusion of the rte_compat.h header.

Some headers are including it where unneeded, while others rely on
implicit inclusion.

Fix unneeded inclusions:
$ git grep -l include..rte_compat.h |
  xargs grep -LE '__rte_(internal|experimental)' |
  xargs sed -i -e '/#include..rte_compat.h/d'

Fix missing inclusion, by inserting rte_compat.h before the first
inclusion of a DPDK header:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#include..\(rte_\|.*pmd.h.$\)/{
      s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/
    }'

Fix missing inclusion, by inserting rte_compat.h after the last
inclusion of a non DPDK header:
$ for file in $(git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h); do
    tac $file > $file.$$
    sed -i -e \
      '0,/#include../{
        s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/
      }' $file.$$
    tac $file.$$ > $file
    rm $file.$$
  done

Fix missing inclusion, by inserting rte_compat.h after the header guard:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#define/{
      s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/
    }'

And finally, exclude rte_compat.h itself.
$ git checkout lib/eal/include/rte_compat.h

At the end of all this, we have a clean tree:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h
buildtools/check-symbols.sh
devtools/checkpatches.sh
doc/guides/contributing/abi_policy.rst
doc/guides/rel_notes/release_20_11.rst
lib/eal/include/rte_compat.h

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-11-15 08:39:14 +01:00
Ashwin Sekhar T K
3af7276eaf mempool/cnxk: fix destroying empty pool
In scenarios where rte_mempool_free() is called immediately
after rte_mempool_create_empty(), the NPA pool will not be
created. In such cases the free path should not call
roc_npa_pool_destroy().

Fixes: bbf19e89b8 ("mempool/cnxk: add generic operations")
Cc: stable@dpdk.org

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
2022-11-15 04:24:36 +01:00
Nicolas Chautru
e77d682aad baseband/acc100: fix input error related to padding
Previous commit includes some padding for some cases,
which may cause input warning from the HW
which should be safely ignored to avoid false alarm.

Fixes: 6f3325bbfa ("baseband/acc100: add LDPC encoder padding function")
Cc: stable@dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-08 14:42:25 +01:00
Arek Kusztal
29d5bf63ed common/qat: fix undefined initial slice
This commit fixes undefined initial value of slice capability.
When unset it could lead to undefined read of capability due to
stack frame picked values, is should therefore be set to 0.

Fixes: b3cbbcdffa ("common/qat: read HW slice configuration")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-11-08 06:15:47 +01:00
Ciara Power
e0e095d314 crypto/ipsec_mb: fix queue setup in secondary process
If a secondary process is using a queue pair that has been setup by the
primary process, we need to reset mb_mgr pointers.
This commit removes an error return in this case, allowing secondary to
do the remaining setup for the existing qp.

Fixes: b35848bc01 ("crypto/ipsec_mb: add multi-process IPC request handler")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-11-07 05:42:54 +01:00
Hernan Vargas
f044948d45 baseband/acc100: detect deRM corner cases
Add function to detect if de-ratematch pre-processing is recommended for
SW corner cases.
Some specific 5GUL FEC corner cases may cause unintended back pressure
and in some cases a potential stability issue on the ACC100.
The PMD can detect such code block configuration and issue an info
message to the user.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-07 05:38:34 +01:00
Kai Ji
6f1f7a271c crypto/ipsec_mb: fix multiprocess request registration
This patch fix the EEXIST error handling when calling
rte_mp_action_register().

Fixes: b35848bc01 ("crypto/ipsec_mb: add multi-process IPC request handler")

Signed-off-by: Kai Ji <kai.ji@intel.com>
Tested-by: Brian Dooley <brian.dooley@intel.com>
2022-11-03 12:59:18 +01:00
Nicolas Chautru
f8a7430691 baseband/acc200: fix possible negative shift
Potential occurrence of negative shift when using invalid
configuration on ACC200. Enforcing that depth > 0.

Coverity issue: 381636
Fixes: 40e3adbdd3 ("baseband/acc200: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
2022-11-03 12:26:17 +01:00
Brian Dooley
3625d12ed6 crypto/qat: fix reallocate OpenSSL version check
Move the ossl_legacy_provider_unload() into the right place for secure
protocol for QAT. Remove unnecessary unload from session destroy.

Fixes: 52d59b92b0 ("crypto/qat: enable OpenSSL legacy provider in session")
Cc: stable@dpdk.org

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-11-03 11:52:31 +01:00
Hernan Vargas
48024cf1f1 baseband/acc100: remove redundant function
Remove acc100_dma_fill_blk_type_in which already exists in acc_common.h

Fixes: 32e8b7ea35 ("baseband/acc100: refactor to segregate common code")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:24:22 +01:00
Hernan Vargas
beaf1f876c baseband/acc: fix double MSI interrupt in TB mode
Fixed logical bug in SW causing MSI to be issued twice
when running in transport block mode.

Fixes: f404dfe35c ("baseband/acc100: support 4G processing")
Fixes: bec597b78a ("baseband/acc200: add LTE processing")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:22:36 +01:00
Hernan Vargas
31f79cb518 baseband/acc100: fix PMon register values
Enabled the PMon for ACC100 properly.
Previous commit was missing actual implementation
and using incorrect register values.

Fixes: b4bd57b74c ("baseband/acc100: configure PMON control registers")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:21:28 +01:00
Nicolas Chautru
0cdecf4774 baseband/acc200: fix access corner case
To enforce safe access to the ACC200 device, the PMD requires
to explicitly check that the device is in configured and
enabled state prior to accessing queue resources.
This is done by checking the Qmgr ingress queue status.

Fixes: 40e3adbdd3 ("baseband/acc200: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:16:15 +01:00
Nicolas Chautru
4e63e38c62 baseband/acc: fix possible overflow in queue release
Potential overflow issue when casting to 64bits,
notably relevant when extending number of queues.

Coverity issue: 381665
Fixes: 32e8b7ea35 ("baseband/acc100: refactor to segregate common code")
Fixes: 40e3adbdd3 ("baseband/acc200: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:15:20 +01:00
Nicolas Chautru
e3e16275da baseband/acc200: fix LTE half iteration flag
The logic for the flag was inverted.
When starting with even iteration it actually runs
for an additional half iteration.
The change is specific to ACC200.

Fixes: bec597b78a ("baseband/acc200: add LTE processing")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:13:15 +01:00
Ciara Power
f436fdcbf6 crypto/scheduler: fix session retrieval
In cases where some ops failed to enqueue, the op session was never being
reset. This resulted in a segmentation fault when processing ops the
next time. To fix this, only set the op session after the failure
condition is checked.

Also, the incorrect ops index was being used for session retrieval when
dequeueing for the secondary worker.

Fixes: 6812b9bf47 ("crypto/scheduler: use unified session")

Reported-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
2022-11-03 09:09:16 +01:00
Kai Ji
16d6ebb65d crypto/ipsec_mb: fix null checks
This patch fix the NULL pointer check when dereference qp
and ring lookup.

Coverity issue: 381625
Fixes: c75542ae42 ("crypto/ipsec_mb: introduce IPsec_mb framework")
Cc: stable@dpdk.org

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-11-03 09:07:37 +01:00
Pavan Nikhilesh
b33d79af2e event/cnxk: fix missing mempool cookie marking
Mark chunks mempool objects as "put" as they are freed to NPA
automatically when they are parsed by TIM HW.

Fixes: 300b796262 ("event/cnxk: add timer arm routine")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2022-11-07 18:25:35 +01:00
Ferruh Yigit
d1a0489930 event/dlb2: fix Meson build
"meson setup" fails when '-Werror' compiler flag is enabled [1].
This is not a build error in the driver but a build error in meson
during "meson setup" stage.

This issue exists for a while but meson takes it as a warning and
ignores it unless '-Werror' compiler flag is provided.
Although it doesn't cause build error without '-Werror', relevant code
should be broken functionally, this patch fixes that too.

Build file using a variable to detect if macro defined, but that
variable is not set, looks like copy/paste error.
Replacing variable with hardcoded macro name.

[1]
Reproduced via `meson -Dc_args='-Werror' build`
in file 'build/meson-logs/meson-log.txt'

``
Running compile:
Working directory:  /tmp/tmpfrnw2x8z
Command line:  ccache cc /tmp/tmpfrnw2x8z/testfile.c -pipe -E -P
		-Werror -D_FILE_OFFSET_BITS=64 -P -O0 -march=native
Code:
        #ifndef dev/qat_crypto_pmd_gen4.c
        # define dev/qat_crypto_pmd_gen4.c
        #endif
        "MESON_GET_DEFINE_DELIMITER"
dev/qat_crypto_pmd_gen4.c
Compiler stdout:
         "MESON_GET_DEFINE_DELIMITER"
/qat_crypto_pmd_gen4.c/qat_crypto_pmd_gen4.c

Compiler stderr:
 /tmp/tmpfrnw2x8z/testfile.c:3:20:
    error: extra tokens at end of #ifndef directive [-Werror]
    3 |         #ifndef dev/qat_crypto_pmd_gen4.c
      |                    ^
/tmp/tmpfrnw2x8z/testfile.c:4:18:
    error: ISO C99 requires whitespace after the macro name [-Werror]
    4 |         # define dev/qat_crypto_pmd_gen4.c
      |                  ^~~
cc1: all warnings being treated as errors

drivers/event/dlb2/meson.build:41:10:
ERROR: Could not get define 'dev/qat_crypto_pmd_gen4.c'
``

Fixes: d0ce87e41c ("event/dlb2: support single 512B write of 4 QEs")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-11-07 15:20:11 +01:00
Pavan Nikhilesh
9b70a944b4 event/cnxk: fix mbuf offset calculation
Fix incorrect mbuf offset calculation when HEADROOM exceeds 128B
while processing event vectors.

Fixes: 7fbbc981d5 ("event/cnxk: support vectorized Rx event fast path")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2022-11-07 12:50:51 +01:00