Dapeng Yu [Tue, 15 Dec 2020 10:10:31 +0000 (18:10 +0800)]
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:
f35fec63dde1 ("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>
Souvik Dey [Tue, 15 Dec 2020 13:28:15 +0000 (08:28 -0500)]
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:
4861cde46116 ("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>
Qi Zhang [Wed, 16 Dec 2020 00:21:58 +0000 (08:21 +0800)]
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:
7f85d5ebcfe1 ("net/ice: add AVX512 vector path")
Fixes:
271cc8c5028a ("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>
Igor Ryzhov [Tue, 17 Nov 2020 08:56:39 +0000 (11:56 +0300)]
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:
4861cde46116 ("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>
Liron Himi [Wed, 16 Dec 2020 21:36:52 +0000 (23:36 +0200)]
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>
Gaetan Rivet [Fri, 17 Apr 2020 16:42:07 +0000 (18:42 +0200)]
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:
c848b518bbc7 ("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>
Viacheslav Ovsiienko [Fri, 11 Dec 2020 11:44:52 +0000 (11:44 +0000)]
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:
6c8f7f1c1877 ("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>
Alexander Kozyrev [Thu, 10 Dec 2020 15:14:23 +0000 (15:14 +0000)]
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:
0f20acbf5eda ("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>
Gregory Etelson [Tue, 8 Dec 2020 08:17:05 +0000 (10:17 +0200)]
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:
e7bfa3596a0a ("net/mlx5: separate the flow handle resource")
Fixes:
8bb81f2649b1 ("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>
Murphy Yang [Tue, 15 Dec 2020 08:10:52 +0000 (08:10 +0000)]
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:
dbf3c0e77a22 ("net/ice: handle Rx flex descriptor")
Fixes:
4ab7dbb0a0f6 ("net/ice: switch to Rx flexible descriptor in AVX path")
Fixes:
ece1f8a8f1c8 ("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>
Ting Xu [Mon, 14 Dec 2020 06:04:10 +0000 (14:04 +0800)]
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:
9cf9c02bf6ee ("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>
Long Li [Fri, 11 Dec 2020 20:48:21 +0000 (12:48 -0800)]
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>
Ivan Malov [Fri, 11 Dec 2020 15:34:21 +0000 (18:34 +0300)]
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:
eb4e80085fae ("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>
Ivan Malov [Fri, 11 Dec 2020 15:34:20 +0000 (18:34 +0300)]
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:
84d3fb7d7e1e ("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>
Ajit Khaparde [Mon, 7 Dec 2020 17:54:30 +0000 (09:54 -0800)]
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>
Ajit Khaparde [Sun, 6 Dec 2020 21:59:28 +0000 (13:59 -0800)]
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>
Ajit Khaparde [Sat, 5 Dec 2020 00:15:05 +0000 (16:15 -0800)]
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>
Somnath Kotur [Thu, 3 Dec 2020 06:38:47 +0000 (12:08 +0530)]
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:
f8168ca0e690 ("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>
Kalesh AP [Wed, 7 Oct 2020 03:41:50 +0000 (09:11 +0530)]
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:
49d0709b257f ("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>
Ajit Khaparde [Fri, 4 Dec 2020 23:22:50 +0000 (15:22 -0800)]
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>
Ajit Khaparde [Thu, 3 Dec 2020 20:47:31 +0000 (12:47 -0800)]
net/bnxt: fix freeing mbuf
mbufs are being allocated using rte_mbuf_raw_alloc().
Use corresponding rte_mbuf_raw_free() to free mbuf.
Fixes:
84799b868da9 ("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>
Rahul Gupta [Tue, 25 Aug 2020 07:46:33 +0000 (13:16 +0530)]
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>
Sriharsha Basavapatna [Fri, 28 Aug 2020 11:13:22 +0000 (07:13 -0400)]
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:
f03e66cb64ce ("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>
Ajit Khaparde [Thu, 3 Dec 2020 19:17:14 +0000 (11:17 -0800)]
net/bnxt: fix format specifier for unsigned int
&device requires the %u format specifier not the %d specifier, as
&device is unsigned.
Fixes:
a46bbb57605b ("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>
Ajit Khaparde [Tue, 1 Dec 2020 20:52:53 +0000 (12:52 -0800)]
net/bnxt: fix cleanup on mutex init failure
In case mutex init fails during initialization, start cleanup and
fail the initialization process.
Fixes:
a73b8e939f10 ("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>
Kalesh AP [Thu, 12 Nov 2020 10:47:54 +0000 (16:17 +0530)]
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:
378ab645bb0b ("net/bnxt: fix RSS RETA indirection table ops")
Fixes:
fcc0aa1edc10 ("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>
Ajit Khaparde [Tue, 1 Dec 2020 19:15:23 +0000 (11:15 -0800)]
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>
Kalesh AP [Tue, 17 Nov 2020 07:10:24 +0000 (12:40 +0530)]
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:
b7778e8a1c00 ("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>
Ajit Khaparde [Thu, 12 Nov 2020 22:45:39 +0000 (14:45 -0800)]
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>
Samik Gupta [Fri, 6 Nov 2020 21:41:21 +0000 (16:41 -0500)]
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:
9b63c6fd70e3 ("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>
Samik Gupta [Thu, 12 Nov 2020 21:28:25 +0000 (13:28 -0800)]
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:
d819382543f3 ("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>
Alvin Zhang [Wed, 2 Dec 2020 09:48:06 +0000 (17:48 +0800)]
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:
12cd0cccc3db ("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>
Beilei Xing [Fri, 20 Nov 2020 08:49:47 +0000 (16:49 +0800)]
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:
be6c228d4da3 ("i40e: support Rx interrupt")
Fixes:
4ab831449a1c ("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>
Murphy Yang [Thu, 3 Dec 2020 07:50:30 +0000 (07:50 +0000)]
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:
9966a00a0688 ("net/i40e: enable bad checksum flags in vector Rx")
Fixes:
dafadd73762e ("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>
Murphy Yang [Mon, 23 Nov 2020 07:05:23 +0000 (07:05 +0000)]
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:
bd70c451532c ("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>
Feifei Wang [Wed, 18 Nov 2020 10:48:59 +0000 (04:48 -0600)]
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>
Feifei Wang [Wed, 18 Nov 2020 10:48:58 +0000 (04:48 -0600)]
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>
Feifei Wang [Wed, 18 Nov 2020 10:48:57 +0000 (04:48 -0600)]
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>
Feifei Wang [Wed, 18 Nov 2020 10:48:56 +0000 (04:48 -0600)]
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>
Min Hu (Connor) [Thu, 10 Dec 2020 12:48:43 +0000 (20:48 +0800)]
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:
9bf2ea8dbc65 ("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>
Lijun Ou [Thu, 10 Dec 2020 12:48:42 +0000 (20:48 +0800)]
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>
Lance Richardson [Thu, 3 Dec 2020 14:16:21 +0000 (09:16 -0500)]
net/bnxt: disable end of packet padding for Rx
Testing has shown that the packet forwarding rate for packet sizes
that are not a multiple of the cache line size is reduced when the
DMA size is padded to a multiple of the cache line size. Improve
performance for these packet sizes by disabling EOP padding.
Fixes:
f4253e97e7b0 ("net/bnxt: set padding flags in Rx descriptor")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Yunjian Wang [Tue, 1 Dec 2020 00:59:34 +0000 (08:59 +0800)]
net/bnxt: fix memory leak when mapping fails
We allocated memory for the 'buf' when sending message to HWRM,
but we don't free it when mapping the address to IO address
fails. It will lead to memory leak.
Fixes:
19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Suanming Mou [Mon, 7 Dec 2020 05:58:34 +0000 (13:58 +0800)]
net/mlx5: optimize tunnel offload index pool
Currently, when creating the index pool, if the trunk size is not
configured, the index pool default trunk size will be 4096.
The maximum tunnel offload supported now is 256(MLX5_MAX_TUNNELS),
create the index pool with trunk size 4096 wastes the memory.
This commits changes the tunnel offload index pool trunk size to
MLX5_MAX_TUNNELS to save the memory.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Reviewed-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Suanming Mou [Thu, 3 Dec 2020 02:18:52 +0000 (04:18 +0200)]
net/mlx5: optimize hash list entry memory
Currently, the hash list saves the hash key in the hash entry. And the
key is mostly used to get the bucket index only.
Save the entire 64 bits key to the entry will not be a good option if
the key is only used to get the bucket index. Since 64 bits costs more
memory for the entry, mostly the signature data in the key only uses
32 bits. And in the unregister function, the key in the entry causes
extra bucket index calculation.
This commit saves the bucket index to the entry instead of the hash key.
For the hash list like table, tag and mreg_copy which save the signature
data in the key, the signature data is moved to the resource data struct
itself.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Suanming Mou [Thu, 3 Dec 2020 02:18:51 +0000 (04:18 +0200)]
net/mlx5: optimize hash list synchronization
Since all the hash table operations are related with one dedicated
bucket, the hash table lock and gen_cnt can be allocated per-bucket.
Currently, the hash table uses one global lock to protect all the
buckets, that global lock avoids the buckets to be operated at one
time, it hurts the hash table performance. And the gen_cnt updated
by the entire hash table causes incorrect redundant list research.
This commit optimized the lock and gen_cnt to bucket solid allows
different bucket entries can be operated more efficiently.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dekel Peled [Tue, 24 Nov 2020 13:45:35 +0000 (15:45 +0200)]
net/mlx5: fix shared age action validation
Previous patch added support of shared age action.
This feature is supported on group 1 and higher, and validation was
added accordingly.
On FDB table the group 0 is skipped to improve performance.
As a result the mentioned validation is not relevant for transfer rules.
This patch adds the required check to ensure proper validation.
Fixes:
f9bc5274a6f9 ("net/mlx5: allow age modes combination")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Viacheslav Ovsiienko [Tue, 24 Nov 2020 10:26:43 +0000 (10:26 +0000)]
net/mlx5: fix Verbs memory allocation callback
The rdma-core library uses callbacks to allocate and free memory
from DPDK. The memory allocation callback used the complicated
and incorrect way to get the NUMA socket ID from the context.
The context was wrong that might result in wrong socket ID
and allocating memory from wrong node.
The callbacks are assigned once as Infinibande device context
is created allowing early access to shared DPDK memory for all
Verbs internal objects need that.
Fixes:
36dabcea78f0 ("net/mlx5: use anonymous Direct Verbs allocator argument")
Fixes:
2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes:
17e19bc4dde7 ("net/mlx5: add IB shared context alloc/free functions")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:37 +0000 (18:57 -0800)]
net/ionic: do minor logging fixups
Expose ionic_opcode_to_str() so it can be used for dev cmds, too.
Store the device name in struct adapter.
Switch to memcpy() to work around gcc false positives.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:36 +0000 (18:57 -0800)]
net/ionic: make minor refactorings
This makes the code clearer and conserves resources.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:35 +0000 (18:57 -0800)]
net/ionic: warn if loopback mode is requested
The ionic FW does not support loopback mode at this time.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:34 +0000 (18:57 -0800)]
net/ionic: convert boolean to flag bit
This conserves resources.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:33 +0000 (18:57 -0800)]
net/ionic: remove some unused fields
This conserves resources.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:32 +0000 (18:57 -0800)]
net/ionic: check for command completion more frequently
This reduces the startup time a bit.
Signed-off-by: Neel Patel <neel@pensando.io>
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:31 +0000 (18:57 -0800)]
net/ionic: update maintainer and documentation
The UNMAINTAINED flag will be removed in a future patch.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:30 +0000 (18:57 -0800)]
net/ionic: update interface file
The ionic_if.h file contains the firmware interface definitions.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Boyer [Thu, 10 Dec 2020 02:57:29 +0000 (18:57 -0800)]
net/ionic: enable meson build
Otherwise the ionic PMD is never built.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Girish Nandibasappa [Tue, 1 Dec 2020 11:57:19 +0000 (11:57 +0000)]
net/axgbe: support VLAN
Added VLAN support for AMD XGBE driver
Adding below APIs for axgbe
- axgbe_enable_rx_vlan_stripping: to enable vlan header stripping
- axgbe_disable_rx_vlan_stripping: to disable vlan header stripping
- axgbe_enable_rx_vlan_filtering: to enable vlan filter mode
- axgbe_disable_rx_vlan_filtering: to disable vlan filter mode
- axgbe_update_vlan_hash_table: crc calculation and hash table update
based on vlan values post filter enable
- axgbe_vlan_filter_set: setting of active vlan out of max 4K values
before doing hash update of same
- axgbe_vlan_tpid_set: setting of default tpid values
- axgbe_vlan_offload_set: a top layer function to call strip/filter etc
based on mask values
Signed-off-by: Girish Nandibasappa <girish.nandibasappa@amd.com>
Acked-by: Somalapuram Amaranath <asomalap@amd.com>
Ivan Malov [Tue, 1 Dec 2020 07:30:10 +0000 (10:30 +0300)]
common/sfc_efx/base: support alternative MAE match fields
If MAE slice is configured without conntrack support, outer
rules must match on IP SRC/DST. This isn't reported clearly
by the FW because IPv4 and IPv6 have separate SRC/DST pairs.
The FW reports status ALWAYS for all these four fields, and
having an all-zeros mask for either field prevents the spec
from being certified by the existing spec validation method.
Extend the spec validation to take the "alternative" fields
into account so that legitimate specs don't get turned down.
Fixes:
ed15d7f8e064 ("common/sfc_efx/base: validate and compare outer match specs")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 1 Dec 2020 07:24:21 +0000 (10:24 +0300)]
common/sfc_efx/base: fix signed/unsigned mismatch warnings
Fix signed/unsigned mismatch issues found by Windows build.
Fixes:
34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes:
bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")
Fixes:
e9d5c5fb6872 ("common/sfc_efx/base: avoid reading past buffer")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 1 Dec 2020 07:24:20 +0000 (10:24 +0300)]
common/sfc_efx/base: remove warnings about inline specifiers
Windows build of the current libefx rejects these specifiers.
They're unneeded anyway; the compiler should decide inlining.
Fixes:
34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Huisong Li [Wed, 2 Dec 2020 12:48:55 +0000 (20:48 +0800)]
app/testpmd: fix queue stats mapping configuration
Currently, the queue stats mapping has the following problems:
1) Many PMD drivers don't support queue stats mapping. But there is no
failure message after executing the command "set stat_qmap rx 0 2 2".
2) Once queue mapping is set, unrelated and unmapped queues are also
displayed.
3) The configuration result does not take effect or can not be queried
in real time.
4) The mapping arrays, "tx_queue_stats_mappings_array" &
"rx_queue_stats_mappings_array" are global and their sizes are based
on fixed max port and queue size assumptions.
5) These record structures, 'map_port_queue_stats_mapping_registers()'
and its sub functions are redundant for majority of drivers.
6) The display of the queue stats and queue stats mapping is mixed
together.
Since xstats is used to obtain queue statistics, we have made the
following simplifications and adjustments:
1) If PMD requires and supports queue stats mapping, configure to driver
in real time by calling ethdev API after executing the command "set
stat_qmap rx/tx ...". If not, the command can not be accepted.
2) Based on the above adjustments, these record structures,
'map_port_queue_stats_mapping_registers()' and its sub functions can
be removed. "tx-queue-stats-mapping" & "rx-queue-stats-mapping"
parameters, and 'parse_queue_stats_mapping_config()' can be removed
too.
3) remove display of queue stats mapping in 'fwd_stats_display()' &
'nic_stats_display()', and obtain queue stats by xstats. Since the
record structures are removed, 'nic_stats_mapping_display()' can be
deleted.
Fixes:
4dccdc789bf4 ("app/testpmd: simplify handling of stats mappings error")
Fixes:
013af9b6b64f ("app/testpmd: various updates")
Fixes:
ed30d9b691b2 ("app/testpmd: add stats per queue")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
RongQing Li [Wed, 25 Nov 2020 11:01:32 +0000 (19:01 +0800)]
net/af_xdp: optimize Rx mbuf allocation
While receiving packets, the max bunch number of mbufs are allocated
and if hardware does not receive the max bunch number packets, it
will free redundancy mbufs, this is low performance.
So optimize Rx performance, by allocating number of mbuf based on
result of xsk_ring_cons__peek, to avoid to redundancy allocation,
and free mbuf when receive packets.
And Rx cached_cons must be roll backed if fails to allocate mbuf.
Signed-off-by: RongQing Li <lirongqing@baidu.com>
Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Selwin Sebastian [Thu, 19 Nov 2020 13:21:58 +0000 (18:51 +0530)]
net/axgbe: support device reset
Added support for device reset
Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Amaranath Somalapuram <asomalap@amd.com>
Kiran KN [Tue, 21 Apr 2020 07:48:34 +0000 (07:48 +0000)]
net/bonding: accommodate jumbo frames
Propagate max rx packet length and jumbo offload capabilities
to slaves from master
Signed-off-by: Kiran KN <kirankn@juniper.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Gaetan Rivet [Fri, 17 Apr 2020 16:42:06 +0000 (18:42 +0200)]
net/bonding: fix port id validity check on parsing
If the port_id is equal to RTE_MAX_ETHPORTS, it should be considered
invalid. Additionally, UNUSED ports are also not valid port ids to be
used afterward.
To simplify following the ethdev API rules, use the exposed function
checking whether a port id is valid.
Fixes:
2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Joyce Kong [Mon, 21 Dec 2020 07:38:48 +0000 (15:38 +0800)]
rcu: use EAL memory barrier API
Use rte_atomic_thread_fence wrapper which has been provided for
__atomic_thread_fence builtins to support optimized code for
__ATOMIC_SEQ_CST memory order on x86 platforms.
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Ashish Sadanandan [Thu, 7 Jan 2021 01:31:14 +0000 (18:31 -0700)]
mbuf: add C++ include guard for dynamic fields header
The header was missing the extern "C" directive which causes name
mangling of functions by C++ compilers, leading to linker errors
complaining of undefined references to these functions.
Fixes:
4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Yunjian Wang [Wed, 15 Jul 2020 02:40:10 +0000 (10:40 +0800)]
eal/linux: fix handling of error events from epoll
The "rev->epdata.event" assigned to "events.epdata.event" directly, which
was wrong in case of epoll events. It should be set to the "evs.events".
Fixes:
9efe9c6cdcac ("eal/linux: add epoll wrappers")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:59:00 +0000 (11:59 +0000)]
net/avp: remove always true condition
There is already a break above for the case "count >= 1", so at this
stage 'count' should be always '0'.
Fixes:
1a85922369c4 ("net/avp: add device configuration")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Steven Webster <steven.webster@windriver.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:59 +0000 (11:58 +0000)]
app/crypto-perf: remove always true condition
This is already 'else' leg of the opposite comparison, simple 'else'
will be logically same.
Fixes:
f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:58 +0000 (11:58 +0000)]
net/bnxt: remove redundant return
Removing useless 'return' statement.
Fixes:
b2da02480cb7 ("net/bnxt: support EEM system memory")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:57 +0000 (11:58 +0000)]
net/af_xdp: remove useless assignment
Assignment of function parameter 'umem' removed.
Fixes:
f0ce7af0e182 ("net/af_xdp: remove resources when port is closed")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:56 +0000 (11:58 +0000)]
net/bonding: remove local variable shadowing outer one
'retval' is already defined in the function scope, removing the 'retval'
in the block scope.
Fixes:
112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:55 +0000 (11:58 +0000)]
net/pcap: remove local variable shadowing outer one
'ret' is already defined in the function scope, removing the 'ret' in
the block scope.
Fixes:
c9507cd0cada ("net/pcap: support physical interface MAC address")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:54 +0000 (11:58 +0000)]
app/procinfo: remove useless assignment
'flag' is initialized to '0' but it is overwritten later, moving the
declaration where it is used and initialize with actual value.
Fixes:
0101a0ec6217 ("app/procinfo: add --show-mempool")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:53 +0000 (11:58 +0000)]
app/procinfo: remove useless memset
The intention with the "sizeof(0)" usage is not clear, but the 'stats'
already 'memset' by 'rte_cryptodev_stats_get()' API, removing 'memset'
in application.
Fixes:
fe773600fe3e ("app/procinfo: add --show-crypto")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:52 +0000 (11:58 +0000)]
app/procinfo: fix check on xstats-ids
'parse_xstats_ids()' return 'int'. The return value is assigned to
'nb_xstats_ids' unsigned value, later negative check on this variable is
wrong.
Adding interim 'int' variable for negative check.
Fixes:
7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Thu, 19 Nov 2020 11:58:51 +0000 (11:58 +0000)]
app/procinfo: fix _filters stats reporting
'_filters' is compared twice, second one will be always false, removing
it using the message more relevant to the '_filters'.
Fixes:
2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Guy Kaneti [Sun, 3 Jan 2021 11:01:28 +0000 (13:01 +0200)]
regex/octeontx2: fix PCI table overflow
Sentinel was missing from pci_id_ree_table[] array initialization
which caused it to overflow.
Bugzilla ID: 603
Fixes:
4cd1c5fd9 ("regex/octeontx2: introduce REE driver")
Cc: stable@dpdk.org
Signed-off-by: Guy Kaneti <guyk@marvell.com>
Wisam Jaddo [Thu, 26 Nov 2020 11:15:43 +0000 (13:15 +0200)]
app/flow-perf: simplify objects initialization
Since items are static then the default values will be zero,
thus the memset to zero value is just a redundant code.
Also remove the all not needed variables, that can be replaced
with direct set to the structure itself.
Fixes:
bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Wisam Jaddo [Thu, 26 Nov 2020 11:15:42 +0000 (13:15 +0200)]
app/flow-perf: change clock measurement
The clock() function is not good practice to use for multiple
cores/threads, since it measures the CPU time used by the process
and not the wall clock time, while when running through multiple
cores/threads simultaneously, we can burn through CPU time much
faster.
As a result this commit will change the way of measurement to use
rd_tsc, and the results will be divided by the processor frequency.
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Wisam Jaddo [Thu, 26 Nov 2020 11:15:41 +0000 (13:15 +0200)]
app/flow-perf: add multi-core rule insertion and deletion
One of the ways to increase the insertion/deletion rate is to use
multi-threaded insertion/deletion. Thus it's needed to have support
for testing and measure those rates using flow-perf application.
Now we generate cores and distribute all flows to those cores,
and start inserting/deleting in parallel.
The app now receive the cores count to use from command line option,
then it distribute the rte_flow rules evenly between the cores, and
start inserting/deleting. Each worker will report it's own results,
and in the end the MAIN worker will report the total results for all
cores.
The total results are calculated using RULES_COUNT divided over
max time used between all cores.
Also this touches the memory area, since inserting using multiple cores
in same time the pre solution for memory is not valid, thus now we save
memory before and after each allocation for all cores. In the end we
pick the min pre memory and the max post memory from all cores.
The difference between those values represent the total memory consumed
by the total rte_flow rules from all cores, and then report the total
size of single rte_flow in byte for each port.
How to use this feature:
--cores=N
Where 1 =< N <= RTE_MAX_LCORE
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Wisam Jaddo [Thu, 26 Nov 2020 11:15:40 +0000 (13:15 +0200)]
app/flow-perf: refactor flows handler
Provide the flows_handler() function the ability to control
flow performance processes. It is made possible after the
introduction of the insert_flows() function.
Also provide to the flows_handler() function the ability to print
the DPDK layer memory consumption of rte_flow rule, regardless
if deletion feature is enabled or not, while in previous
solution it was printing all memory changes after flows_handler().
Thus if deletion is there, it will not provide any memory that
represents the rte_flow rule size.
Also current design is easier to read and understand.
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Olivier Matz [Fri, 18 Dec 2020 13:14:22 +0000 (14:14 +0100)]
build: fix plugin load on static build
When dpdk is compiled as static libraries, it is not possible
to load a plugin from an application. We get the following error:
EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno
This happens because the dpdk symbols are not exported. Add them to the
dynamic symbol table by using '-Wl,--export-dynamic'. This option was
previously present when compiled with Makefiles, it was introduced in
commit
f9a08f650211 ("eal: add support for shared object drivers")
Also add it to the pkg-config file.
Fixes:
16ade738fd0d ("app/testpmd: build with meson")
Fixes:
89f0711f9ddf ("examples: build some samples with meson")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Tal Shnaiderman [Sun, 13 Dec 2020 14:16:04 +0000 (16:16 +0200)]
bus/pci: ignore missing NUMA node on Windows
On older processors, NUMA isn't bound to PCIe locality.
those cases return ERROR_NOT_FOUND in response to the
SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node
attribute.
This error fails the probe process for the PCIe device.
this commit will ignore such failure and will set the
numa_node to 0.
Fixes:
b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Reported-by: Odi Assli <odia@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Odi Assli <odia@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Pallavi Kadam [Tue, 15 Dec 2020 00:26:22 +0000 (16:26 -0800)]
eal/windows: add interrupt functions stub
Add some missing interrupt implementations on Windows.
Also add respective functions to export file.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Dmitry Kozlyuk [Fri, 11 Dec 2020 20:09:30 +0000 (23:09 +0300)]
bus/pci: fix hardware ID limit on Windows
Length of hardware IDs list is limited by REGSTR_VAL_MAX_HCID_LEN [1],
which is currently 1024. With the old limit of 260, obtaining the list
could fail in a rare occasion of a very long result (no examples known).
This also removes a bogus dependency on the maximum path length.
[1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hardware-ids
Fixes:
b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
David Marchand [Sat, 19 Dec 2020 08:05:33 +0000 (09:05 +0100)]
ci: fix package installation in GitHub Actions
APT cache must be updated to avoid trying to install an unavailable
version of a package.
Fixes:
87009585e293 ("ci: hook to GitHub Actions")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Vladimir Medvedkin [Tue, 8 Dec 2020 17:00:04 +0000 (17:00 +0000)]
rib: fix insertion in some cases
According to GCC documentation for __builtin_clz:
Returns the number of leading 0-bits in x,
starting at the most significant bit position.
If x is 0, the result is undefined.
__builtin_clz will be called with 0 if the existing
prefix address matches the one we want to insert.
Fixes:
5a5793a5ffa2 ("rib: add RIB library")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
David Marchand [Fri, 4 Dec 2020 17:36:22 +0000 (18:36 +0100)]
ci: enable v21 ABI checks
v21 ABI will be maintained until v21.11.
Let's use the latest released libabigail 1.8.
In GitHub Actions, libabigail binaries and the ABI reference are stored
in two shared caches as all branches can use the same.
While at it, we can reproduce changes from the commit
0b8086ce3fe7
("devtools: remove useless files from ABI reference").
This will save some space in the CI caches.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
David Marchand [Fri, 4 Dec 2020 17:36:21 +0000 (18:36 +0100)]
ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.
Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
Instead, they are gathered in a "catch-all" step and attached as
artifacts.
- A cache entry is stored once and for all, but if no cache is found you
can inherit from the default branch cache. The cache is 5GB large, for
the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
processors that don't have the same capabilities. For DPDK, this
impacts the ccache content since everything was built with
-march=native so far, and we will end up with binaries that can't run
in a later build. The problem has not been seen in Travis CI (?) but
it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
default ccache for the week (useful for the ovsrobot).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
John McNamara [Wed, 2 Dec 2020 19:01:40 +0000 (19:01 +0000)]
license: add licenses for exception cases
The license/exceptions.txt file lists a small number of files
that have licenses that are exceptions to the three main
licenses defined in the Intellectual Property Policy of the
DPDK Charter.
The three exception licenses are MIT, ISC and BSD-2-Clause.
Each of these licenses states that the content of the license
message should be included in the code distribution. This
change adds the text of the MIT, ISC and BSD-2-Clause licenses
as defined on the SPDX website.
Cc: stable@dpdk.org
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Nick Connolly [Sun, 29 Nov 2020 16:00:24 +0000 (16:00 +0000)]
build: disable Windows warnings for insecure funtions
Microsoft CRT defines Windows-specific secure alternatives to
standard library functions and triggers warnings when "insecure"
functions are used [1]. However, calling code already has all
necessary checks around those functions, so these warnings are not
useful for DPDK. MinGW provides its own CRT without this issue.
[1]:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160
Disable this by defining -D_CRT_SECURE_NO_WARNINGS.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Nick Connolly [Sun, 29 Nov 2020 13:00:47 +0000 (13:00 +0000)]
eal/windows: fix vfprintf warning with clang
When building with clang (11.0,--buildtype=debug), eal_lcore.c
produces a -Wformat-nonliteral warning from the vfprintf call
in log_early.
Add __rte_format_printf annotation.
Fixes:
b8a36b086625 ("eal/windows: improve CPU and NUMA node detection")
Cc: stable@dpdk.org
Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Nick Connolly [Fri, 27 Nov 2020 11:07:26 +0000 (11:07 +0000)]
eal/windows: fix debug build with MinGW
Compiling with MinGW in --buildtype=debug produces a redefinition
error for strncasecmp.
The root cause is that rte_os.h shouldn't be injecting POSIX definitions
into the environment. It is the applications responsibility to decide
how to handle missing functionality.
Resolving this properly will require further work, but in the meantime
wrap all such definitions with #ifndef/#endif. This resolves the specific
issue with strncasecmp and handles similar issues that applications may
encounter.
Fixes:
e8428a9d89f1 ("eal/windows: add some basic functions and macros")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Dmitry Kozlyuk [Tue, 1 Dec 2020 16:39:59 +0000 (19:39 +0300)]
bus/pci: fix build with MinGW-w64 8
Fix redefinition of GUID, missing from previous versions.
Fixes:
b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
Dmitry Kozlyuk [Tue, 1 Dec 2020 16:39:58 +0000 (19:39 +0300)]
eal/windows: fix build with MinGW-w64 8
MinGW-w64 above 8.0.0 exposes VirtualAlloc2() API in headers, but lacks
it in import libraries. Hence, availability of this API at compile-time
can't be used to choose between locating VirtualAlloc2() manually or
relying on the dynamic linker.
Fix redefinition compile-time errors.
Always link VirtualAlloc2() when using GCC.
Fixes:
2a5d547a4a9b ("eal/windows: implement basic memory management")
Cc: stable@dpdk.org
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Mon, 30 Nov 2020 07:47:11 +0000 (08:47 +0100)]
version: 21.02-rc0
Start a new release cycle with empty release notes.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Fri, 27 Nov 2020 18:48:48 +0000 (19:48 +0100)]
version: 20.11.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>