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>
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>
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>
rte_intr_callback_unregister may fail when irq cb is in handling,
use sync version to make sure unregister successfully.
Fixes: cf911d90e3 ("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 0d58caa7d6 ("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: 0d58caa7d6 ("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>
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: 17c7d0f9d6 ("net/ice: support basic Rx/Tx")
Fixes: ccf33dccf7 ("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: 5007ac1318 ("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: 6eac0b7fde ("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: 91f27b2e39 ("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: 2184f7cdee ("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>
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: ef4c16fd91 ("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: eff56a7b9f ("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: fed0c5ca5f ("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>
Protocol header count should be changed when tunnel level is larger than 1.
Fixes: 0b241667cc ("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: f7c8c36fde ("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: 549343c25d ("net/idpf: support device initialization")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.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: 70faf9ae0a ("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: 3a2f674b6a ("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: 655c3c26c1 ("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: 50c00baff7 ("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: d15c0946be ("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: c467608215 ("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: 394cc7ba40 ("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: 3eb748869d ("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: e9de8f33ca ("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>