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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
The function rte_free() already handles NULL argument;
therefore the checks in this code are unnecessary.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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>