dpdk.git
5 years agonet/cxgbe: implement dynamic log type
Stephen Hemminger [Tue, 16 Jul 2019 18:53:31 +0000 (11:53 -0700)]
net/cxgbe: implement dynamic log type

The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/null: replace BSD license with SPDX tag
Stephen Hemminger [Fri, 16 Aug 2019 20:43:21 +0000 (13:43 -0700)]
net/null: replace BSD license with SPDX tag

Replace the boilerplate BSD license text with the equivalent
SPDX license id.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Acked-by: Takanari Hayama <taki@igel.co.jp>
5 years agonet/mlx5: fix TSO flag check
Yongseok Koh [Tue, 20 Aug 2019 16:43:23 +0000 (09:43 -0700)]
net/mlx5: fix TSO flag check

Fix some mistakes in Tx bursts in regard to TSO flag check.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: fix crash for empty raw encap data
Xiaoyu Min [Tue, 20 Aug 2019 09:47:14 +0000 (17:47 +0800)]
net/mlx5: fix crash for empty raw encap data

For the rte_flow_action_raw_encap, the header definition for
encapsulation must be available, otherwise it will lead to crash on some
OFED versions and logically it should be rejected.

Fixes: 8ba9eee4ce32 ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
5 years agonet/fm10k: fix stats crash in multi-process
Lu Qiuwen [Wed, 7 Aug 2019 08:24:22 +0000 (16:24 +0800)]
net/fm10k: fix stats crash in multi-process

The ops pointers in fm10k_stats_get() are set up from primary
process, when secondary process calls these ops pointers,
a segment fault will happen.

Fixes: 7223d200c227 ("fm10k: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/i40e: fix VF runtime queues RSS config
Xiao Zhang [Tue, 13 Aug 2019 22:17:45 +0000 (06:17 +0800)]
net/i40e: fix VF runtime queues RSS config

I40evf queue can not work properly with kernel pf driver for X722 vf.
Eg. when configure 8 queues pair, only 4 queues can receive packets,
and half packets will be lost if using 2 queues pair.

This issue is caused by misconfiguration of look up table, the original
code of LUT configuration did not work for X722 vf, use aq command to
setup the LUT to make it work properly.

Fixes: cea7a51c1750 ("i40evf: support RSS")
Cc: stable@dpdk.org
Acked-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
5 years agonet/bonding: prefer allmulti to promiscuous for LACP
David Marchand [Wed, 10 Apr 2019 12:53:49 +0000 (14:53 +0200)]
net/bonding: prefer allmulti to promiscuous for LACP

Rather than the global promiscuous mode on all slaves, let's try to use
allmulti.
To do this, we apply the same mechanism than for promiscuous and drop in
rx_burst.

When adding a slave, we first try to use allmulti, else we try
promiscuous.
Because of this, we must be able to handle allmulti on the bonding
interface, so the associated dev_ops is added with checks on which mode
has been applied on each slave.

Rather than add a new flag in the bond private structure, we can remove
promiscuous_en since ethdev already maintains this information.
When starting the bond device, there is no promisc/allmulti re-apply
as, again, ethdev does this itself.

On reception, we must inspect if the packets are multicast or unicast
and take a decision to drop based on which mode has been enabled on the
bonding interface.

Note: in the future, if we define an API so that we can add/remove mc
addresses to a port (rather than the current global set_mc_addr_list
API), we can refine this to only register the LACP multicast mac
address.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
5 years agonet/bonding: fix unicast packets filtering
David Marchand [Wed, 10 Apr 2019 12:53:48 +0000 (14:53 +0200)]
net/bonding: fix unicast packets filtering

By default, the 802.3ad code enables promisc mode on all slaves.
To avoid all packets going to the application (unless the application
asked for promiscuous mode), all frames are supposed to be filtered in
the rx burst handler.

However the incriminated commit broke this because non pure ethernet
frames (basically any unicast Ether()/IP() packet) are not filtered
anymore.

Fixes: 71b7b37ec959 ("net/bonding: use ptype flags for LACP Rx filtering")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
5 years agonet/bonding: fix LACP fast queue Rx handler
David Marchand [Wed, 10 Apr 2019 12:53:47 +0000 (14:53 +0200)]
net/bonding: fix LACP fast queue Rx handler

Fast queue Rx burst function is missing checks on promisc and the
slave collecting state.
Define an inline wrapper to have a common base.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
5 years agonet/bonding: fix out of bound access in LACP mode
David Marchand [Wed, 10 Apr 2019 12:53:46 +0000 (14:53 +0200)]
net/bonding: fix out of bound access in LACP mode

We'd better consolidate the fast queue and the normal tx burst functions
under a common inline wrapper for maintenance.

But looking closer at the bufs_slave_port_idxs[] mapping array in those
tx burst functions, its size is invalid since up to nb_bufs are handled
here.
A previous patch [1] fixed this issue for balance tx burst function
without mentioning it.

802.3ad and balance modes are functionally equivalent on transmit.
The only difference is on the slave id distribution.
Add an additional inline wrapper to consolidate even more and fix this
issue.

[1]: https://git.dpdk.org/dpdk/commit/?id=c5224f623431

Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
5 years agoversion: 19.11-rc0
David Marchand [Tue, 13 Aug 2019 12:18:48 +0000 (14:18 +0200)]
version: 19.11-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>
5 years agoversion: 19.08.0
Thomas Monjalon [Sun, 11 Aug 2019 09:37:19 +0000 (11:37 +0200)]
version: 19.08.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: add guidelines for initial PMD submission
Rami Rosen [Fri, 12 Apr 2019 10:26:51 +0000 (13:26 +0300)]
doc: add guidelines for initial PMD submission

This patch for DPDK Contributor's Guidelines indicates the repos
against which a new PMD should be prepared; for example, for new
network ethernet PMDs it should be dpdk-next-net, and for new crypto
PMDs it should be dpdk-next-crypto. For other new PMDs, the
contributor should refer to the MAINTAINERS file. Though this may seem
obvious, it is not mentioned in DPDK documentation.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Last contribution, last commit closing the release.
Thank you Rami, you will be missed.

5 years agoexamples/qos_meter: fix color type conversion
Jasvinder Singh [Fri, 9 Aug 2019 09:37:13 +0000 (10:37 +0100)]
examples/qos_meter: fix color type conversion

In APP_MODE_SRTCM_COLOR_AWARE mode, sample app compilation fails
due to wrong meter color type conversion.

error log-
/qos_meter/main.c:error: conversion to incomplete type
(enum rte_meter_color) input_color);

Fixes: c1656328dbc2 ("meter: replace color definitions")
Cc: stable@dpdk.org
Reported-by: Yuan Peng <yuan.peng@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agonet/bnxt: revert fix traffic stall on stop/start
Lance Richardson [Fri, 9 Aug 2019 17:22:08 +0000 (13:22 -0400)]
net/bnxt: revert fix traffic stall on stop/start

This reverts commit aa2c00702bad7b2c742e11a86cb9dbbb8364fd88, which
introduced the possibility of an invalid address exception when running
an application with a stopped receive queue. The issues with rxq stop/start
 will be revisited in the 19.11 release timeframe.

Fixes: aa2c00702bad ("net/bnxt: fix traffic stall on Rx queue stop/start")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agodoc: announce ethdev ABI change for LRO fields
Matan Azrad [Tue, 6 Aug 2019 14:56:22 +0000 (14:56 +0000)]
doc: announce ethdev ABI change for LRO fields

It may be needed by the user to limit the LRO session packet size.
In order to allow the above limitation, a new Rx configuration may be
added for the maximum LRO session size.

A new capability may be added too to expose the maximum LRO session size
supported by the port.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: announce ethdev API changes in offload flags
Pavan Nikhilesh [Fri, 9 Aug 2019 09:55:59 +0000 (15:25 +0530)]
doc: announce ethdev API changes in offload flags

Add new offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and
``DEV_RX_OFFLOAD_FLOW_MARK``.
Add new function ``rte_eth_dev_set_supported_ptypes`` to allow application
to set specific ptypes to be updated in ``rte_mbuf::packet_type``

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agodoc: announce removal of old port count function
Thomas Monjalon [Tue, 6 Aug 2019 13:31:35 +0000 (15:31 +0200)]
doc: announce removal of old port count function

The function rte_eth_dev_count() was marked as deprecated in DPDK 18.05
in commit d9a42a69febf ("ethdev: deprecate port count function").
It is planned to be removed after the next LTS release.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agodoc: announce ethdev functions will not return void
Andrew Rybchenko [Tue, 23 Jul 2019 14:07:51 +0000 (15:07 +0100)]
doc: announce ethdev functions will not return void

void return value is bad for get API (like rte_eth_dev_info-get())
since caller does not know if the function does its job or not and
output value is filled in.

void return value is bad for state changing API (like
rte_eth_promiscuous_enable()) since caller should use get API
to understand if state is really changed.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agodoc: announce ethernet structures alignment changes
Stephen Hemminger [Fri, 19 Jul 2019 16:56:31 +0000 (09:56 -0700)]
doc: announce ethernet structures alignment changes

Tell users about upcoming changes to rte_ether_addr and
rte_ether_header.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: announce lcore config struct removal from ABI
David Marchand [Thu, 8 Aug 2019 09:31:29 +0000 (11:31 +0200)]
doc: announce lcore config struct removal from ABI

New accessors have been introduced to provide the hidden information.
This symbol can now be kept internal.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: announce malloc virt2phys function removal
David Marchand [Thu, 8 Aug 2019 09:32:06 +0000 (11:32 +0200)]
doc: announce malloc virt2phys function removal

This symbol has been deprecated for quite some time.
Let's drop it as soon as possible.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agodoc: announce CPU flags check function removal
David Marchand [Thu, 8 Aug 2019 09:30:46 +0000 (11:30 +0200)]
doc: announce CPU flags check function removal

This symbol has been deprecated for quite some time.
Let's drop it as soon as possible.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agousertools: fix input handling in telemetry script
Andrius Sirvys [Thu, 8 Aug 2019 14:37:52 +0000 (15:37 +0100)]
usertools: fix input handling in telemetry script

This commit removes the unnecesarry ast.literal_eval() function call
from the input handling, which now relies just on raw_input() to get
its input.

Fixes: 53f293c9a783 ("usertools: replace unsafe input function")
Cc: stable@dpdk.org
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
5 years agoeal: increase maximum different hugepage sizes on Arm
Gagandeep Singh [Thu, 8 Aug 2019 12:13:20 +0000 (17:43 +0530)]
eal: increase maximum different hugepage sizes on Arm

ARM is supporting maximum 4 hugepage sizes (64K, 2M, 32M
and 1G) when granule is 4KB since very long and DPDK
support maximum 3 hugepage sizes.

With all 4 hugepage sizes enabled, applications and some
stacks like VPP which are working over DPDK and using
"in-memory" eal option, or using separate mount points
on ARM based platform, fails at huge page initialization,
reporting error messages from eal:

EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
EAL: Error - exiting with code: 1

This issue is originated from Linux 5.0
(a21b0b78eaf7 "arm64: hugetlb: Register hugepages during arch init")
where kernel is by default creating directories for each supported
hugepage size in /sys/kernel/mm/hugepages/

On earlier Stable Kernel LTR's, the directories visible in
/sys/kernel/mm/hugepages/ were dependent upon what hugepage
sizes are configured at boot time.

This change increases the maximum supported hugepage sizes
to 4 for ARM based platforms.

Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agonet/ixgbe/base: fix product version check
Congwen Zhang [Thu, 8 Aug 2019 00:37:20 +0000 (08:37 +0800)]
net/ixgbe/base: fix product version check

The "and" condition offset == 0 && offset == NVM_INVALID_PTR
 can never be true.

Fixes: cf3af5aa56c9 ("net/ixgbe/base: add functions to get version info")
Cc: stable@dpdk.org
Signed-off-by: Congwen Zhang <zhang.congwen@zte.com.cn>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/mlx5: fix completion request for multi-segment
Viacheslav Ovsiienko [Wed, 7 Aug 2019 12:58:10 +0000 (12:58 +0000)]
net/mlx5: fix completion request for multi-segment

The copying of sent mbufs pointers might be deferred to the end of
tx_burst() routine to be copied in one call of rte_memcpy.
For the multi segment packets this optimization is not applicable,
because number of packets does not match with number of mbufs and
we do not have linear array of pointers in pkts parameter.

The completion request generating routine wrongly took into account
the inconsistent (for multi-segment packets) deferred pointer copying.

Fixes: 5a93e173b874 ("net/mlx5: fix Tx completion request generation")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agodoc: add limitation with mlx5 Tx inline settings
Viacheslav Ovsiienko [Thu, 8 Aug 2019 11:47:23 +0000 (11:47 +0000)]
doc: add limitation with mlx5 Tx inline settings

Introduces the possible limitations on maximal Tx queue
size in descriptors if Tx inline data are enabled.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agodoc: update Tx inline settings in mlx5 guide
Viacheslav Ovsiienko [Wed, 7 Aug 2019 12:57:47 +0000 (12:57 +0000)]
doc: update Tx inline settings in mlx5 guide

This patch updates mlx5 documentation in parts:

  - txq_inline_min parameter is described in more details,
    values are fixed

  - maximal amount of segments in multi-segment packets.

Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agotest/mcslock: wait for lcore completion
Aaron Conole [Wed, 7 Aug 2019 14:58:44 +0000 (10:58 -0400)]
test/mcslock: wait for lcore completion

It's possible that the mcsunlock occurs before the test_mcslock_try has
a chance to execute, which will result in the trylock being successful,
making the test case fail.  Fix this by waiting until all lcores have
completed their test before unlocking the master lock.

Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agoapp/testpmd: fix latency stats deinit on signal
Amit Gupta [Wed, 7 Aug 2019 13:12:09 +0000 (18:42 +0530)]
app/testpmd: fix latency stats deinit on signal

On receiving signal, testpmd showing warning as
"LATENCY_STATS: failed to remove Rx/Tx callback"
because rte_latencystats_uninit is called without
checking if latencystats is enabled or not.

After this fix, rte_latencystats_uninit will be
called only if latencystats is enabled.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")
Cc: stable@dpdk.org
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/memif: fix build with gcc 9.1
Jerin Jacob [Wed, 7 Aug 2019 03:11:34 +0000 (08:41 +0530)]
net/memif: fix build with gcc 9.1

gcc-9 is stricter on NULL arguments for printf.
Fix the following build error by avoiding NULL argument to printf.

In file included from drivers/net/memif/memif_socket.c:26:
In function 'memif_socket_create',
inlined from 'memif_socket_init' at net/memif/memif_socket.c:965:12:
net/memif/rte_eth_memif.h:35:2: error:
'%s' directive argument is null [-Werror=format-overflow=]
   35 |  rte_log(RTE_LOG_ ## level, memif_logtype, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   36 |   "%s(): " fmt "\n", __func__, ##args)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
5 years agoversion: 19.08-rc4
Thomas Monjalon [Tue, 6 Aug 2019 21:50:31 +0000 (23:50 +0200)]
version: 19.08-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: advise patching third party dependencies
John McNamara [Tue, 30 Jul 2019 11:07:55 +0000 (12:07 +0100)]
doc: advise patching third party dependencies

Added a note to the getting started guides about patching third
party libraries/dependencies to avoid any known vulnerabilities.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: remove deprecated ethdev features
Thomas Monjalon [Tue, 30 Jul 2019 15:57:26 +0000 (17:57 +0200)]
doc: remove deprecated ethdev features

As legacy filter API "filter_ctrl" is superseded since 2017
by the rte_flow API, and got the deprecated attribute in DPDK 19.05,
it is time to remove the associated features from the matrix.
Not documenting deprecated features as supported will avoid confusion.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agoapp/bbdev: fix bulk allocation checks
Nicolas Chautru [Tue, 6 Aug 2019 14:09:00 +0000 (07:09 -0700)]
app/bbdev: fix bulk allocation checks

Returned value from rte_bbdev_enc_op_alloc_bulk not checked consistently.

Coverity issue: 344986
Fixes: d819c08327f3 ("app/bbdev: update for 5GNR")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
5 years agobaseband/turbo_sw: remove dead code
Nicolas Chautru [Tue, 6 Aug 2019 14:08:59 +0000 (07:08 -0700)]
baseband/turbo_sw: remove dead code

Error handling code cannot logically be reached.

Coverity issue: 344980, 344992
Fixes: c769c711757a ("baseband/turbo_sw: extend for 5G")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
5 years agonet/mlx5: fix memory event callback list
Viacheslav Ovsiienko [Tue, 6 Aug 2019 15:00:33 +0000 (15:00 +0000)]
net/mlx5: fix memory event callback list

The shared Infiniband device context should be included
into memory event callback list only once on context creation,
and removed from the list only once on context destroying.
Multiple insertions of the same object caused the infinite
loop on the list processing.

Fixes: ccb3815346e6 ("net/mlx5: update memory event callback for shared context")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix RSS expand for IP-in-IP
Xiaoyu Min [Wed, 24 Jul 2019 11:31:56 +0000 (19:31 +0800)]
net/mlx5: fix RSS expand for IP-in-IP

The RSS expand function for IP-in-IP tunnel type is missed,
which leads to create following flow failed:

   flow create 0 ingress pattern eth / ipv4 proto is 4 /
        ipv4 / udp / end actions rss queues 0 1 end level 2
types ip ipv4-other udp ipv4 ipv4-frag end /
mark id 221 / count / end

In order to make RSS expand function working correctly,
now the way to check whether a IP tunnel existing is to
check whether there is the second IPv4/IPv6 item and whether the
first IPv4/IPv6 item's next protocl is IPPROTO_IPIP/IPPROTO_IPV6.
For example:
  ... pattern eth / ipv4 proto is 4 / ipv4 / ....

Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agodoc: add more details about mlx5 offloads
Thomas Monjalon [Mon, 5 Aug 2019 15:32:22 +0000 (17:32 +0200)]
doc: add more details about mlx5 offloads

Add firmware config for MPLS and DevX (required by LRO and DR).

Add a table for queue offloads requirements.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agodoc: add mlx5 design details
Thomas Monjalon [Mon, 5 Aug 2019 15:32:21 +0000 (17:32 +0200)]
doc: add mlx5 design details

Some details about libibverbs were missing:
- automatic detection by meson
- main ways to access the device

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agodoc: remove useless console syntax in mlx guides
Thomas Monjalon [Mon, 5 Aug 2019 15:32:20 +0000 (17:32 +0200)]
doc: remove useless console syntax in mlx guides

It is not needed to use "console" syntax highlighting
for literal blocks.
The file is easier to read by removing the code-block lines
and simply having double colons in previous line.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agodoc: fix wording and formatting of mlx5 guide
Thomas Monjalon [Mon, 5 Aug 2019 15:32:19 +0000 (17:32 +0200)]
doc: fix wording and formatting of mlx5 guide

These are simple fixes of punctuation, anchor placement
or wording.
The table format is fixed to avoid having a long line
in the first column.

Fixes: 909be50a34d0 ("doc: update Mellanox guides and release notes")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agodoc: improve firmware configuration in mlx5 guide
Thomas Monjalon [Mon, 5 Aug 2019 15:32:18 +0000 (17:32 +0200)]
doc: improve firmware configuration in mlx5 guide

The command mlxconfig was not enough explained and too much verbose
at the same time.
The syntax is now explained in introduction before listing the options,
without repeating the commands.
Some options, which are explained elsewhere in the doc,
are added to this list.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agonet/mlx5: fix UDP checksum zeroing
Dekel Peled [Mon, 5 Aug 2019 11:51:19 +0000 (14:51 +0300)]
net/mlx5: fix UDP checksum zeroing

Function flow_dv_zero_encap_udp_csum() uses a while loop to iterate
over vlan items in flow rule.
Pointer next_hdr is incremented to the next item before it is used,
so the first item is skipped.

This patch moves the incrementing of next_hdr to the correct place.

Fixes: bf1d7d9a033a ("net/mlx5: zero out UDP checksum in encapsulation")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix link speed info when link is down
Xiaoyu Min [Mon, 5 Aug 2019 08:02:03 +0000 (16:02 +0800)]
net/mlx5: fix link speed info when link is down

When the link is down, the link speed returned by ethtool is
UINT32_MAX and the link status is 0.

In this case, the DPDK ethdev link speed should be set to
ETH_SPEED_NUM_NONE.
Otherwise since link speed is non-zero but link status is zero, this
is an inconsistent situation and -EAGAIN is returned, which is not right.

Fixes: 188408719888 ("net/mlx5: fix support for newer link speeds")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix completion queue overflow for large burst
Viacheslav Ovsiienko [Mon, 5 Aug 2019 13:03:54 +0000 (13:03 +0000)]
net/mlx5: fix completion queue overflow for large burst

There is the limit on completion descriptor fetch to improve
latency. If burst size is large there might be not enough
resources freed in completion processing. This fix reiterates
sending loop and allows multiple completion descriptor fetch
and processing.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix packet size inline settings
Viacheslav Ovsiienko [Mon, 5 Aug 2019 13:03:53 +0000 (13:03 +0000)]
net/mlx5: fix packet size inline settings

This patch fixes the default settings for packet size to inline
with Enhanced Multi-Packet Write feature, allowing 256B packets
to be inlined with Out-Of-the-Box settings.

Fixes: 50724e1bba76 ("net/mlx5: update Tx definitions")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix inline data settings
Viacheslav Ovsiienko [Mon, 5 Aug 2019 13:03:52 +0000 (13:03 +0000)]
net/mlx5: fix inline data settings

If the minimal inline data are required the data inline feature
must be engaged. There were the incorrect settings enabling the
entire small packet inline (in size up to 82B) which may result
in sending rate declining if there is no enough cores. The same
problem was raised if inline was enabled to support VLAN tag
insertion by software.

Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix completion queue drain loop
Viacheslav Ovsiienko [Mon, 5 Aug 2019 13:03:51 +0000 (13:03 +0000)]
net/mlx5: fix completion queue drain loop

The completion loop speed optimizations for error-free
operations are done - no CQE field fetch on each loop
iteration. Also, code size is oprimized - the flush
buffers routine is invoked once.

Fixes: 318ea4cfa1b1 ("net/mlx5: fix Tx completion descriptors fetching loop")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix inline data length assert
Viacheslav Ovsiienko [Mon, 5 Aug 2019 13:03:50 +0000 (13:03 +0000)]
net/mlx5: fix inline data length assert

The debug assert wrongly triggers on the inline data 18B,
this should be passed successfully.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix default minimal data inline
Viacheslav Ovsiienko [Mon, 5 Aug 2019 13:03:49 +0000 (13:03 +0000)]
net/mlx5: fix default minimal data inline

The patch [Fixes] sets the default value of required minimal
inline data to 0 bytes. On some configurations (depends
on switchdev/legacy settings and FW version/settings)
the ConnectX-4LX NIC requires minimal 18 bytes of
Tx descriptor inline data to operate correctly.

Wrongly set to 0 default value may prevent NIC from operating
with out-of-the-box settings, this patch reverts default
value for ConnectX-4LX back to 18 bytes (inline L2).

Fixes: 9f350504bb32 ("net/mlx5: fix ConnectX-4LX minimal inline data limit")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix VLAN inner type matching on DR/DV
Xiaoyu Min [Fri, 2 Aug 2019 09:18:23 +0000 (17:18 +0800)]
net/mlx5: fix VLAN inner type matching on DR/DV

The rte_flow_item_vlan has the inner_type, which is missing on
DR/DV flow engine.

By adding this support, the example testpmd commands could be:

 - matching all vlan traffic with id 2:

 testpmd> flow create 0 ingress pattern eth / vlan vid is 2 / end
          actions queue index 2 / end

 - matching all ipv4 traffic in vlan with id 2:

 testpmd> flow create 0 ingress pattern eth / vlan vid is 2
          inner_type is 0x0800 / end actions queue index 2 / end

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix flow rule configuration
Dekel Peled [Mon, 5 Aug 2019 07:07:05 +0000 (10:07 +0300)]
net/mlx5: fix flow rule configuration

Some flow rules were not configured.

Part of the code in function flow_dv_matcher_enable() is enclosed in
'#ifdef HAVE_MLX5DV_DR' preprocessor directive.
Using this directive is not needed here, and prevents compilation of
relevant code.

This patch removes the unnecessary preprocessor directive.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix validation of VLAN PCP item
Dekel Peled [Mon, 29 Jul 2019 15:14:45 +0000 (18:14 +0300)]
net/mlx5: fix validation of VLAN PCP item

Function mlx5_flow_validate_item_vlan() validates the user setting
is supported by NIC, using a mask with TCI mask 0x0fff.
This check will reject a flow rule specifying a vlan pcp item.

This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff,
so flow rules with vlan pcp item are accepted.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx4: fix crash on info query in secondary process
Stephen Hemminger [Fri, 12 Jul 2019 20:54:24 +0000 (13:54 -0700)]
net/mlx4: fix crash on info query in secondary process

mlx4_dev_info_get calls mlx4_get_ifname, but mlx4_get_ifname
uses priv->ctx which is not a valid pointer in a secondary
process. The fix is to cache the value in primary.

In the primary process, get and store the interface index of
the device so that secondary process can see it.

Bugzilla ID: 320
Fixes: 61cbdd419478 ("net/mlx4: separate device control functions")
Cc: stable@dpdk.org
Reported-by: Suyang Ju <sju@paloaltonetworks.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/mlx5: fix Tx inline minimum for ConnectX-5
David Christensen [Wed, 31 Jul 2019 22:41:11 +0000 (17:41 -0500)]
net/mlx5: fix Tx inline minimum for ConnectX-5

The function mlx5_set_min_inline() includes a switch() that checks
various PCI device IDs in order to set the txq_inline_min value.  No
value is set when the PCI device ID matches the ConnectX-5 adapters,
resulting in an assert() failure later in the function
mlx5_set_txlimit_params().

This error was encountered on an IBM Power 9 system running RHEL 7.6
w/o Mellanox OFED installed.

Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix limit of direct rules tables number
Dekel Peled [Thu, 1 Aug 2019 13:22:58 +0000 (16:22 +0300)]
net/mlx5: fix limit of direct rules tables number

MLX5 PMD limits the number of SW steering tables to 32.
This patch updates the limit to 65535, to allow wide range of values.

Fixes: e2b4925ef7c1 ("net/mlx5: support Direct Rules E-Switch")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: add workaround for VLAN in virtual machine
Viacheslav Ovsiienko [Tue, 30 Jul 2019 09:20:24 +0000 (09:20 +0000)]
net/mlx5: add workaround for VLAN in virtual machine

On some virtual setups (particularly on ESXi) when we have SR-IOV and
E-Switch enabled there is the problem to receive VLAN traffic on VF
interfaces. The NIC driver in ESXi hypervisor does not setup E-Switch
vport setting correctly and VLAN traffic targeted to VF is dropped.

The patch provides the temporary workaround - if the rule
containing the VLAN pattern is being installed for VF the VLAN
network interface over VF is created, like the command does:

  ip link add link vf.if name mlx5.wa.1.100 type vlan id 100

The PMD in DPDK maintains the database of created VLAN interfaces
for each existing VF and requested VLAN tags. When all of the RTE
Flows using the given VLAN tag are removed the created VLAN interface
with this VLAN tag is deleted.

The name of created VLAN interface follows the format:

  evmlx.d1.d2, where d1 is VF interface ifindex, d2 - VLAN ifindex

Implementation limitations:

- mask in rules is ignored, rule must specify VLAN tags exactly,
  no wildcards (which are implemented by the masks) are allowed

- virtual environment is detected via rte_hypervisor() call,
  and the type of hypervisor is checked. Currently we engage
  the workaround for ESXi and unrecognized hypervisors (which
  always happen on platforms other than x86 - it means workaround
  applied for the Flow over PCI VF). There are no confirmed data
  the other hypervisors (HyperV, Qemu) need this workaround,
  we are trying to reduce the list of configurations on those
  workaround should be applied.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/fm10k: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:54 +0000 (07:20 +0800)]
net/fm10k: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343416
Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/iavf: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:53 +0000 (07:20 +0800)]
net/iavf: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343447
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/i40e: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:52 +0000 (07:20 +0800)]
net/i40e: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343422, 343403
Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:51 +0000 (07:20 +0800)]
net/ice: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343452, 343407
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ixgbe: fix address of first segment
Xiao Zhang [Mon, 5 Aug 2019 23:20:50 +0000 (07:20 +0800)]
net/ixgbe: fix address of first segment

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 13245
Fixes: 8a44c15aa57d ("net/ixgbe: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: fix null pointer dereferences for tunnels
Xiaolong Ye [Mon, 5 Aug 2019 09:15:11 +0000 (17:15 +0800)]
net/ice: fix null pointer dereferences for tunnels

This patch fixes two null pointer dereferences in flow code detected by
coverity scan.

Coverity issue: 345815, 345816
Fixes: 94f00800d78b ("net/ice: fix VXLAN/NVGRE flow matching")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/e1000: fix PCI config read check
Xiao Zhang [Sun, 4 Aug 2019 21:27:00 +0000 (05:27 +0800)]
net/e1000: fix PCI config read check

Add return value checking when reading configure information from PCI
register to avoid Coverity issue.

Fixes: 1fc97012 ("net/e1000: fix i219 hang on reset/close")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ice: remove unused parameter tag
Xiaolong Ye [Thu, 1 Aug 2019 15:12:01 +0000 (23:12 +0800)]
net/ice: remove unused parameter tag

Given the fact that dev parameter is used in ice_dev_configure.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agoexamples/ip_pipeline: fix TC oversubscription weight
Jasvinder Singh [Tue, 6 Aug 2019 11:49:51 +0000 (12:49 +0100)]
examples/ip_pipeline: fix TC oversubscription weight

The sched library checks the subport tc ov weight value regardless
of whether RTE_SCHED_SUBPORT_TC_OV flag is enabled or not.

This fix allows application to always set valid tc ov weight value.

error log
SCHED: pipe_profile_check: Incorrect value for tc ov weight
SCHED: rte_sched_port_check_params: Pipe profile check failed(-22)
Command "tmgr" failed.

Fixes: 25961ff3bcb9 ("examples/ip_pipeline: add traffic manager object")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
5 years agoexamples/bpf: fix build
Konstantin Ananyev [Tue, 30 Jul 2019 10:19:27 +0000 (11:19 +0100)]
examples/bpf: fix build

Example BPF programs t2.c, t3.c in folder examples/bpf are
failing to compile with latest dpdk.org master.
The reason is changes in some core DPDK header files, that causes
now inclusion of x86 specific headers.
To overcome the issue, minimize inclusion of DPDK header files
into BPF source code.

Bugzilla ID: 321

Fixes: 9dfc06c26a8b ("test/bpf: add samples")
Cc: stable@dpdk.org
Reported-by: Michel Machado <michel@digirati.com.br>
Suggested-by: Michel Machado <michel@digirati.com.br>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agodoc: update release notes for i40e MARK+RSS
Mesut Ali Ergin [Thu, 25 Jul 2019 22:11:12 +0000 (15:11 -0700)]
doc: update release notes for i40e MARK+RSS

Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agonet/memif: fix multi-process Tx
Phil Yang [Tue, 6 Aug 2019 08:45:26 +0000 (16:45 +0800)]
net/memif: fix multi-process Tx

When working as a secondary process, it uses eth_memif_rx in PMD egress.
It should be eth_memif_tx.

Fixes: c41a04958b ("net/memif: support multi-process")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
5 years agonet/memif: fix error paths
Jakub Grajciar [Mon, 5 Aug 2019 09:07:32 +0000 (11:07 +0200)]
net/memif: fix error paths

Coverity issue: 343440, 343459, 343464, 343394
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoexamples/ntb: fix error handling
Xiaoyun Li [Mon, 5 Aug 2019 05:57:28 +0000 (13:57 +0800)]
examples/ntb: fix error handling

This patch adds return value checking for fseek function to fix
error handling issue found by coverity scan.

Coverity issue: 344996
Fixes: c5eebf85badc ("examples/ntb: add example for NTB")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agoraw/ntb: fix null pointer dereference
Xiaoyun Li [Mon, 5 Aug 2019 05:02:47 +0000 (13:02 +0800)]
raw/ntb: fix null pointer dereference

This patch fixes null pointer dereference issues found by coverity scan.

Coverity issue: 344981, 344991, 345000, 345002, 345006, 345024
Fixes: 277310027965 ("raw/ntb: introduce NTB raw device driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Tue, 6 Aug 2019 07:01:52 +0000 (07:01 +0000)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agonet/bnxt: fix traffic stall on Rx queue stop/start
Kalesh AP [Thu, 1 Aug 2019 15:45:20 +0000 (08:45 -0700)]
net/bnxt: fix traffic stall on Rx queue stop/start

Fixed a check in bnxt_alloc_hwrm_rx_ring() while initializing
the rx ring.

Driver should not change "deferred_start" status of rx/tx queues.
It should get the status in queue_setup_op() and use that value.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agocommon/octeontx2: fix mbox memory access
Vamsi Attunuru [Fri, 2 Aug 2019 06:57:16 +0000 (12:27 +0530)]
common/octeontx2: fix mbox memory access

Octeontx2 PMD's mailbox client uses device memory to send messages
to mailbox server in the admin function Linux kernel driver.
The device memory used for the mailbox communication needs to
be qualified as volatile memory type to avoid unaligned device
memory accesses because of compiler's memory access coalescing.

This patch modifies the mailbox request and responses as volatile
type which were non-volatile earlier and accessed from unaligned
memory addresses which resulted in bus errors on Fedora 30 with
gcc 9.1.1.

Fixes: 2b71657c8660 ("common/octeontx2: add mbox request and response definition")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/mvpp2: remove resources when port is closed
Liron Himi [Mon, 5 Aug 2019 10:16:56 +0000 (13:16 +0300)]
net/mvpp2: remove resources when port is closed

Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.

Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
5 years agonet/thunderx: fix crash on detach
Amit Gupta [Mon, 5 Aug 2019 08:00:44 +0000 (13:30 +0530)]
net/thunderx: fix crash on detach

Fix the PCIe detach segfault by releasing eth_dev resources
by adding nicvf cleanup support on PCI detach.

Fixes: fdf91e0f2fac ("drivers/net: do not use ethdev driver")
Cc: stable@dpdk.org
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agodrivers/octeontx2: fix Coverity warnings
Harman Kalra [Sun, 4 Aug 2019 07:20:52 +0000 (07:20 +0000)]
drivers/octeontx2: fix Coverity warnings

Addressed issues reported by coverity: NULL pointer dereferencing
issues, unchecked return value, uinitialized scalar value,
probable deadcode cases, unintended sign extension, bad bit
shift operation, Wrong sizeof argument (SIZEOF_MISMATCH)

Coverity issue: 343396, 345028, 344977, 345015, 345025, 344969
Coverity issue: 345014, 344966, 343437, 344993, 345007, 344988
Coverity issue: 343405, 344999, 345003

Fixes: 58f6f93c34c1 ("net/octeontx2: add module EEPROM dump")
Fixes: 38f566280abb ("net/octeontx2: add link stats operations")
Fixes: b5dc3140448e ("net/octeontx2: support base PTP")
Fixes: ba1b3b081edf ("net/octeontx2: support VLAN offloads")
Fixes: 092b38341859 ("net/octeontx2: add flow init and fini")
Fixes: 3da1b85b6d06 ("common/octeontx2: add FLR IRQ handler")
Fixes: 2548ab774f92 ("mempool/octeontx2: add context dump support")
Fixes: 2b71657c8660 ("common/octeontx2: add mbox request and response definition")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: support 96xx A1 silicon revision
Nithin Dabilpuram [Mon, 5 Aug 2019 05:40:51 +0000 (11:10 +0530)]
net/octeontx2: support 96xx A1 silicon revision

Update workaround changes for erratas that are fixed on 96xx A1.
This patch also enables cq drop for all the passes for
maintaining performance along with updating a default
Rx ring size in dev_info.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: fix optimal default SQE buffer count
Vamsi Attunuru [Mon, 5 Aug 2019 15:37:39 +0000 (21:07 +0530)]
net/octeontx2: fix optimal default SQE buffer count

Patch extends minimum supported max_sqb_count devarg value
such that it can limit the max sqb count to 8 buffers and
also defines NIX_DEF_SQB and uses it to compute the number
of sqe buffers required for the egress traffic.

NIX_DEF_SQB is defined as 16 which is optimal across multiple
octeontx2 platforms to scale up the performance proportional
to the corresponding port/queue to lcore mappings.

Fixes: fb0198b7dc07 ("net/octeontx2: add devargs parsing functions")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agocommon/octeontx2: update ready message response
Jerin Jacob [Sat, 3 Aug 2019 18:42:19 +0000 (00:12 +0530)]
common/octeontx2: update ready message response

The kernel mbox server driver(AF) updated the ready
message response. Sync with AF driver.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: drop Rx and L2 error packets
Jerin Jacob [Tue, 30 Jul 2019 14:27:19 +0000 (19:57 +0530)]
net/octeontx2: drop Rx and L2 error packets

From B0 HW revision onwards, HW can drop the Rx and L2 error packets.
Enable this by default if the feature is available.
Since this bit field is used as reserved in old HW revisions,
No need to have additional HW version check.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
5 years agodoc: add tested Marvell integrated NIC platforms
Jerin Jacob [Wed, 31 Jul 2019 15:45:49 +0000 (21:15 +0530)]
doc: add tested Marvell integrated NIC platforms

Add tested Marvell integrated NIC platforms to v19.08 release note.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add co-existence consideration for qede
Rasesh Mody [Mon, 5 Aug 2019 09:19:54 +0000 (02:19 -0700)]
doc: add co-existence consideration for qede

Add and update co-existence considerations for qede PMD

Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agodoc: add co-existence consideration for bnx2x
Rasesh Mody [Mon, 5 Aug 2019 09:24:26 +0000 (02:24 -0700)]
doc: add co-existence consideration for bnx2x

Add and update co-existence considerations for bnx2x PMD

Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agodoc: use SPDX tag for bnx2x guide
Rasesh Mody [Mon, 5 Aug 2019 09:24:25 +0000 (02:24 -0700)]
doc: use SPDX tag for bnx2x guide

Use SPDX tag for bnx2x PMD guide

Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/ena: fix L4 checksum Tx offload
Maciej Bielski [Thu, 1 Aug 2019 11:45:36 +0000 (13:45 +0200)]
net/ena: fix L4 checksum Tx offload

During an if-condition evaluation, a 2-bit flag evaluates to 'true' for
'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are
indistinguishable. To make them distinct, respective bits must be
extracted with a mask and then checked for strict equality.

Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the
expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value
'0x1') is evaluated first and the result is 'true'. In consequence, for
UDP packets the execution flow enters an incorrect branch.

Fixes: 56b8b9b7e5d2 ("net/ena: convert to new Tx offloads API")
Cc: stable@dpdk.org
Reported-by: Eduard Serra <eserra@vmware.com>
Signed-off-by: Maciej Bielski <mba@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
5 years agonet/virtio: fix build with 0 headroom
Hemant Agrawal [Thu, 25 Jul 2019 11:06:45 +0000 (16:36 +0530)]
net/virtio: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, virito ethdev driver throws
compilation error
virtio_ethdev.c:1851:2: note: in expansion of macro ‘RTE_BUILD_BUG_ON’
RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM
< sizeof(struct virtio_net_hdr_mrg_rxbuf));

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: dec08c28c0b3 ("virtio: check packet headroom at compile time")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agobus/fslmc: fix build with 0 headroom
Hemant Agrawal [Thu, 25 Jul 2019 11:06:44 +0000 (16:36 +0530)]
bus/fslmc: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, dpaa driver throws compilation error
error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: beb2a7865dda ("bus/fslmc: define hardware annotation area size")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa: fix build with 0 headroom
Hemant Agrawal [Thu, 25 Jul 2019 11:06:43 +0000 (16:36 +0530)]
net/dpaa: fix build with 0 headroom

When using RTE_PKTMBUF_HEADROOM as 0, dpaa driver throws compilation error
error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: ff9e112d7870 ("net/dpaa: add NXP DPAA PMD driver skeleton")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agodevtools: allow misc options in null test
Thomas Monjalon [Tue, 30 Jul 2019 17:34:14 +0000 (19:34 +0200)]
devtools: allow misc options in null test

In order to ease basic testing with customized options,
EAL and testpmd options can be added as third and fourth arguments
of the "null PMD" script.

Also, the first argument becomes more flexible by accepting
the testpmd path as an alternative to the build directory.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodevtools: restore null test
Thomas Monjalon [Tue, 30 Jul 2019 17:34:13 +0000 (19:34 +0200)]
devtools: restore null test

This small testpmd test was not working for a long time
because of several changes in EAL and mempool.
The 3 main issues solved are:
- Make --no-huge working by specifying an amount of memory
to allocate in legacy mode, and disabling mlockall.
- Load a mempool handler in shared library case.
- Support meson

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agoreplace license text with SPDX tag on PPC files
David Christensen [Tue, 30 Jul 2019 20:01:58 +0000 (15:01 -0500)]
replace license text with SPDX tag on PPC files

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
5 years agodoc: replace tools guide license with SPDX tag
Hemant Agrawal [Tue, 5 Jun 2018 07:50:22 +0000 (13:20 +0530)]
doc: replace tools guide license with SPDX tag

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
5 years agovhost: replace IOTLB license with SPDX tag
Maxime Coquelin [Fri, 2 Aug 2019 06:59:09 +0000 (08:59 +0200)]
vhost: replace IOTLB license with SPDX tag

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agodoc: replace PVP guide license with SPDX tag
Maxime Coquelin [Fri, 2 Aug 2019 07:00:02 +0000 (09:00 +0200)]
doc: replace PVP guide license with SPDX tag

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: update supported i40e driver and firmware version
Zhaoyan Chen [Mon, 29 Jul 2019 03:36:21 +0000 (11:36 +0800)]
doc: update supported i40e driver and firmware version

Update supported Intel NIC driver version and firmware version

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
5 years agoapp/testpmd: use exit instead of panic
Stephen Hemminger [Fri, 2 Aug 2019 02:51:54 +0000 (19:51 -0700)]
app/testpmd: use exit instead of panic

rte_panic causes a backtrace (which is uniformative since all
these calls are in main). Instead use rte_exit and try and make the
messages informative.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>