Maxime Coquelin [Thu, 17 Jun 2021 14:17:16 +0000 (16:17 +0200)]
net/virtio: keep device and frontend features separated
This patch is preliminary rework to add support for getting
and setting device's config space.
In order to get or set a device config such as its MAC address,
we need to know whether the device itself support the feature,
or if it is emulated by the frontend.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Balazs Nemeth [Tue, 8 Jun 2021 11:41:11 +0000 (13:41 +0200)]
vhost: allocate and free packets in bulk in Tx split
Same idea as commit
a287ac28919d ("vhost: allocate and free packets
in bulk in Tx packed"), allocate and free packets in bulk.
Also remove the unused function virtio_dev_pktmbuf_alloc.
Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thierry Herbelot [Fri, 28 May 2021 13:20:38 +0000 (15:20 +0200)]
net/virtio: fix kernel set features for multi-queue device
Restore the original code, where VHOST_SET_FEATURES is applied to
all vhostfds of the device.
Fixes:
cc0151b34dee ("net/virtio: add virtio-user features ops")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thierry Herbelot [Mon, 24 May 2021 09:08:21 +0000 (11:08 +0200)]
vhost/crypto: check request pointer before dereference
Use vc_req only after it was checked not to be NULL.
Fixes:
2d962bb736521 ("vhost/crypto: fix possible TOCTOU attack")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thomas Monjalon [Tue, 15 Jun 2021 12:49:49 +0000 (14:49 +0200)]
devtools: fix file listing in maintainers check
When having multiple working trees, the main one has a .git directory
while attached trees have a .git file.
Thus the git check should work for both file and directory.
In the case there is no working tree (.git not readable), the command
"find" is used and should be able to list paths with wildcards.
Wildcards work only as shell expansion in the case of file paths,
so the quotes must be removed.
Fixes:
27c2ce563216 ("maintainers: start a Linux-style file")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Chengwen Feng [Fri, 21 May 2021 03:33:54 +0000 (11:33 +0800)]
config/arm: check SVE CPU flag
If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary
could not run on non-SVE platform else it will encounter illegal
instruction [1].
This patch fixes it by adding 'RTE_CPUFLAG_SVE' to compile_time_cpuflags,
so that rte_cpu_is_supported() will print meaningful log under above
situation.
[1] http://mails.dpdk.org/archives/dev/2021-May/209124.html
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Dmitry Kozlyuk [Sun, 2 May 2021 02:33:33 +0000 (05:33 +0300)]
eal/windows: cleanup interrupt resources
Interrupt manager in Windows EAL allocates on IOCP and starts
a control thread that runs indefinitely. At DPDK cleanup
this thread was not stopped and IOCP handle was not closed.
Gracefully stop interrupt-handling in rte_eal_cleanup().
The thread already closes IOCP handle before exiting.
Fixes:
5c016fc0205a ("eal/windows: add interrupt thread skeleton")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Jie Zhou <jizh@microsoft.com>
Tested-by: Jie Zhou <jizh@microsoft.com>
Dmitry Kozlyuk [Sun, 2 May 2021 02:33:32 +0000 (05:33 +0300)]
eal/windows: fix interrupt thread handle leakage
Each time a work was scheduled in the interrupt thread,
usually an alarm, a handle was opened but not closed.
Opening a handle is a system call, which harms alarm precision.
Instead of opening and closing a handle each time, open it
when interrupt thread starts and close it when the thread finishes.
Fixes:
5c016fc0205a ("eal/windows: add interrupt thread skeleton")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Dmitry Kozlyuk [Sun, 2 May 2021 02:33:31 +0000 (05:33 +0300)]
eal/windows: fix interrupt thread ID
Interrupt thread ID retained its value after interrupt thread finish.
Other interrupt routines could then operate on the wrong thread.
Clear interrupt thread ID before thread termination.
Fixes:
5c016fc0205a ("eal/windows: add interrupt thread skeleton")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Kevin Laatz [Thu, 17 Jun 2021 14:18:15 +0000 (14:18 +0000)]
raw/ioat: fix missing ring pointer reset
In the event of a device reconfigure, "hdls_avail" is not being reset. This
can lead to miscalculations in rte_ioat_completed_ops(), causing the
function to report an incorrect amount of completed operations. This patch
fixes the issue by resetting "hdls_avail" during the device configure.
Fixes:
74464005a2af ("raw/ioat: rework SW ring layout")
Cc: stable@dpdk.org
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Kevin Laatz [Thu, 17 Jun 2021 14:17:52 +0000 (14:17 +0000)]
raw/ioat: fix memory leak in device configure
During device configure, memory is allocated for "hdl_ring_flags". In the
event of another call to the device configure function (reconfigure), a
memory leak would occur. This patch fixes the memory leak by free'ing the
memory before reallocating it.
Fixes:
245efe544d8e ("raw/ioat: report status of completed jobs")
Cc: stable@dpdk.org
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Dmitry Kozlyuk [Thu, 27 May 2021 21:24:21 +0000 (00:24 +0300)]
buildtools: allow string constant padding
Size of string constant symbol may be larger than its length
measured up to NUL terminator. In this case pmdinfogen included padding
bytes after NUL terminator in generated source, yielding incorrect code.
Always trim string data to NUL terminator while reading ELF.
It was already done for COFF because there's no symbol size.
Bugzilla ID: 720
Fixes:
f0f93a7adfee ("buildtools: use Python pmdinfogen")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Christian Ehrhardt [Tue, 1 Jun 2021 08:28:25 +0000 (10:28 +0200)]
vfio: add stdbool include
This became visible by backporting the following for the 19.11 stable tree:
c13ca4e8 "vfio: fix DMA mapping granularity for IOVA as VA"
The usage of type bool in the vfio code would require "#include
<stdbool.h>", but rte_vfio.h has no direct paths to stdbool.h.
It happens that in eal_vfio_mp_sync.c it comes after "#include
<rte_log.h>".
And rte_log.h since 20.05 includes stdbool since this change:
241e67bfe "log: add API to check if a logtype can log in a given level"
and thereby mitigates the issue.
It should be safe to include stdbool.h from rte_vfio.h itself
to be present exactly when needed for the struct it defines using that
type.
Fixes:
c13ca4e81cac ("vfio: fix DMA mapping granularity for IOVA as VA")
Cc: stable@dpdk.org
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Ajit Khaparde [Fri, 28 May 2021 17:45:29 +0000 (10:45 -0700)]
doc: fix default burst size in testpmd
Default burst size in testpmd has been changed from 16 to 32
for some time now. But the documentation had not been updated.
Fixes:
836853d3d4cf7 ("app/testpmd: increase default burst size to 32")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kevin Traynor [Fri, 11 Jun 2021 16:38:42 +0000 (17:38 +0100)]
doc: fix typo in SPDX tag
A stray character got added. Remove it.
Fixes:
cb056611a8ed ("eal: rename lcore master and slave")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Kevin Laatz [Fri, 28 May 2021 13:55:59 +0000 (14:55 +0100)]
raw/ioat: add device reset to configuration script
Currently once a device is configured, the user does not have the ability
to reset the device via the script.
This patch adds a device reset option to the script. For example
"$dpdk_idxd_cfg.py 0 --reset" would reset device 0.
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Kevin Laatz [Fri, 28 May 2021 13:55:58 +0000 (14:55 +0100)]
raw/ioat: handle PCI address in configuration script
Currently the user needs to find the DSA instance number for any DSA device
they would like to configure using this script, which can be cumbersome and
error-prone since the instance numbering may change when changing the
binding of the devices between vfio-pci and idxd.
This patch improves the usability of the script by adding the ability to
specify the DSA device to configure using the device's PCI address instead
of the DSA instance number. For example, "$dpdk_idxd_cfg.py 0" and
"$dpdk_idxd_cfg.py 6a:01.0" are both valid references to the same device
(assuming the numbering).
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Kevin Laatz [Thu, 27 May 2021 13:36:09 +0000 (14:36 +0100)]
raw/ioat: fix missing device name in idxd bus scan
The device name is not being initialized during the idxd bus scan which
will cause segmentation faults when an appliation tries to access this
information.
This patch adds the required initialization of the device name so that it
can be read without issues.
Fixes:
b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically")
Cc: stable@dpdk.org
Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
Konstantin Ananyev [Fri, 21 May 2021 14:42:07 +0000 (15:42 +0100)]
acl: fix build with GCC 6.3
--buildtype=debug with gcc 6.3 produces the following error:
../lib/librte_acl/acl_run_avx512_common.h: In function
‘resolve_match_idx_avx512x16’:
../lib/librte_acl/acl_run_avx512x16.h:33:18: error:
the last argument must be an 8-bit immediate
^
../lib/librte_acl/acl_run_avx512_common.h:373:9: note:
in expansion of macro ‘_M_I_’
return _M_I_(slli_epi32)(mi, match_log);
^~~~~
Seems like gcc-6.3 complains about the following construct:
static const uint32_t match_log = 5;
...
_mm512_slli_epi32(mi, match_log);
It can't substitute constant variable 'match_log' with its actual value.
The fix replaces constant variable with its immediate value.
Bugzilla ID: 717
Fixes:
b64c2295f7fc ("acl: add 256-bit AVX512 classify method")
Fixes:
45da22e42ec3 ("acl: add 512-bit AVX512 classify method")
Cc: stable@dpdk.org
Reported-by: Liang Ma <liangma@liangbit.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Ting Xu [Thu, 10 Jun 2021 02:45:09 +0000 (10:45 +0800)]
net/ice/base: fix ptype bitmap for IP fragment
IPv4 and IPv6 fragment ptypes are supposed to be separated from IP
other ptypes. New bitmaps for IP fragment ptypes were created, but the
IP fragment ptypes were not deleted from the previous non-frag bitmaps,
which will cause conflicts. This patch removes IP fragment ptypes from
the non-frag bitmaps.
Fixes:
843452817561 ("net/ice/base: support IP fragment RSS and FDIR")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wenjun Wu [Thu, 10 Jun 2021 02:30:19 +0000 (10:30 +0800)]
net/ice: fix RSS for L2 packet
L2 RSS support was deleted by mistake during code
refactoring. This patch adds it again.
Fixes:
38d632cbdc88 ("net/ice: refactor PF RSS")
Cc: stable@dpdk.org
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Beilei Xing [Tue, 1 Jun 2021 05:09:51 +0000 (13:09 +0800)]
net/iavf: fix scalar Rx
The new allocated mbuf should be updated to the SW
ring.
Fixes:
a2b29a7733ef ("net/avf: enable basic Rx Tx")
Fixes:
b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Dapeng Yu [Fri, 4 Jun 2021 02:02:01 +0000 (10:02 +0800)]
net/i40e: fix use after free in FDIR release
The original code use a heap pointer after it is freed.
Fixes:
460d1679586e ("drivers/net: delete HW rings while freeing queues")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ting Xu [Wed, 2 Jun 2021 08:21:04 +0000 (16:21 +0800)]
net/ice: fix FDIR flow type for IPv4 fragment
When creating FDIR rule and parsing the pattern, if IPv4 fragment type is
detected, the flow type is not changed to ICE_FLTR_PTYPE_FRAG_IPV4 from
ICE_FLTR_PTYPE_NONF_IPV4_OTHER. It will cause profile confilict with
other FDIR rules for IPv4 other type.
Fixes:
b7e8781de768 ("net/ice: support flow director for IP fragment packet")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Wed, 26 May 2021 06:12:56 +0000 (14:12 +0800)]
net/ice: fix data path in secondary process
The rte_eth_devices array is not in share memory, it should not be
referenced by ice_adapter which is shared by primary and secondary.
Any process set ice_adapter->eth_dev will corrupt another process'
context.
The patch removed the field "eth_dev" from ice_adapter.
Now, when the data paths try to access the rte_eth_dev_data instance,
they should replace adapter->eth_dev->data with adapter->pf.dev_data.
Fixes:
f9cf4f864150 ("net/ice: support device initialization")
Cc: stable@dpdk.org
Reported-by: Yixue Wang <yixue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yixue Wang <yixue.wang@intel.com>
Qi Zhang [Mon, 24 May 2021 09:07:59 +0000 (17:07 +0800)]
net/ice: fix data path selection in secondary process
The flag use_avx2 and use_avx512 are defined as local variables, they
will not be aware by the secondary process, then wrong data path is
selected. Fix the issue by moving them into struct ice_adapter.
Fixes:
ae60d3c9b227 ("net/ice: support Rx AVX2 vector")
Fixes:
2d5f6953d56d ("net/ice: support vector AVX2 in Tx")
Fixes:
7f85d5ebcfe1 ("net/ice: add AVX512 vector path")
Cc: stable@dpdk.org
Reported-by: Yixue Wang <yixue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yixue Wang <yixue.wang@intel.com>
Qi Zhang [Tue, 1 Jun 2021 13:36:22 +0000 (21:36 +0800)]
net/ice/base: remove unncessary code
Remove unnecessary jumbo frame configure.
Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 1 Jun 2021 12:26:06 +0000 (20:26 +0800)]
net/ice/base: remove VSI info from previous aggregator
remove the VSI info from previous aggregator after moving the VSI to a
new aggregator.
Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 1 Jun 2021 12:13:49 +0000 (20:13 +0800)]
net/ice/base: remove firmware log
Remove firmware log related code.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Tue, 1 Jun 2021 12:03:52 +0000 (20:03 +0800)]
net/ice/base: add function for DSCP configure
ice_aq_set_pfc_mode is used to configure DSCP.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Gordon Noonan [Wed, 12 May 2021 10:28:54 +0000 (11:28 +0100)]
net/iavf: use write combining store for tail updates
Performance improvement: use a write combining store
instead of a regular mmio write to update queue tail
registers.
Signed-off-by: Gordon Noonan <gordon.noonan@intel.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Steve Yang [Wed, 19 May 2021 03:27:45 +0000 (03:27 +0000)]
net/i40e: fix raw packet flow director
When user configured the flow rule with raw packet via command
"flow_director_filter", it would reset all previous fdir input set
flags with "i40e_flow_set_fdir_inset()".
Ignore to configure the flow input set with raw packet rule used.
Fixes:
ff04964ea6d5 ("net/i40e: fix flow director for common pctypes")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Qi Zhang [Wed, 26 May 2021 09:53:05 +0000 (17:53 +0800)]
net/iavf: fix handling of unsupported promiscuous
iavf_execute_vf_cmd returns standard error code but not IAVF_xxx,
The patch fix the wrong error handling in iavf_config_promisc.
Fixes:
1e4d55a7fe71 ("net/iavf: optimize promiscuous device operations")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Dapeng Yu [Thu, 27 May 2021 06:42:51 +0000 (14:42 +0800)]
net/ice: fix default RSS key generation
In original implementation, device reconfiguration will generate
a new default RSS key if there is no one from user, it is unexpected
when updating a completely unrelated configuration.
This patch makes default RSS key unchanged, during the lifetime of the
DPDK application even if there are multiple reconfigurations.
Fixes:
50370662b727 ("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>
Wei Huang [Mon, 31 May 2021 05:22:31 +0000 (01:22 -0400)]
raw/ifpga/base: check address before assigning
In max10_staging_area_init(), variable "start" from fdt_get_reg() may
be invalid, it should be checked before assigning to member variable
"staging_area_base" of structure "intel_max10_device".
Coverity issue: 367480, 367482
Fixes:
a05bd1b40bde ("raw/ifpga: add FPGA RSU APIs")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Haiyue Wang [Wed, 19 May 2021 07:59:33 +0000 (15:59 +0800)]
net/iavf: fix RSS key access out of bound
The array rss_key has size 'vf->vf_res->rss_key_size', the array index
should be less than that.
Cc: stable@dpdk.org
Fixes:
69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Kalesh AP [Mon, 31 May 2021 07:26:44 +0000 (12:56 +0530)]
net/bnxt: remove unnecessary comment
Remove unnecessary comment in the code.
Fixes:
0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Mon, 31 May 2021 07:26:43 +0000 (12:56 +0530)]
net/bnxt: improve probing log message
The existing log message is missing a space. Modified it to
a more meaningful log as part of this change.
Before this patch:
bnxt_dev_init(): bnxtfound at mem
D67E0000, node addr 0x2101112000M
With this patch:
bnxt_dev_init(): Found bnxt device at mem
D67E0000, node addr 0x2101112000M
Fixes:
1bf01f5135f8 ("net/bnxt: prevent device access when device is in reset")
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>
Kalesh AP [Mon, 31 May 2021 07:26:42 +0000 (12:56 +0530)]
net/bnxt: fix check for PTP support in FW
On Thor, driver must use HWRM to access the timestamp information.
Driver should not advertise PTP support to application
if PTP information is not available via HWRM commands.
Fixes:
6cbd89f9f3d8 ("net/bnxt: support PTP for Thor")
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>
Kalesh AP [Mon, 31 May 2021 07:26:41 +0000 (12:56 +0530)]
net/bnxt: use common function to free VNIC resource
Use the function bnxt_vnic_destroy() to destroy VNIC resources
and thereby eliminate few duplicate code.
Fixes:
8d0a244b40b2 ("net/bnxt: cleanup VNIC after flow validate")
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>
Kalesh AP [Mon, 31 May 2021 07:26:40 +0000 (12:56 +0530)]
net/bnxt: set flow error after tunnel redirection free
During flow destroy, when bnxt_hwrm_tunnel_redirect_free() fails,
driver is not setting flow error using "rte_flow_error_set".
Fixes:
11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to 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>
Kalesh AP [Mon, 31 May 2021 07:26:39 +0000 (12:56 +0530)]
net/bnxt: fix error handling in VNIC prepare
Resources should be freed on error conditions. i.e, VNIC and
VNIC context created in HW and memory allocated in
bnxt_vnic_grp_alloc() should be freed.
Added a new function bnxt_vnic_destroy() to do the cleanup.
This lightweight function can be used in flow destroy/flush
path to avoid duplicate code as well.
Fixes:
d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
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>
Kalesh AP [Mon, 31 May 2021 07:26:38 +0000 (12:56 +0530)]
net/bnxt: remove unnecessary code
Also removed a log message which does not convey any
useful information.
Fixes:
d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Mon, 31 May 2021 07:26:37 +0000 (12:56 +0530)]
net/bnxt: set flow error when free filter not available
In bnxt_flow_validate(), when bnxt_get_unused_filter() fails due to
no filter resources available, driver is not setting flow error using
"rte_flow_error_set".
Also, fixed the error code.
Fixes:
5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Mon, 31 May 2021 07:26:36 +0000 (12:56 +0530)]
net/bnxt: fix error messages in VNIC prepare
The bnxt_vnic_prep() can fail due to multiple reasons.
But when bnxt_vnic_prep() fails, PMD is not returning
the actual error/string to the application.
Fix it by moving the "rte_flow_error_set" to bnxt_vnic_prep()
to set the actual error code.
Fixes:
d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
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>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Somnath Kotur [Mon, 31 May 2021 05:53:01 +0000 (11:23 +0530)]
net/bnxt: workaround spurious zero stats in Thor
There is a HW bug that can result in certain stats being reported as
zero.
Workaround this by ignoring stats with a value of zero based on the
previously stored snapshot of the same stat.
This bug mainly manifests in the output of func_qstats as FW aggregrates
each ring's stat value to give the per function stat and if one of
them is zero, the per function stat value ends up being lower than the
previous snapshot which shows up as a zero PPS value in testpmd.
Eliminate invocation of func_qstats and aggregate the per-ring stat
values in the driver itself to derive the func_qstats output post
accounting for the spurious zero stat value.
Bugzilla ID: 641
Fixes:
f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 27 May 2021 06:18:46 +0000 (11:48 +0530)]
net/bnxt: detect bad opaque in Rx completion
There is a rare hardware bug that can cause a bad opaque value in the RX
or TPA start completion. When this happens, the hardware may have used the
same buffer twice for 2 Rx packets. In addition, the driver might also
crash later using the bad opaque as an index into the ring.
The Rx opaque value is predictable and is always monotonically increasing.
The workaround is to keep track of the expected next opaque value and
compare it with the one returned by hardware during RX and TPA start
completions. If they miscompare, log it, discard the completion,
schedule a ring reset and move on to the next one.
Fixes:
0958d8b6435d ("net/bnxt: support LRO")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Mon, 24 May 2021 18:59:51 +0000 (14:59 -0400)]
net/bnxt: add AVX2 RX/Tx
Implement AVX2 vector PMD.
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Mon, 24 May 2021 18:59:50 +0000 (14:59 -0400)]
net/bnxt: fix Rx burst size constraint
The burst receive function should return all packets currently
present in the receive ring up to the requested burst size,
update vector mode receive functions accordingly.
Fixes:
398358341419 ("net/bnxt: support NEON")
Fixes:
bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Mon, 24 May 2021 18:59:49 +0000 (14:59 -0400)]
net/bnxt: refactor HW ptype mapping table
Make the definition of the table used to map hardware packet type
information to DPDK packet type more generic.
Add macro definitions for constants used in creating table
indices, use these to eliminate raw constants in code.
Add build-time assertions to validate ptype mapping constants.
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Thierry Herbelot [Mon, 24 May 2021 09:00:38 +0000 (11:00 +0200)]
net/bnxt: check access to possible null pointer
Check that pointers are valid before using them.
Fixes:
7bc8e9a227ccb ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
David Marchand [Thu, 10 Jun 2021 12:09:22 +0000 (14:09 +0200)]
malloc: fix size annotation for NUMA-aware realloc
__rte_alloc_size is mapped to compiler alloc_size attribute.
Quoting gcc documentation:
"""
alloc_size
The alloc_size attribute is used to tell the compiler that the
function return value points to memory, where the size is given by
one or two of the functions parameters. GCC uses this information
to improve the correctness of __builtin_object_size.
The function parameter(s) denoting the allocated size are specified
by one or two integer arguments supplied to the attribute.
The allocated size is either the value of the single function
argument specified or the product of the two function arguments
specified. Argument numbering starts at one.
"""
In rte_realloc_socket case, only 'size' matters.
Note: this has been spotted by Maxime trying to use rte_realloc_socket
and compiling with gcc 11.
Fixes:
17b347dab769 ("malloc: add alloc_size attribute to functions")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ivan Ilchenko [Wed, 2 Jun 2021 09:49:22 +0000 (12:49 +0300)]
bitmap: fix buffer overrun in bitmap init
Bitmap initialization function is allowed to memset()
caller-provided buffer with number of bytes exceeded
this buffer size. This happens due to wrong comparison
sign between buffer size and number of bytes required
to initialize bitmap.
Fixes:
602c9ca33a4 ("sched: bitmap is now dynamically allocated")
Cc: stable@dpdk.org
Reported-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Haiyue Wang [Mon, 24 May 2021 01:23:45 +0000 (09:23 +0800)]
net/i40e: enable PCI bus master after reset
The VF reset can be triggered by the PF reset event, then the PCI bus
master will be cleared, the VF will be not allowed to issue any Memory
or I/O Requests.
So after the reset event is detected, always enable the PCI bus master.
And if failed, the device or system may be in an invalid state, so keep
the VF reset state to mark it as I/O error.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Haiyue Wang [Mon, 24 May 2021 01:23:44 +0000 (09:23 +0800)]
net/iavf: enable PCI bus master after reset
The VF reset can be triggered by the PF reset event, then the PCI bus
master will be cleared, the VF will be not allowed to issue any Memory
or I/O Requests.
So after the reset event is detected, always enable the PCI bus master.
And if failed, the device or system may be in an invalid state, so keep
the VF reset state to mark it as I/O error.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Haiyue Wang [Mon, 24 May 2021 01:23:43 +0000 (09:23 +0800)]
bus/pci: configure PCI bus master
Add the API to set 'Bus Master Enable' bit to be enabled or disabled in
the PCI command register.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
David Marchand [Thu, 6 May 2021 08:27:54 +0000 (10:27 +0200)]
telemetry: remove static limit on callbacks count
This code is not performance sensitive and can be switched to dynamic
allocations.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Hongbo Zheng [Thu, 6 May 2021 07:16:27 +0000 (15:16 +0800)]
graph: fix null dereference in stats
In function 'stats_mem_init', pointer 'stats' should
be confirmed not null before memset it.
Fixes:
af1ae8b6a32c ("graph: implement stats")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Hongbo Zheng [Thu, 6 May 2021 07:16:26 +0000 (15:16 +0800)]
graph: fix memory leak in stats
Fix function 'stats_mem_populate' return without
free dynamic memory referenced by 'stats'.
Fixes:
af1ae8b6a32c ("graph: implement stats")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Aaron Conole [Thu, 3 Jun 2021 15:22:34 +0000 (11:22 -0400)]
test: remove strict timing requirements some tests
The tests 'alarm_autotest' and 'cycles_autotest' rely on the underlying
system having very accurate and precise timing. On systems where the
timing isn't as rigid, or the load is particularly high, these tests are
unreliable since the wake latency from the scheduler can be high enough
to miss the timing window.
Remove the timing related tests from the test suites. These tests now
ensure the add/remove callback infrastructure unit tests, but drop the
waits and reliance on system timing and load.
This avoids FAIL on various testing infrastructures.
Signed-off-by: Aaron Conole <aconole@redhat.com>
David Marchand [Fri, 21 May 2021 16:45:21 +0000 (18:45 +0200)]
version: 21.08-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, 21 May 2021 15:53:33 +0000 (17:53 +0200)]
version: 21.05.0
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
John McNamara [Thu, 20 May 2021 23:24:09 +0000 (23:24 +0000)]
doc: update release notes for 21.05
Fix grammar, spelling and formatting of DPDK 21.05 release notes.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Kevin Traynor [Fri, 19 Feb 2021 11:17:11 +0000 (11:17 +0000)]
doc: update backport guidelines
Updating the docs to elaborate on the stable release
characteristics and better document the current practice
about new features in stable releases.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Thomas Monjalon [Mon, 8 Mar 2021 22:25:52 +0000 (23:25 +0100)]
doc: improve lstopo tip
The tool lstopo from hwloc package can provide a graphical
or textual view.
In its textual form, the option --merge gives a shorter summary
which fits well with the DPDK need.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Wed, 3 Feb 2021 10:30:57 +0000 (11:30 +0100)]
doc: explain steps for improved code spell checking
The script build-dict.sh was added in DPDK 20.08.
It generates a better dictionary for spell checking
done via checkpatch.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Wed, 19 May 2021 19:24:49 +0000 (21:24 +0200)]
devtools: check %l format specifier
%lx or %llx tend to be wrong for 32-bit platform
if used for fixed size variable like uint64_t.
A checkpatch warning will avoid this common mistake.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Timothy McDaniel [Fri, 21 May 2021 09:11:37 +0000 (11:11 +0200)]
event/dlb2: select scalar dequeue by default
Optimized dequeue using x86 vector instructions was added
in 21.05, but due to limited testing the default has been
changed back to the scalar mode implementation. The vector mode
implementation can be enabled via the devargs option
"vector_opts_enabled=<y/Y>".
Fixes:
000a7b8e7582 ("event/dlb2: optimize dequeue operation")
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Timothy McDaniel [Fri, 21 May 2021 09:11:36 +0000 (11:11 +0200)]
event/dlb2: fix extraction of HW scheduling type
The HW scheduling type was not being extracted properly
in the vector optimized dequeue path. It was also not
being recorded in the xstats.
Fixes:
000a7b8e7582 ("event/dlb2: optimize dequeue operation")
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Timothy McDaniel [Fri, 21 May 2021 09:11:35 +0000 (11:11 +0200)]
doc: fix runtime options in DLB2 guide
Convert to PCI "--allow" devarg format.
The documentation was previously using the "--vdev" form, which cannot
be used with the DLB2 PF PMD.
Fixes:
f3cad285bb88 ("event/dlb2: add infos get and configure")
Fixes:
f7cc194b0f7e ("event/dlb2: add enqueue and its burst variants")
Fixes:
a2e4f1f5e79f ("event/dlb2: add dequeue and its burst variants")
Fixes:
95aa7101cd3c ("doc: add some features to DLB2 guide")
Cc: stable@dpdk.org
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Timothy McDaniel [Fri, 21 May 2021 09:11:34 +0000 (11:11 +0200)]
event/dlb2: remove references to deferred scheduling
Deferred scheduling is a DLB v1.0 feature, and is not valid for
DLB v2.0 or v2.5.
Fixes:
bc62748bd7d4 ("event/dlb2: add private data structures and constants")
Fixes:
a2e4f1f5e79f ("event/dlb2: add dequeue and its burst variants")
Cc: stable@dpdk.org
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
David Marchand [Thu, 20 May 2021 10:39:38 +0000 (12:39 +0200)]
devtools: warn about old release notes updates
Touching release notes should only be for the current version.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Pablo de Lara [Wed, 5 May 2021 15:58:42 +0000 (15:58 +0000)]
doc: support IPsec Multi-buffer lib v1.0
Updated AESNI MB and AESNI GCM, KASUMI, ZUC and SNOW3G PMD documentation
guides with information about the latest Intel IPSec Multi-buffer
library supported.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Kevin Traynor [Thu, 20 May 2021 11:18:21 +0000 (12:18 +0100)]
doc: add GCC 11 and clang 12 support to release notes
Note added support for GCC 11 and clang 12 in the
DPDK 21.05 release notes.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Kevin Traynor [Thu, 20 May 2021 11:06:12 +0000 (12:06 +0100)]
test: fix build with GCC 11
GCC 11 complains that 'a' is uninitialized.
../dpdk/app/test/test_prefetch.c: In function 'test_prefetch':
../dpdk/app/test/test_prefetch.c:25:9:
error: 'a' may be used uninitialized [-Werror=maybe-uninitialized]
25 | rte_prefetch0(&a);
| ^~~~~~~~~~~~~~~~~
Fix by initializing 'a'.
Bugzilla ID: 714
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Reported-by: Ali Alnubani <alialnu@nvidia.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Ferruh Yigit [Wed, 12 May 2021 16:04:43 +0000 (17:04 +0100)]
doc: clarify PMD order in release notes
PMD updates are expected in alphabetical order based on their vendor
name. Clarify this expectation in the section comment.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon [Wed, 19 May 2021 21:38:41 +0000 (23:38 +0200)]
version: 21.05-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Conor Walsh [Thu, 6 May 2021 16:40:59 +0000 (16:40 +0000)]
doc: show how to include code in guides
Currently the documentation describes how to add code snippets to the
docs using code blocks. This can be problematic as the code snippets
in the docs may fall out of sync with the actual code it is referencing
within DPDK. This patch adds instructions to the contribution guide
about how to include code in the docs using literalinclude which will
dynamically get the code from source when the docs are generated. This
will help to ensure that the code within the docs is up to date and not
out of sync with the actual code.
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Wed, 19 May 2021 17:33:16 +0000 (19:33 +0200)]
ethdev: fix comments of packet integrity flow item
The Doxygen comments are placed before the related lines,
but the markers were /**< instead of /**
The struct rte_flow_item_integrity did not appear in Doxygen output
because there was no general comment for the struct.
Fixes:
b10a421a1f3b ("ethdev: add packet integrity check flow rules")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Tianyu Li [Mon, 12 Apr 2021 08:22:31 +0000 (16:22 +0800)]
net/memif: fix Tx bps statistics for zero-copy
Fix the missing Tx-bps counter for memif zero-copy mode
Before
Rx-pps:
6891450 Rx-bps:
3528438928
Tx-pps:
6891482 Tx-bps: 0
After
Throughput (since last show)
Rx-pps:
11157056 Rx-bps:
5712413016
Tx-pps:
11157056 Tx-bps:
5712413016
Fixes:
43b815d88188 ("net/memif: support zero-copy slave")
Cc: stable@dpdk.org
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
Andy Moreton [Tue, 18 May 2021 15:10:12 +0000 (18:10 +0300)]
common/sfc_efx/base: add missing MCDI response length checks
Fixes:
6f619653b9b1 ("net/sfc/base: import MCDI implementation")
Fixes:
e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes:
94190e3543bf ("net/sfc/base: import SFN8xxx family support")
Fixes:
34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes:
e61baa82e64b ("common/sfc_efx/base: add MAE action set provisioning APIs")
Fixes:
b4fac34715f2 ("common/sfc_efx/base: add MAE action rule provisioning APIs")
Fixes:
ed15d7f8e064 ("common/sfc_efx/base: validate and compare outer match specs")
Fixes:
7a673e1a4a05 ("common/sfc_efx/base: support outer rule provisioning")
Cc: stable@dpdk.org
Signed-off-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Andy Moreton [Tue, 18 May 2021 15:10:11 +0000 (18:10 +0300)]
common/sfc_efx/base: limit reported MCDI response length
MCDI helper routines in libefx include length checks for response
messages, to ensure that short replies and optional fields are
handled correctly.
If the MCDI response message from the firmware is larger than the
caller's buffer then the response length reported to the caller
should be limited to the buffer size. Otherwise length checks in
the caller may allow reading past the end of the buffer.
Fixes:
6f619653b9b1 ("net/sfc/base: import MCDI implementation")
Cc: stable@dpdk.org
Signed-off-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Alexander Kozyrev [Thu, 13 May 2021 19:54:58 +0000 (22:54 +0300)]
net/mlx5: fix meta field size for flow modify
The modify_field flow API assumes that the META item is 32 bits wide.
But the C register that is used for META item can be 16 or 32 bits
wide depending on kernel and firmware configurations.
Take this into consideration and use the appropriate META width.
Fixes:
641dbe4fb053 ("net/mlx5: support modify field flow action")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Bing Zhao [Mon, 17 May 2021 15:18:41 +0000 (18:18 +0300)]
net/mlx5: fix loopback for Direct Verbs queue
In the past, all the queues and other hardware objects were created
through Verbs interface. Currently, most of the objects creation are
migrated to Devx interface by default, including queues. Only when
the DV is disabled by device arg or eswitch is enabled, all or some
of the objects are created through Verbs interface.
When using Devx interface to create queues, the kernel driver
behavior is different from the case using Verbs. The Tx loopback
cannot work properly even if the Tx and Rx queues are configured
with loopback attribute. To fix the support self loopback for Tx, a
Verbs dummy queue pair needs to be created to trigger the kernel to
enable the global loopback capability.
This is only required when TIR is created for Rx and loopback is
needed. Only CQ and QP are needed for this case, no WQ(RQ) needs to
be created.
Bugzilla ID: 645
Fixes:
6deb19e1b2d2 ("net/mlx5: separate Rx queue object creations")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Huisong Li [Sat, 15 May 2021 00:52:38 +0000 (08:52 +0800)]
net/hns3: fix link speed when VF device is down
When the port is link down state, it is meaningless to display the
port link speed. It should be an undefined state.
Fixes:
59fad0f32135 ("net/hns3: support link update operation")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Huisong Li [Sat, 15 May 2021 00:52:37 +0000 (08:52 +0800)]
net/hns3: fix DCB reconfiguration
Whether the enable bit of the pfc ("pfc_en") is changed or not is one of
the conditions for reconfiguring the DCB. Currently, pfc_en is not
rolled back when DCB configuration fails. This patch fixes it.
Fixes:
62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Huisong Li [Sat, 15 May 2021 00:52:36 +0000 (08:52 +0800)]
net/hns3: fix DCB configuration
Currently, the DCB configuration takes effect in the dev_start stage, and
the mapping between TCs and queues are also updated in this stage.
However, the DCB configuration is delivered in the dev_configure stage.
If the configuration fails, it should be intercepted in this stage. If
the configuration succeeds, the user should be able to obtain the
corresponding updated information, such as the mapping between TCs and
queues. So this patch moves DCB configuration to dev_configure.
Fixes:
62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Huisong Li [Sat, 15 May 2021 00:52:35 +0000 (08:52 +0800)]
net/hns3: remove meaningless packet buffer rollback
Packet buffer allocation and hardware pause configuration fail normally
when a reset occurs. If the execution fails, rollback of the packet
buffer still fails. So this rollback is meaningless.
Fixes:
62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Huisong Li [Sat, 15 May 2021 00:52:34 +0000 (08:52 +0800)]
net/hns3: fix requested FC mode rollback
Currently, the "requested_fc_mode" lacks rollback when enabling link
FC or PFC fails.
For example, this may result an incorrect FC mode after a reset.
Fixes:
d4fdb71a0e7b ("net/hns3: fix flow control mode")
Fixes:
62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Huisong Li [Sat, 15 May 2021 00:52:33 +0000 (08:52 +0800)]
net/hns3: fix Rx/Tx queue numbers check
The Rx/Tx queue numbers should be greater than TC number, this patch adds
this check for PF before updating the mapping between TC and queue.
Fixes:
a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")
Fixes:
76d794566d43 ("net/hns3: maximize queue number")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Matan Azrad [Thu, 13 May 2021 18:40:20 +0000 (21:40 +0300)]
vdpa/mlx5: fix device unplug
The vDPA PCI device unplug process should release all the private
device resources and also to unregister the device.
The device unregistration was missed what remained the device data
invalid in the rte_vhost library.
Unregister the device in unplug process via the remove operation.
Fixes:
95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")
Cc: stable@dpdk.org
Reported-by: Eli Britstein <elibr@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
Tested-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
David Marchand [Tue, 18 May 2021 07:07:27 +0000 (09:07 +0200)]
net/vhost: restore pseudo TSO support
The net/vhost PMD does not comply with the ethdev offload API as it does
not report Rx/Tx offload capabilities wrt TSO and checksum offloading.
On the other hand, the net/vhost PMD lets guest negotiates TSO and
checksum offloading.
Changing the behavior for Rx/Tx offload flags handling won't
improve/fix this situation and will break applications that might have
been relying on implicit support of TSO in this driver.
Revert this behavior change until we have a complete fix.
Fixes:
ca7036b4af3a ("vhost: fix offload flags in Rx path")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
David Marchand [Mon, 17 May 2021 08:59:51 +0000 (10:59 +0200)]
vhost: restore IOTLB mempool allocation
IOTLB messages will be sent when some queues are not enabled. If we
initialize IOTLB in vhost_user_set_vring_num, it could happen that IOTLB
update comes when IOTLB pool of disabled queues are not initialized.
Fixes:
968bbc7e2e50 ("vhost: avoid IOTLB mempool allocation while IOMMU disabled")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Balazs Nemeth [Fri, 14 May 2021 16:02:07 +0000 (18:02 +0200)]
vhost: fix stored last used index
The optimization introduced by
commit
d18db8049c7c ("vhost: read last used index once")
didn't account for the fact that vhost_flush_enqueue_shadow_packed
increments the last_used_idx.
For this reason, store last_used_idx after the potential call to
vhost_flush_enqueue_shadow_packed.
Bugzilla ID: 699
Fixes:
d18db8049c7c ("vhost: read last used index once")
Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Li Zhang [Thu, 13 May 2021 08:35:44 +0000 (11:35 +0300)]
net/mlx5: fix metering cleanup on stop
A meter may handle Rx queue reference in his sub-policies.
In stop operation, all the Rx queues are released.
Wrongly, the meter reference was not released before
destroying the Rx queues what cause an error in stop.
Release the Rx queues meter references in stop operation.
Fixes:
fc6ce56bba05 ("net/mlx5: prepare sub-policy for flow with meter")
Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Suanming Mou [Thu, 13 May 2021 08:05:15 +0000 (11:05 +0300)]
net/mlx5: fix counter offset detection
Currently, the counter offset support is discovered by creating the
rule with invalid offset counter and drop action in root table. If
the rule creation fails with EINVAL errno, that mean counter offset
is not supported in root table.
However, drop action may not be supported in some rdma-core version
in root table. In this case, the discover code will not work properly.
This commits changes flow attribute to egress. That removes all the
extra fate actions in the flow to avoid any unsupported fate actions
make the discover code fail time to time.
Fixes:
994829e695c0 ("net/mlx5: remove single counter container")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Yunjian Wang [Thu, 13 May 2021 03:39:54 +0000 (11:39 +0800)]
net/mlx5: fix leak when configured repeatedly
Currently, configuring a mlx device, it will allocate its
own process private in mlx5_proc_priv_init() and only frees
it when closing the device. This will lead to a memory leak,
when a device is configured repeatedly.
For example:
for(...)
do
rte_eth_dev_configure
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup
rte_eth_dev_start
rte_eth_dev_stop
done
Fixes:
120dc4a7dcd3 ("net/mlx5: remove device register remap")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Yunjian Wang [Thu, 13 May 2021 03:38:56 +0000 (11:38 +0800)]
net/mlx4: fix leak when configured repeatedly
Currently, configuring a mlx device, it will allocate its
own process private in mlx5_proc_priv_init() and only frees
it when closing the device. This will lead to a memory leak,
when a device is configured repeatedly.
For example:
for(...)
do
rte_eth_dev_configure
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup
rte_eth_dev_start
rte_eth_dev_stop
done
Fixes:
97d37d2c1f6b ("net/mlx4: remove device register remap")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Heinrich Kuhn [Fri, 14 May 2021 09:19:34 +0000 (11:19 +0200)]
net/nfp: fix internal port addressing
Depending on the breakout mode of the physical ports the internal NFP
port number might differ from the actual physical port number. Prior to
this patch the physical port number was used when making configuration
changes to the physical ports (enable, admin up etc). After this change
the internal port number is now correctly used for configuration
changes.
Fixes:
5e15e799d697 ("net/nfp: create separate entity for PF device")
Cc: stable@dpdk.org
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Adam Dybkowski [Thu, 13 May 2021 12:05:42 +0000 (13:05 +0100)]
doc: fix release notes for QAT compression PMD
This patch extends the DPDK 21.05 release notes with the QAT GEN3
compression update.
Fixes:
da573c0e4205 ("compress/qat: enable compression on GEN3")
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>