patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1
@ 2018-02-07  8:56 Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'bus/vdev: continue probing after a device failure' " Yuanhan Liu
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:56 UTC (permalink / raw)
  To: Marko Kovacevic; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f8e8bb5d26348f1adc47af99de5cd99479d87fea Mon Sep 17 00:00:00 2001
From: Marko Kovacevic <marko.kovacevic@intel.com>
Date: Mon, 5 Feb 2018 15:45:31 +0000
Subject: [PATCH] mk: fix external build

[ upstream commit c36fddd4372305ecf7a25a8417aa720571177a54 ]

Code commit for 'make -f' support, breaks the build in cases where
entries in $(MAKEFILE_LIST) are absolute paths. This commit uses
notdir and firstword to ensure that only the local filename is used.

Fixes: 3a5c339d51a4 ("mk: support renamed Makefile in external project")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk
index 723c015..ea41ebf 100644
--- a/mk/internal/rte.extvars.mk
+++ b/mk/internal/rte.extvars.mk
@@ -48,7 +48,7 @@ ifeq ("$(origin M)", "command line")
 RTE_EXTMK := $(abspath $(M))
 endif
 endif
-RTE_EXTMK ?= $(RTE_SRCDIR)/$(firstword $(MAKEFILE_LIST))
+RTE_EXTMK ?= $(RTE_SRCDIR)/$(notdir $(firstword $(MAKEFILE_LIST)))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'bus/vdev: continue probing after a device failure' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
@ 2018-02-07  8:56 ` Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'mempool: fix physical contiguous check' " Yuanhan Liu
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:56 UTC (permalink / raw)
  To: Moti Haimovsky; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From abb25d6009b0fa4f79c89ef7ff4d717038596a6a Mon Sep 17 00:00:00 2001
From: Moti Haimovsky <motih@mellanox.com>
Date: Mon, 5 Feb 2018 19:15:03 +0200
Subject: [PATCH] bus/vdev: continue probing after a device failure

[ upstream commit 9576ded31edeee3ca82799bf55db6a5458f44feb ]

This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
 drivers/bus/vdev/vdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index fd7736d..ba0ed7a 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -289,6 +289,7 @@ static int
 vdev_probe(void)
 {
 	struct rte_vdev_device *dev;
+	int ret = 0;
 
 	/* call the init function for each virtual device */
 	TAILQ_FOREACH(dev, &vdev_device_list, next) {
@@ -299,11 +300,11 @@ vdev_probe(void)
 		if (vdev_probe_all_drivers(dev)) {
 			VDEV_LOG(ERR, "failed to initialize %s device\n",
 				rte_vdev_device_name(dev));
-			return -1;
+			ret = -1;
 		}
 	}
 
-	return 0;
+	return ret;
 }
 
 static struct rte_device *
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'mempool: fix physical contiguous check' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'bus/vdev: continue probing after a device failure' " Yuanhan Liu
@ 2018-02-07  8:56 ` Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'usertools/devbind: fix kernel module reporting' " Yuanhan Liu
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:56 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 8b4341b7b7d851d355fa402f9dff1bf85389b0e8 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Thu, 1 Feb 2018 14:02:23 +0000
Subject: [PATCH] mempool: fix physical contiguous check

[ upstream commit ce42ae42bc0f577d9d91c6120216b3b007170d5a ]

There is not specified dependency between rte_mempool_populate_default()
and rte_mempool_populate_iova(). So, the second should not rely on the
fact that the first adds capability flags to the mempool flags.

Fixes: 65cf769f5e6a ("mempool: detect physical contiguous objects")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 lib/librte_mempool/rte_mempool.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 6d17022..5bd74ea 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -362,6 +362,7 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 	void *opaque)
 {
 	unsigned total_elt_sz;
+	unsigned int mp_capa_flags;
 	unsigned i = 0;
 	size_t off;
 	struct rte_mempool_memhdr *memhdr;
@@ -386,8 +387,17 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 
 	total_elt_sz = mp->header_size + mp->elt_size + mp->trailer_size;
 
+	/* Get mempool capabilities */
+	mp_capa_flags = 0;
+	ret = rte_mempool_ops_get_capabilities(mp, &mp_capa_flags);
+	if ((ret < 0) && (ret != -ENOTSUP))
+		return ret;
+
+	/* update mempool capabilities */
+	mp->flags |= mp_capa_flags;
+
 	/* Detect pool area has sufficient space for elements */
-	if (mp->flags & MEMPOOL_F_CAPA_PHYS_CONTIG) {
+	if (mp_capa_flags & MEMPOOL_F_CAPA_PHYS_CONTIG) {
 		if (len < total_elt_sz * mp->size) {
 			RTE_LOG(ERR, MEMPOOL,
 				"pool area %" PRIx64 " not enough\n",
@@ -407,7 +417,7 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 	memhdr->free_cb = free_cb;
 	memhdr->opaque = opaque;
 
-	if (mp->flags & MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS)
+	if (mp_capa_flags & MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS)
 		/* align object start address to a multiple of total_elt_sz */
 		off = total_elt_sz - ((uintptr_t)vaddr % total_elt_sz);
 	else if (mp->flags & MEMPOOL_F_NO_CACHE_ALIGN)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'usertools/devbind: fix kernel module reporting' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'bus/vdev: continue probing after a device failure' " Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'mempool: fix physical contiguous check' " Yuanhan Liu
@ 2018-02-07  8:56 ` Yuanhan Liu
  2018-02-07  8:56 ` [dpdk-stable] patch 'net/mlx4: fix drop flow resources leak' " Yuanhan Liu
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:56 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 64d138435894ae01ee5820d1d2ddadac5b8ea696 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 24 Jan 2018 10:26:12 +0000
Subject: [PATCH] usertools/devbind: fix kernel module reporting

[ upstream commit c76a10ec1531b3e5d182b8e9bbd27c48365f91aa ]

lspci reports kernel modules in "Module" string, but devbind
expects it to be "Module_str". Fix it up similar to how we fix
up "Driver" to be "Driver_str".

Fixes: c3ce205d5729 ("usertools: optimize lspci invocation")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 usertools/dpdk-devbind.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index f9f7aee..df9b21a 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -278,6 +278,8 @@ def get_device_details(devices_type):
                 # of dictionary key names
                 if "Driver" in dev.keys():
                     dev["Driver_str"] = dev.pop("Driver")
+                if "Module" in dev.keys():
+                    dev["Module_str"] = dev.pop("Module")
                 # use dict to make copy of dev
                 devices[dev["Slot"]] = dict(dev)
             # Clear previous device's data
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/mlx4: fix drop flow resources leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2018-02-07  8:56 ` [dpdk-stable] patch 'usertools/devbind: fix kernel module reporting' " Yuanhan Liu
@ 2018-02-07  8:56 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " Yuanhan Liu
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:56 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Moti Haimovsky, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f014d695bbfee54b24dc170106d5951537b7f3dd Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 31 Jan 2018 16:33:06 +0100
Subject: [PATCH] net/mlx4: fix drop flow resources leak

[ upstream commit ff20ecbf2af7d7fe430526c055e980321a9fa7d9 ]

Resources allocated for drop flow rules are not freed properly. This causes
a memory leak and triggers an assertion failure on a reference counter when
compiled in debug mode.

This issue can be reproduced with testpmd by entering the following
commands:

 flow create 0 ingress pattern eth / end actions drop / end
 port start all
 port stop all
 port start all
 port stop all
 quit

The reason is additional references are taken when re-enabling existing
flow rules, a common occurrence when rehashing configuration.

Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")

Reported-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 8b87b29..e81e24d 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -1048,6 +1048,8 @@ mlx4_flow_toggle(struct priv *priv,
 		flow->drop = missing;
 	}
 	if (flow->drop) {
+		if (flow->ibv_flow)
+			return 0;
 		mlx4_drop_get(priv);
 		if (!priv->drop) {
 			err = rte_errno;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/bonding: check error of MAC address setting' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2018-02-07  8:56 ` [dpdk-stable] patch 'net/mlx4: fix drop flow resources leak' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/qede: fix few log messages' " Yuanhan Liu
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 47961e7d6117710f9fd5cc682f870ea1b84894fb Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Thu, 1 Feb 2018 17:21:26 +0000
Subject: [PATCH] net/bonding: check error of MAC address setting

[ upstream commit a508daa1a43491ef347774852fe9ee3ff960182c ]

Coverity issue: 260405
Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 532683b..b834035 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -291,8 +291,13 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 	if (internals->slave_count < 1) {
 		/* if MAC is not user defined then use MAC of first slave add to
 		 * bonded device */
-		if (!internals->user_defined_mac)
-			mac_address_set(bonded_eth_dev, slave_eth_dev->data->mac_addrs);
+		if (!internals->user_defined_mac) {
+			if (mac_address_set(bonded_eth_dev,
+					    slave_eth_dev->data->mac_addrs)) {
+				RTE_BOND_LOG(ERR, "Failed to set MAC address");
+				return -1;
+			}
+		}
 
 		/* Inherit eth dev link properties from first slave */
 		link_properties_set(bonded_eth_dev,
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/qede: fix few log messages' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'vhost: fix IOTLB pool out-of-memory handling' " Yuanhan Liu
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From a872346d97596d81a3f1349cba569be6f6b3017c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Fri, 2 Feb 2018 22:03:18 -0800
Subject: [PATCH] net/qede: fix few log messages

[ upstream commit 651f3d4d0f1329b1dcf933e6dc207be44ef51d01 ]

Fixes: 9e334305178f ("net/qede: fix MTU set and max Rx length")
Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_dcbx.c | 7 +++----
 drivers/net/qede/qede_rxtx.c       | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index 632297a..21ddda9 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -216,10 +216,9 @@ ecore_dcbx_get_app_protocol_type(struct ecore_hwfn *p_hwfn,
 		*type = DCBX_PROTOCOL_ETH;
 	} else {
 		*type = DCBX_MAX_PROTOCOL_TYPE;
-		DP_ERR(p_hwfn,
-		       "No action required, App TLV id = 0x%x"
-		       " app_prio_bitmap = 0x%x\n",
-		       id, app_prio_bitmap);
+		DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
+			    "No action required, App TLV entry = 0x%x\n",
+			   app_prio_bitmap);
 		return false;
 	}
 
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 7efc19a..31132ce 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -158,7 +158,7 @@ qede_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	qdev->fp_array[queue_idx].rxq = rxq;
 
 	DP_INFO(edev, "rxq %d num_desc %u rx_buf_size=%u socket %u\n",
-		  queue_idx, nb_desc, qdev->mtu, socket_id);
+		  queue_idx, nb_desc, rxq->rx_buf_size, socket_id);
 
 	return 0;
 }
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'vhost: fix IOTLB pool out-of-memory handling' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/qede: fix few log messages' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'vhost: remove pending IOTLB entry if miss request failed' " Yuanhan Liu
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 2f6b2ae70c32cc9e9bcc377945cdedaa3d7e515d Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 5 Feb 2018 16:04:56 +0100
Subject: [PATCH] vhost: fix IOTLB pool out-of-memory handling

[ upstream commit 37771844a05c7b0a7b039dcae1b4b0a69b4acced ]

In the unlikely case the IOTLB memory pool runs out of memory,
an issue may happen if all entries are used by the IOTLB cache,
and an IOTLB miss happen. If the iotlb pending list is empty,
then no memory is freed and allocation fails a second time.

This patch fixes this by doing an IOTLB cache random evict if
the IOTLB pending list is empty, ensuring the second allocation
try will succeed.

In the same spirit, the opposite is done when inserting an
IOTLB entry in the IOTLB cache fails due to out of memory. In
this case, the IOTLB pending is flushed if the IOTLB cache is
empty to ensure the new entry can be inserted.

Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions")
Fixes: f72c2ad63aeb ("vhost: add pending IOTLB miss request list and helpers")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/iotlb.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
index b74cc6a..72cd27d 100644
--- a/lib/librte_vhost/iotlb.c
+++ b/lib/librte_vhost/iotlb.c
@@ -51,6 +51,9 @@ struct vhost_iotlb_entry {
 #define IOTLB_CACHE_SIZE 2048
 
 static void
+vhost_user_iotlb_cache_random_evict(struct vhost_virtqueue *vq);
+
+static void
 vhost_user_iotlb_pending_remove_all(struct vhost_virtqueue *vq)
 {
 	struct vhost_iotlb_entry *node, *temp_node;
@@ -95,9 +98,11 @@ vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq,
 
 	ret = rte_mempool_get(vq->iotlb_pool, (void **)&node);
 	if (ret) {
-		RTE_LOG(INFO, VHOST_CONFIG,
-				"IOTLB pool empty, clear pending misses\n");
-		vhost_user_iotlb_pending_remove_all(vq);
+		RTE_LOG(DEBUG, VHOST_CONFIG, "IOTLB pool empty, clear entries\n");
+		if (!TAILQ_EMPTY(&vq->iotlb_pending_list))
+			vhost_user_iotlb_pending_remove_all(vq);
+		else
+			vhost_user_iotlb_cache_random_evict(vq);
 		ret = rte_mempool_get(vq->iotlb_pool, (void **)&node);
 		if (ret) {
 			RTE_LOG(ERR, VHOST_CONFIG, "IOTLB pool still empty, failure\n");
@@ -186,8 +191,11 @@ vhost_user_iotlb_cache_insert(struct vhost_virtqueue *vq, uint64_t iova,
 
 	ret = rte_mempool_get(vq->iotlb_pool, (void **)&new_node);
 	if (ret) {
-		RTE_LOG(DEBUG, VHOST_CONFIG, "IOTLB pool empty, evict one entry\n");
-		vhost_user_iotlb_cache_random_evict(vq);
+		RTE_LOG(DEBUG, VHOST_CONFIG, "IOTLB pool empty, clear entries\n");
+		if (!TAILQ_EMPTY(&vq->iotlb_list))
+			vhost_user_iotlb_cache_random_evict(vq);
+		else
+			vhost_user_iotlb_pending_remove_all(vq);
 		ret = rte_mempool_get(vq->iotlb_pool, (void **)&new_node);
 		if (ret) {
 			RTE_LOG(ERR, VHOST_CONFIG, "IOTLB pool still empty, failure\n");
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'vhost: remove pending IOTLB entry if miss request failed' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'vhost: fix IOTLB pool out-of-memory handling' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx4: fix Rx offload non-fragmented indication' " Yuanhan Liu
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 55811badd15743cb2f12fe248bec64ae4b401753 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 5 Feb 2018 16:04:57 +0100
Subject: [PATCH] vhost: remove pending IOTLB entry if miss request failed

[ upstream commit 82b9c1540348b6be7996203065e10421e953cea9 ]

In case vhost_user_iotlb_miss returns an error, the pending IOTLB
entry has to be removed from the list as no IOTLB update will be
received.

Fixes: fed67a20ac94 ("vhost: introduce guest IOVA to backend VA helper")

Suggested-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/iotlb.c |  2 +-
 lib/librte_vhost/iotlb.h |  3 +++
 lib/librte_vhost/vhost.c | 13 ++++++++++---
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
index 72cd27d..c11ebca 100644
--- a/lib/librte_vhost/iotlb.c
+++ b/lib/librte_vhost/iotlb.c
@@ -120,7 +120,7 @@ vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq,
 	rte_rwlock_write_unlock(&vq->iotlb_pending_lock);
 }
 
-static void
+void
 vhost_user_iotlb_pending_remove(struct vhost_virtqueue *vq,
 				uint64_t iova, uint64_t size, uint8_t perm)
 {
diff --git a/lib/librte_vhost/iotlb.h b/lib/librte_vhost/iotlb.h
index f1a050e..e7083e3 100644
--- a/lib/librte_vhost/iotlb.h
+++ b/lib/librte_vhost/iotlb.h
@@ -71,6 +71,9 @@ bool vhost_user_iotlb_pending_miss(struct vhost_virtqueue *vq, uint64_t iova,
 						uint8_t perm);
 void vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq, uint64_t iova,
 						uint8_t perm);
+void vhost_user_iotlb_pending_remove(struct vhost_virtqueue *vq, uint64_t iova,
+						uint64_t size, uint8_t perm);
+
 int vhost_user_iotlb_init(struct virtio_net *dev, int vq_index);
 
 #endif /* _VHOST_IOTLB_H_ */
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index dcc42fc..51ea720 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -71,7 +71,9 @@ __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	if (tmp_size == size)
 		return vva;
 
-	if (!vhost_user_iotlb_pending_miss(vq, iova + tmp_size, perm)) {
+	iova += tmp_size;
+
+	if (!vhost_user_iotlb_pending_miss(vq, iova, perm)) {
 		/*
 		 * iotlb_lock is read-locked for a full burst,
 		 * but it only protects the iotlb cache.
@@ -81,8 +83,13 @@ __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
 		 */
 		vhost_user_iotlb_rd_unlock(vq);
 
-		vhost_user_iotlb_pending_insert(vq, iova + tmp_size, perm);
-		vhost_user_iotlb_miss(dev, iova + tmp_size, perm);
+		vhost_user_iotlb_pending_insert(vq, iova, perm);
+		if (vhost_user_iotlb_miss(dev, iova, perm)) {
+			RTE_LOG(ERR, VHOST_CONFIG,
+				"IOTLB miss req failed for IOVA 0x%" PRIx64 "\n",
+				iova);
+			vhost_user_iotlb_pending_remove(vq, iova, 1, perm);
+		}
 
 		vhost_user_iotlb_rd_lock(vq);
 	}
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/mlx4: fix Rx offload non-fragmented indication' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'vhost: remove pending IOTLB entry if miss request failed' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx5: fix flow RSS configuration' " Yuanhan Liu
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Moti Haimovsky; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5d5091cd4d4cf49779bf5bac387a5ccb9e0d1e2a Mon Sep 17 00:00:00 2001
From: Moti Haimovsky <motih@mellanox.com>
Date: Tue, 30 Jan 2018 19:02:51 +0200
Subject: [PATCH] net/mlx4: fix Rx offload non-fragmented indication

[ upstream commit c7aaaecd41d9a34a8753aca70c7527ae0c03eb85 ]

This patch fixes the missing RTE_PTYPE_L4_NONFRAG on non-fragmented
IP packets with unrecognized payload type.

Fixes: aee4a03fee4f ("net/mlx4: enhance Rx packet type offloads")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index 0d008ed..92b6257 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -88,7 +88,8 @@ uint32_t mlx4_ptype_table[0x100] __rte_cache_aligned = {
 	 * giving a total of up to 256 entries.
 	 */
 	[0x00] = RTE_PTYPE_L2_ETHER,
-	[0x01] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+	[0x01] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+		     RTE_PTYPE_L4_NONFRAG,
 	[0x02] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
 		     RTE_PTYPE_L4_FRAG,
 	[0x03] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix flow RSS configuration' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx4: fix Rx offload non-fragmented indication' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx5: fix UAR remapping on non configured queues' " Yuanhan Liu
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5c35c2f5c9d12a5835759a36d1fbe3e0e02d0269 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Tue, 6 Feb 2018 10:22:15 +0100
Subject: [PATCH] net/mlx5: fix flow RSS configuration

[ upstream commit 1f30a22358f1ce5bfb70691faf38fdc9d7467992 ]

An RSS configuration without a key is valid according to the
rte_eth_rss_conf API definition.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")

Reported-by: Yuanhan Liu <yliu@fridaylinux.org>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d49aed8..50b052e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -563,7 +563,8 @@ mlx5_flow_item_validate(const struct rte_flow_item *item,
 }
 
 /**
- * Copy the RSS configuration from the user ones.
+ * Copy the RSS configuration from the user ones, of the rss_conf is null,
+ * uses the driver one.
  *
  * @param priv
  *   Pointer to private structure.
@@ -580,21 +581,25 @@ priv_flow_convert_rss_conf(struct priv *priv,
 			   struct mlx5_flow_parse *parser,
 			   const struct rte_eth_rss_conf *rss_conf)
 {
-	const struct rte_eth_rss_conf *rss;
-
+	/*
+	 * This function is also called at the beginning of
+	 * priv_flow_convert_actions() to initialize the parser with the
+	 * device default RSS configuration.
+	 */
+	(void)priv;
 	if (rss_conf) {
 		if (rss_conf->rss_hf & MLX5_RSS_HF_MASK)
 			return EINVAL;
-		rss = rss_conf;
-	} else {
-		rss = &priv->rss_conf;
+		if (rss_conf->rss_key_len != 40)
+			return EINVAL;
+		if (rss_conf->rss_key_len && rss_conf->rss_key) {
+			parser->rss_conf.rss_key_len = rss_conf->rss_key_len;
+			memcpy(parser->rss_key, rss_conf->rss_key,
+			       rss_conf->rss_key_len);
+			parser->rss_conf.rss_key = parser->rss_key;
+		}
+		parser->rss_conf.rss_hf = rss_conf->rss_hf;
 	}
-	if (rss->rss_key_len > 40)
-		return EINVAL;
-	parser->rss_conf.rss_key_len = rss->rss_key_len;
-	parser->rss_conf.rss_hf = rss->rss_hf;
-	memcpy(parser->rss_key, rss->rss_key, rss->rss_key_len);
-	parser->rss_conf.rss_key = parser->rss_key;
 	return 0;
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix UAR remapping on non configured queues' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx5: fix flow RSS configuration' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " Yuanhan Liu
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ffb48e8ce73a6e1f96a9d4b4385f602aa996fc1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Tue, 6 Feb 2018 10:26:21 +0100
Subject: [PATCH] net/mlx5: fix UAR remapping on non configured queues

[ upstream commit fbab400f6143b8d41af7369309334cd22ac2751c ]

priv_tx_uar_remap() is wrongly considering the queue is already configured
and thus present in the queue array of the device.

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_txq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 9c5860f..31110a7 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -253,6 +253,8 @@ priv_tx_uar_remap(struct priv *priv, int fd)
 	 * Ref to libmlx5 function: mlx5_init_context()
 	 */
 	for (i = 0; i != priv->txqs_n; ++i) {
+		if (!(*priv->txqs)[i])
+			continue;
 		txq = (*priv->txqs)[i];
 		txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq);
 		uar_va = (uintptr_t)txq_ctrl->txq.bf_reg;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx5: fix UAR remapping on non configured queues' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'app/testpmd: fix port topology " Yuanhan Liu
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 1e1f3b9152ec37b541bb6c243e2c9f8d5546c5ac Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 5 Feb 2018 14:09:21 +0000
Subject: [PATCH] app/testpmd: fix port index in RSS forward config

[ upstream commit 13cb6fae7991e2213cf8ce39fe3caa1c804511e1 ]

When multi-queue ports are configured by the user, the testpmd streams
are created by rss_fwd_config_setup() function.

This function may configure to the streams either invalid Rx ports or
invalid Tx ports.

An invalid Tx port is configured when the number of ports is odd.
In this case, the last Tx port will be always invalid.

An invalid Rx port is configured when NUMA support is configured by the
user and the number of forward ports is much smaller than the number of
all ports. In this case, also the Tx port is invalid.

Change calculations to get valid ports.

Fixes: af75078 ("first public release")

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 app/test-pmd/config.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 726c737..24451fc 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1983,7 +1983,8 @@ rss_fwd_config_setup(void)
 		 * if we are in loopback, simply send stuff out through the
 		 * ingress port
 		 */
-		if (port_topology == PORT_TOPOLOGY_LOOP)
+		if (port_topology == PORT_TOPOLOGY_LOOP ||
+		    txp >= cur_fwd_config.nb_fwd_ports)
 			txp = rxp;
 
 		fs->rx_port = fwd_ports_ids[rxp];
@@ -2000,11 +2001,7 @@ rss_fwd_config_setup(void)
 		 * Restart from RX queue 0 on next RX port
 		 */
 		rxq = 0;
-		if (numa_support && (nb_fwd_ports <= (nb_ports >> 1)))
-			rxp = (portid_t)
-				(rxp + ((nb_ports >> 1) / nb_fwd_ports));
-		else
-			rxp = (portid_t) (rxp + 1);
+		rxp++;
 	}
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix port topology in RSS forward config' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (11 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'bus/fslmc: fix build with latest glibc' " Yuanhan Liu
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 1c5819ed8fb4fbbd675ceafd16b3ad6b2f5eb65a Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 5 Feb 2018 14:09:22 +0000
Subject: [PATCH] app/testpmd: fix port topology in RSS forward config

[ upstream commit 4deefb6f7107dd6a40900be4f1d6a6844a702505 ]

The testpmd user can configure port topology mode to define the port
topology between the testpmd forward ports(paired, chained and loop).

When multi-queue ports are configured by the user, the testpmd
streams are created by rss_fwd_config_setup() function, this function
doesn't take into account the chained topology mode and configures the
forward streams with paired topology mode in this case.

Configure the stream Tx port by dedicated function which calculates
a valid Tx port index as a function of the topology mode and the Rx
port index.

Fixes: af75078 ("first public release")

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 app/test-pmd/config.c | 49 +++++++++++++++++++++++++++++++------------------
 1 file changed, 31 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 24451fc..a0f3c24 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1876,6 +1876,36 @@ setup_fwd_config_of_each_lcore(struct fwd_config *cfg)
 	}
 }
 
+static portid_t
+fwd_topology_tx_port_get(portid_t rxp)
+{
+	static int warning_once = 1;
+
+	RTE_ASSERT(rxp < cur_fwd_config.nb_fwd_ports);
+
+	switch (port_topology) {
+	default:
+	case PORT_TOPOLOGY_PAIRED:
+		if ((rxp & 0x1) == 0) {
+			if (rxp + 1 < cur_fwd_config.nb_fwd_ports)
+				return rxp + 1;
+			if (warning_once) {
+				printf("\nWarning! port-topology=paired"
+				       " and odd forward ports number,"
+				       " the last port will pair with"
+				       " itself.\n\n");
+				warning_once = 0;
+			}
+			return rxp;
+		}
+		return rxp - 1;
+	case PORT_TOPOLOGY_CHAINED:
+		return (rxp + 1) % cur_fwd_config.nb_fwd_ports;
+	case PORT_TOPOLOGY_LOOP:
+		return rxp;
+	}
+}
+
 static void
 simple_fwd_config_setup(void)
 {
@@ -1938,11 +1968,6 @@ simple_fwd_config_setup(void)
  * For the RSS forwarding test all streams distributed over lcores. Each stream
  * being composed of a RX queue to poll on a RX port for input messages,
  * associated with a TX queue of a TX port where to send forwarded packets.
- * All packets received on the RX queue of index "RxQj" of the RX port "RxPi"
- * are sent on the TX queue "TxQl" of the TX port "TxPk" according to the two
- * following rules:
- *    - TxPk = (RxPi + 1) if RxPi is even, (RxPi - 1) if RxPi is odd
- *    - TxQl = RxQj
  */
 static void
 rss_fwd_config_setup(void)
@@ -1974,19 +1999,7 @@ rss_fwd_config_setup(void)
 		struct fwd_stream *fs;
 
 		fs = fwd_streams[sm_id];
-
-		if ((rxp & 0x1) == 0)
-			txp = (portid_t) (rxp + 1);
-		else
-			txp = (portid_t) (rxp - 1);
-		/*
-		 * if we are in loopback, simply send stuff out through the
-		 * ingress port
-		 */
-		if (port_topology == PORT_TOPOLOGY_LOOP ||
-		    txp >= cur_fwd_config.nb_fwd_ports)
-			txp = rxp;
-
+		txp = fwd_topology_tx_port_get(rxp);
 		fs->rx_port = fwd_ports_ids[rxp];
 		fs->rx_queue = rxq;
 		fs->tx_port = fwd_ports_ids[txp];
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'bus/fslmc: fix build with latest glibc' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (12 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'app/testpmd: fix port topology " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'bus/dpaa: fix default IOVA mode' " Yuanhan Liu
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6174c13ff290e78860ed84880050f97fb1ee4eca Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Tue, 6 Feb 2018 22:44:55 +0530
Subject: [PATCH] bus/fslmc: fix build with latest glibc

[ upstream commit 877fe37c0379a7df4aaaeffae7a811b964ed0af5 ]

Fix the following build error with latest glibc-headers(
Part of aarch64-linux-gnu-gcc-7.3.0 toolchain)

In file included from drivers/bus/fslmc/mc/fsl_mc_sys.h:30:0,
                 from drivers/bus/fslmc/mc/dpmng.c:7:
/usr/aarch64-linux-gnu/usr/include/libio.h:21:2: error:
  #warning "<libio.h> is deprecated; use <stdio.h> instead." [-Werror=cpp]

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/bus/fslmc/mc/fsl_mc_sys.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d803205..e4b2404 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -60,7 +60,6 @@ struct fsl_mc_io {
 #else /* __linux_driver__ */
 
 #include <stdio.h>
-#include <libio.h>
 #include <stdint.h>
 #include <errno.h>
 #include <sys/uio.h>
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'bus/dpaa: fix default IOVA mode' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (13 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'bus/fslmc: fix build with latest glibc' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " Yuanhan Liu
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d7eab3d55173964267b7f6cd824e8a989c78b855 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Tue, 6 Feb 2018 22:52:48 +0530
Subject: [PATCH] bus/dpaa: fix default IOVA mode

[ upstream commit d415e4d18c316f21b83ecf21bbc7101b5906835e ]

Fix dpaa bus returning IOVA as PA even when it is not running on dpaa
platform.

Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8")
Fixes: d5a4e3a00c4a ("bus/dpaa: set IOVA mode as physical")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 1cc8c89..3a0b255 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -490,6 +490,10 @@ rte_dpaa_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
 static enum rte_iova_mode
 rte_dpaa_get_iommu_class(void)
 {
+	if ((access(DPAA_DEV_PATH1, F_OK) != 0) &&
+	    (access(DPAA_DEV_PATH2, F_OK) != 0)) {
+		return RTE_IOVA_DC;
+	}
 	return RTE_IOVA_PA;
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (14 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'bus/dpaa: fix default IOVA mode' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/bitmap: fix memory leak' " Yuanhan Liu
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Bao-Long Tran; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ad2beec0ac6233e099fffce0f2135a1c31d949f7 Mon Sep 17 00:00:00 2001
From: Bao-Long Tran <longtb5@viettel.com.vn>
Date: Wed, 31 Jan 2018 15:48:16 +0700
Subject: [PATCH] examples/ip_pipeline: fix timer period unit

[ upstream commit 07b7b0b5a922a44c24252cb62e4ebba3b8774674 ]

The timer_period option specified by users via config file
should have unit of 1 millisecond. However timer_period is
internally converted to unit of 10 millisecond.

Fixes: 4e14069328fc ("examples/ip_pipeline: measure CPU utilization")

Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 examples/ip_pipeline/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index e56e404..ffd0fc2 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -1726,7 +1726,7 @@ app_init_pipelines(struct app_params *app)
 		data->ptype = ptype;
 
 		data->timer_period = (rte_get_tsc_hz() *
-			params->timer_period) / 100;
+			params->timer_period) / 1000;
 	}
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'test/bitmap: fix memory leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (15 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/reorder: " Yuanhan Liu
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 38efe0857d165d29dc8a27cf1c31a5e39768bd70 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:37 +0000
Subject: [PATCH] test/bitmap: fix memory leak

[ upstream commit 24d376bfee2874c6fcb0d468b5f3898e60478169 ]

Fixes: c7e4a134e769 ("test: verify bitmap operations")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 test/test/test_bitmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/test/test_bitmap.c b/test/test/test_bitmap.c
index 5c9eee9..7045d33 100644
--- a/test/test/test_bitmap.c
+++ b/test/test/test_bitmap.c
@@ -186,6 +186,9 @@ test_bitmap(void)
 	if (test_bitmap_scan_operations(bmp) < 0)
 		return TEST_FAILED;
 
+	rte_bitmap_free(bmp);
+	rte_free(mem);
+
 	return TEST_SUCCESS;
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'test/reorder: fix memory leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (16 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/bitmap: fix memory leak' " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/ring: " Yuanhan Liu
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 4c1392ec6d52070ca61dbc1e1f62ae622ff93903 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:38 +0000
Subject: [PATCH] test/reorder: fix memory leak

[ upstream commit 8d0e39debc2eaaf684d78d222152b34f08a325b5 ]

Add a teardown function that frees allocated resources.

Fixes: d0c9b58d7156 ("app/test: new reorder unit test")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_reorder.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/test/test_reorder.c b/test/test/test_reorder.c
index 4ec22ac..429f6eb4 100644
--- a/test/test/test_reorder.c
+++ b/test/test/test_reorder.c
@@ -360,9 +360,20 @@ test_setup(void)
 	return 0;
 }
 
+static void
+test_teardown(void)
+{
+	rte_reorder_free(test_params->b);
+	test_params->b = NULL;
+	rte_mempool_free(test_params->p);
+	test_params->p = NULL;
+}
+
+
 static struct unit_test_suite reorder_test_suite  = {
 
 	.setup = test_setup,
+	.teardown = test_teardown,
 	.suite_name = "Reorder Unit Test Suite",
 	.unit_test_cases = {
 		TEST_CASE(test_reorder_create),
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'test/ring: fix memory leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (17 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/reorder: " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/ring_perf: " Yuanhan Liu
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3fb4d531c82a99eae9ef0121cb8b1e85b8bbe4ee Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:39 +0000
Subject: [PATCH] test/ring: fix memory leak

[ upstream commit 14ec04e1ae0f55c68d2c718e3a6cf9e6b6adeac4 ]

Get rid of global static ring variable and don't reuse rings
between test runs.

Acked-by: Olivier Matz <olivier.matz@6wind.com>

Fixes: 4e32101f9b01 ("ring: support freeing")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_ring.c | 63 +++++++++++++++++++++++++++------------------------
 1 file changed, 34 insertions(+), 29 deletions(-)

diff --git a/test/test/test_ring.c b/test/test/test_ring.c
index 5eb40a0..d225e82 100644
--- a/test/test/test_ring.c
+++ b/test/test/test_ring.c
@@ -86,8 +86,6 @@
 
 static rte_atomic32_t synchro;
 
-static struct rte_ring *r;
-
 #define	TEST_RING_VERIFY(exp)						\
 	if (!(exp)) {							\
 		printf("error at %s:%d\tcondition " #exp " failed\n",	\
@@ -102,7 +100,7 @@ static struct rte_ring *r;
  * helper routine for test_ring_basic
  */
 static int
-test_ring_basic_full_empty(void * const src[], void *dst[])
+test_ring_basic_full_empty(struct rte_ring *r, void * const src[], void *dst[])
 {
 	unsigned i, rand;
 	const unsigned rsz = RING_SIZE - 1;
@@ -143,7 +141,7 @@ test_ring_basic_full_empty(void * const src[], void *dst[])
 }
 
 static int
-test_ring_basic(void)
+test_ring_basic(struct rte_ring *r)
 {
 	void **src = NULL, **cur_src = NULL, **dst = NULL, **cur_dst = NULL;
 	int ret;
@@ -279,7 +277,7 @@ test_ring_basic(void)
 		goto fail;
 	}
 
-	if (test_ring_basic_full_empty(src, dst) != 0)
+	if (test_ring_basic_full_empty(r, src, dst) != 0)
 		goto fail;
 
 	cur_src = src;
@@ -346,7 +344,7 @@ test_ring_basic(void)
 }
 
 static int
-test_ring_burst_basic(void)
+test_ring_burst_basic(struct rte_ring *r)
 {
 	void **src = NULL, **cur_src = NULL, **dst = NULL, **cur_dst = NULL;
 	int ret;
@@ -700,7 +698,7 @@ test_ring_basic_ex(void)
 {
 	int ret = -1;
 	unsigned i;
-	struct rte_ring * rp;
+	struct rte_ring *rp = NULL;
 	void **obj = NULL;
 
 	obj = rte_calloc("test_ring_basic_ex_malloc", RING_SIZE, sizeof(void *), 0);
@@ -760,6 +758,7 @@ test_ring_basic_ex(void)
 
 	ret = 0;
 fail_test:
+	rte_ring_free(rp);
 	if (obj != NULL)
 		rte_free(obj);
 
@@ -840,61 +839,67 @@ end:
 static int
 test_ring(void)
 {
+	struct rte_ring *r = NULL;
+
 	/* some more basic operations */
 	if (test_ring_basic_ex() < 0)
-		return -1;
+		goto test_fail;
 
 	rte_atomic32_init(&synchro);
 
+	r = rte_ring_create("test", RING_SIZE, SOCKET_ID_ANY, 0);
 	if (r == NULL)
-		r = rte_ring_create("test", RING_SIZE, SOCKET_ID_ANY, 0);
-	if (r == NULL)
-		return -1;
+		goto test_fail;
 
 	/* retrieve the ring from its name */
 	if (rte_ring_lookup("test") != r) {
 		printf("Cannot lookup ring from its name\n");
-		return -1;
+		goto test_fail;
 	}
 
 	/* burst operations */
-	if (test_ring_burst_basic() < 0)
-		return -1;
+	if (test_ring_burst_basic(r) < 0)
+		goto test_fail;
 
 	/* basic operations */
-	if (test_ring_basic() < 0)
-		return -1;
+	if (test_ring_basic(r) < 0)
+		goto test_fail;
 
 	/* basic operations */
 	if ( test_create_count_odd() < 0){
-			printf ("Test failed to detect odd count\n");
-			return -1;
-		}
-		else
-			printf ( "Test detected odd count\n");
+		printf("Test failed to detect odd count\n");
+		goto test_fail;
+	} else
+		printf("Test detected odd count\n");
 
 	if ( test_lookup_null() < 0){
-				printf ("Test failed to detect NULL ring lookup\n");
-				return -1;
-			}
-			else
-				printf ( "Test detected NULL ring lookup \n");
+		printf("Test failed to detect NULL ring lookup\n");
+		goto test_fail;
+	} else
+		printf("Test detected NULL ring lookup\n");
 
 	/* test of creating ring with wrong size */
 	if (test_ring_creation_with_wrong_size() < 0)
-		return -1;
+		goto test_fail;
 
 	/* test of creation ring with an used name */
 	if (test_ring_creation_with_an_used_name() < 0)
-		return -1;
+		goto test_fail;
 
 	if (test_ring_with_exact_size() < 0)
-		return -1;
+		goto test_fail;
 
 	/* dump the ring status */
 	rte_ring_list_dump(stdout);
 
+	rte_ring_free(r);
+
 	return 0;
+
+test_fail:
+	rte_ring_free(r);
+
+	return -1;
 }
 
 REGISTER_TEST_COMMAND(ring_autotest, test_ring);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'test/ring_perf: fix memory leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (18 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/ring: " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/table: " Yuanhan Liu
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 763a2d2512886e37c69d54fdeee601f6e7fb5b84 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:40 +0000
Subject: [PATCH] test/ring_perf: fix memory leak

[ upstream commit cac64abd2572e3d9b1a34d44bbb3fcaf359d3d14 ]

Fixes: ac3fb3019c52 ("app: rework ring tests")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 test/test/test_ring_perf.c | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/test/test/test_ring_perf.c b/test/test/test_ring_perf.c
index 84d2003..66aa51a 100644
--- a/test/test/test_ring_perf.c
+++ b/test/test/test_ring_perf.c
@@ -61,9 +61,6 @@
  */
 static const volatile unsigned bulk_sizes[] = { 8, 32 };
 
-/* The ring structure used for tests */
-static struct rte_ring *r;
-
 struct lcore_pair {
 	unsigned c1, c2;
 };
@@ -144,7 +141,7 @@ get_two_sockets(struct lcore_pair *lcp)
 
 /* Get cycle counts for dequeuing from an empty ring. Should be 2 or 3 cycles */
 static void
-test_empty_dequeue(void)
+test_empty_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 26;
 	const unsigned iterations = 1<<iter_shift;
@@ -172,6 +169,7 @@ test_empty_dequeue(void)
  * and return two. Input = burst size, output = cycle average for sp/sc & mp/mc
  */
 struct thread_params {
+	struct rte_ring *r;
 	unsigned size;        /* input value, the burst size */
 	double spsc, mpmc;    /* output value, the single or multi timings */
 };
@@ -186,6 +184,7 @@ enqueue_bulk(void *p)
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
 	struct thread_params *params = p;
+	struct rte_ring *r = params->r;
 	const unsigned size = params->size;
 	unsigned i;
 	void *burst[MAX_BURST] = {0};
@@ -221,6 +220,7 @@ dequeue_bulk(void *p)
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
 	struct thread_params *params = p;
+	struct rte_ring *r = params->r;
 	const unsigned size = params->size;
 	unsigned i;
 	void *burst[MAX_BURST] = {0};
@@ -251,7 +251,7 @@ dequeue_bulk(void *p)
  * used to measure ring perf between hyperthreads, cores and sockets.
  */
 static void
-run_on_core_pair(struct lcore_pair *cores,
+run_on_core_pair(struct lcore_pair *cores, struct rte_ring *r,
 		lcore_function_t f1, lcore_function_t f2)
 {
 	struct thread_params param1 = {0}, param2 = {0};
@@ -259,6 +259,7 @@ run_on_core_pair(struct lcore_pair *cores,
 	for (i = 0; i < sizeof(bulk_sizes)/sizeof(bulk_sizes[0]); i++) {
 		lcore_count = 0;
 		param1.size = param2.size = bulk_sizes[i];
+		param1.r = param2.r = r;
 		if (cores->c1 == rte_get_master_lcore()) {
 			rte_eal_remote_launch(f2, &param2, cores->c2);
 			f1(&param1);
@@ -281,7 +282,7 @@ run_on_core_pair(struct lcore_pair *cores,
  * takes on a single lcore. Result is for comparison with the bulk enq+deq.
  */
 static void
-test_single_enqueue_dequeue(void)
+test_single_enqueue_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 24;
 	const unsigned iterations = 1<<iter_shift;
@@ -314,7 +315,7 @@ test_single_enqueue_dequeue(void)
  * as for the bulk function called on a single lcore.
  */
 static void
-test_burst_enqueue_dequeue(void)
+test_burst_enqueue_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
@@ -352,7 +353,7 @@ test_burst_enqueue_dequeue(void)
 
 /* Times enqueue and dequeue on a single lcore */
 static void
-test_bulk_enqueue_dequeue(void)
+test_bulk_enqueue_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
@@ -394,32 +395,35 @@ static int
 test_ring_perf(void)
 {
 	struct lcore_pair cores;
+	struct rte_ring *r = NULL;
+
 	r = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), 0);
-	if (r == NULL && (r = rte_ring_lookup(RING_NAME)) == NULL)
+	if (r == NULL)
 		return -1;
 
 	printf("### Testing single element and burst enq/deq ###\n");
-	test_single_enqueue_dequeue();
-	test_burst_enqueue_dequeue();
+	test_single_enqueue_dequeue(r);
+	test_burst_enqueue_dequeue(r);
 
 	printf("\n### Testing empty dequeue ###\n");
-	test_empty_dequeue();
+	test_empty_dequeue(r);
 
 	printf("\n### Testing using a single lcore ###\n");
-	test_bulk_enqueue_dequeue();
+	test_bulk_enqueue_dequeue(r);
 
 	if (get_two_hyperthreads(&cores) == 0) {
 		printf("\n### Testing using two hyperthreads ###\n");
-		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+		run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
 	}
 	if (get_two_cores(&cores) == 0) {
 		printf("\n### Testing using two physical cores ###\n");
-		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+		run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
 	}
 	if (get_two_sockets(&cores) == 0) {
 		printf("\n### Testing using two NUMA nodes ###\n");
-		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+		run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
 	}
+	rte_ring_free(r);
 	return 0;
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'test/table: fix memory leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (19 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/ring_perf: " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/timer_perf: " Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/i40e: fix multiple DDP packages conflict' " Yuanhan Liu
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From bb09db9f5aab59f919e1b5464b9e69017883cc8b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:41 +0000
Subject: [PATCH] test/table: fix memory leak

[ upstream commit c1d30e443b624f8281b08ae7651feaf4b5ba1a09 ]

Always deallocate allocated resources after the test is done.

Fixes: 5205954791cb ("app/test: packet framework unit tests")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 test/test/test_table.c | 44 ++++++++++++++++++++++++++++----------------
 1 file changed, 28 insertions(+), 16 deletions(-)

diff --git a/test/test/test_table.c b/test/test/test_table.c
index db7d4e6..c5a6e00 100644
--- a/test/test/test_table.c
+++ b/test/test/test_table.c
@@ -84,6 +84,14 @@ uint64_t pipeline_test_hash(void *key,
 }
 
 static void
+app_free_resources(void) {
+	int i;
+	for (i = 0; i < N_PORTS; i++)
+		rte_ring_free(rings_rx[i]);
+	rte_mempool_free(pool);
+}
+
+static void
 app_init_mbuf_pools(void)
 {
 	/* Init the buffer pool */
@@ -142,18 +150,20 @@ app_init_rings(void)
 static int
 test_table(void)
 {
-	int status, failures;
+	int status, ret;
 	unsigned i;
 
-	failures = 0;
+	ret = TEST_SUCCESS;
 
 	app_init_rings();
 	app_init_mbuf_pools();
 
 	printf("\n\n\n\n************Pipeline tests************\n");
 
-	if (test_table_pipeline() < 0)
-		return -1;
+	if (test_table_pipeline() < 0) {
+		ret = TEST_FAILED;
+		goto end;
+	}
 
 	printf("\n\n\n\n************Port tests************\n");
 	for (i = 0; i < n_port_tests; i++) {
@@ -161,8 +171,8 @@ test_table(void)
 		if (status < 0) {
 			printf("\nPort test number %d failed (%d).\n", i,
 				status);
-			failures++;
-			return -1;
+			ret = TEST_FAILED;
+			goto end;
 		}
 	}
 
@@ -172,8 +182,8 @@ test_table(void)
 		if (status < 0) {
 			printf("\nTable test number %d failed (%d).\n", i,
 				status);
-			failures++;
-			return -1;
+			ret = TEST_FAILED;
+			goto end;
 		}
 	}
 
@@ -183,21 +193,23 @@ test_table(void)
 		if (status < 0) {
 			printf("\nCombined table test number %d failed with "
 				"reason number %d.\n", i, status);
-			failures++;
-			return -1;
+			ret = TEST_FAILED;
+			goto end;
 		}
 	}
 
-	if (failures)
-		return -1;
-
 #ifdef RTE_LIBRTE_ACL
 	printf("\n\n\n\n************ACL tests************\n");
-	if (test_table_acl() < 0)
-		return -1;
+	if (test_table_acl() < 0) {
+		ret = TEST_FAILED;
+		goto end;
+	}
 #endif
 
-	return 0;
+end:
+	app_free_resources();
+
+	return ret;
 }
 
 REGISTER_TEST_COMMAND(table_autotest, test_table);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'test/timer_perf: fix memory leak' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (20 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/table: " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  2018-02-07  8:57 ` [dpdk-stable] patch 'net/i40e: fix multiple DDP packages conflict' " Yuanhan Liu
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 331d4df06bd73f251d834d7a417872a3a08d784a Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:42 +0000
Subject: [PATCH] test/timer_perf: fix memory leak

[ upstream commit 863fc5beca5d2ad0cd49e31a3e2b5a848f786c67 ]

Fixes: 277afaf3dbcb ("app/test: add timer_perf")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_timer_perf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/test/test_timer_perf.c b/test/test/test_timer_perf.c
index 467ae13..9804133 100644
--- a/test/test/test_timer_perf.c
+++ b/test/test/test_timer_perf.c
@@ -156,6 +156,7 @@ test_timer_perf(void)
 	printf("Time per rte_timer_manage with zero callbacks: %"PRIu64" cycles\n",
 			(end_tsc - start_tsc + iterations/2) / iterations);
 
+	rte_free(tms);
 	return 0;
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix multiple DDP packages conflict' has been queued to LTS release 17.11.1
  2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (21 preceding siblings ...)
  2018-02-07  8:57 ` [dpdk-stable] patch 'test/timer_perf: " Yuanhan Liu
@ 2018-02-07  8:57 ` Yuanhan Liu
  22 siblings, 0 replies; 24+ messages in thread
From: Yuanhan Liu @ 2018-02-07  8:57 UTC (permalink / raw)
  To: Kirill Rybalchenko; +Cc: Andrey Chilikin, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fb4c79d4062f110201af15040d8cd78373881582 Mon Sep 17 00:00:00 2001
From: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Date: Thu, 1 Feb 2018 12:43:05 +0000
Subject: [PATCH] net/i40e: fix multiple DDP packages conflict

[ upstream commit b1ec717bfff5cede471261078f3e2dce156553f4 ]

Should be not possible to load conflicting DDP profiles. Only DDP
profiles of the same group (not 0) can be loaded together. If DDP
profile group is 0, it is exclusive, i.e. it cannot be loaded with
any other DDP profile. If DDP profile groups are different, these
profiles cannot be loaded together.

Fixes: b319712f53c8 ("net/i40e: extended list of operations for DDP processing")

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 40 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index c2e2466..f726a9c 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -1525,7 +1525,14 @@ i40e_check_profile_info(uint16_t port, uint8_t *profile_info_sec)
 	struct rte_pmd_i40e_profile_info *pinfo, *p;
 	uint32_t i;
 	int ret;
+	static const uint32_t group_mask = 0x00ff0000;
 
+	pinfo = (struct rte_pmd_i40e_profile_info *)(profile_info_sec +
+			     sizeof(struct i40e_profile_section_header));
+	if (pinfo->track_id == 0) {
+		PMD_DRV_LOG(INFO, "Read-only profile.");
+		return 0;
+	}
 	buff = rte_zmalloc("pinfo_list",
 			   (I40E_PROFILE_INFO_SIZE * I40E_MAX_PROFILE_NUM + 4),
 			   0);
@@ -1544,8 +1551,6 @@ i40e_check_profile_info(uint16_t port, uint8_t *profile_info_sec)
 		return -1;
 	}
 	p_list = (struct rte_pmd_i40e_profile_list *)buff;
-	pinfo = (struct rte_pmd_i40e_profile_info *)(profile_info_sec +
-			     sizeof(struct i40e_profile_section_header));
 	for (i = 0; i < p_list->p_count; i++) {
 		p = &p_list->p_info[i];
 		if (pinfo->track_id == p->track_id) {
@@ -1554,6 +1559,23 @@ i40e_check_profile_info(uint16_t port, uint8_t *profile_info_sec)
 			return 1;
 		}
 	}
+	for (i = 0; i < p_list->p_count; i++) {
+		p = &p_list->p_info[i];
+		if ((p->track_id & group_mask) == 0) {
+			PMD_DRV_LOG(INFO, "Profile of the group 0 exists.");
+			rte_free(buff);
+			return 2;
+		}
+	}
+	for (i = 0; i < p_list->p_count; i++) {
+		p = &p_list->p_info[i];
+		if ((pinfo->track_id & group_mask) !=
+		    (p->track_id & group_mask)) {
+			PMD_DRV_LOG(INFO, "Profile of different group exists.");
+			rte_free(buff);
+			return 3;
+		}
+	}
 
 	rte_free(buff);
 	return 0;
@@ -1573,6 +1595,7 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 	uint8_t *profile_info_sec;
 	int is_exist;
 	enum i40e_status_code status = I40E_SUCCESS;
+	static const uint32_t type_mask = 0xff000000;
 
 	if (op != RTE_PMD_I40E_PKG_OP_WR_ADD &&
 		op != RTE_PMD_I40E_PKG_OP_WR_ONLY &&
@@ -1624,6 +1647,10 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 		return -EINVAL;
 	}
 
+	/* force read-only track_id for type 0 */
+	if ((track_id & type_mask) == 0)
+		track_id = 0;
+
 	/* Find profile segment */
 	profile_seg_hdr = i40e_find_segment_in_package(SEGMENT_TYPE_I40E,
 						       pkg_hdr);
@@ -1657,12 +1684,17 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 
 	if (op == RTE_PMD_I40E_PKG_OP_WR_ADD) {
 		if (is_exist) {
-			PMD_DRV_LOG(ERR, "Profile already exists.");
+			if (is_exist == 1)
+				PMD_DRV_LOG(ERR, "Profile already exists.");
+			else if (is_exist == 2)
+				PMD_DRV_LOG(ERR, "Profile of group 0 already exists.");
+			else if (is_exist == 3)
+				PMD_DRV_LOG(ERR, "Profile of different group already exists");
 			rte_free(profile_info_sec);
 			return -EEXIST;
 		}
 	} else if (op == RTE_PMD_I40E_PKG_OP_WR_DEL) {
-		if (!is_exist) {
+		if (is_exist != 1) {
 			PMD_DRV_LOG(ERR, "Profile does not exist.");
 			rte_free(profile_info_sec);
 			return -EACCES;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-02-07  9:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07  8:56 [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 17.11.1 Yuanhan Liu
2018-02-07  8:56 ` [dpdk-stable] patch 'bus/vdev: continue probing after a device failure' " Yuanhan Liu
2018-02-07  8:56 ` [dpdk-stable] patch 'mempool: fix physical contiguous check' " Yuanhan Liu
2018-02-07  8:56 ` [dpdk-stable] patch 'usertools/devbind: fix kernel module reporting' " Yuanhan Liu
2018-02-07  8:56 ` [dpdk-stable] patch 'net/mlx4: fix drop flow resources leak' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'net/qede: fix few log messages' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'vhost: fix IOTLB pool out-of-memory handling' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'vhost: remove pending IOTLB entry if miss request failed' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx4: fix Rx offload non-fragmented indication' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx5: fix flow RSS configuration' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'net/mlx5: fix UAR remapping on non configured queues' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'app/testpmd: fix port topology " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'bus/fslmc: fix build with latest glibc' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'bus/dpaa: fix default IOVA mode' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'test/bitmap: fix memory leak' " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'test/reorder: " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'test/ring: " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'test/ring_perf: " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'test/table: " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'test/timer_perf: " Yuanhan Liu
2018-02-07  8:57 ` [dpdk-stable] patch 'net/i40e: fix multiple DDP packages conflict' " Yuanhan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).