Fixed logical bug in SW causing MSI to be issued twice
when running in transport block mode.
Fixes: f404dfe35cc ("baseband/acc100: support 4G processing")
Fixes: bec597b78a0 ("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: b4bd57b74c8 ("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: bec597b78a0 ("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: 6812b9bf470e ("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: c75542ae4200 ("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>
Use helper function rte_mbuf_iova_set to set IOVA address
to fix compilation failures.
Below error was observed:
app/test-bbdev/test_bbdev_perf.c: In function ‘init_op_data_objs’:
app/test-bbdev/test_bbdev_perf.c:1145:11: error:
‘struct rte_mbuf’ has no member named ‘buf_iova’
1145 | m_head->buf_iova = rte_malloc_virt2iova(data);
| ^~
Fixes: 0acdb98667 ("test/bbdev: add FFT operations cases")
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
With symmetric crypto producer and enabled `--fwd_latency` we will
treat rte_mbuf as perf_elt which will lead to rte_mbuf header
corruption. Use rte_mbuf data to store time stamp information.
For asymmetric add space in result data for time stamp.
Fixes: de2bc16e1bd1 ("app/eventdev: add crypto producer mode")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
For asymmetric crypto producer check for event type in
`process_crypto_request` will not pass in case of multiple stages, due
to overwrite of event type during event forward. Use producer type to
dispatch.
Fixes: 8f5b549502d1 ("app/eventdev: support asym ops for crypto adapter")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Setup crypto adapter and add queue pairs before assigning them in
session metadata. Session metadata may use queue pair configuration
parameters, so queue pair should be added before meta assignment.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Mark chunks mempool objects as "put" as they are freed to NPA
automatically when they are parsed by TIM HW.
Fixes: 300b796262a1 ("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: d0ce87e41cdc ("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>
Swap min and max values to match their labels.
Fixes: 2eaa37b86635 ("app/eventdev: add vector mode in pipeline test")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
In the example:
* Properly initialize the socket id field.
* Remove comments redundant and/or not consistent with the code. 180
seconds is not 2 minutes.
* Remove redundant pointer initialization.
In both the example and text, the flags field of the conf struct was
erroneously referred to as timer_adapter_flags and the max_tmo_ns
field as max_tmo_nsec.
Fixes: 30e7fbd62839 ("doc: add event timer adapter guide")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
rte_intr_callback_unregister may fail when irq cb is in handling,
use sync version to make sure unregister successfully.
Fixes: cf911d90e366 ("net/ice: support link update")
Cc: stable@dpdk.org
Signed-off-by: Frank Du <frank.du@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The vector Tx path does not support VLAN insertion via the L2TAG2 field,
but the scalar path supports. The earlier commit was to force to select
scalar path as soon as kernel driver requests to use L2TAG2. That logic is
incorrect. Because other case like VLAN offloading not required but scalar
path selected would have a significant performance drop.
Therefore the following commit was reverted accordingly.
commit 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
After reverting this commit, the AVX512 Tx path would insert the VLAN tag
into the wrong location(inner of QinQ) when the kernel driver requested
L2TAG2. This is inconsistent with the behavior of PF(outer of QinQ).
It is currently known that ice kernel drivers newer than 1.8.9 will request
the use of L2TAG2. User can set parameter '--force-max-simd-bitwidth' to
64/128/256 to avoid this issue.
Fixes: 0d58caa7d6d1 ("net/iavf: fix VLAN insertion")
Cc: stable@dpdk.org
Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Add recommended matching list for ice PMD in DPDK 22.07 and
i40e PMD in DPDK 22.07 and 22.11.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The scalar Tx path would send empty buffer that causes the Tx queue to
overflow.
This patch adds the last buffer length judgment in tx_prepare to fix this
issue, rte_errno will be set to EINVAL and returned if the last buffer is
empty.
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Fixes: ccf33dccf7aa ("net/ice: check illegal packet sizes")
Cc: stable@dpdk.org
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The drop queue index was not set when adding internal Flow
Director Configuration copy in ixgbe device private data.
Therefore dropped packets would be received by queue 0
which is set to drop queue.
This commit sets drop queue index as IXGBE_FDIR_DROP_QUEUE
to fix this issue.
Fixes: 5007ac13189d ("ethdev: remove deprecated Flow Director configuration")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
CRC is stripped by the hardware in the scattered Rx path. The last buffer
is invalid if it's packet length is zero.
This patch adds a judgment for the last buffer length to fix this issue,
it would free the mbuf associated to the last one if the last buffer is
empty.
Fixes: 6eac0b7fde95 ("net/ice: support advance Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
tainted_data_downcast: Downcasting match_item->meta from void * to
struct virtchnl_proto_hdrs implies that the data that this pointer points
to is tainted.
var_assign_var: Assigning: proto_hdrs = match_item->meta.
Both are now tainted.
var_assign_var: Assigning: rss_meta->proto_hdrs = *proto_hdrs. Both are
now tainted.
Passing tainted expression "rss_meta->proto_hdrs.count" to
"iavf_refine_proto_hdrs", which uses it as a loop boundary.
Removed temporary variable 'proto_hdrs', and copied whole memory of
match_item meta with exact structure size to avoid data downcast.
Coverity issue: 381131
Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
For NIC I40E_10G-10G_BASE_T_X722, when the port is configured with
link speed, it cannot receive jumbo frame packets.
Because it set maximum frame size failed when starts the port that
the port link status is still down.
This patch fix the error that starts the port will force set maximum
frame size.
Fixes: 2184f7cdeeaa ("net/i40e: fix max frame size config at port level")
Cc: stable@dpdk.org
Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Tested-by: Dukai Yuan <dukaix.yuan@intel.com>
Passing tainted expression "msg.data_len" to
"rte_memcpy", which uses it as a loop boundary.
Replace tainted expression with a temp variable
to avoid the tainted scalar coverity warning.
Coverity issue: 381688
Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")
Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
To make X722's PCTYPE is compatible with X710, the PCTYPE in the
FD programming descriptor is translated into different types by using
GLQF_FD_PCTYPE table. But the types of 'UNICAST_IPV4_UDP'
and 'MULTICAST_IPV4_UDP' are only supported for X722, so that
the corresponding registers can not be configured after translation.
This patch removes the transition before the FD filter is programmed.
Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
HW VLAN offload cannot be enabled because the HW capability flags
are not set correctly.
Fixes: eff56a7b9f97 ("net/iavf: add offload path for Rx AVX512")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
When a vsi that already exists in the created vsi_list subscribes to the
same filter again, the return value ICE_SUCCESS results in duplicate flow
rules to be stored, which will cause 'flush' and 'destroy' errors.
Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Tested-by: Ke Xu <ke1.xu@intel.com>
This patch corrects the product name for idpf PMD.
Fixes: 549343c25db8 ("net/idpf: support device initialization")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Protocol header count should be changed when tunnel level is larger than 1.
Fixes: 0b241667cc67 ("net/iavf: fix tainted scalar")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This patch fixes the building of context and data descriptor
on the scalar path for IPSec.
Fixes: f7c8c36fdeb7 ("net/iavf: enable inner and outer Tx checksum offload")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Ke Xu <ke1.xu@intel.com>
There's build error with clang 3.4.2 in CentOS 7:
drivers/net/idpf/idpf_vchnl.c:141:13: error: comparison of constant
522 with expression of type 'enum virtchnl_ops' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
Fixes: 549343c25db8 ("net/idpf: support device initialization")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Add explicit flushing of template tables, pattern and actions templates,
when a port is closed or detached.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
PMD attempt to read HW UTC counter properties can fail because the feature
has no support in port FW or mlx5 kernel module.
In that case PMD still can produce correct time-stamps if it runs on core
with nanosecond time resolution.
Fixes: b0067860959d ("common/mlx5: update log for DevX general command failure")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Currently there's limitation for Drop action that can only co-exist with
Count action.
Sample and Age actions are also able to exist with Drop within the same
flow, and this patch includes them in the Drop action validation.
Fixes: 70faf9ae0a29 ("net/mlx5: unify validation of drop action")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
If HW Steering is enabled, Rx queues were configured to receive MARKs
when a table with MARK actions was created. After stopping the port,
Rx queue configuration is released, but during starting the port
the mark flag was not updated in the Rx queue configuration.
This patch introduces a reference count on the MARK action and it
increases/decreases per template_table create/destroy.
When the port is stopped, Rx queue configuration is not cleared if
reference count is not zero.
Fixes: 3a2f674b6aa8 ("net/mlx5: add queue and RSS HW steering action")
Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
The shared IB device (sh) has per port data with filed for interrupt
handler port_id. It used by shared interrupt handler to find the
corresponding rte_eth device by IB port index.
If value is equal or greater RTE_MAX_ETHPORTS it means there is no
subhandler installed for specified IB port index.
When a few ports are created under same sh, the sh is created with the
first port and the interrupt handler port_id is initialized to
RTE_MAX_ETHPORTS for each port.
In port creation, the interrupt handler port_id is updated with the
correct value. Since this updating, the mlx5_dev_interrupt_nl_cb
function uses this port and its priv structure.
However, when the ports are closed, this filed isn't updated and the
interrupt handler continue working until it is uninstalled in SH
destruction.
If mlx5_dev_interrupt_nl_cb is called between port closing and SH
destruction, it uses invalid port causing a crash.
This patch adds interrupt handler port_id updating to the close function
and add memory barrier to make sure it is done before priv reset.
Fixes: 655c3c26c11e ("net/mlx5: fix initial link status detection")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
If application provided maximal LRO size was less than expected PMD
minimum, the PMD either crashed with assert, if asserts were enabled,
or proceeded with port initialization to set port private maximal
LRO size below supported minimum.
The patch terminates port start if LRO size
does not match PMD requirements and TCP LRO offload was requested
at least for one Rx queue.
Fixes: 50c00baff763 ("net/mlx5: limit LRO size to maximum Rx packet")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Local cache for an indexed pool is not initialized in the situation when
all the indices are allocated on one CPU core and freed on another one.
That leads to a crash once we try to check its reference counter.
Check that the local cache is initialized before accessing this counter.
Fixes: d15c0946beea ("net/mlx5: add indexed pool local cache")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
This patch fixes the matcher disconnection handling, by removing the RTC
references from flow table if the currently removed matcher was the last
one for the given table. As a result RTC in this matcher can be
correctly freed, since there are no dangling references to the RTC.
Fixes: c467608215b2 ("net/mlx5/hws: add matcher object")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
This patch fixes the order dereferencing default FDB miss table and
destroying the flow table object. Flow table should be destroyed
before the dereference.
Fixes: 394cc7ba4033 ("net/mlx5/hws: add table object")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
The NIC since 6DX supports multiple timestamp formats
in CQEs configured via firmware. If real time timestamp
format has been configured the correct attributes should
be specified on queue creation via DevX. These attributes
setting was missed on steering queue creation and hardware
steering initialization failed.
Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
When creating meter policy rules, it's possible to use flow items
translation to add src port match criteria. Currently the items
translation process needs to get thread workspace to store vport
metadata tag, but in policy creation, the thread workspace was not
initialized so it will cause assert failure.
This patch adds initialization of thread-local workspace when creating
meter policy rules to avoid that assert.
Fixes: e9de8f33ca89 ("net/mlx5: fix source port checking in sample flow rule")
CC: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>