dpdk.git
4 years agonet: add rte prefix to ICMP defines
Olivier Matz [Tue, 21 May 2019 16:13:09 +0000 (18:13 +0200)]
net: add rte prefix to ICMP defines

Add 'RTE_' prefix to defines:
- rename IP_ICMP_ECHO_REPLY as RTE_IP_ICMP_ECHO_REPLY.
- rename IP_ICMP_ECHO_REQUEST as RTE_IP_ICMP_ECHO_REQUEST.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ICMP structure
Olivier Matz [Tue, 21 May 2019 16:13:08 +0000 (18:13 +0200)]
net: add rte prefix to ICMP structure

Add 'rte_' prefix to structures:
- rename struct icmp_hdr as struct rte_icmp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to GRE structure
Olivier Matz [Tue, 21 May 2019 16:13:07 +0000 (18:13 +0200)]
net: add rte prefix to GRE structure

Add 'rte_' prefix to structures:
- rename struct gre_hdr as struct rte_gre_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ESP structure
Olivier Matz [Tue, 21 May 2019 16:13:06 +0000 (18:13 +0200)]
net: add rte prefix to ESP structure

Add 'rte_' prefix to structures:
- rename struct esp_hdr as struct rte_esp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ether defines
Olivier Matz [Tue, 21 May 2019 16:13:05 +0000 (18:13 +0200)]
net: add rte prefix to ether defines

Add 'RTE_' prefix to defines:
- rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN.
- rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN.
- rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN.
- rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN.
- rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN.
- rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN.
- rename ETHER_MTU as RTE_ETHER_MTU.
- rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN.
- rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID.
- rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN.
- rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU.
- rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR.
- rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR.
- rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4.
- rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6.
- rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP.
- rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN.
- rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP.
- rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ.
- rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG.
- rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588.
- rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW.
- rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB.
- rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP.
- rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS.
- rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM.
- rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN.
- rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE.
- rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4.
- rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6.
- rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH.
- rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH.
- rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS.
- rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP.
- rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG.
- rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ether functions
Olivier Matz [Tue, 21 May 2019 16:13:04 +0000 (18:13 +0200)]
net: add rte prefix to ether functions

Add 'rte_' prefix to functions:
- rename is_same_ether_addr() as rte_is_same_ether_addr().
- rename is_zero_ether_addr() as rte_is_zero_ether_addr().
- rename is_unicast_ether_addr() as rte_is_unicast_ether_addr().
- rename is_multicast_ether_addr() as rte_is_multicast_ether_addr().
- rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr().
- rename is_universal_ether_addr() as rte_is_universal_ether_addr().
- rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr().
- rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr().
- rename eth_random_addr() as rte_eth_random_addr().
- rename ether_addr_copy() as rte_ether_addr_copy().
- rename ether_format_addr() as rte_ether_format_addr().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ether structures
Olivier Matz [Tue, 21 May 2019 16:13:03 +0000 (18:13 +0200)]
net: add rte prefix to ether structures

Add 'rte_' prefix to structures:
- rename struct ether_addr as struct rte_ether_addr.
- rename struct ether_hdr as struct rte_ether_hdr.
- rename struct vlan_hdr as struct rte_vlan_hdr.
- rename struct vxlan_hdr as struct rte_vxlan_hdr.
- rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ARP defines
Olivier Matz [Tue, 21 May 2019 16:13:02 +0000 (18:13 +0200)]
net: add rte prefix to ARP defines

Add 'RTE_' prefix to defines:
- rename ARP_HRD_ETHER as RTE_ARP_HRD_ETHER.
- rename ARP_OP_REQUEST as RTE_ARP_OP_REQUEST.
- rename ARP_OP_REPLY as RTE_ARP_OP_REPLY.
- rename ARP_OP_REVREQUEST as RTE_ARP_OP_REVREQUEST.
- rename ARP_OP_REVREPLY as RTE_ARP_OP_REVREPLY.
- rename ARP_OP_INVREQUEST as RTE_ARP_OP_INVREQUEST.
- rename ARP_OP_INVREPLY as RTE_ARP_OP_INVREPLY.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet: add rte prefix to ARP structures
Olivier Matz [Tue, 21 May 2019 16:13:01 +0000 (18:13 +0200)]
net: add rte prefix to ARP structures

Also rename arp_hrd, arp_pro, arp_hln, arp_pln and arp_op fields
to avoid conflict with the #defines in gnu libc.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/ice: update RSS RETA size with supported values
Haiyue Wang [Mon, 20 May 2019 08:14:33 +0000 (16:14 +0800)]
net/ice: update RSS RETA size with supported values

Since ice can support 128, 512, 2K RSS RETA size value, change the
update API to set it to resize the RSS RETA table. And by default,
use 512 to sync with ETH_RSS_RETA_SIZE_x maximum value definition.
Also the flag ICE_FLAG_RSS_AQ_CAPABLE is missed to set.

Fixes: 690175ee51bf ("net/ice: support getting device information")
Fixes: ff963bfa7cb1 ("net/ice: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/i40e: enable new device
Beilei Xing [Wed, 15 May 2019 01:58:36 +0000 (09:58 +0800)]
net/i40e: enable new device

This patch removes ifdef to enable new device.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ixgbe: fix Tx threshold setup
Qi Zhang [Sat, 4 May 2019 09:29:39 +0000 (17:29 +0800)]
net/ixgbe: fix Tx threshold setup

Tx desc's DD status is not cleaned by NIC automatically after packets
have been transmitted until software refill a new packet during next
loop. So when tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

Then patch fixes this issue by
1. try to adapt tx_rs_thresh to an aggressive tx_free_thresh.
2. queue setup fail when tx_free_thresh + tx_rs_thresh > nb_desc

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
4 years agonet/ice: fix Tx threshold setup
Qi Zhang [Sat, 4 May 2019 09:29:38 +0000 (17:29 +0800)]
net/ice: fix Tx threshold setup

Tx desc's DD status is not cleaned by NIC automatically after packets
have been transmitted until software refill a new packet during next
loop. So when tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

Then patch fixes this issue by
1. try to adapt tx_rs_thresh to an aggressive tx_free_thresh.
2. queue setup fail when tx_free_thresh + tx_rs_thresh > nb_desc

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
4 years agonet/i40e: fix Tx threshold setup
Qi Zhang [Sat, 4 May 2019 09:29:37 +0000 (17:29 +0800)]
net/i40e: fix Tx threshold setup

Tx desc's DD status is not cleaned by NIC automatically after packets
have been transmitted until software refill a new packet during next
loop. So when tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

Then patch fixes this issue by
1. try to adapt tx_rs_thresh to an aggressive tx_free_thresh.
2. queue setup fail when tx_free_thresh + tx_rs_thresh > nb_desc

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
4 years agonet/fm10k: advertise supported RSS hash function
Xiao Wang [Mon, 6 May 2019 08:44:34 +0000 (16:44 +0800)]
net/fm10k: advertise supported RSS hash function

PMD should advertise supported RSS hash functions via
dev_info.flow_type_rss_offloads variable [1], otherwise upper level check
would fail on configuring RSS, leading to MQ RSS failure.

[1] commit aa1a6d87f15d ("ethdev: force RSS offload rules again")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ixgbe: fix unexpected link handler
Yunjian Wang [Wed, 8 May 2019 12:51:38 +0000 (20:51 +0800)]
net/ixgbe: fix unexpected link handler

The nic's interrupt source has some active handler, which maybe call
ixgbe_dev_link_update() to set link handler. We should cancel the
link handler before remove dev to prevent executing the link handler.
It triggers segfault.

Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
4 years agonet/ice: set min and max MTU
Qi Zhang [Tue, 7 May 2019 01:53:46 +0000 (09:53 +0800)]
net/ice: set min and max MTU

This commit sets the min and max supported MTU values for ice devices
via the ice_dev_info_get() function. Min MTU supported is set to
ETHER_MIN_MTU and max mtu is calculated as the max packet length
supported minus the transport overhead.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/i40e: forbid two RSS flow rules
Wei Zhao [Thu, 9 May 2019 02:59:30 +0000 (10:59 +0800)]
net/i40e: forbid two RSS flow rules

Refuse to create the second RSS flow rule as only one RSS key and
HASH register for each PF port. Users should delete the first rule
before setup the second rule.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Wenjie Li <wenjiex.a.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/fm10k: support Rx queue count API
Xiao Wang [Wed, 24 Apr 2019 07:51:36 +0000 (15:51 +0800)]
net/fm10k: support Rx queue count API

Some application, e.g. the l3fwd-power sample uses rte_eth_rx_queue_count()
API to get the get the number of used descriptors of a Rx queue. This patch
adds fm10k implementation for this API.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: support link status change
Haiyue Wang [Fri, 3 May 2019 05:59:10 +0000 (13:59 +0800)]
net/ice: support link status change

Support link up and down functions for ice, and when stop the ice,
makes the link down also.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agoexamples: fix make clean when using pkg-config
Bruce Richardson [Fri, 17 May 2019 12:02:31 +0000 (13:02 +0100)]
examples: fix make clean when using pkg-config

The "make clean" command had a number of issues:
- the "--ignore-fail-on-non-empty" flag is not present on BSD
- the call to remove the build folder would fail if there was no build
  folder present.

These are fixed by only removing the build folder if it exists, and by
using -p flag to rmdir in place of --ignore-fail-on-non-empty

Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agoexamples: remove auto-generation of examples list
Bruce Richardson [Fri, 17 May 2019 12:02:30 +0000 (13:02 +0100)]
examples: remove auto-generation of examples list

The examples/meson.build file scanned the filesystem to find all examples
to build (for examples=all option) and install. However, using run_command
and scanning the filesystem prevented ninja from properly detecting the
addition or removal of any examples - one had to recreate the build
directory from scratch to guarantee correct detection of all examples. This
patch replaces this generated list with a static list of examples, thereby
allowing proper tracking by ninja/meson, but at the cost of having to
update this file when a new example is added or removed.

This also fixes an issue with Windows builds, since "sh" is not available
there.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agoexamples: fix install with empty meson parameter
Bruce Richardson [Fri, 17 May 2019 12:02:29 +0000 (13:02 +0100)]
examples: fix install with empty meson parameter

While the examples were being installed into the appropriate install path
when processing the examples/meson.build file, that file was only processed
if the "examples" meson parameter was non-empty. Since we now do more than
just build the examples, we need to unconditionally process the file.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agoversion: 19.08-rc0
Thomas Monjalon [Tue, 14 May 2019 16:04:37 +0000 (18:04 +0200)]
version: 19.08-rc0

Start a new release cycle with empty release notes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoversion: 19.05.0
Thomas Monjalon [Mon, 13 May 2019 21:41:38 +0000 (23:41 +0200)]
version: 19.05.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: announce power API change
Marcin Hajkowski [Mon, 13 May 2019 13:52:10 +0000 (15:52 +0200)]
doc: announce power API change

Function rte_power_set_env will no longer return
success on attempt to set env in initialized state.

Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Acked-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agodoc: announce sched API change
Jasvinder Singh [Wed, 24 Apr 2019 12:37:17 +0000 (13:37 +0100)]
doc: announce sched API change

Add deprecation note for making changes in data structures, APIs
and macros in order to have more traffic classes, flexible
mapping of pipe queues to traffic classes, subport level
configuration of pipes and queues, etc. These changes are aligned
to improvements suggested in the RFC-
https://mails.dpdk.org/archives/dev/2018-November/120035.html

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
4 years agodoc: announce crypto API change for GCM IV
Arek Kusztal [Wed, 17 Apr 2019 07:41:13 +0000 (09:41 +0200)]
doc: announce crypto API change for GCM IV

This patch adds deprecation notice of changing iv behaviour
when using Galois Counter Mode of operation.
With this change, IV of all supported sizes can be used.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
4 years agodoc: announce API change for net defines/structs/funcs
Olivier Matz [Wed, 10 Apr 2019 08:36:25 +0000 (10:36 +0200)]
doc: announce API change for net defines/structs/funcs

As discussed at techboard, the network definitions, structures
and functions will be prefixed by 'rte_'.

Link: http://mails.dpdk.org/archives/dev/2019-February/125033.html
Link: https://mails.dpdk.org/archives/dev/2019-April/129752.html
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: announce removal of memory config struct from API
Erik Gabriel Carrillo [Thu, 9 May 2019 18:51:45 +0000 (13:51 -0500)]
doc: announce removal of memory config struct from API

It is planned to make the rte_mem_config struct of the EAL private to
remove it from the visible ABI.  Add a notice to announce the intention.

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: announce API change to remove exit calls in libs
Thomas Monjalon [Wed, 8 May 2019 20:54:13 +0000 (22:54 +0200)]
doc: announce API change to remove exit calls in libs

Two public functions from EAL and metrics libraries need to return
some new error codes instead of calling rte_panic or rte_exit.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Arnon Warshavsky <arnon@qwilt.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: prepare security process for vulnerabilities
Thomas Monjalon [Tue, 7 May 2019 16:02:31 +0000 (18:02 +0200)]
doc: prepare security process for vulnerabilities

In case a vulnerability is discovered, the process to follow
is described in this document.
It has been inspired by the process of some referenced projects
and with the help of experts from Intel, RedHat, Mellanox
and the Linux Foundation.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agodoc: update release notes for 19.05
John McNamara [Fri, 10 May 2019 14:18:17 +0000 (15:18 +0100)]
doc: update release notes for 19.05

Fix grammar, spelling and formatting of DPDK 19.05 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: update Mellanox guides and release notes
Ori Kam [Mon, 13 May 2019 11:41:02 +0000 (11:41 +0000)]
doc: update Mellanox guides and release notes

This patch adds some missing features to Mellanox drivers release notes.
It also updates the mlx5/mlx4 documentations.

Fixes: d85b204b5dba ("doc: update release notes for Mellanox drivers")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agodoc: fix JSON interface for power sample
Lukasz Krakowiak [Mon, 13 May 2019 14:13:55 +0000 (15:13 +0100)]
doc: fix JSON interface for power sample

Updated doc for JSON sample code related to vm_power_manager
fifo interface: "command": "destroy", "command": "power".

There is no code change to go with this doc update, it is to fix
the docs to match the implementation in the code.

Fixes: a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
4 years agodoc: fix doxygen for timer API
Erik Gabriel Carrillo [Fri, 10 May 2019 16:38:36 +0000 (11:38 -0500)]
doc: fix doxygen for timer API

Now that some of the symbols in the timer lib are versioned, the
Doxygen documentation that is generated is incorrect.  Group all
versioned symbols, listing the generic name first, and remove comments
for older versions of symbols.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
4 years agoapp/testpmd: fix offload flags after port config
Wei Zhao [Thu, 9 May 2019 07:20:47 +0000 (15:20 +0800)]
app/testpmd: fix offload flags after port config

There is an error in function rxtx_port_config(), which may overwrite
offloads configuration get from function launch_args_parse() when run
testpmd app. So rxtx_port_config() should do "or" for port offloads.

Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Peng Yuan <yuan.peng@intel.com>
4 years agonet/mlx5: fix device removal handler for multiport
Viacheslav Ovsiienko [Sun, 12 May 2019 08:32:29 +0000 (08:32 +0000)]
net/mlx5: fix device removal handler for multiport

IBV_EVENT_DEVICE_FATAL event is generated by the driver once for
the entire multiport Infiniband device, not for each existing ports.
The port index is zero and it causes dropping the device removal
event. We should invoke the removal event processing routine
for each port we have installed handler for.

Fixes: 028b2a28c3cb ("net/mlx5: update event handler for multiport IB devices")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agoevent/dsw: ignore scheduling type for single-link queues
Mattias Rönnblom [Fri, 10 May 2019 12:18:16 +0000 (14:18 +0200)]
event/dsw: ignore scheduling type for single-link queues

The scheduling type parameter is not applicable for single link
queues. DSW would, at the time of rte_event_queue_setup(), erroneously
verify that scheduling type was one of the supported types, and
returned -ENOTSUP in case of RTE_SCHED_TYPE_ORDERED.

Fixes: 4540ee9c68 ("event/dsw: add device and queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Gage Eads <gage.eads@intel.com>
4 years agoeventdev: fix Rx adapter event flush
Nikhil Rao [Fri, 10 May 2019 08:08:10 +0000 (13:38 +0530)]
eventdev: fix Rx adapter event flush

The Rx adapter flushes events only if it has BATCH_SIZE
events buffered where BATCH_SIZE is set to 32, e.g., if a
single packet is sent, it is never passed to
eventdev. Fix this issue by adding an event buffer flush
either when a Rx queue is found to be empty or the adapter service
function has processed the max number of packets for an invocation.

Bugzilla ID: 277
Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter")
Cc: stable@dpdk.org
Reported-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Tested-by: Matias Elo <matias.elo@nokia.com>
4 years agodevtools: select patches to check with git range
David Marchand [Fri, 10 May 2019 07:49:36 +0000 (09:49 +0200)]
devtools: select patches to check with git range

Rather than default to origin/master.., it can be handy to choose the
range you want to check.

Example on a branch rebased on next-net:

Before:
$ ./devtools/checkpatches.sh
...
...
67/69 valid patches

After:
$ ./devtools/checkpatches.sh -r next-net/master..

3/3 valid patches

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoversion: 19.05-rc4
Thomas Monjalon [Thu, 9 May 2019 23:13:20 +0000 (01:13 +0200)]
version: 19.05-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update recommended kernel version for i40e
Lijuan Tu [Mon, 6 May 2019 16:37:18 +0000 (00:37 +0800)]
doc: update recommended kernel version for i40e

add recommended DPDK/kernel driver/firmware version matching list for
i40e for 19.05

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add tested Intel platforms with Intel NICs
Lijuan Tu [Mon, 6 May 2019 16:37:17 +0000 (00:37 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v19.05 release note.

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Thu, 9 May 2019 11:12:22 +0000 (11:12 +0000)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: add Mellanox BlueField platform guide
Yongseok Koh [Wed, 8 May 2019 23:39:15 +0000 (16:39 -0700)]
doc: add Mellanox BlueField platform guide

Platform specific guide for Mellanox BlueField SoC is added.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: update release notes for Mellanox drivers
Yongseok Koh [Thu, 9 May 2019 21:11:23 +0000 (14:11 -0700)]
doc: update release notes for Mellanox drivers

mlx4/mlx5 release note for v19.05

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
4 years agodoc: update release notes for QAT PMDs
Fiona Trahe [Fri, 3 May 2019 16:15:40 +0000 (17:15 +0100)]
doc: update release notes for QAT PMDs

Added release note entry for QAT compression PMD
Clarified that previous entry was for QAT sym crypto PMD

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: remove redundant information from debug guide
Vipin Varghese [Mon, 6 May 2019 09:00:12 +0000 (14:30 +0530)]
doc: remove redundant information from debug guide

Remove redundant information from section Performance issue isolation.
Re-word for section header for packet capture.

Fixes: 08db7bde1617 ("doc: add guide for debug and troubleshoot")

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: fix formatting in testpmd guide
Kevin Traynor [Thu, 2 May 2019 18:43:42 +0000 (19:43 +0100)]
doc: fix formatting in testpmd guide

Minor formatting error related to code block noticed when reading the doc.
Fix it and some other errors.

Fixes: c7217b9dd8ef ("app/testpmd: change log level at run time")
Fixes: 3c272b280a50 ("app/testpmd: add commands for RSS queue region")
Fixes: e38ea44f1714 ("app/testpmd: add configuration for input set")
Fixes: 08e0b3440baf ("app/testpmd: add option to configure UDP tunnel port")
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agodevtools: fix check of symbol added as stable API
David Marchand [Fri, 3 May 2019 14:34:20 +0000 (16:34 +0200)]
devtools: fix check of symbol added as stable API

The incriminated commit broke the detection of new symbols skipping the
EXPERIMENTAL step before entering a stable ABI section.
sed won't return an error, check a null output instead.

Fixes: 3630757803ab ("devtools: accept experimental symbol promotion")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agodevtools: fix symbol name in check log
David Marchand [Fri, 3 May 2019 14:34:19 +0000 (16:34 +0200)]
devtools: fix symbol name in check log

We have an incorrect variable name in this log.

Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agodevtools: skip warning for reordered symbols
David Marchand [Fri, 3 May 2019 14:34:17 +0000 (16:34 +0200)]
devtools: skip warning for reordered symbols

No need to shout when we are just reordering symbols in a section.

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/ipsec-secgw: fix build error log
Marcin Smoczynski [Wed, 8 May 2019 13:09:56 +0000 (15:09 +0200)]
examples/ipsec-secgw: fix build error log

Fix invalid indentation - extra whitespace before error directive which
is causing syntax error when no pkgconfig file for the DPDK is found and
RTE_SDK is not specified.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Cc: stable@dpdk.org
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
4 years agodoc: add timer library changes to release notes
Erik Gabriel Carrillo [Mon, 6 May 2019 21:29:56 +0000 (16:29 -0500)]
doc: add timer library changes to release notes

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agotimer: allow first subsystem init from secondary
Erik Gabriel Carrillo [Thu, 9 May 2019 19:39:36 +0000 (14:39 -0500)]
timer: allow first subsystem init from secondary

Since memzones can be reserved from secondary processes as well as
primary processes, if the first call to the timer subsystem init
function occurs in a secondary process, we should allow it to succeed.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
4 years agotest/hash: check freeing key with position
Dharmik Thakkar [Thu, 9 May 2019 17:19:07 +0000 (17:19 +0000)]
test/hash: check freeing key with position

This patch adds a unit test for rte_hash_free_key_with_position().

Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agohash: fix total entries count
Dharmik Thakkar [Thu, 9 May 2019 17:19:06 +0000 (17:19 +0000)]
hash: fix total entries count

In rte_hash, with current implementation, it is possible that keys
are stored at indexes greater than the number of total entries.

Currently, in rte_hash_free_key_with_position(), due to incorrect
computation of total_entries, application cannot free keys with
indexes greater than the number of total entries.

This patch fixes this incorrect computation of total_entries.

Bugzilla ID: 261
Fixes: 9d033dac7d7c ("hash: support no free on delete")
Cc: stable@dpdk.org
Reported-by: Linfan <zhongdahulinfan@163.com>
Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agohash: fix position returned in free slots
Dharmik Thakkar [Thu, 9 May 2019 17:19:05 +0000 (17:19 +0000)]
hash: fix position returned in free slots

Currently, in rte_hash_free_key_with_position(), the position returned
to the ring of free_slots leads to an unexpected conflict with a key
already in use.

This patch fixes incorrect position returned to the ring of free_slots.

Bugzilla ID: 261
Fixes: 9d033dac7d7c ("hash: support no free on delete")
Cc: stable@dpdk.org
Reported-by: Linfan <zhongdahulinfan@163.com>
Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agotest/barrier: fix for Power CPUs
David Christensen [Wed, 8 May 2019 21:02:43 +0000 (16:02 -0500)]
test/barrier: fix for Power CPUs

The memory barrier test fails on IBM Power 9 systems.  Add additional
barriers to accommodate the weakly ordered model used on Power CPUs.

Fixes: 93da5b59afc9 ("test: introduce memory barrier test case")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/barrier: enlarge variables to 64 bits
David Christensen [Wed, 8 May 2019 21:02:32 +0000 (16:02 -0500)]
test/barrier: enlarge variables to 64 bits

Memory barrier failures can be intermittent. Increase the size of the
sum/val/iteration variables to allow tests that can run for days so that
sporadic errors can be identified.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/barrier: fix allocation check
David Christensen [Wed, 8 May 2019 21:02:19 +0000 (16:02 -0500)]
test/barrier: fix allocation check

Code tested calloc failures for pt & lpt variables
but not for the sum variable. Add a test for calloc
failure of sum.

Fixes: 93da5b59afc9 ("test: introduce memory barrier test case")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/barrier: fix typo in log
David Christensen [Wed, 8 May 2019 21:02:08 +0000 (16:02 -0500)]
test/barrier: fix typo in log

Change "much" to "match" in a printf.

Fixes: 93da5b59afc9 ("test: introduce memory barrier test case")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest: call timer subsystem finalize at exit
Erik Gabriel Carrillo [Mon, 6 May 2019 21:03:51 +0000 (16:03 -0500)]
test: call timer subsystem finalize at exit

The eal_flags_autotest checks that no hugepage map files are left behind
after a process exits, which can only be the case if all allocations made
from DPDK heaps were freed back to the freelist, resulting in the
hugepage map files being unlinked automatically.  Add a call to
rte_timer_subsystem_finalize() at application exit time to release
allocations now made by the timer library.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
4 years agopower: fix cache line alignment
Mattias Rönnblom [Sun, 5 May 2019 18:12:16 +0000 (20:12 +0200)]
power: fix cache line alignment

The ACPI and PState CPU frequency scaling drivers used the
__rte_cache_aligned attribute without including rte_memory.h, which
turns what looks as the declaration of a cache line-aligned struct
into a non-aligned struct declaration and the definition of an
instance of the struct.

Fixes: e6c6dc0f96 ("power: add p-state driver compatibility")
Fixes: 445c6528b5 ("power: common interface for guest and host")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
4 years agopower: fix resource leak
Liang Ma [Mon, 8 Apr 2019 16:19:16 +0000 (17:19 +0100)]
power: fix resource leak

Fix the resource leaking issue

Coverity issue: 337668
Fixes: b60fd5f8b1ce8f0a2c ("power: add bit for high frequency cores")

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
4 years agoipc: add warnings about correct API usage
Anatoly Burakov [Fri, 3 May 2019 11:50:50 +0000 (12:50 +0100)]
ipc: add warnings about correct API usage

When handling synchronous or asynchronous requests, the reply
must be sent explicitly even if the result of the operation is
an error, to avoid the other side timing out. Make note of this
in documentation explicitly.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agoipc: add warnings about not using IPC with memory API
Anatoly Burakov [Fri, 3 May 2019 11:50:49 +0000 (12:50 +0100)]
ipc: add warnings about not using IPC with memory API

IPC and memory-related API's should not be mixed because memory
relies on IPC internally. Add explicit warnings to IPC API and
to the documentation about this.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: fix typo in IPC guide
Anatoly Burakov [Fri, 3 May 2019 11:50:48 +0000 (12:50 +0100)]
doc: fix typo in IPC guide

The word "synchronous" appears twice. Fix it.

Fixes: e22266669e86 ("doc: add IPC guide")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agoipc: unlock on failure
Aaron Conole [Mon, 6 May 2019 13:48:25 +0000 (09:48 -0400)]
ipc: unlock on failure

Coverity issue: 340076
Fixes: a2a06860b8c4 ("ipc: fix memory leak on request failure")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agotest/crypto: return not supported instead of skipped
Ayuj Verma [Thu, 9 May 2019 11:23:21 +0000 (16:53 +0530)]
test/crypto: return not supported instead of skipped

Currently some tests return TEST_SKIPPED/-1 when tests or params
are not supported for particular PMD because of which tests adds to
FAILED test counter in place of Skipped/Unsupported counter.

Since unsupported test is not a failure case,
replace return value TEST_SKIPPED/-1 with -ENOTSUP

- Return -ENOTSUP for unsupported tests
- add NULL check for rte_cryptodev_asym_capability_get()
- Typo correction

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
4 years agoipsec: fix headers install
Marcin Smoczynski [Wed, 8 May 2019 12:12:12 +0000 (14:12 +0200)]
ipsec: fix headers install

Invalid statement is used to indicate header files to install.

Fixed the statement and reformatted recipe file.

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agodoc: fix typo in mlx5 guide
Yongseok Koh [Wed, 8 May 2019 09:24:09 +0000 (02:24 -0700)]
doc: fix typo in mlx5 guide

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: fix mbuf leak with multi-segment Tx
Andrew Rybchenko [Wed, 8 May 2019 10:27:37 +0000 (11:27 +0100)]
app/testpmd: fix mbuf leak with multi-segment Tx

The last mbuf allocated in bulk is never used and never freed.

Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Fixes: 561ddcf8d099 ("app/testpmd: allocate txonly segments per bulk")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix errno for unsupported Direct Rules
Ori Kam [Tue, 7 May 2019 13:41:34 +0000 (13:41 +0000)]
net/mlx5: fix errno for unsupported Direct Rules

When Direct Rules API is not supported we don't set the errno.
This results in failing the function but with errno equals to zero.
The result of this is that a function that failed, is considered as
a function that worked correctly.

This commit fixes this issue by setting the errno to ENOTSUP and
returning this error when error value should be returned.

Since RDMA-CORE are returning positive errno we are also returning
positive error values.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agonet/mlx5: fix release of Rx queue object
Dekel Peled [Tue, 7 May 2019 07:26:02 +0000 (10:26 +0300)]
net/mlx5: fix release of Rx queue object

Function mlx5_rx_intr_disable() calls mlx5_rxq_ibv_get() and performs
some actions on the returned rxq_ibv.
It doesn't release the rxq_ibv when all is completed with success.

This patch adds call to mlx5_rxq_ibv_release() where it's missing.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agonet/mlx5: fix Multi-Packet RQ mempool name
Yongseok Koh [Mon, 6 May 2019 23:21:58 +0000 (16:21 -0700)]
net/mlx5: fix Multi-Packet RQ mempool name

Currently, the name of MPRQ mempool is set by
snprintf(name, sizeof(name), "%s-mprq", dev->device->name);
For port representor, the name is duplicate of its master and failed to
create such a mempool having the same name. Port ID is used in the name
instead.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agonet/mlx5: fix init with zero Rx queue
Dekel Peled [Sun, 5 May 2019 11:44:24 +0000 (14:44 +0300)]
net/mlx5: fix init with zero Rx queue

Recent patch [1] added, at the end of mlx5_dev_configure(), a call to
mlx5_proc_priv_init(), initializing process_private data of eth_dev.
This call is not reached if PMD is started with zero Rx queues.
In this case mlx5_dev_configure() returns earlier due to the check:
if (rxqs_n == priv->rxqs_n)
return 0;
In such a scenario, later references to uninitialized process_private
data will result in segmentation fault.
For example see in function txq_uar_init().

This patch changes the check logic. The following code is executed
if (rxqs_n != priv->rxqs_n), and skipped otherwise.
Function mlx5_proc_priv_init() is always invoked, to ensure
process_private data is initialized.

[1] http://patches.dpdk.org/patch/52629/

Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
4 years agonet/iavf: enable more link speed
Qi Zhang [Sat, 4 May 2019 14:09:10 +0000 (22:09 +0800)]
net/iavf: enable more link speed

Enable advanced link speed mode (VIRTCHNL_VF_CAP_ADV_LINK_SPEED) so iavf
PMD can identify more link speed that reported by pf.

Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
4 years agonet/i40e: add device id for X710/XXV710 of ipn3ke
Rosen Xu [Sun, 5 May 2019 03:27:02 +0000 (11:27 +0800)]
net/i40e: add device id for X710/XXV710 of ipn3ke

New PCI device ids are created to support X710/XXV710 of Intel FPGA
Programmable Acceleration card N3000, also called ipn3ke.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: fix EEPROM range check
Xiao Wang [Sun, 5 May 2019 05:48:21 +0000 (13:48 +0800)]
net/ice: fix EEPROM range check

The last word should not cross shadow RAM boundary.

Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/ice: clean up minor issues
Xiao Wang [Sun, 5 May 2019 05:45:28 +0000 (13:45 +0800)]
net/ice: clean up minor issues

This patch is a cleanup on comment, variable modifier, coding style.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agoversion: 19.05-rc3
Thomas Monjalon [Sat, 4 May 2019 22:28:48 +0000 (00:28 +0200)]
version: 19.05-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update release notes for Windows support
Pallavi Kadam [Tue, 23 Apr 2019 18:12:51 +0000 (11:12 -0700)]
doc: update release notes for Windows support

Added documentation for Windows support on 19.05 release.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Anand Rawat <anand.rawat@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: update release notes for new armv8 targets
Jerin Jacob [Thu, 25 Apr 2019 07:41:30 +0000 (13:11 +0530)]
doc: update release notes for new armv8 targets

Added documentation for the new armv8 targets supported in 19.05 release.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add guide for debug and troubleshoot
Vipin Varghese [Tue, 9 Apr 2019 06:33:44 +0000 (12:03 +0530)]
doc: add guide for debug and troubleshoot

Add user guide on debugging and troubleshooting for common
issues and bottleneck found in the sample application model.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: add pictures for debug and troubleshoot guide
Vipin Varghese [Tue, 9 Apr 2019 06:33:43 +0000 (12:03 +0530)]
doc: add pictures for debug and troubleshoot guide

Add svg images for debug and troubleshoot guide.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: fix broken link in LPM guide
Herakliusz Lipiec [Wed, 24 Apr 2019 15:35:36 +0000 (16:35 +0100)]
doc: fix broken link in LPM guide

Bugzilla ID: 235
Fixes: fc1f2750a3ec ("doc: programmers guide")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agohash: fix doc about thread/process safety
Yipeng Wang [Mon, 29 Apr 2019 09:40:16 +0000 (02:40 -0700)]
hash: fix doc about thread/process safety

rte_hash_hash is multi-thread safe but not multi-process safe
because of the use of function pointers. Previous document
and comment says the other way around. This commit fixes
the issue.

Fixes: fc1f2750a3ec ("doc: programmers guide")
Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")
Cc: stable@dpdk.org
Reported-by: Andrey Nikolaev <gentoorion@gmail.com>
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agoeventdev: update references to removed function
Erik Gabriel Carrillo [Mon, 29 Apr 2019 14:38:06 +0000 (09:38 -0500)]
eventdev: update references to removed function

Remove references to the (deleted) rte_event_port_enqueue_depth()
function in the Doxygen comments for rte_event_enqueue_burst() and
friends, and replace with references to rte_event_port_attr_get().

Fixes: 78ffab961155 ("eventdev: add port attribute function")
Fixes: c9bf83947e2e ("eventdev: add eth Tx adapter APIs")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agotest: load test symbols from binary at init
David Marchand [Mon, 29 Apr 2019 14:28:36 +0000 (16:28 +0200)]
test: load test symbols from binary at init

Rather than call nm on the test application binary for each test to
consider, call it once at the object init.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agotest: clean remaining trace of devargs autotest
David Marchand [Mon, 29 Apr 2019 14:32:45 +0000 (16:32 +0200)]
test: clean remaining trace of devargs autotest

This test has been removed by the commit 83945fbd7c49 ("test: remove
devargs unit tests") which left some trace in meson and reintroduced in
autotest by the second commit 9eabcb682493 ("test: update autotest
list").

Fixes: 83945fbd7c49 ("test: remove devargs unit tests")
Fixes: 9eabcb682493 ("test: update autotest list")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
4 years agoapp/testpmd: revert fixed flag for exact link speed
Ferruh Yigit [Wed, 24 Apr 2019 22:03:09 +0000 (23:03 +0100)]
app/testpmd: revert fixed flag for exact link speed

This reverts commit bdca79053b6aea504d02691d9319fa976062457f.

Not all PMDs support the fixed link speed set, and link speed can be set
even with auto negotiation enabled. Reverting the patch to not break
existing usage.

Fixes: bdca79053b6a ("app/testpmd: set fixed flag for exact link speed")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/netvsc: free all queues on close
Stephen Hemminger [Tue, 30 Apr 2019 18:12:17 +0000 (11:12 -0700)]
net/netvsc: free all queues on close

When dev_close is called, the netvsc driver will clean up all
queues including the primary ring buffer.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
4 years agonet/netvsc: reset mbuf port on VF Rx
Stephen Hemminger [Tue, 30 Apr 2019 18:12:16 +0000 (11:12 -0700)]
net/netvsc: reset mbuf port on VF Rx

Redo the receive logic to set m->port on packets received on VF.

When using VF, still need to check for packets and completions
arriving on the VMBus path even if application is not doing bursting
(ie n_rx == 0).

Also, fix comment.

Fixes: dc7680e8597c ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
4 years agonet/vmxnet3: add VLAN filter capability
Mark Gillott [Wed, 1 May 2019 15:29:42 +0000 (16:29 +0100)]
net/vmxnet3: add VLAN filter capability

The driver supports VLAN filtering, but the option is not included in
the advertised list of capabilities. Thus any attempt to enable VLAN
filtering always fails. Update the list of offload capabilities to
include DEV_RX_OFFLOAD_VLAN_FILTER.

Fixes: 95e4a96ccbf1 ("net/vmxnet3: convert to new Rx offload API")
Cc: stable@dpdk.org
Signed-off-by: Mark Gillott <mgillott@vyatta.att-mail.com>
Acked-by: Yong Wang <yongwang@vmware.com>
4 years agonet/tap: fix potential IPC buffer overrun
Herakliusz Lipiec [Mon, 29 Apr 2019 17:31:21 +0000 (18:31 +0100)]
net/tap: fix potential IPC buffer overrun

When secondary to primary process synchronization occurs
there is no check for number of fds which could cause buffer overrun.

Bugzilla ID: 252
Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix Direct Rules API
Ori Kam [Wed, 1 May 2019 20:40:45 +0000 (20:40 +0000)]
net/mlx5: fix Direct Rules API

The RDMA-CORE Direct Rules API was changed in latest upstream code

This commit update the API accordingly.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agonet/mlx5: fix max number of queues for NEON Tx
Yongseok Koh [Wed, 1 May 2019 01:37:17 +0000 (18:37 -0700)]
net/mlx5: fix max number of queues for NEON Tx

BlueField SmartNIC has 0xa2d2 as PCI device ID on both ARM and x86 host. On
ARM side, Tx inlining need not be used as PCI bandwidth is not bottleneck.
Vectorized Tx can still be used up to 16 queues. For other archs
(e.g., x86), keep using the default value.

Fixes: 09d8b41699bb ("net/mlx5: make vectorized Tx threshold configurable")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
4 years agonet/mlx5: check Tx queue size overflow
Yongseok Koh [Wed, 1 May 2019 01:01:43 +0000 (18:01 -0700)]
net/mlx5: check Tx queue size overflow

If Tx packet inlining is enabled, rdma-core library should allocate large
Tx WQ enough to support it. It is better for PMD to calculate the size of
WQ based on the parameters and return error with appropriate message if it
exceeds the device capability.

Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>