Commit Graph

26229 Commits

Author SHA1 Message Date
Qi Zhang
64589777b9 net/ice/base: increase control queue timeout
250 msec timeout is insufficient for some AQ commands. Advice from FW
team was to increase the timeout. Increased to 1 second.

Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2021-01-08 16:03:06 +01:00
Qi Zhang
40e186a69e net/ice/base: modify ptype map for UDP
Add below ptypes into ice_ptypes_udp_il.

MAC_IPV4_GTPC_TEID
MAC_IPV6_GTPC_TEID
MAC_IPV4_GTPC
MAC_IPV6_GTPC
MAC_IPV4_GTPU
MAC_IPV6_GTPU

So outer UDP can also be selected as input set for GTPC and
GTPU non IP packet.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2021-01-08 16:03:06 +01:00
Dapeng Yu
bfa4f64872 net/ice: check Rx queue number on RSS init
When RSS is initialized, rx queues number is used as denominator to set
default value into the RSS lookup table. If it is zero, there will be
error of being divided by 0. So add value check to avoid the error.

Fixes: 50370662b7 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Xuan Ding
95f2f0e9fc net/iavf: improve default RSS
Add support to actively configure the RSS through port config.

Any kernel PF enabled default RSS will be disabled during
initialization.

Besides, default RSS will be configured based on
rte_eth_rss_conf->rss_hf.
Currently supported default rss_type: ipv4[6], ipv4[6]_udp, ipv4[6]_tcp,
ipv4[6]_sctp.

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Simei Su
f57ebdae3c net/iavf: support eCPRI message type 0 for RSS
This patch enables eCPRI Message Type 0 with input set physical
channel ID in rte_flow for RSS.

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Junfeng Guo
6c37927479 net/iavf: support eCPRI message type 0 for flow director
For eCPRI MSG Type 0, ecpriRtcid/ecpriPcid field within the eCPRI
header will be extracted to Field Vector for AVF FDIR.

SPEC for eCPRI:
http://www.cpri.info/downloads/eCPRI_v_2.0_2019_05_10c.pdf

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Simei Su
a14e297a12 net/iavf: support eCPRI flow patterns
Add patterns support for eCPRI.
Added patterns are as follows:
        eth_ecpri
        eth_ipv4_ecpri

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Junfeng Guo
37ab8bdcf0 common/iavf: support eCPRI protocol header fields
Add eCPRI header and its field selectors, including MSG_TYPE, PCID
and RTCID. Since the offset of PCID is same as RTCID, we just add one
MACRO for these two fields. For MSG Type 0, ecpriRtcid/ecpriPcid field
within the eCPRI header will be extracted to Field Vector for FDIR and
RSS.

SPEC for eCPRI:
http://www.cpri.info/downloads/eCPRI_v_2.0_2019_05_10c.pdf

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Alvin Zhang
e8326d35d1 net/i40e: fix Rx bytes statistics
Update the Rx-bytes statistics by subtract CRC bytes count from original
bytes count.

Fixes: bd7883c07d ("net/i40e: refactor some stats related functions")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:06 +01:00
Dapeng Yu
06cad275fe net/ixgbe: fix flex bytes flow director rule
When a flexbytes flow director rule is created, the FDIRCTRL.FLEX_OFFSET
register is set, and it keeps its affect even after the flow director
flexbytes rule is destroyed, causing packets to be transferred to the
wrong place.

It is because setting FDIRCTRL shall only be permitted on Flow Director
initialization flow or clearing the Flow Director table according to the
datasheet, otherwise device may behave unexpectedly.

In order to evade this limitation, simulate the Flow Director
initialization flow or clearing the Flow Director table by setting
FDIRCMD.CLEARHT to 0x1B and then clear it back to 0x0B.

Fixes: f35fec63dd ("net/ixgbe: enable flex bytes for generic flow API")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
2021-01-08 16:03:06 +01:00
Souvik Dey
95ba3f7211 net/i40e: fix VLAN stripping in VF
When VF adds VLAN, Linux PF driver enables VLAN stripping by default,
this might have issues if the app configured DEV_RX_OFFLOAD_VLAN_STRIP.

This behavior of the Linux driver causes confusion with the DPDK app
using i40e_pmd. So it is better to reconfigure the vlan_offload, which
checks for DEV_RX_OFFLOAD_VLAN_STRIP flag in the dev_conf and enables or
disables the vlan strip in the PF.

Application cannot use rte_eth_dev_set_vlan_offload() to set
the VLAN_STRIP, as this will only work for the first time when
original and current config mismatch, but for all subsequent call
it will be ignored.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Souvik Dey <sodey@rbbn.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
2021-01-08 16:03:06 +01:00
Qi Zhang
c2e129698d doc: fix some statements for ice vector PMD
1. Add descriptions for how to select avx512 datapath.
2. Add explanation for "P" in ice.ini.

Fixes: 7f85d5ebcf ("net/ice: add AVX512 vector path")
Fixes: 271cc8c502 ("doc: update ice features list")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Leyi Rong <leyi.rong@intel.com>
2021-01-08 16:03:06 +01:00
Igor Ryzhov
d8d652ec72 net/i40e: fix stats counters
When low and high registers are read separately, this opens the door to
a race condition:
- low register is read
- NIC updates the registers
- high register is read

Because of this, we may end up with an incorrect counter value.
Let's read the registers in one shot, as it is done in Linux kernel
since the introduction of the i40e driver.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:05 +01:00
Liron Himi
7432c8cf8e build: update meson for Marvell Armada drivers
With pkg-config support available within musdk library
(from musdk-release-SDK-10.3.5.0-PR2 version),
meson option 'lib_musdk_dir' can be removed.
PKG_CONFIG_PATH environment variable should be set appropriately
to use the musdk library.

docs are updated with new musdk version and meson instructions.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-08 16:03:05 +01:00
Gaetan Rivet
3b37cc0c28 net/bonding: fix PCI address comparison on non-PCI ports
The bonding PMD will iterate over all available ETH ports and for each,
compare a chunk of bytes at an offset that would correspond to the PCI
address in an rte_pci_device.

This is incorrect and unsafe. Also, the rte_device using this PCI
address is already found, no need to compare again the PCI address of
all eth devices.

Refactoring the code to fix this, the initial check to find the PCI bus
is out of scope.

Fixes: c848b518bb ("net/bonding: support bifurcated driver in eal")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2021-01-08 16:03:05 +01:00
Viacheslav Ovsiienko
ddb0384346 net/mlx5: fix buffer split offload advertising
The buffer split Rx offload is not compatible with Multi-Packet
Receiving Queue (MPRQ) Rx offload, hence, the buffer split
offload flag RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT and other related
values should be advertised only if there is no MPRQ engaged.

Fixes: 6c8f7f1c18 ("net/mlx5: report Rx buffer split capabilities")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Asaf Penso <asafp@nvidia.com>
2021-01-08 16:03:05 +01:00
Alexander Kozyrev
ac340e1fe5 net/mlx5: fix mbuf freeing in vectorized MPRQ
Wrong index is used to find mbufs belonging to an application in
the rxq_free_elts_sprq() function in the case of vectorized MPRQ.
elts_ci points to the last allocated mbuf in this case, not rq_ci.
Use this field to avoid double free of mbuf and segmentation fault.

Fixes: 0f20acbf5e ("net/mlx5: implement vectorized MPRQ burst")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-01-08 16:03:05 +01:00
Gregory Etelson
3ab5a3a7ac net/mlx5: fix Direct Verbs flow descriptor allocation
Initialize flow descriptor tunnel member during flow creation.
Prevent access to stale data and pointers when flow descriptor is
reallocated after release.
Fix flow index validation.

Fixes: e7bfa3596a ("net/mlx5: separate the flow handle resource")
Fixes: 8bb81f2649 ("net/mlx5: use thread specific flow workspace")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-01-08 16:03:05 +01:00
Murphy Yang
75c6287f25 net/ice: fix outer checksum flags
When received tunneled packets, the testpmd output log shows 'ol_flags'
value always is 'PKT_RX_OUTER_L4_CKSUM_UNKNOWN', but expected value is
'PKT_RX_OUTER_L4_CKSUM_GOOD' or 'PKT_RX_OUTER_L4_CKSUM_BAD'.

Add the 'PKT_RX_OUTER_L4_CKSUM_GOOD' and 'PKT_RX_OUTER_L4_CKSUM_BAD' to
'flags' for normal path, 'l3_l4_flags_shuf' for AVX2 and AVX512 vector
path and 'cksum_flags' for SSE vector path to ensure that the 'ol_flags'
can match correct flags.

Fixes: dbf3c0e77a ("net/ice: handle Rx flex descriptor")
Fixes: 4ab7dbb0a0 ("net/ice: switch to Rx flexible descriptor in AVX path")
Fixes: ece1f8a8f1 ("net/ice: switch to flexible descriptor in SSE path")
Cc: stable@dpdk.org

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:05 +01:00
Ting Xu
20aa3a899c net/iavf: fix memory leak in large VF
This patch fixed the issue that the memory allocated for structure
virtchnl_del_ena_dis_queues is not released at the end of the functions
iavf_enable_queues_lv, iavf_disable_queues_lv and iavf_switch_queue_lv.

Fixes: 9cf9c02bf6 ("net/iavf: add enable/disable queues for large VF")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:05 +01:00
Long Li
0a4533facb net/netvsc: ignore unsupported packet on sync command
On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE
packet while executing a VSP command synchronously.

Instead of returning an error, ignore this packet as we don't use it for
DPDK.

Cc: stable@dpdk.org

Signed-off-by: Long Li <longli@microsoft.com>
2021-01-08 16:03:05 +01:00
Ivan Malov
be2f2be77c common/sfc_efx/base: check for MAE privilege
VFs can't control MAE, so it's important to override the general
MAE capability bit by taking MAE privilege into account. Reorder
the code slightly to have the privileges queried before datapath
capabilities are discovered and add required MAE privilege check.

Fixes: eb4e80085f ("common/sfc_efx/base: indicate support for MAE")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-01-08 16:03:05 +01:00
Ivan Malov
1a9e1b7d27 common/sfc_efx/base: update MCDI headers for MAE privilege
VFs and unprivileged PFs should not be able to control MAE.
Add MAE privilege to MCDI headers in order to reflect that.

Fixes: 84d3fb7d7e ("common/sfc_efx/base: add MAE definitions to MCDI")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
c7de4195cc net/bnxt: modify ring index logic
Change the ring logic so that the index increments
unbounded and mask it only when needed.

Modify the existing macros so that the index is not masked.
Add a new macro RING_IDX() to mask it only when needed.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
68e2bebf7b net/bnxt: add missing comments
Add and update some missing comments in the code.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
c50944609e net/bnxt: update indentation and coding style
Indentation and coding style fixes.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Somnath Kotur
70517a3a8f net/bnxt: fix PF resource query
This cmd should be called by every driver after 'hwrm_func_cfg'
to get the actual number of resources allocated by the HWRM.
The values returned in the cmd are the max values for that PF.

Also, now that the max values for the PF are computed in probe itself,
no need to invoke FUNC_QCAPs or any other cmd in dev_configure_op()
as that would just override the actual max values obtained above.

Fixes: f8168ca0e6 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-08 16:03:05 +01:00
Kalesh AP
5f0f9a45ac net/bnxt: fix VNIC RSS configure function
1. Moved invalid VNIC id check to the beginning of the function.
2. Removed a duplicate check which avoids unnecessary code indentation.

Fixes: 49d0709b25 ("net/bnxt: delete and flush L2 filters cleanly")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
265d1a2bb8 net/bnxt: remove function declaration
Remove an orphan function declaration.
It has not been defined yet and hence not used anywhere.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
553347153d net/bnxt: fix freeing mbuf
mbufs are being allocated using rte_mbuf_raw_alloc().
Use corresponding rte_mbuf_raw_free() to free mbuf.

Fixes: 84799b868d ("net/bnxt: fix freeing mbuf")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Rahul Gupta
d35a08b87f net/bnxt: support 236 queues in NS3
For NS3, increased CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS to support
236 counters and increased MAX_STINGRAY_RINGS in driver to support
more rings.

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-08 16:03:05 +01:00
Sriharsha Basavapatna
c72fe7ac3b net/bnxt: fix max rings computation
The current max_rings computation does not take into account the case
when max_nq_rings is <= num_async_cpr. This results in a wrong value
like 0, when max_nq_rings is 1. Fix this by subtracting num_async_cpr
only when max_cp_rings > num_async_cpr.

Apart from this, the entire logic is currently spread across a few
macros, making it hard to read and debug this code. Move this code
into an inline function.

max_msix is not used in the max_rings calculation.
Apparently the max_msix field returned in HWRM_RESC_QCAPS is only valid
for Thor and newer chips. On Wh+ it will be equal to min_compl_rings.
Also, when a function reset is performed on an application quit, FW
will not reset the VF resource pool as per design.
This can lead to a strange condition wherein the max_msix field
on Wh+ keeps changing on each application re-load thereby throwing
throwing off the max_rings computation.

Fixes: f03e66cb64 ("net/bnxt: limit queue count for NS3/Stingray devices")
Cc: stable@dpdk.org

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
fa24e230b1 net/bnxt: fix format specifier for unsigned int
&device requires the %u format specifier not the %d specifier, as
&device is unsigned.

Fixes: a46bbb5760 ("net/bnxt: update multi device design")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
5bbf650b71 net/bnxt: fix cleanup on mutex init failure
In case mutex init fails during initialization, start cleanup and
fail the initialization process.

Fixes: a73b8e939f ("net/bnxt: fix race between start and interrupt handler")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Kalesh AP
4297cadef3 net/bnxt: propagate FW command failure to application
In bnxt_reta_update_op() and bnxt_rss_hash_update_op(), driver does not
propagate the error back to the application when the fw command fails.

Fixes: 378ab645bb ("net/bnxt: fix RSS RETA indirection table ops")
Fixes: fcc0aa1edc ("net/bnxt: add RSS hash configuration")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
3c1fba1903 net/bnxt: remove references to Thor
Refactor code to remove references to Thor.
Instead use P5 as in phase 5 of development cycle since it is applicable
to boards other than Thor as well.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Kalesh AP
ec0a96819d net/bnxt: release HWRM lock in error
In __bnxt_hwrm_func_qcaps, when memory allocations fails
driver is not releasing the hwrm lock. This patch fixes it
by calling hwrm_unlock in that error case.

Fixes: b7778e8a1c ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-08 16:03:05 +01:00
Ajit Khaparde
6a5be38da6 net/bnxt: remove unused field
Remove flow_xstat from bnxt structure.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
2021-01-08 16:03:05 +01:00
Samik Gupta
e36b1cd6b8 net/bnxt: fix VNIC config on Rx queue stop
Reconfigure a vnic's default ring if the current default ring is stopped
by the application. It picks the lowest numbered ring that is currently
active to be the new default, and issues the hwrm_vnic_cfg command to
update the configuration. Applies to adapters that are not Thor-based.

Fixes: 9b63c6fd70 ("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org

Signed-off-by: Samik Gupta <samik.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2021-01-08 16:03:05 +01:00
Samik Gupta
d424af43e6 net/bnxt: fix Rx rings in RSS redirection table
This commit introduces a limit on the number of RX rings included in
the RSS redirection table to a value no larger than the size supported
by Thor as defined by BNXT_RSS_TBL_SIZE_THOR.

Fixes: d819382543 ("net/bnxt: add RSS redirection table operations")
Cc: stable@dpdk.org

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Samik Gupta <samik.gupta@broadcom.com>
2021-01-08 16:03:05 +01:00
Alvin Zhang
c77866a169 net/ixgbe: detect failed VF MTU set
If a VF request to set a invalid maximum packet length value,
The PF kernel driver may disable its reception.

This patch add codes to output information and return the error status.

Fixes: 12cd0cccc3 ("ixgbevf: allow to set MTU")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2021-01-08 16:03:05 +01:00
Beilei Xing
ac241c74ac net/i40e: fix global register recovery
PMD configures the global register I40E_GLINT_CTL during
device initialization to work around the Rx write back
issue. But when a device is bound from DPDK to kernel,
the global register is not recovered to the original
state, it will cause kernel driver performance drop issue.
This patch fixes this issue.

Fixes: be6c228d4d ("i40e: support Rx interrupt")
Fixes: 4ab831449a ("net/i40e: fix interrupt conflict with multi-driver")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
2021-01-08 16:03:05 +01:00
Murphy Yang
c17af95a19 net/i40e: fix L4 checksum flag
When tunneled packet received that inner L4 checksum value is correct,
the test_pmd output log shows 'ol_flags' value is
'PKT_RX_L4_CKSUM_UNKNOWN', but expected value is 'PKT_RX_L4_CKSUM_GOOD'.

If the inner l4 checksum is correct, mark the 'PKT_RX_L4_CKSUM_GOOD'
flag to 'l3_l4e_flags' for sse and 'l3_l4_flags_shuf' for avx2 to
ensure that the 'ol_flags' can match correct flags.

Fixes: 9966a00a06 ("net/i40e: enable bad checksum flags in vector Rx")
Fixes: dafadd7376 ("net/i40e: add AVX2 Rx function")
Cc: stable@dpdk.org

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
2021-01-08 16:03:04 +01:00
Murphy Yang
2ed0117763 net/ice: fix outer UDP Tx checksum offload
If hardware outer UDP Tx checksum offload enabled, it doesn't take
effect when 'IPv6/UDP/VXLAN' packet sent with wrong outer UDP checksum.

In order to take effect, set the 'L4T_CS' flag valid only when 'L4TUNT'
equals one and 'EIPT' is not zero. If 'L4T_CS' flag marked, the hardware
can calculate the outer tunneling UDP checksum.

Fixes: bd70c45153 ("net/ice: support Tx checksum offload for tunnel")
Cc: stable@dpdk.org

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-08 16:03:04 +01:00
Feifei Wang
cf96160a0a net/ixgbe: enable NEON path with checksum offload
IXGBE NEON vector PMD now supports checksum offloading, hence can be
used when DEV_RX_OFFLOAD_CHECKSUM is set.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2021-01-08 16:03:04 +01:00
Feifei Wang
4b194d481b net/ixgbe: mark good checksum for NEON Rx
Add CKSUM_GOOD flag to distinguish a good checksum from an unknown one
in neon vector RX function.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2021-01-08 16:03:04 +01:00
Feifei Wang
f1657f97e4 net/ixgbe: mark bad checksum for NEON Rx
Updated desc_to_olflags_v() to support PKT_RX_IP_CKSUM_BAD and
PKT_RX_L4_CKSUM_BAD in the ol_flags of the mbuf.

And then the NEON vector RX function can be called with hw_ip_checksum
enabled.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2021-01-08 16:03:04 +01:00
Feifei Wang
ff1294ca53 net/ixgbe: set VLAN strip flag for NEON Rx
For NEON vector of IXGBE PMD, introduce new flag PKT_RX_VLAN_STRIPPED to
show the case that the VLAN is stripped from the VLAN tagged packet.

This is because that the old flag PKT_RX_VLAN_PKT only indicates that
the packet is VLAN tagged, but cannot show whether VLAN is in
m->vlan_tci or in the packet at present. So add new flag to show the
vlan has been stripped by the hardware and its tci is saved in
m->vlan_tci when vlan stripping is enabled in the RX configuration of
the IXGBE PMD.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2021-01-08 16:03:04 +01:00
Min Hu (Connor)
2390bf217f net/hns3: fix FEC state query
As FEC is not supported below 10 Gbps,
CMD(HNS3_OPC_CONFIG_FEC_MODE) offered from
Firmware read will return fail in 10 Gbps device.

This patch will prevent read this CMD when below 10 Gbps,
as this is non-sense.

Fixes: 9bf2ea8dbc ("net/hns3: support FEC")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-01-08 16:03:04 +01:00
Lijun Ou
1181500b2f net/hns3: adjust MAC address logging
Here the printing of MAC addresses is adjusted. After the
modification, only some bytes of the MAC address are
displayed.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-01-08 16:03:04 +01:00