dpdk.git
4 years agodoc: announce deprecation of ethdev HW Rx done API
Ferruh Yigit [Wed, 26 Feb 2020 15:01:14 +0000 (15:01 +0000)]
doc: announce deprecation of ethdev HW Rx done API

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: clarify experimental API status in security process
Ferruh Yigit [Mon, 17 Jun 2019 16:06:48 +0000 (17:06 +0100)]
doc: clarify experimental API status in security process

Explicitly note that experimental APIs also part of security process.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: clarify security pre-release end of embargo date
Ferruh Yigit [Mon, 17 Jun 2019 16:06:47 +0000 (17:06 +0100)]
doc: clarify security pre-release end of embargo date

Clarify that a fixed date will be used for end of embargo (public
disclosure) date while communicating with downstream stakeholders.

Initial document got a review that it gives an impression that
communicated embargo date can be a range like 'less than a week' which
is not the case. The range applies when defining the end of the embargo
date but a fix date will be communicated.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add tested Marvell integrated NIC platforms
Jerin Jacob [Fri, 22 May 2020 19:46:11 +0000 (01:16 +0530)]
doc: add tested Marvell integrated NIC platforms

Add tested Marvell integrated NIC platforms to v20.05 release notes.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Wed, 20 May 2020 08:38:31 +0000 (11:38 +0300)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: add tested Intel platforms with Intel NICs
Zhaoyan Chen [Fri, 22 May 2020 04:30:39 +0000 (12:30 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms for DPDK 20.05 release.

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
4 years agodoc: prefer https when pointing to dpdk.org
David Marchand [Thu, 19 Mar 2020 08:28:59 +0000 (09:28 +0100)]
doc: prefer https when pointing to dpdk.org

for file in $(git grep -l http://.*dpdk.org doc/); do
  sed -i -e 's#http://\(.*dpdk.org\)#https://\1#g' $file;
done

Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agodoc: fix typo in contributors guide
Muhammad Bilal [Thu, 26 Mar 2020 05:46:54 +0000 (10:46 +0500)]
doc: fix typo in contributors guide

Bugzilla ID: 422
Fixes: 9e0e4a00df77 ("doc: suggest to keep doc and code in same patch")
Cc: stable@dpdk.org
Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
4 years agodoc: fix typo in contributors guide
Sarosh Arif [Sat, 21 Mar 2020 18:06:54 +0000 (23:06 +0500)]
doc: fix typo in contributors guide

Bugzilla ID: 420
Fixes: 58abf6e77c6b ("doc: add contributors guide")
Cc: stable@dpdk.org
Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: update igb_uio module status in Linux guide
Ferruh Yigit [Thu, 21 May 2020 15:11:06 +0000 (16:11 +0100)]
doc: update igb_uio module status in Linux guide

igb_uio kernel module disabled by default starting from v20.02,
document this to prevent confusion.

And add note about long term igb_uio plans/directions to move it to
another repo based on DPDK technical board decision:
http://mails.dpdk.org/archives/dev/2019-November/151763.html

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add gcc 10 support to release notes
Kevin Traynor [Fri, 22 May 2020 15:14:34 +0000 (16:14 +0100)]
doc: add gcc 10 support to release notes

Note support for gcc 10 in the DPDK 20.05 release notes.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
4 years agodevtools: add acronyms in dictionary for commit checks
Ferruh Yigit [Wed, 20 May 2020 10:25:02 +0000 (11:25 +0100)]
devtools: add acronyms in dictionary for commit checks

AltiVec ->
IOTLB   -> Input/Output Translation Lookaside Buffer
IPsec   -> Internet Protocol security
PPPoE   -> Point-to-Point Protocol over Ethernet
PVID    -> Port VLAN IDentifier

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodevtools: remove old ABI validation script
Neil Horman [Thu, 16 Apr 2020 14:54:14 +0000 (10:54 -0400)]
devtools: remove old ABI validation script

Since we've moved away from our initial validate-abi.sh script,
in favor of check-abi.sh, which uses libabigail,
remove the old script from the tree, and update the docs accordingly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agousertools: read PCI device name as UTF-8
Christos Ricudis [Mon, 13 Apr 2020 16:18:04 +0000 (00:18 +0800)]
usertools: read PCI device name as UTF-8

Fixes the case where a PCI device string identifier
contains non-ASCII UTF-8

A particular example is Mellanox Connext-X 5 EN MT27800:

28:00.0 Ethernet controller: Mellanox Technologies
MT27800 Family [ConnectX-5]

Subsystem: Mellanox Technologies ConnectX®-5 EN network
interface card, 100GbE single-port QSFP28, PCIe3.0 x16,
tall bracket; MCX515A-CCAT

Signed-off-by: Christos Ricudis <ricudis@niometrics.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agodoc: add NASM installation steps
Pablo de Lara [Thu, 21 May 2020 09:15:12 +0000 (10:15 +0100)]
doc: add NASM installation steps

The intel-ipsec-mb library requires NASM as a dependency.
Steps on how to get and install NASM are added on the documentation
of the crypto PMDs which requires the library.

Bugzilla ID: 417
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agodoc: fix telemetry registration example
Ciara Power [Fri, 22 May 2020 16:27:41 +0000 (17:27 +0100)]
doc: fix telemetry registration example

The example shown for registering telemetry commands was previously
missing the help text parameter.

Fixes: 24cd1b529f35 ("doc: update telemetry guides")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agoexamples/ip_pipeline: remove check of null response
Jasvinder Singh [Mon, 27 Apr 2020 16:56:49 +0000 (17:56 +0100)]
examples/ip_pipeline: remove check of null response

For sending request messages to data plane threads, the
caller invokes *_msg_send_recv() functions which never
return null response. Thus, removed redundant check on
the returned response.

Coverity issue: 357750, 357740, 357749, 357758, 357702, 357736
Coverity issue: 357679, 357791, 357738, 357778, 357716, 357705
Coverity issue: 357776, 357753, 357729, 357735, 357773, 357723
Fixes: 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands")
Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands")
Fixes: 6b1b3c3c9d30 ("examples/ip_pipeline: add port enable and disable commands")
Fixes: a3a95b7d58b9 ("examples/ip_pipeline: add table entry commands")
Fixes: 3186282f8e12 ("examples/ip_pipeline: add table bulk add command")
Fixes: f634e4c5698a ("examples/ip_pipeline: add table entry delete command")
Fixes: c64b9121a963 ("examples/ip_pipeline: add table entry stats command")
Fixes: 7e11393e40ef ("examples/ip_pipeline: add meter profile commands")
Fixes: e92058d604e6 ("examples/ip_pipeline: add meter stats command")
Fixes: 2b82ef4861c0 ("examples/ip_pipeline: add DSCP table update command")
Fixes: d0d306c7f2a1 ("examples/ip_pipeline: add TTL stats command")
Fixes: a3169ee5ec59 ("examples/ip_pipeline: support rule time read")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoexamples/kni: fix crash during MTU set
Ferruh Yigit [Thu, 21 May 2020 15:10:42 +0000 (16:10 +0100)]
examples/kni: fix crash during MTU set

During MTU set (kni_change_mtu) sample application setup queues, which
can free and re-allocate queues.
Meanwhile sample application keeps continues in Rx/Tx burst calls in
different threads, which may cause crash during queue setup.

Pausing application Rx/Tx calls before MTU set and starts it back
afterwards.

Bugzilla ID: 482
Fixes: a26b116749a3 ("examples/kni: fix MTU change to setup Tx queue")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Tested-by: Xi Zhang <xix.zhang@intel.com>
4 years agotelemetry: fix init log printing
Ciara Power [Fri, 22 May 2020 13:48:39 +0000 (14:48 +0100)]
telemetry: fix init log printing

Initially, printf was used to indicate and error/warning resulting from
telemetry initialisation. This is now fixed to use EAL logs for
notices, and the unnecessary printf for an error is removed.

Fixes: eeb486f3ba65 ("eal: add telemetry as dependency")
Fixes: dd6275a424ac ("telemetry: fix error log output")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/ixgbe: check driver type in MACsec API
Guinan Sun [Fri, 22 May 2020 05:59:55 +0000 (05:59 +0000)]
net/ixgbe: check driver type in MACsec API

The driver type need to be checked in private API.

Fixes: 50556c88104c ("net/ixgbe: fix MACsec setting")
Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/i40e: fix flow director enabling
Wei Zhao [Thu, 21 May 2020 08:03:06 +0000 (16:03 +0800)]
net/i40e: fix flow director enabling

When we flush flow FDIR, all queues are disabled for FDIR.
If FDIR rule is created again, then the flow list is empty,
as it is the first time to create rule after flush fdir filter,
so we need to enable FDIR for all queues.
And also, disable FDIR for queues should be done in function
i40e_flow_flush_fdir_filter().

Fixes: 1491f63c7559 ("net/i40e: fix flush of flow director filter")
Fixes: 6ae9b2b5e8c2 ("net/i40e: cache flow director enable value in Rx queue")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
4 years agonet/iavf: fix flow access
Jeff Guo [Fri, 22 May 2020 02:11:51 +0000 (22:11 -0400)]
net/iavf: fix flow access

Add invalid flow checking func in iavf generic flow to avoid the error
of "Cannot access memory at address 0xXXXXXX" occur.

When hash init, the default RSS rules would be added, while hash uninit,
the default RSS rules should be deleted. Add the missing part in the
hash uninit process.

Fixes: 5ea614254332 ("net/iavf: fix VF reset for RSS")
Fixes: ff2d0c345c3b ("net/iavf: support generic flow API")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
4 years agonet/ice: fix setting L2TAG
Jeff Guo [Wed, 20 May 2020 21:46:14 +0000 (17:46 -0400)]
net/ice: fix setting L2TAG

Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/iavf: fix setting L2TAG
Jeff Guo [Wed, 20 May 2020 21:44:14 +0000 (17:44 -0400)]
net/iavf: fix setting L2TAG

Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/i40e: fix setting L2TAG
Jeff Guo [Wed, 20 May 2020 21:25:21 +0000 (17:25 -0400)]
net/i40e: fix setting L2TAG

Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agodoc: add cycles per packet in testpmd guide
Dharmik Thakkar [Wed, 20 May 2020 03:20:22 +0000 (03:20 +0000)]
doc: add cycles per packet in testpmd guide

Update documentation for 'show fwd' testpmd runtime function to show
CPU cycles/packet example.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: revert DevX preference for Rx objects
Dekel Peled [Wed, 20 May 2020 12:37:31 +0000 (15:37 +0300)]
net/mlx5: revert DevX preference for Rx objects

Recent patch exposed a minor performance issue,
so it is reverted.

Fixes: d237d22fbe62 ("net/mlx5: prefer DevX API to create Rx objects")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/sfc/base: fix manual filter delete in EF10
Igor Romanov [Wed, 20 May 2020 13:59:52 +0000 (14:59 +0100)]
net/sfc/base: fix manual filter delete in EF10

When user requests a filter deletion only filter with
manual priority must be deleted. When an automatic filter has
the same specification, it must be skipped.

Fixes: 585c22edb29c ("net/sfc/base: handle manual and auto filter clashes in EF10")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/hinic: fix TSO
Xiaoyun Wang [Wed, 20 May 2020 11:52:59 +0000 (19:52 +0800)]
net/hinic: fix TSO

When TSO MSS is smaller than 80, and the sum length of continuous
sge num is larger than a MSS, which may cause hardware failed,
so in this scenarios pmd driver should adjust the tso_segsz with
the same with the value of hardware supported.

Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/octeontx2: fix buffer size assignment
Ankur Dwivedi [Wed, 20 May 2020 12:20:10 +0000 (17:50 +0530)]
net/octeontx2: fix buffer size assignment

The elt_size field in mempool holds the size of one packet buffer.
It can be used to set the lpm_sizem1 field in rq context.

The lpb_sizem1 field in rq context is 12 bit, direct assignment
to it was causing overflow of value. Because of this errors
were observed while trying inline inbound with large packets.
This patch resolves the errors.

Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/bnxt: fix Rx ring producer index
Rahul Gupta [Wed, 20 May 2020 17:39:18 +0000 (23:09 +0530)]
net/bnxt: fix Rx ring producer index

When a queue is started after deferred_start, then increment raw_prod
irrespective of new mbuf is allocated or old mbufs are used.

Fixes: d256c73c1122 ("net/bnxt: fix memory leak during queue restart")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
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>
4 years agodoc: update bnxt guide
Ajit Khaparde [Fri, 1 May 2020 19:22:45 +0000 (12:22 -0700)]
doc: update bnxt guide

    - Update list of supported adapters.
    - Update list of supported features.
    - Add some details to describe the features.
    - Remove obsolete limitations.
    - Fix and update links.

Signed-off-by: JP Lee <jongpil.lee@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
4 years agonet/iavf: fix flow director after queue reconfigured
Leyi Rong [Wed, 20 May 2020 06:39:50 +0000 (14:39 +0800)]
net/iavf: fix flow director after queue reconfigured

FDIR ID parsing will not be handled correctly after queue reconfigured,
enable FDIR ID parsing per Q regardless of fdir_ref_cnt to fix it.

Fixes: f71dbf852d46 ("net/iavf: add flow director enabled switch value")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice/base: fix tunnel type match word handling
Qi Zhang [Mon, 18 May 2020 04:23:51 +0000 (12:23 +0800)]
net/ice/base: fix tunnel type match word handling

Use a common function when selecting the proper word and mask match for
a tunnel type when programming switch rules.

Store switch recipe field mask as little endian, which avoids needing to
convert back to big endian after reading recipe from FW.

Obtain word mask from FW recipe.

Fix word matching element and index pairing.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agocryptodev: fix SHA-1 digest enum comment
Adam Dybkowski [Thu, 21 May 2020 14:48:53 +0000 (16:48 +0200)]
cryptodev: fix SHA-1 digest enum comment

This patch fixes improper SHA-1 digest size in the enum comment
and also adds the note about HMAC-SHA-1-96.

Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agodoc: fix build with doxygen 1.8.18
Thomas Monjalon [Wed, 20 May 2020 13:33:43 +0000 (15:33 +0200)]
doc: fix build with doxygen 1.8.18

Having an explicit "index" anchor looks forbidden:

doc/api/doxy-api-index.md:1: warning:
multiple use of section label 'index' for main page

Anyway this anchor was not used, it can be removed.

Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Jerin Jacob <jerinj@marvell.com>
4 years agodevtools: allow warnings in ABI reference build
Thomas Monjalon [Wed, 20 May 2020 09:52:25 +0000 (11:52 +0200)]
devtools: allow warnings in ABI reference build

There is no point in forcing warning-free compilation when building
an ABI reference. It is only preventing from compiling ABI reference
of old releases with recent compilers.

Note: DPDK 20.02 is built (with warnings) by GCC 10 if using -fcommon.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agoexamples/vm_power: drop Unix path limit redefinition
Thomas Monjalon [Wed, 20 May 2020 08:10:50 +0000 (10:10 +0200)]
examples/vm_power: drop Unix path limit redefinition

The Unix socket path may be as long as UNIX_PATH_MAX.
This constant is supposed to be defined in sys/un.h.
On Linux, it appears to be in linux/un.h.

This constant was re-defined locally, based on a variable declaration.
It is breaking compilation with -fno-common (default in GCC 10)
We could avoid the variable declaration by using NULL struct,
but it looks simpler not redefining this system constant.

As the power library and its examples are restricted to Linux only,
the Linux header file is directly included.

Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agoexamples/vm_power: fix build with -fno-common
Thomas Monjalon [Wed, 20 May 2020 07:59:35 +0000 (09:59 +0200)]
examples/vm_power: fix build with -fno-common

The variables of the same name are merged together
if compiled with -fcommon. It used to be the default.
This default behaviour allows to declare a variable in a header file and
share the variable in every .o binaries thanks to merge at link-time.

If compiling with -fno-common (default in GCC 10), the variable must be
shared as extern to avoid multiple re-definitions.

Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agonet/mvpp2: fix build with gcc 10
Thomas Monjalon [Wed, 20 May 2020 09:56:02 +0000 (11:56 +0200)]
net/mvpp2: fix build with gcc 10

GCC 10 is detecting the enum mismatch when assigning UDP variables
with MUSDK constants for TCP.

drivers/net/mvpp2/mrvl_flow.c:2521:47: error: implicit conversion
from 'enum mv_net_tcp_fields' to 'enum mv_net_udp_fields'
[-Werror=enum-conversion]

An assigned field is also fixed from "tcp" to "udp".

Fixes: 7235341d7517 ("net/mrvl: support classifier")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Liron Himi <lironh@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agobus/fslmc: drop inline from non-static functions
Ferruh Yigit [Wed, 20 May 2020 10:22:22 +0000 (11:22 +0100)]
bus/fslmc: drop inline from non-static functions

There is no point in having non-static (and non-extern) inline
functions.

Also this breaks the build for the ICC [1] because of the 'internal'
symbol check.

When function is 'inline' ICC is ignoring 'section' attribute and not
putting function to 'internal' section which breaks 'check-symbols.sh'
script with below error.

[1]
qbman_swp_dqrr_next is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_dqrr_next
qbman_swp_enqueue_multiple is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_enqueue_multiple
qbman_swp_enqueue_multiple_desc is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_enqueue_multiple_desc
qbman_swp_enqueue_multiple_fd is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_enqueue_multiple_fd
qbman_swp_pull is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_pull
qbman_swp_release is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_release

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agoversion: 20.05-rc3
Thomas Monjalon [Tue, 19 May 2020 18:52:47 +0000 (20:52 +0200)]
version: 20.05-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agomaintainers: update for ice
Qi Zhang [Thu, 30 Apr 2020 09:28:05 +0000 (17:28 +0800)]
maintainers: update for ice

Replace Wenzhuo Lu with Qi Zhang.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
4 years agovhost: fix zero-copy server mode
Xuan Ding [Tue, 19 May 2020 10:15:46 +0000 (10:15 +0000)]
vhost: fix zero-copy server mode

This patch fixes the situation where vhost-user cannot start as server
with dequeue_zero_copy enabled.

Using flag instead of vsocket->is_server to determine whether vhost-user
is in client mode. Because vsocket->is_server is not ready at this time.

Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode")
Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
4 years agonet/iavf: fix VF reset for RSS
Jeff Guo [Tue, 19 May 2020 14:23:50 +0000 (10:23 -0400)]
net/iavf: fix VF reset for RSS

Since there are some default rss configure in kernel PF/VF but not DPDK
IAVF, if these configurations be modified by VF and then VF reset, this
default rss configurations can not be reset to default by IAVF. So need
to add default rss set in IAVF hash initial process.

Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhiwei He <zhiwei.he@intel.com>
4 years agonet/i40e: fix queue related exception handling
Qiming Yang [Mon, 18 May 2020 05:45:53 +0000 (13:45 +0800)]
net/i40e: fix queue related exception handling

There should have different behavior in queue start fail and stop fail
case.  When queue start fail, all the next actions should be terminated
and then started queues should be cleared. But for queue stop stage, one
queue stop fail should not end other queues stop. This patch fixed that
issue in PF and VF.

Fixes: b6583ee40265 ("i40e: full VMDQ pools support")
Fixes: 3f6a696f1054 ("i40evf: queue start and stop")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice: fix RSS for GTPU
Qi Zhang [Wed, 13 May 2020 12:11:44 +0000 (20:11 +0800)]
net/ice: fix RSS for GTPU

All supported pattern for GTPU include extend header:
pattern_eth_ipv4_gtpu_eh_ipv4
pattern_eth_ipv4_gtpu_eh_ipv4_udp
pattern_eth_ipv4_gtpu_eh_ipv4_tcp

So the RSS rule should only take effect on GTPU packet that contains
extend header. The patch fix above issue and also allow inner l4 port
as input set.

Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension header")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
4 years agonet/i40e: fix wild pointer
Wei Zhao [Mon, 18 May 2020 08:00:51 +0000 (16:00 +0800)]
net/i40e: fix wild pointer

In i40e PMD code of function i40e_res_pool_free(), if valid_entry
is freed by "rte_free(valid_entry);" in the code, then the following
code for pool update may still use the wild pointer "valid_entry"
for pool info update. It seems has the risk of core dump for
using wild pointer operation, we should avoid this risk.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: update release notes for hns3 driver
Wei Hu (Xavier) [Tue, 19 May 2020 02:11:09 +0000 (10:11 +0800)]
doc: update release notes for hns3 driver

Add release notes for Hisilicon hns3 PMD driver.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
4 years agoapp/fib: fix parsing of invalid line
Vladimir Medvedkin [Mon, 11 May 2020 09:22:32 +0000 (10:22 +0100)]
app/fib: fix parsing of invalid line

Check returned value after strtok()
CID 355674 (#1 of 1): Dereference null return value (NULL_RETURNS)
4. dereference: Dereferencing a pointer that might be NULL s when
calling inet_pton

Fixes: 103809d032cd ("app/test-fib: add test application for FIB")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
4 years agoexamples/l3fwd-graph: check link query failure
Pavan Nikhilesh [Wed, 13 May 2020 20:22:17 +0000 (01:52 +0530)]
examples/l3fwd-graph: check link query failure

Fix unchecked return values reported by coverity.

Coverity issue: 350601
Fixes: ef853f1fd979 ("examples/l3fwd-graph: add ethdev configuration changes")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
4 years agoexamples/l3fwd: check service core reset result
Pavan Nikhilesh [Wed, 13 May 2020 20:20:25 +0000 (01:50 +0530)]
examples/l3fwd: check service core reset result

Fix unchecked return values reported by coverity.

Coverity issue: 354235
Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on caps")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agodevtools: preserve internal section on ABI bump
Haiyue Wang [Thu, 30 Apr 2020 05:46:06 +0000 (13:46 +0800)]
devtools: preserve internal section on ABI bump

INTERNAL is a newly introduced version, update the script used to bump
ABI in all map files but leaving internal section exactly as it is.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodevtools: handle internal version in symbols check
Haiyue Wang [Thu, 30 Apr 2020 05:46:05 +0000 (13:46 +0800)]
devtools: handle internal version in symbols check

INTERNAL is a newly introduced version, update the shell script that
checks whether built libraries are versioned with expected ABI
(current ABI, current ABI + 1, EXPERIMENTAL, or INTERNAL).

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/kni: fix MTU change to setup Tx queue
Rasesh Mody [Thu, 14 May 2020 04:09:38 +0000 (21:09 -0700)]
examples/kni: fix MTU change to setup Tx queue

This patch adds a fix to setup Tx queue when changing KNI interface MTU.
It ensures device can safely start txq post MTU change operation.

Fixes: fc9ee41b7016 ("examples/kni: convert to new ethdev offloads API")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agomempool/octeontx2: add devargs to lock context in cache
Pavan Nikhilesh [Mon, 11 May 2020 10:07:38 +0000 (15:37 +0530)]
mempool/octeontx2: add devargs to lock context in cache

Add device arguments to lock NPA aura and pool contexts in NDC cache.
The device args take hexadecimal bitmask where each bit represent the
corresponding aura/pool id.
Example:
-w 0002:02:00.0,npa_lock_mask=0xf // Lock first 4 aura/pool ctx

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agomk: add note about make system deprecation
Bruce Richardson [Mon, 27 Apr 2020 14:25:20 +0000 (15:25 +0100)]
mk: add note about make system deprecation

When anyone uses the make build system, they are to be informed
about upcoming plans to deprecate and subsequently remove that
system and to use meson and ninja instead.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agokernel/linux: error out on module build failure
Anatoly Burakov [Mon, 11 May 2020 10:25:13 +0000 (11:25 +0100)]
kernel/linux: error out on module build failure

Now that kernel modules aren't built by default, we can be more
strict with their build process, and fail the build if they were
requested to be built, but weren't.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agobuild: skip config of explicitly disabled drivers
Darek Stojaczyk [Thu, 7 May 2020 10:13:50 +0000 (12:13 +0200)]
build: skip config of explicitly disabled drivers

Even when a PMD was disabled with meson's disable_drivers option
its config file was still being parsed. Some of the PMD configs
attempt to find a library they depend on and parse its header files
with certain assumptions. If the library is found, but it's simply
too old to contain the necessary header files, the meson build
fails and it can only be fixed by either updating that library, or
expanding the meson script for the faulty PMD.

While the latter should be still done for the sake of DPDK quality,
an intermediate solution would be to skip building the faulty PMD
- there's a chance we don't need it. That's what this patch allows.

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agometer: provide experimental alias for matured API
Ferruh Yigit [Tue, 19 May 2020 12:16:29 +0000 (13:16 +0100)]
meter: provide experimental alias for matured API

On v20.02 some meter APIs have been matured and symbols moved from
EXPERIMENTAL to DPDK_20.0.1 block.

This can break the applications that were using these mentioned APIs on
v19.11. Although there is no modification on the APIs and the action is
positive and matures the APIs, the affect can be negative to
applications.

This patch provides aliasing by duplicating the existing and versioned
symbols as experimental.

Since symbols moved from DPDK_20.0.1 to DPDK_21 block in the v20.05, the
aliasing done between EXPERIMENTAL and DPDK_21.

With DPDK_21 ABI (DPDK v20.11) all aliasing will be removed and only
stable version of the APIs will remain.

Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agodoc: add link to stable roadmap
Kevin Traynor [Fri, 13 Mar 2020 19:54:42 +0000 (19:54 +0000)]
doc: add link to stable roadmap

The versions currently listed as maintained have gone stale.

Rather than having to keep updating this doc, point to the
dpdk.org stable roadmap.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: use globbing terminology
Jerin Jacob [Mon, 4 May 2020 13:45:37 +0000 (19:15 +0530)]
doc: use globbing terminology

Glob is the terminology used in fnmatch man page.
Use glob terminology across DPDK for shell pattern.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agofix same typo in multiple places
Muhammad Bilal [Fri, 15 May 2020 16:50:54 +0000 (21:50 +0500)]
fix same typo in multiple places

Removed the typing error in doc/guides/eventdevs/index.rst,
drivers/net/mlx5/mlx5.c and in lib/librte_vhost/rte_vhost.h

Bugzilla ID: 477
Fixes: 0857b9421138 ("doc: add event device and software eventdev")
Fixes: 039253166a57 ("vhost: add device op when notification to guest is sent")
Fixes: ad74bc619504 ("net/mlx5: support multiport IB device during probing")
Cc: stable@dpdk.org
Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
4 years agobus/fslmc: remove unused internal symbol
Hemant Agrawal [Fri, 15 May 2020 09:47:52 +0000 (15:17 +0530)]
bus/fslmc: remove unused internal symbol

rte_dpaa2_memsegs is not being used by any other library
or even within bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agobus/fslmc: add accessor for MCP
Hemant Agrawal [Fri, 15 May 2020 09:47:51 +0000 (15:17 +0530)]
bus/fslmc: add accessor for MCP

Currently rte_mcp_ptr_list is being shared as a variable
across libs. This is only used in control path.
This patch change it to a exported function based access.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agobus/dpaa: add accessor for netcfg
Hemant Agrawal [Fri, 15 May 2020 09:47:50 +0000 (15:17 +0530)]
bus/dpaa: add accessor for netcfg

This patch changes the export of fman port config
as function call instead of direct variable access.
This is in control path, so it will not impact perf.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agobus/dpaa: move log types to NXP drivers
Hemant Agrawal [Fri, 15 May 2020 09:47:49 +0000 (15:17 +0530)]
bus/dpaa: move log types to NXP drivers

This is to reduce the number of variables getting exposed
from the dpaa bus. They are not required to be in bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agobus/dpaa: add accessor for qman portal ids
Hemant Agrawal [Fri, 15 May 2020 09:47:48 +0000 (15:17 +0530)]
bus/dpaa: add accessor for qman portal ids

qman caam and pool portal ids are only used in control
path. This patch changes their inter library access to
function call instead of direct shared variable.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agomempool/dpaa2: install missing header with meson
Hemant Agrawal [Fri, 15 May 2020 09:47:47 +0000 (15:17 +0530)]
mempool/dpaa2: install missing header with meson

rte_dpaa2_mempool.h header was missed to be added in meson.build
for header installation.

Fixes: 7ed359909556 ("mempool/dpaa2: add functions for CMDIF")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agodrivers: mark internal NXP symbols
Hemant Agrawal [Fri, 15 May 2020 09:47:44 +0000 (15:17 +0530)]
drivers: mark internal NXP symbols

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agodrivers/mempool: mark internal NXP symbols
Hemant Agrawal [Fri, 15 May 2020 09:47:43 +0000 (15:17 +0530)]
drivers/mempool: mark internal NXP symbols

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agobus/dpaa: mark internal symbols
Hemant Agrawal [Fri, 15 May 2020 09:47:42 +0000 (15:17 +0530)]
bus/dpaa: mark internal symbols

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which are not to be exported.
rte_dpaa_mem_ptov  - static inline in the headerfile
fman_ccsr_map_fd - local shared variable.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agobus/fslmc: mark internal symbols
Hemant Agrawal [Fri, 15 May 2020 09:47:41 +0000 (15:17 +0530)]
bus/fslmc: mark internal symbols

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which were not used
anywhere else i.e. rte_fslmc_vfio_dmamap & dpaa2_get_qbman_swp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agocommon/dpaax: mark internal symbols
Hemant Agrawal [Fri, 15 May 2020 09:47:40 +0000 (15:17 +0530)]
common/dpaax: mark internal symbols

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agotelemetry: fix buffer overrun if max bytes read
Ciara Power [Tue, 12 May 2020 15:29:02 +0000 (16:29 +0100)]
telemetry: fix buffer overrun if max bytes read

If 1024 bytes were received over the socket, this caused
buffer_recvf[bytes] to overrun the array. The size of the buffer - 1 is
now passed to the read function.

Coverity issue: 358442
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agotelemetry: check socket creation failure
Ciara Power [Tue, 12 May 2020 15:29:01 +0000 (16:29 +0100)]
telemetry: check socket creation failure

The return value from the socket function is now checked, as it can
return a negative value on error.

Coverity issue: 358443
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agotelemetry: close socket on connection failure
Ciara Power [Tue, 12 May 2020 15:29:00 +0000 (16:29 +0100)]
telemetry: close socket on connection failure

The socket fd is now being closed when the connection fails.

Coverity issue: 358444
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agotelemetry: fix error checking for strchr function
Ciara Power [Tue, 12 May 2020 15:28:59 +0000 (16:28 +0100)]
telemetry: fix error checking for strchr function

The strchr function return was not being checked which could lead to
NULL deferencing later in the function.

Coverity issue: 358438, 358445
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agotelemetry: keep threads separate from data plane
Ciara Power [Tue, 12 May 2020 15:28:58 +0000 (16:28 +0100)]
telemetry: keep threads separate from data plane

The threads for listening on the telemetry sockets are control threads
and should be separated from those on the data plane. Since telemetry
cannot use the rte_ctrl_thread_create() API, as it does not depend on
EAL, we pass the ctrl thread cpu_set to telemetry init and use it
directly to ensure that telemetry cannot interfere with the data plane
threads.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agokvargs: fix strcmp helper documentation
Gaetan Rivet [Wed, 13 May 2020 10:42:29 +0000 (12:42 +0200)]
kvargs: fix strcmp helper documentation

Minor error, "unless" was used instead of "unlike".

Fixes: a3b85476c51e ("kvargs: add generic string matching callback")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
4 years agodoc: fix typos in ABI policy
Gaetan Rivet [Wed, 13 May 2020 10:43:01 +0000 (12:43 +0200)]
doc: fix typos in ABI policy

Some errors in the document:

  * API instead of ABI once.

Some typos:

  * __rte_depreciated instead of __rte_deprecated.
  * missing ```` around value.
  * inconsistent reference to major ABI version, most
    of the time described without the minor appended, except once.

Verbosity and grammar:

  * Long sentences that would be better cut short.
  * Comma abuse.
  * 'May' used where 'can' seems more fitting.

I'm not a native speaker though, so grain of salt applies.

Fixes: fdf7471cccb8 ("doc: introduce major ABI versions")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agotest: cleanup when leaving bitrate and latency tests
Hemant Agrawal [Tue, 19 May 2020 10:52:58 +0000 (16:22 +0530)]
test: cleanup when leaving bitrate and latency tests

Both bitratestats_autotest latency test initializes the metrics library.
It should be cleaned during exit.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agometrics: fix library cleanup
Hemant Agrawal [Tue, 19 May 2020 10:52:57 +0000 (16:22 +0530)]
metrics: fix library cleanup

metrics_initialized shall be reset in deinit function.
This is currently causing issue in running metrics_autotest
multiple times.

Fixes: 07c1b6925b65 ("telemetry: invert dependency on metrics library")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agopci: explain how empty strings are rejected in DBDF
Gaetan Rivet [Wed, 13 May 2020 10:47:51 +0000 (12:47 +0200)]
pci: explain how empty strings are rejected in DBDF

Empty strings are forbidden as input to rte_pci_addr_parse().
It is explicitly enforced in BDF parsing as parsing the bus
field will immediately fail. The related check is commented.

It is implicitly enforced in DBDF parsing, as the domain would be
parsed to 0 without error, but the check `end[0] != ':'` afterward
will return -EINVAL.

Enforcing consistency between parsers by reading the code is not helped
by this property being implicit. Add a comment to explain.

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
4 years agopci: reject negative values in PCI id
Gaetan Rivet [Wed, 13 May 2020 10:47:50 +0000 (12:47 +0200)]
pci: reject negative values in PCI id

The function strtoul will not return ERANGE if the input is negative, as
one might expect.

   0000:-FFFFFFFFFFFFFFFB:00.0

is not a better way to write 0000:05:00.0.
To simplify checking for '-', forbid using spaces before the field value.

   0000: 00:   2c.0

Should not be accepted.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
4 years agopci: accept 32-bit domain numbers
Darek Stojaczyk [Tue, 12 May 2020 13:30:57 +0000 (15:30 +0200)]
pci: accept 32-bit domain numbers

The parsing code was bailing on domains greater than UINT16_MAX,
but domain numbers like that are still valid and present on some systems.
One example is Intel VMD (Volume Management Device), which acts somewhat
as a software-managed PCI switch and its upstream linux driver assigns
all downstream devices a PCI domain of 0x10000.

Parsing a BDF like 10000:01:00.0 was failing before. To fix it, increase
the upper limit of domain number to UINT32_MAX. This matches the size of
struct rte_pci_addr->domain (uint32).

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Gaetan Rivet <grive@u256.net>
4 years agonet/igc/base: update copyright
Xiaoyun Li [Mon, 18 May 2020 09:13:05 +0000 (17:13 +0800)]
net/igc/base: update copyright

Clarify Intel copyright and update the date to 2020.

Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/ice/base: update copyright
Xiaoyun Li [Mon, 18 May 2020 09:07:33 +0000 (17:07 +0800)]
net/ice/base: update copyright

Clarify Intel copyright and update the date to 2020.

Fixes: f3202a097f12 ("net/ice/base: add ACL module")
Fixes: a90fae1d0755 ("net/ice/base: add admin queue structures and commands")
Fixes: 2d2bdc026737 ("net/ice/base: add various headers")
Fixes: c9e37832c95f ("net/ice/base: rework on bit ops")
Fixes: 453d087ccaff ("net/ice/base: add common functions")
Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")
Fixes: 1082f786547e ("net/ice/base: support DCB")
Fixes: 6aa406714a65 ("net/ice/base: add device IDs for Intel E800 Series NICs")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module")
Fixes: 2d2bdc026737 ("net/ice/base: add various headers")
Fixes: aa1cd410fa64 ("net/ice/base: add flow module")
Fixes: 51c7f09f3f81 ("net/ice/base: add registers for Intel E800 Series NIC")
Fixes: 64e9587d5629 ("net/ice/base: add structures for Rx/Tx queues")
Fixes: 557fa75bcf55 ("net/ice/base: add code to work with the NVM")
Fixes: b06499a43394 ("net/ice/base: update Boot Configuration Section read of NVM")
Fixes: 04b8ec1ea807 ("net/ice/base: add protocol structures and defines")
Fixes: 2a27e0a16d29 ("net/ice/base: add sideband queue info")
Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Fixes: a240ff50505b ("net/ice/base: add basic structures")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agocommon/iavf: update copyright
Xiaoyun Li [Mon, 18 May 2020 08:45:46 +0000 (16:45 +0800)]
common/iavf: update copyright

Clarify Intel copyright and update the date to 2020.

Fixes: 317862a4e44f ("net/iavf: replace license text with SPDX tag")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/i40e/base: update copyright
Xiaoyun Li [Mon, 18 May 2020 08:44:06 +0000 (16:44 +0800)]
net/i40e/base: update copyright

Clarify Intel copyright and update the date to 2020.

Fixes: 547be3f01f55 ("net/i40e/base: replace license text with SPDX tag")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/ixgbe/base: update copyright
Xiaoyun Li [Mon, 18 May 2020 08:41:36 +0000 (16:41 +0800)]
net/ixgbe/base: update copyright

Clarify Intel copyright and update the date to 2020.

Fixes: 9db3087f4f77 ("net/ixgbe/base: update the license")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: fix DCB set
Ting Xu [Tue, 12 May 2020 10:13:56 +0000 (10:13 +0000)]
app/testpmd: fix DCB set

When set DCB in testpmd, there is a segmentation fault. It is
because the local variable rss_conf in get_eth_dcb_conf()
is not cleared, so that the pointer member variable rss_key has
a random address, which leads to an error in the following
processing. This patch initialized the local variable rss_conf
to avoid this situation.

Fixes: ac7c491c3fec ("app/testpmd: fix DCB config")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix port action resource initialization
Bing Zhao [Fri, 15 May 2020 11:44:44 +0000 (19:44 +0800)]
net/mlx5: fix port action resource initialization

After memory optimization, the organization of some resources are
changed from pointer based LIST to the index based ILIST. A lot of
code parts are touched due to such change.
Some static code checking and analysis tool will complain and raise
a false warning on the uninitialized value using. E.g. in the port
action registering function, the stack variable will be used as the
right value with some uninitialized field to initialize variable
allocated from heap. But indeed, it is not an error because all the
fields set with the uninitialized value will be overwritten in the
following code part and the macros. All the fields will be used as
the left value explicitly.
It makes no sense to clear the stack variable to 0 in this case,
and the extra memset will introduce some cycles overhead. It just
needs to ignore the false warning from the tool, if any.

Fixes: f3faf9ea1185 ("net/mlx5: convert port id action to indexed")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Reviewed-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix port action assert timing
Bing Zhao [Fri, 15 May 2020 11:44:43 +0000 (19:44 +0800)]
net/mlx5: fix port action assert timing

After memory optimization, some action object handles are changed to
index to save the overhead. Assertion in debug mode will be helpful
for trouble shooting.
In the current implementation, only one port action is supported in
switchdev mode for one device flow. In debug mode, an assertion will
be used to check the if the port action is none, and it should
locate before the port action resource registration but not after
it. The action index in the handle should be 0 before registration.
Or else it will always cause a failure because the port action is
registered and the index is not 0.

Fixes: f3faf9ea1185 ("net/mlx5: convert port id action to indexed")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Reviewed-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agocommon/mlx5: fix netlink buffer allocation from stack
Viacheslav Ovsiienko [Thu, 14 May 2020 07:11:12 +0000 (07:11 +0000)]
common/mlx5: fix netlink buffer allocation from stack

The buffer size to receive netlink reply messages is relatively
large (32K), and it is allocated on the stack and it might
break in application is using smaller per-thread stacks.
This patch allocates temporary buffer from heap.

Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agocommon/mlx5: fix MAC addresses assert
Viacheslav Ovsiienko [Thu, 14 May 2020 07:09:02 +0000 (07:09 +0000)]
common/mlx5: fix MAC addresses assert

The MLX5 device supports up to MLX5_MAX_MAC_ADDRESSES (256) MAC
addresses.  The code flushes all MAC devices.

If DPDK is compiled with MLX5_DEBUG this would an assert.
PANIC in mlx5_nl_mac_addr_flush():
line 775 assert "(size_t)(i) < sizeof(mac_own) * 8" failed

The root cause is that mac_own is a pointer and is being used as
a bitmap array. The sizeof(mac_own) would therefore be 64 but the
number of entries to be flushed would be 256.

There is a whole set of asserts in MLX5 netlink code with
the same bug; that should just be changed into proper error checks.

Fixes: 8e46d4e18f09 ("common/mlx5: improve assert control")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix shared flow counter lookup
Suanming Mou [Fri, 15 May 2020 08:36:03 +0000 (16:36 +0800)]
net/mlx5: fix shared flow counter lookup

Currently, the shared counter search uses the wrong nested index which
is used by the pool index. The incorrect nested index using causes the
search go to incorrect counter pool is not existed.

Add the counter index to fix the incorrect nested use case.

Fixes: 4001d7ad26d4 ("net/mlx5: change Direct Verbs counter to indexed")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix doorbell bitmap management offsets
Bing Zhao [Fri, 15 May 2020 08:13:58 +0000 (16:13 +0800)]
net/mlx5: fix doorbell bitmap management offsets

The doorbell record is organized with page and bitmap. When some new
doorbell needs to be associated with a queue, the bit will be set
in the bitmap to indicate the corresponding doorbell occupied. A
counter is used to record the number of doorbell occupied to speed
up the searching.
If the number reaches the maximal value of a pre-defined number of a
page, a new page will be allocated. If not, then the bitmap will be
checked to find a free one.
The LSHIFT and OR (AND NOT) operations are used to update the bitmap
of a page. But 1 will be treated as a signed integer when compiling.
When the shift number is 31, the shifted value will be considered as
negative. Then a wrong extension will be done when setting it to a
64-bits variable. All the upper 32-bits will be set to 1 by such
extension.
Then a wrong offset value will be calculated because of this. The
next 64 bits will be also treated as the bitmap and get corrupted
through the bit set operation.
The immediate value 1 needs to be used as 64 bits width explicitly.

Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix Verbs counter pool allocation
Suanming Mou [Fri, 15 May 2020 00:48:15 +0000 (08:48 +0800)]
net/mlx5: fix Verbs counter pool allocation

When create the Verbs flows with counter, randomly SEGSEV will also
comes. The reason is that the counter pool memory is not allocated
sufficiently and initialized correctly in Verbs case.

As the mlx5_flow_counter array member is moved out of the counter pool
struct, the counter pool memory layout currently contain implicitly
with mlx5_flow_counter, mlx5_age_param(if the pool is an age pool),
mlx5_flow_counter_ext(if the pool is a none batch pool). When allocate
the pool memory, the pool size should be calculated based on the pool
type accordingly.

Currently, for Verbs counter pool, both mlx5_flow_counter and
mlx5_flow_counter_ext need to be taken into account in the pool size.
And the pool type should also be initialized as CNT_POOL_TYPE_EXT.

This patch add the missing size and type for the Verbs counter pool.

Fixes: 8d93c830e450 ("net/mlx5: modify ext-counter memory allocation")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/iavf: fix RXDID setting for Rx queue
Ting Xu [Mon, 11 May 2020 15:27:48 +0000 (15:27 +0000)]
net/iavf: fix RXDID setting for Rx queue

CVL kernel PF configures all reserved queues for VF, including
Rx queue RXDID. The number of reserved queues is the maximum
between Tx and Rx queues. If the number of the enabled Rx queues
is less than that of reserved queues, required RXDID will only
be set for those enabled, but default value (0) is set for others.
However, RXDID 0 (legacy 16byte descriptor) is not supported now,
PF will return error when configuring those disabled VF queues.

In this patch, required RXDID is set for all reserved Rx queues,
no matter enabled or not. In this way, PF will configure Rx
queues correctly without reporting error.

Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Tested-by: Xiaoxiao Zeng <xiaoxiaox.zeng@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>