patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1
@ 2018-11-23 10:26 Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: fix memory leak of logid' " Kevin Traynor
                   ` (67 more replies)
  0 siblings, 68 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Li Han; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 362b57a19d3d606c23dd4ce198d608e34351b22f Mon Sep 17 00:00:00 2001
From: Li Han <han.li1@zte.com.cn>
Date: Wed, 1 Aug 2018 22:01:03 -0400
Subject: [PATCH] ip_frag: fix overflow in key comparison

[ upstream commit 8721e07478c6edc9565645047742f79c654cfd1b ]

in struct ip_frag_key,src_dst[] type is uint64_t.
but "val" which to store the calc restult ,type is uint32_t.
we may lost high 32 bit key. and function return value is int,
but it won't return < 0.

Signed-off-by: Li Han <han.li1@zte.com.cn>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/ip_frag_common.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h
index 197acf8d8..d7980a304 100644
--- a/lib/librte_ip_frag/ip_frag_common.h
+++ b/lib/librte_ip_frag/ip_frag_common.h
@@ -70,8 +70,9 @@ ip_frag_key_invalidate(struct ip_frag_key * key)
 
 /* compare two keys */
-static inline int
+static inline uint64_t
 ip_frag_key_cmp(const struct ip_frag_key * k1, const struct ip_frag_key * k2)
 {
-	uint32_t i, val;
+	uint32_t i;
+	uint64_t val;
 	val = k1->id ^ k2->id;
 	for (i = 0; i < k1->key_len; i++)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.282066154 +0000
+++ 0001-ip_frag-fix-overflow-in-key-comparison.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 8721e07478c6edc9565645047742f79c654cfd1b Mon Sep 17 00:00:00 2001
+From 362b57a19d3d606c23dd4ce198d608e34351b22f Mon Sep 17 00:00:00 2001
 From: Li Han <han.li1@zte.com.cn>
 Date: Wed, 1 Aug 2018 22:01:03 -0400
 Subject: [PATCH] ip_frag: fix overflow in key comparison
 
+[ upstream commit 8721e07478c6edc9565645047742f79c654cfd1b ]
+
 in struct ip_frag_key,src_dst[] type is uint64_t.
 but "val" which to store the calc restult ,type is uint32_t.
 we may lost high 32 bit key. and function return value is int,
@@ -15,10 +17,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h
-index 0fdcc7d0f..0f62e2e16 100644
+index 197acf8d8..d7980a304 100644
 --- a/lib/librte_ip_frag/ip_frag_common.h
 +++ b/lib/librte_ip_frag/ip_frag_common.h
-@@ -76,8 +76,9 @@ ip_frag_key_invalidate(struct ip_frag_key * key)
+@@ -70,8 +70,9 @@ ip_frag_key_invalidate(struct ip_frag_key * key)
  
  /* compare two keys */
 -static inline int

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

* [dpdk-stable] patch 'eal/linux: fix memory leak of logid' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'malloc: check size hint when reserving the biggest element' " Kevin Traynor
                   ` (66 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ziye Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 7d736d77d9747cfe535d51faa00536b1c54cfe37 Mon Sep 17 00:00:00 2001
From: Ziye Yang <ziye.yang@intel.com>
Date: Wed, 12 Sep 2018 09:31:50 +0800
Subject: [PATCH] eal/linux: fix memory leak of logid

[ upstream commit e4f2c1421d8036a4778c43bf25201ef5fb37ad6f ]

This patch is used to fix the memory leak issue of logid.
We use the ASAN test in SPDK when integrating DPDK and
find this memory leak issue.

Fixes: d8a2bc71dfc2 ("log: remove app path from syslog id")

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index e59ac6577..211affff8 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -794,5 +794,6 @@ rte_eal_init(int argc, char **argv)
 	pthread_t thread_id;
 	static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
-	const char *logid;
+	const char *p;
+	static char logid[PATH_MAX];
 	char cpuset[RTE_CPU_AFFINITY_STR_LEN];
 	char thread_name[RTE_MAX_THREAD_NAME_LEN];
@@ -811,7 +812,6 @@ rte_eal_init(int argc, char **argv)
 	}
 
-	logid = strrchr(argv[0], '/');
-	logid = strdup(logid ? logid + 1: argv[0]);
-
+	p = strrchr(argv[0], '/');
+	strlcpy(logid, p ? p + 1 : argv[0], sizeof(logid));
 	thread_id = pthread_self();
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.306233759 +0000
+++ 0002-eal-linux-fix-memory-leak-of-logid.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From e4f2c1421d8036a4778c43bf25201ef5fb37ad6f Mon Sep 17 00:00:00 2001
+From 7d736d77d9747cfe535d51faa00536b1c54cfe37 Mon Sep 17 00:00:00 2001
 From: Ziye Yang <ziye.yang@intel.com>
 Date: Wed, 12 Sep 2018 09:31:50 +0800
 Subject: [PATCH] eal/linux: fix memory leak of logid
 
+[ upstream commit e4f2c1421d8036a4778c43bf25201ef5fb37ad6f ]
+
 This patch is used to fix the memory leak issue of logid.
 We use the ASAN test in SPDK when integrating DPDK and
 find this memory leak issue.
 
 Fixes: d8a2bc71dfc2 ("log: remove app path from syslog id")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ziye Yang <ziye.yang@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
-index 7b11375f4..67116eee2 100644
+index e59ac6577..211affff8 100644
 --- a/lib/librte_eal/linuxapp/eal/eal.c
 +++ b/lib/librte_eal/linuxapp/eal/eal.c
-@@ -826,5 +826,6 @@ rte_eal_init(int argc, char **argv)
+@@ -794,5 +794,6 @@ rte_eal_init(int argc, char **argv)
  	pthread_t thread_id;
  	static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
 -	const char *logid;
@@ -28,7 +29,7 @@
 +	static char logid[PATH_MAX];
  	char cpuset[RTE_CPU_AFFINITY_STR_LEN];
  	char thread_name[RTE_MAX_THREAD_NAME_LEN];
-@@ -843,7 +844,6 @@ rte_eal_init(int argc, char **argv)
+@@ -811,7 +812,6 @@ rte_eal_init(int argc, char **argv)
  	}
  
 -	logid = strrchr(argv[0], '/');

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

* [dpdk-stable] patch 'malloc: check size hint when reserving the biggest element' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: fix memory leak of logid' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/vdev: fix devargs after multi-process bus scan' " Kevin Traynor
                   ` (65 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Darek Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From ff9eeb07f14efddc9c69699855162133347beda7 Mon Sep 17 00:00:00 2001
From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Date: Sun, 7 Oct 2018 21:31:47 +0200
Subject: [PATCH] malloc: check size hint when reserving the biggest element

[ upstream commit c7810c319d5f70c7d3c1b878f9431dc17dc1b6bc ]

RTE_MEMZONE_SIZE_HINT_ONLY wasn't checked in any way,
causing size hints to be parsed as hard requirements.
This resulted in some allocations being failed prematurely.

Fixes: 68b6092bd3c7 ("malloc: allow reserving biggest element")

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/malloc_heap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index ac7bbb3ba..d2a8bd8dc 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -166,5 +166,7 @@ find_biggest_element(struct malloc_heap *heap, size_t *size,
 				!!elem; elem = LIST_NEXT(elem, free_list)) {
 			size_t cur_size;
-			if (!check_hugepage_sz(flags, elem->msl->page_sz))
+			if ((flags & RTE_MEMZONE_SIZE_HINT_ONLY) == 0 &&
+					!check_hugepage_sz(flags,
+						elem->msl->page_sz))
 				continue;
 			if (contig) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.332184292 +0000
+++ 0003-malloc-check-size-hint-when-reserving-the-biggest-el.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From c7810c319d5f70c7d3c1b878f9431dc17dc1b6bc Mon Sep 17 00:00:00 2001
+From ff9eeb07f14efddc9c69699855162133347beda7 Mon Sep 17 00:00:00 2001
 From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Date: Sun, 7 Oct 2018 21:31:47 +0200
 Subject: [PATCH] malloc: check size hint when reserving the biggest element
 
+[ upstream commit c7810c319d5f70c7d3c1b878f9431dc17dc1b6bc ]
+
 RTE_MEMZONE_SIZE_HINT_ONLY wasn't checked in any way,
 causing size hints to be parsed as hard requirements.
 This resulted in some allocations being failed prematurely.
 
 Fixes: 68b6092bd3c7 ("malloc: allow reserving biggest element")
-Cc: stable@dpdk.org
 
 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
-index 08ec75377..363f306cc 100644
+index ac7bbb3ba..d2a8bd8dc 100644
 --- a/lib/librte_eal/common/malloc_heap.c
 +++ b/lib/librte_eal/common/malloc_heap.c
-@@ -193,5 +193,7 @@ find_biggest_element(struct malloc_heap *heap, size_t *size,
+@@ -166,5 +166,7 @@ find_biggest_element(struct malloc_heap *heap, size_t *size,
  				!!elem; elem = LIST_NEXT(elem, free_list)) {
  			size_t cur_size;
 -			if (!check_hugepage_sz(flags, elem->msl->page_sz))

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

* [dpdk-stable] patch 'bus/vdev: fix devargs after multi-process bus scan' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: fix memory leak of logid' " Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'malloc: check size hint when reserving the biggest element' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: fix sPAPR IOMMU mapping' " Kevin Traynor
                   ` (64 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Qi Zhang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 7f84852308212054338fab88279a74ddae837c68 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 25 Oct 2018 11:30:36 +0800
Subject: [PATCH] bus/vdev: fix devargs after multi-process bus scan

[ upstream commit f5b2eff0847d49a66301f0046502c6232cd5da3f ]

It's not necessary to insert device argment to devargs_list
during bus scan, but this happens when we try to attach a
device on secondary process. The patch fix the issue.

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/bus/vdev/vdev.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 2566d6c0d..daba77da7 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -203,5 +203,7 @@ alloc_devargs(const char *name, const char *args)
 
 static int
-insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
+insert_vdev(const char *name, const char *args,
+		struct rte_vdev_device **p_dev,
+		bool init)
 {
 	struct rte_vdev_device *dev;
@@ -232,5 +234,6 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
 
 	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	rte_devargs_insert(devargs);
+	if (init)
+		rte_devargs_insert(devargs);
 
 	if (p_dev)
@@ -253,5 +256,5 @@ rte_vdev_init(const char *name, const char *args)
 
 	rte_spinlock_recursive_lock(&vdev_device_list_lock);
-	ret = insert_vdev(name, args, &dev);
+	ret = insert_vdev(name, args, &dev, true);
 	if (ret == 0) {
 		ret = vdev_probe_all_drivers(dev);
@@ -382,5 +385,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
 	case VDEV_SCAN_ONE:
 		VDEV_LOG(INFO, "receive vdev, %s", in->name);
-		ret = insert_vdev(in->name, NULL, NULL);
+		ret = insert_vdev(in->name, NULL, NULL, false);
 		if (ret == -EEXIST)
 			VDEV_LOG(DEBUG, "device already exist, %s", in->name);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.357665601 +0000
+++ 0004-bus-vdev-fix-devargs-after-multi-process-bus-scan.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From f5b2eff0847d49a66301f0046502c6232cd5da3f Mon Sep 17 00:00:00 2001
+From 7f84852308212054338fab88279a74ddae837c68 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Thu, 25 Oct 2018 11:30:36 +0800
 Subject: [PATCH] bus/vdev: fix devargs after multi-process bus scan
 
+[ upstream commit f5b2eff0847d49a66301f0046502c6232cd5da3f ]
+
 It's not necessary to insert device argment to devargs_list
 during bus scan, but this happens when we try to attach a
 device on secondary process. The patch fix the issue.
 
 Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 7 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
-index 685cc4e78..6952724bd 100644
+index 2566d6c0d..daba77da7 100644
 --- a/drivers/bus/vdev/vdev.c
 +++ b/drivers/bus/vdev/vdev.c
 @@ -203,5 +203,7 @@ alloc_devargs(const char *name, const char *args)
@@ -28,7 +29,7 @@
 +		bool init)
  {
  	struct rte_vdev_device *dev;
-@@ -238,5 +240,6 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
+@@ -232,5 +234,6 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
  
  	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
 -	rte_devargs_insert(devargs);
@@ -36,14 +37,14 @@
 +		rte_devargs_insert(devargs);
  
  	if (p_dev)
-@@ -258,5 +261,5 @@ rte_vdev_init(const char *name, const char *args)
+@@ -253,5 +256,5 @@ rte_vdev_init(const char *name, const char *args)
  
  	rte_spinlock_recursive_lock(&vdev_device_list_lock);
 -	ret = insert_vdev(name, args, &dev);
 +	ret = insert_vdev(name, args, &dev, true);
  	if (ret == 0) {
  		ret = vdev_probe_all_drivers(dev);
-@@ -384,5 +387,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -382,5 +385,5 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void *peer)
  	case VDEV_SCAN_ONE:
  		VDEV_LOG(INFO, "receive vdev, %s", in->name);
 -		ret = insert_vdev(in->name, NULL, NULL);

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

* [dpdk-stable] patch 'vfio: fix sPAPR IOMMU mapping' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (2 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/vdev: fix devargs after multi-process bus scan' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix PCI config error handling' " Kevin Traynor
                   ` (63 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Takeshi Yoshimura; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e9634e33b6908bce9add992f5406863a64d834bb Mon Sep 17 00:00:00 2001
From: Takeshi Yoshimura <tyos@jp.ibm.com>
Date: Tue, 7 Aug 2018 11:35:06 +0900
Subject: [PATCH] vfio: fix sPAPR IOMMU mapping

[ upstream commit 998c89f148ee31564ccde958056e54418c18f10c ]

Commit 73a639085938 ("vfio: allow to map other memory regions")
introduced a bug in sPAPR IOMMU mapping. The commit removed necessary
ioctl with VFIO_IOMMU_SPAPR_REGISTER_MEMORY. Also, vfio_spapr_map_walk
should call vfio_spapr_dma_do_map instead of vfio_spapr_dma_mem_map.

Fixes: 73a639085938 ("vfio: allow to map other memory regions")

Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index c68dc38e0..68e862946 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -1146,6 +1146,20 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
 	struct vfio_iommu_type1_dma_unmap dma_unmap;
 	int ret;
+	struct vfio_iommu_spapr_register_memory reg = {
+		.argsz = sizeof(reg),
+		.flags = 0
+	};
+	reg.vaddr = (uintptr_t) vaddr;
+	reg.size = len;
 
 	if (do_map != 0) {
+		ret = ioctl(vfio_container_fd,
+				VFIO_IOMMU_SPAPR_REGISTER_MEMORY, &reg);
+		if (ret) {
+			RTE_LOG(ERR, EAL, "  cannot register vaddr for IOMMU, "
+				"error %i (%s)\n", errno, strerror(errno));
+			return -1;
+		}
+
 		memset(&dma_map, 0, sizeof(dma_map));
 		dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
@@ -1164,11 +1178,4 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
 
 	} else {
-		struct vfio_iommu_spapr_register_memory reg = {
-			.argsz = sizeof(reg),
-			.flags = 0
-		};
-		reg.vaddr = (uintptr_t) vaddr;
-		reg.size = len;
-
 		ret = ioctl(vfio_container_fd,
 				VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY, &reg);
@@ -1202,5 +1209,5 @@ vfio_spapr_map_walk(const struct rte_memseg_list *msl __rte_unused,
 	int *vfio_container_fd = arg;
 
-	return vfio_spapr_dma_mem_map(*vfio_container_fd, ms->addr_64, ms->iova,
+	return vfio_spapr_dma_do_map(*vfio_container_fd, ms->addr_64, ms->iova,
 			ms->len, 1);
 }
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.381170026 +0000
+++ 0005-vfio-fix-sPAPR-IOMMU-mapping.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From 998c89f148ee31564ccde958056e54418c18f10c Mon Sep 17 00:00:00 2001
+From e9634e33b6908bce9add992f5406863a64d834bb Mon Sep 17 00:00:00 2001
 From: Takeshi Yoshimura <tyos@jp.ibm.com>
 Date: Tue, 7 Aug 2018 11:35:06 +0900
 Subject: [PATCH] vfio: fix sPAPR IOMMU mapping
 
+[ upstream commit 998c89f148ee31564ccde958056e54418c18f10c ]
+
 Commit 73a639085938 ("vfio: allow to map other memory regions")
 introduced a bug in sPAPR IOMMU mapping. The commit removed necessary
 ioctl with VFIO_IOMMU_SPAPR_REGISTER_MEMORY. Also, vfio_spapr_map_walk
 should call vfio_spapr_dma_do_map instead of vfio_spapr_dma_mem_map.
 
 Fixes: 73a639085938 ("vfio: allow to map other memory regions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 15 insertions(+), 8 deletions(-)
 
 diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-index d7268e4ce..ebecde12c 100644
+index c68dc38e0..68e862946 100644
 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
 +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-@@ -1155,6 +1155,20 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
+@@ -1146,6 +1146,20 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
  	struct vfio_iommu_type1_dma_unmap dma_unmap;
  	int ret;
 +	struct vfio_iommu_spapr_register_memory reg = {
@@ -41,7 +42,7 @@
 +
  		memset(&dma_map, 0, sizeof(dma_map));
  		dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
-@@ -1173,11 +1187,4 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
+@@ -1164,11 +1178,4 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
  
  	} else {
 -		struct vfio_iommu_spapr_register_memory reg = {
@@ -53,8 +54,8 @@
 -
  		ret = ioctl(vfio_container_fd,
  				VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY, &reg);
-@@ -1214,5 +1221,5 @@ vfio_spapr_map_walk(const struct rte_memseg_list *msl,
- 		return 0;
+@@ -1202,5 +1209,5 @@ vfio_spapr_map_walk(const struct rte_memseg_list *msl __rte_unused,
+ 	int *vfio_container_fd = arg;
  
 -	return vfio_spapr_dma_mem_map(*vfio_container_fd, ms->addr_64, ms->iova,
 +	return vfio_spapr_dma_do_map(*vfio_container_fd, ms->addr_64, ms->iova,

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

* [dpdk-stable] patch 'net/virtio: fix PCI config error handling' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (3 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: fix sPAPR IOMMU mapping' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-26  2:02   ` Tiwei Bie
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/pci: compare kernel driver instead of interrupt handler' " Kevin Traynor
                   ` (62 subsequent siblings)
  67 siblings, 1 reply; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Brian Russell; +Cc: Luca Boccassi, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e0af7542c97f172f44d633389d33920b889e8b22 Mon Sep 17 00:00:00 2001
From: Brian Russell <brussell@brocade.com>
Date: Tue, 28 Aug 2018 11:12:40 +0100
Subject: [PATCH] net/virtio: fix PCI config error handling

[ upstream commit 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd ]

In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
the number of bytes read from PCI config or < 0 on error.
If less than the expected number of bytes are read then log the
failure and return rather than carrying on with garbage.

Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")

Signed-off-by: Brian Russell <brussell@brocade.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_pci.c | 65 ++++++++++++++++++++++++---------
 1 file changed, 48 insertions(+), 17 deletions(-)

diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 6bd22e54a..b6a3c80b4 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -568,14 +568,16 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
 
 	ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
-	if (ret < 0) {
-		PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
+	if (ret != 1) {
+		PMD_INIT_LOG(DEBUG,
+			     "failed to read pci capability list, ret %d", ret);
 		return -1;
 	}
 
 	while (pos) {
-		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
-		if (ret < 0) {
-			PMD_INIT_LOG(ERR,
-				"failed to read pci cap at pos: %x", pos);
+		ret = rte_pci_read_config(dev, &cap, 2, pos);
+		if (ret != 2) {
+			PMD_INIT_LOG(DEBUG,
+				     "failed to read pci cap at pos: %x ret %d",
+				     pos, ret);
 			break;
 		}
@@ -587,5 +589,14 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
 			 * cap; next two bytes are the flags.
 			 */
-			uint16_t flags = ((uint16_t *)&cap)[1];
+			uint16_t flags;
+
+			ret = rte_pci_read_config(dev, &flags, sizeof(flags),
+					pos + 2);
+			if (ret != sizeof(flags)) {
+				PMD_INIT_LOG(DEBUG,
+					     "failed to read pci cap at pos:"
+					     " %x ret %d", pos + 2, ret);
+				break;
+			}
 
 			if (flags & PCI_MSIX_ENABLE)
@@ -602,4 +613,12 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
 		}
 
+		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
+		if (ret != sizeof(cap)) {
+			PMD_INIT_LOG(DEBUG,
+				     "failed to read pci cap at pos: %x ret %d",
+				     pos, ret);
+			break;
+		}
+
 		PMD_INIT_LOG(DEBUG,
 			"[%2x] cfg type: %u, bar: %u, offset: %04x, len: %u",
@@ -690,23 +709,35 @@ vtpci_msix_detect(struct rte_pci_device *dev)
 {
 	uint8_t pos;
-	struct virtio_pci_cap cap;
 	int ret;
 
 	ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
-	if (ret < 0) {
-		PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
+	if (ret != 1) {
+		PMD_INIT_LOG(DEBUG,
+			     "failed to read pci capability list, ret %d", ret);
 		return VIRTIO_MSIX_NONE;
 	}
 
 	while (pos) {
-		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
-		if (ret < 0) {
-			PMD_INIT_LOG(ERR,
-				"failed to read pci cap at pos: %x", pos);
+		uint8_t cap[2];
+
+		ret = rte_pci_read_config(dev, cap, sizeof(cap), pos);
+		if (ret != sizeof(cap)) {
+			PMD_INIT_LOG(DEBUG,
+				     "failed to read pci cap at pos: %x ret %d",
+				     pos, ret);
 			break;
 		}
 
-		if (cap.cap_vndr == PCI_CAP_ID_MSIX) {
-			uint16_t flags = ((uint16_t *)&cap)[1];
+		if (cap[0] == PCI_CAP_ID_MSIX) {
+			uint16_t flags;
+
+			ret = rte_pci_read_config(dev, &flags, sizeof(flags),
+					pos + sizeof(cap));
+			if (ret != sizeof(flags)) {
+				PMD_INIT_LOG(DEBUG,
+					     "failed to read pci cap at pos:"
+					     " %x ret %d", pos + 2, ret);
+				break;
+			}
 
 			if (flags & PCI_MSIX_ENABLE)
@@ -716,5 +747,5 @@ vtpci_msix_detect(struct rte_pci_device *dev)
 		}
 
-		pos = cap.cap_next;
+		pos = cap[1];
 	}
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.406494254 +0000
+++ 0006-net-virtio-fix-PCI-config-error-handling.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd Mon Sep 17 00:00:00 2001
+From e0af7542c97f172f44d633389d33920b889e8b22 Mon Sep 17 00:00:00 2001
 From: Brian Russell <brussell@brocade.com>
 Date: Tue, 28 Aug 2018 11:12:40 +0100
 Subject: [PATCH] net/virtio: fix PCI config error handling
 
+[ upstream commit 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd ]
+
 In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
 the number of bytes read from PCI config or < 0 on error.
 If less than the expected number of bytes are read then log the
 failure and return rather than carrying on with garbage.
 
 Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
-Cc: stable@dpdk.org
 
 Signed-off-by: Brian Russell <brussell@brocade.com>
 Signed-off-by: Luca Boccassi <bluca@debian.org>

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

* [dpdk-stable] patch 'bus/pci: compare kernel driver instead of interrupt handler' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (4 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix PCI config error handling' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: check if group fd is already open' " Kevin Traynor
                   ` (61 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 6d96dcc744945a4a90fdacf431ae45300755b3eb Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Thu, 25 Oct 2018 11:49:28 +0100
Subject: [PATCH] bus/pci: compare kernel driver instead of interrupt handler

[ upstream commit 630deed612ca382f48a3ef4b65dfc74b7cd09cf9 ]

Invoking the right pci read/write functions is based on interrupt
handler type. However, this is not configured for secondary processes
precluding to use those functions.

This patch fixes the issue using the driver name the device is bound
to instead.

Fixes: 632b2d1deeed ("eal: provide functions to access PCI config")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/pci/linux/pci.c | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 04648ac93..58b615a47 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -673,21 +673,19 @@ int rte_pci_read_config(const struct rte_pci_device *device,
 		void *buf, size_t len, off_t offset)
 {
+	char devname[RTE_DEV_NAME_MAX_LEN] = "";
 	const struct rte_intr_handle *intr_handle = &device->intr_handle;
 
-	switch (intr_handle->type) {
-	case RTE_INTR_HANDLE_UIO:
-	case RTE_INTR_HANDLE_UIO_INTX:
+	switch (device->kdrv) {
+	case RTE_KDRV_IGB_UIO:
 		return pci_uio_read_config(intr_handle, buf, len, offset);
-
 #ifdef VFIO_PRESENT
-	case RTE_INTR_HANDLE_VFIO_MSIX:
-	case RTE_INTR_HANDLE_VFIO_MSI:
-	case RTE_INTR_HANDLE_VFIO_LEGACY:
+	case RTE_KDRV_VFIO:
 		return pci_vfio_read_config(intr_handle, buf, len, offset);
 #endif
 	default:
+		rte_pci_device_name(&device->addr, devname,
+				    RTE_DEV_NAME_MAX_LEN);
 		RTE_LOG(ERR, EAL,
-			"Unknown handle type of fd %d\n",
-					intr_handle->fd);
+			"Unknown driver type for %s\n", devname);
 		return -1;
 	}
@@ -698,21 +696,19 @@ int rte_pci_write_config(const struct rte_pci_device *device,
 		const void *buf, size_t len, off_t offset)
 {
+	char devname[RTE_DEV_NAME_MAX_LEN] = "";
 	const struct rte_intr_handle *intr_handle = &device->intr_handle;
 
-	switch (intr_handle->type) {
-	case RTE_INTR_HANDLE_UIO:
-	case RTE_INTR_HANDLE_UIO_INTX:
+	switch (device->kdrv) {
+	case RTE_KDRV_IGB_UIO:
 		return pci_uio_write_config(intr_handle, buf, len, offset);
-
 #ifdef VFIO_PRESENT
-	case RTE_INTR_HANDLE_VFIO_MSIX:
-	case RTE_INTR_HANDLE_VFIO_MSI:
-	case RTE_INTR_HANDLE_VFIO_LEGACY:
+	case RTE_KDRV_VFIO:
 		return pci_vfio_write_config(intr_handle, buf, len, offset);
 #endif
 	default:
+		rte_pci_device_name(&device->addr, devname,
+				    RTE_DEV_NAME_MAX_LEN);
 		RTE_LOG(ERR, EAL,
-			"Unknown handle type of fd %d\n",
-					intr_handle->fd);
+			"Unknown driver type for %s\n", devname);
 		return -1;
 	}
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.429167009 +0000
+++ 0007-bus-pci-compare-kernel-driver-instead-of-interrupt-h.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 630deed612ca382f48a3ef4b65dfc74b7cd09cf9 Mon Sep 17 00:00:00 2001
+From 6d96dcc744945a4a90fdacf431ae45300755b3eb Mon Sep 17 00:00:00 2001
 From: Alejandro Lucero <alejandro.lucero@netronome.com>
 Date: Thu, 25 Oct 2018 11:49:28 +0100
 Subject: [PATCH] bus/pci: compare kernel driver instead of interrupt handler
 
+[ upstream commit 630deed612ca382f48a3ef4b65dfc74b7cd09cf9 ]
+
 Invoking the right pci read/write functions is based on interrupt
 handler type. However, this is not configured for secondary processes
 precluding to use those functions.
@@ -11,7 +13,6 @@
 to instead.
 
 Fixes: 632b2d1deeed ("eal: provide functions to access PCI config")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 14 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
-index d5faa893d..45c24ef7e 100644
+index 04648ac93..58b615a47 100644
 --- a/drivers/bus/pci/linux/pci.c
 +++ b/drivers/bus/pci/linux/pci.c
-@@ -675,21 +675,19 @@ int rte_pci_read_config(const struct rte_pci_device *device,
+@@ -673,21 +673,19 @@ int rte_pci_read_config(const struct rte_pci_device *device,
  		void *buf, size_t len, off_t offset)
  {
 +	char devname[RTE_DEV_NAME_MAX_LEN] = "";
@@ -52,7 +53,7 @@
 +			"Unknown driver type for %s\n", devname);
  		return -1;
  	}
-@@ -700,21 +698,19 @@ int rte_pci_write_config(const struct rte_pci_device *device,
+@@ -698,21 +696,19 @@ int rte_pci_write_config(const struct rte_pci_device *device,
  		const void *buf, size_t len, off_t offset)
  {
 +	char devname[RTE_DEV_NAME_MAX_LEN] = "";

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

* [dpdk-stable] patch 'vfio: check if group fd is already open' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (5 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/pci: compare kernel driver instead of interrupt handler' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: fix read of freed memory on getting container fd' " Kevin Traynor
                   ` (60 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Xiao Wang, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9e8a431408f3538e4853dbaef7db72771e639065 Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Mon, 17 Sep 2018 15:46:42 +0200
Subject: [PATCH] vfio: check if group fd is already open

[ upstream commit db9d32b8b73e3fc9e16f8a38e5b7f66a5df0e36a ]

Always attempt to find already opened fd for an iommu
group as subsequent attempts to open it will fail.

There's no public API to check if a group was already
bound and has a container, so rte_vfio_container_group_bind()
shouldn't fail in such case.

Fixes: ea2dc1066870 ("vfio: add multi container support")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 68e862946..957844ad8 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -1688,4 +1688,9 @@ rte_vfio_container_group_bind(int container_fd, int iommu_group_num)
 	}
 
+	/* check if we already have the group descriptor open */
+	for (i = 0; i < VFIO_MAX_GROUPS; i++)
+		if (vfio_cfg->vfio_groups[i].group_num == iommu_group_num)
+			return vfio_cfg->vfio_groups[i].fd;
+
 	/* Check room for new group */
 	if (vfio_cfg->vfio_active_groups == VFIO_MAX_GROUPS) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.453462731 +0000
+++ 0008-vfio-check-if-group-fd-is-already-open.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From db9d32b8b73e3fc9e16f8a38e5b7f66a5df0e36a Mon Sep 17 00:00:00 2001
+From 9e8a431408f3538e4853dbaef7db72771e639065 Mon Sep 17 00:00:00 2001
 From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
 Date: Mon, 17 Sep 2018 15:46:42 +0200
 Subject: [PATCH] vfio: check if group fd is already open
 
+[ upstream commit db9d32b8b73e3fc9e16f8a38e5b7f66a5df0e36a ]
+
 Always attempt to find already opened fd for an iommu
 group as subsequent attempts to open it will fail.
 
@@ -11,7 +13,6 @@
 shouldn't fail in such case.
 
 Fixes: ea2dc1066870 ("vfio: add multi container support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
 Acked-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -21,10 +22,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-index ebecde12c..04c8f2e9c 100644
+index 68e862946..957844ad8 100644
 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
 +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-@@ -1703,4 +1703,9 @@ rte_vfio_container_group_bind(int container_fd, int iommu_group_num)
+@@ -1688,4 +1688,9 @@ rte_vfio_container_group_bind(int container_fd, int iommu_group_num)
  	}
  
 +	/* check if we already have the group descriptor open */

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

* [dpdk-stable] patch 'vfio: fix read of freed memory on getting container fd' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (6 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: check if group fd is already open' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: share default container in multi-process' " Kevin Traynor
                   ` (59 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Darek Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From c682a52044a0ff987385c0ecb34efe0762a1cc72 Mon Sep 17 00:00:00 2001
From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Date: Thu, 25 Oct 2018 12:49:10 +0200
Subject: [PATCH] vfio: fix read of freed memory on getting container fd

[ upstream commit 88e2d78a20fae4cccde351e38e0b1ef534ad3302 ]

We were reading some memory just after freeing it.

Fixes: 83a73c5fef66 ("vfio: use generic multi-process channel")

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 957844ad8..3fd5be79f 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -1029,6 +1029,7 @@ rte_vfio_get_container_fd(void)
 		p = (struct vfio_mp_param *)mp_rep->param;
 		if (p->result == SOCKET_OK && mp_rep->num_fds == 1) {
+			vfio_container_fd = mp_rep->fds[0];
 			free(mp_reply.msgs);
-			return mp_rep->fds[0];
+			return vfio_container_fd;
 		}
 		free(mp_reply.msgs);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.480356441 +0000
+++ 0009-vfio-fix-read-of-freed-memory-on-getting-container-f.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,12 +1,13 @@
-From 88e2d78a20fae4cccde351e38e0b1ef534ad3302 Mon Sep 17 00:00:00 2001
+From c682a52044a0ff987385c0ecb34efe0762a1cc72 Mon Sep 17 00:00:00 2001
 From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Date: Thu, 25 Oct 2018 12:49:10 +0200
 Subject: [PATCH] vfio: fix read of freed memory on getting container fd
 
+[ upstream commit 88e2d78a20fae4cccde351e38e0b1ef534ad3302 ]
+
 We were reading some memory just after freeing it.
 
 Fixes: 83a73c5fef66 ("vfio: use generic multi-process channel")
-Cc: stable@dpdk.org
 
 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -15,10 +16,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-index 7d5b96426..13a8b1811 100644
+index 957844ad8..3fd5be79f 100644
 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
 +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-@@ -1043,6 +1043,7 @@ rte_vfio_get_container_fd(void)
+@@ -1029,6 +1029,7 @@ rte_vfio_get_container_fd(void)
  		p = (struct vfio_mp_param *)mp_rep->param;
  		if (p->result == SOCKET_OK && mp_rep->num_fds == 1) {
 +			vfio_container_fd = mp_rep->fds[0];

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

* [dpdk-stable] patch 'vfio: share default container in multi-process' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (7 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: fix read of freed memory on getting container fd' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'fix global variable issues' " Kevin Traynor
                   ` (58 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Darek Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 239dadd17803875567072a6efda6c5a1783b9b61 Mon Sep 17 00:00:00 2001
From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Date: Wed, 3 Oct 2018 14:39:25 +0200
Subject: [PATCH] vfio: share default container in multi-process

[ upstream commit 6bcb7c95fe14544bca9de1a698e4553533192197 ]

So far each process in MP used to have a separate container
and relied on the primary process to register all memsegs.

Mapping external memory via rte_vfio_container_dma_map()
in secondary processes was broken, because the default
(process-local) container had no groups bound. There was
even no way to bind any groups to it, because the container
fd was deeply encapsulated within EAL.

This patch introduces a new SOCKET_REQ_DEFAULT_CONTAINER
message type for MP synchronization, makes all processes
within a MP party use a single default container, and hence
fixes rte_vfio_container_dma_map() for secondary processes.

>From what I checked this behavior was always the same, but
started to be invalid/insufficient once mapping external
memory was allowed.

While here, fix up the comment on rte_vfio_get_container_fd().
This function always opens a new container, never reuses
an old one.

Fixes: 73a639085938 ("vfio: allow to map other memory regions")

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/include/rte_vfio.h      |  2 +-
 lib/librte_eal/linuxapp/eal/eal_vfio.c        | 49 ++++++++++++++++++-
 lib/librte_eal/linuxapp/eal/eal_vfio.h        |  4 ++
 .../linuxapp/eal/eal_vfio_mp_sync.c           | 11 +++++
 4 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/include/rte_vfio.h
index 5ca13fcce..1064426eb 100644
--- a/lib/librte_eal/common/include/rte_vfio.h
+++ b/lib/librte_eal/common/include/rte_vfio.h
@@ -228,5 +228,5 @@ rte_vfio_get_group_num(const char *sysfs_base,
 
 /**
- * Open VFIO container fd or get an existing one
+ * Open a new VFIO container fd
  *
  * This function is only relevant to linux and will return
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 3fd5be79f..c4d80a994 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -897,5 +897,13 @@ rte_vfio_enable(const char *modname)
 	}
 
-	default_vfio_cfg->vfio_container_fd = rte_vfio_get_container_fd();
+	if (internal_config.process_type == RTE_PROC_PRIMARY) {
+		/* open a new container */
+		default_vfio_cfg->vfio_container_fd =
+				rte_vfio_get_container_fd();
+	} else {
+		/* get the default container from the primary process */
+		default_vfio_cfg->vfio_container_fd =
+				vfio_get_default_container_fd();
+	}
 
 	/* check if we have VFIO driver enabled */
@@ -917,4 +925,43 @@ rte_vfio_is_enabled(const char *modname)
 }
 
+int
+vfio_get_default_container_fd(void)
+{
+	struct rte_mp_msg mp_req, *mp_rep;
+	struct rte_mp_reply mp_reply;
+	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
+	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
+
+	if (default_vfio_cfg->vfio_enabled)
+		return default_vfio_cfg->vfio_container_fd;
+
+	if (internal_config.process_type == RTE_PROC_PRIMARY) {
+		/* if we were secondary process we would try requesting
+		 * container fd from the primary, but we're the primary
+		 * process so just exit here
+		 */
+		return -1;
+	}
+
+	p->req = SOCKET_REQ_DEFAULT_CONTAINER;
+	strcpy(mp_req.name, EAL_VFIO_MP);
+	mp_req.len_param = sizeof(*p);
+	mp_req.num_fds = 0;
+
+	if (rte_mp_request_sync(&mp_req, &mp_reply, &ts) == 0 &&
+	    mp_reply.nb_received == 1) {
+		mp_rep = &mp_reply.msgs[0];
+		p = (struct vfio_mp_param *)mp_rep->param;
+		if (p->result == SOCKET_OK && mp_rep->num_fds == 1) {
+			free(mp_reply.msgs);
+			return mp_rep->fds[0];
+		}
+		free(mp_reply.msgs);
+	}
+
+	RTE_LOG(ERR, EAL, "  cannot request default container fd\n");
+	return -1;
+}
+
 const struct vfio_iommu_type *
 vfio_set_iommu_type(int vfio_container_fd)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index 68d4750a5..63ae115c3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -116,4 +116,7 @@ struct vfio_iommu_type {
 };
 
+/* get the vfio container that devices are bound to by default */
+int vfio_get_default_container_fd(void);
+
 /* pick IOMMU type. returns a pointer to vfio_iommu_type or NULL for error */
 const struct vfio_iommu_type *
@@ -130,4 +133,5 @@ int vfio_mp_sync_setup(void);
 #define SOCKET_REQ_CONTAINER 0x100
 #define SOCKET_REQ_GROUP 0x200
+#define SOCKET_REQ_DEFAULT_CONTAINER 0x400
 #define SOCKET_OK 0x0
 #define SOCKET_NO_FD 0x1
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
index 680a24aae..a1e8c834f 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
@@ -67,4 +67,15 @@ vfio_mp_primary(const struct rte_mp_msg *msg, const void *peer)
 		}
 		break;
+	case SOCKET_REQ_DEFAULT_CONTAINER:
+		r->req = SOCKET_REQ_DEFAULT_CONTAINER;
+		fd = vfio_get_default_container_fd();
+		if (fd < 0)
+			r->result = SOCKET_ERR;
+		else {
+			r->result = SOCKET_OK;
+			reply.num_fds = 1;
+			reply.fds[0] = fd;
+		}
+		break;
 	default:
 		RTE_LOG(ERR, EAL, "vfio received invalid message!\n");
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.506035172 +0000
+++ 0010-vfio-share-default-container-in-multi-process.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 6bcb7c95fe14544bca9de1a698e4553533192197 Mon Sep 17 00:00:00 2001
+From 239dadd17803875567072a6efda6c5a1783b9b61 Mon Sep 17 00:00:00 2001
 From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Date: Wed, 3 Oct 2018 14:39:25 +0200
 Subject: [PATCH] vfio: share default container in multi-process
 
+[ upstream commit 6bcb7c95fe14544bca9de1a698e4553533192197 ]
+
 So far each process in MP used to have a separate container
 and relied on the primary process to register all memsegs.
 
@@ -26,7 +28,6 @@
 an old one.
 
 Fixes: 73a639085938 ("vfio: allow to map other memory regions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -38,10 +39,10 @@
  4 files changed, 64 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/include/rte_vfio.h
-index 7d66438b5..cae96fab9 100644
+index 5ca13fcce..1064426eb 100644
 --- a/lib/librte_eal/common/include/rte_vfio.h
 +++ b/lib/librte_eal/common/include/rte_vfio.h
-@@ -257,5 +257,5 @@ rte_vfio_get_group_num(const char *sysfs_base,
+@@ -228,5 +228,5 @@ rte_vfio_get_group_num(const char *sysfs_base,
  
  /**
 - * Open VFIO container fd or get an existing one
@@ -49,10 +50,10 @@
   *
   * This function is only relevant to linux and will return
 diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-index 13a8b1811..0516b1597 100644
+index 3fd5be79f..c4d80a994 100644
 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
 +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
-@@ -911,5 +911,13 @@ rte_vfio_enable(const char *modname)
+@@ -897,5 +897,13 @@ rte_vfio_enable(const char *modname)
  	}
  
 -	default_vfio_cfg->vfio_container_fd = rte_vfio_get_container_fd();
@@ -67,7 +68,7 @@
 +	}
  
  	/* check if we have VFIO driver enabled */
-@@ -931,4 +939,43 @@ rte_vfio_is_enabled(const char *modname)
+@@ -917,4 +925,43 @@ rte_vfio_is_enabled(const char *modname)
  }
  
 +int

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

* [dpdk-stable] patch 'fix global variable issues' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (8 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: share default container in multi-process' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: register/unregister intr handler on start/stop' " Kevin Traynor
                   ` (57 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Nikhil Rao, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 5e60edf80f1b1170da5cdb6b6ab05115e250a209 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 23:57:40 +0000
Subject: [PATCH] fix global variable issues

[ upstream commit 9757358342a089e9d3e770cc3e4b4b1289d65abe ]

Various fixes related to the global variable usage.

Fixes: 43e610bb8565 ("compress/octeontx: introduce octeontx zip PMD")
Fixes: c378f084d6e3 ("compress/octeontx: add device setup ops")
Fixes: b43ebc65aada ("compress/octeontx: create private xform")
Fixes: b1ce8ebd97ba ("eventdev: add PMD callbacks for eth Rx adapter")
Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/compress/octeontx/include/zip_regs.h   | 4 ++--
 drivers/compress/octeontx/otx_zip.h            | 6 +++---
 drivers/event/octeontx/ssovf_evdev.c           | 3 +--
 drivers/net/enic/enic_ethdev.c                 | 1 -
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 1 -
 lib/librte_eventdev/rte_eventdev_pmd.h         | 4 ++--
 6 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/compress/octeontx/include/zip_regs.h b/drivers/compress/octeontx/include/zip_regs.h
index 1e74db433..04c3d75e9 100644
--- a/drivers/compress/octeontx/include/zip_regs.h
+++ b/drivers/compress/octeontx/include/zip_regs.h
@@ -13,10 +13,10 @@
  * Enumerates ZIP_INST_S[CC].
  */
-enum {
+enum zip_cc {
 	ZIP_CC_DEFAULT = 0,
 	ZIP_CC_DYN_HUFF,
 	ZIP_CC_FIXED_HUFF,
 	ZIP_CC_LZS
-} zip_cc;
+};
 
 /**
diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h
index 99a38d005..3abefd1dc 100644
--- a/drivers/compress/octeontx/otx_zip.h
+++ b/drivers/compress/octeontx/otx_zip.h
@@ -80,5 +80,5 @@ int octtx_zip_logtype_driver;
 
 /* resources required to process stream */
-enum {
+enum NUM_BUFS_PER_STREAM {
 	RES_BUF = 0,
 	CMD_BUF,
@@ -89,5 +89,5 @@ enum {
 	HISTORY_DATA_BUF,
 	MAX_BUFS_PER_STREAM
-} NUM_BUFS_PER_STREAM;
+};
 
 struct zip_stream;
@@ -107,5 +107,5 @@ struct zip_stream {
 	/* function to process comp operation */
 	void *bufs[MAX_BUFS_PER_STREAM];
-} _rte_cache_aligned;
+} __rte_cache_aligned;
 
 
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 16a3a04b8..44243e0fc 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -455,5 +455,4 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
 	pki_del_qos_t pki_qos;
 	RTE_SET_USED(dev);
-	RTE_SET_USED(rx_queue_id);
 
 	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
@@ -467,5 +466,5 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
 	if (ret < 0)
 		ssovf_log_err("Failed to delete QOS port=%d, q=%d",
-				nic->port_id, queue_conf->ev.queue_id);
+				nic->port_id, rx_queue_id);
 	return ret;
 }
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index fa2f4709a..4cb17dfc7 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1021,5 +1021,4 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
 }
 
-struct enic *enicpmd_list_head = NULL;
 /* Initialize the driver
  * It returns 0 on success.
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 870ac8c3b..71d008cd1 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -1126,5 +1126,4 @@ rxa_poll(struct rte_event_eth_rx_adapter *rx_adapter)
 	max_nb_rx = rx_adapter->max_nb_rx;
 	buf = &rx_adapter->event_enqueue_buffer;
-	stats = &rx_adapter->stats;
 
 	/* Iterate through a WRR sequence */
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 3fbb4d2b2..2e9dd494b 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -451,5 +451,5 @@ typedef int (*eventdev_eth_rx_adapter_caps_get_t)
 					uint32_t *caps);
 
-struct rte_event_eth_rx_adapter_queue_conf *queue_conf;
+struct rte_event_eth_rx_adapter_queue_conf;
 
 /**
@@ -576,5 +576,5 @@ typedef int (*eventdev_eth_rx_adapter_stop_t)
 					const struct rte_eth_dev *eth_dev);
 
-struct rte_event_eth_rx_adapter_stats *stats;
+struct rte_event_eth_rx_adapter_stats;
 
 /**
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.529207337 +0000
+++ 0011-fix-global-variable-issues.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 9757358342a089e9d3e770cc3e4b4b1289d65abe Mon Sep 17 00:00:00 2001
+From 5e60edf80f1b1170da5cdb6b6ab05115e250a209 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 23:57:40 +0000
 Subject: [PATCH] fix global variable issues
 
+[ upstream commit 9757358342a089e9d3e770cc3e4b4b1289d65abe ]
+
 Various fixes related to the global variable usage.
 
 Fixes: 43e610bb8565 ("compress/octeontx: introduce octeontx zip PMD")
@@ -11,7 +13,6 @@
 Fixes: b1ce8ebd97ba ("eventdev: add PMD callbacks for eth Rx adapter")
 Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
 Fixes: fefed3d1e62c ("enic: new driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
@@ -68,16 +69,16 @@
  
  
 diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
-index c5e891cdb..a273d4c96 100644
+index 16a3a04b8..44243e0fc 100644
 --- a/drivers/event/octeontx/ssovf_evdev.c
 +++ b/drivers/event/octeontx/ssovf_evdev.c
-@@ -456,5 +456,4 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
+@@ -455,5 +455,4 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
  	pki_del_qos_t pki_qos;
  	RTE_SET_USED(dev);
 -	RTE_SET_USED(rx_queue_id);
  
  	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
-@@ -468,5 +467,5 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
+@@ -467,5 +466,5 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
  	if (ret < 0)
  		ssovf_log_err("Failed to delete QOS port=%d, q=%d",
 -				nic->port_id, queue_conf->ev.queue_id);
@@ -85,10 +86,10 @@
  	return ret;
  }
 diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
-index 1a129f414..996bb5542 100644
+index fa2f4709a..4cb17dfc7 100644
 --- a/drivers/net/enic/enic_ethdev.c
 +++ b/drivers/net/enic/enic_ethdev.c
-@@ -1031,5 +1031,4 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
+@@ -1021,5 +1021,4 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
  }
  
 -struct enic *enicpmd_list_head = NULL;
@@ -105,17 +106,17 @@
  
  	/* Iterate through a WRR sequence */
 diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
-index 792fb3a23..aa6e52c63 100644
+index 3fbb4d2b2..2e9dd494b 100644
 --- a/lib/librte_eventdev/rte_eventdev_pmd.h
 +++ b/lib/librte_eventdev/rte_eventdev_pmd.h
-@@ -468,5 +468,5 @@ typedef int (*eventdev_eth_rx_adapter_caps_get_t)
+@@ -451,5 +451,5 @@ typedef int (*eventdev_eth_rx_adapter_caps_get_t)
  					uint32_t *caps);
  
 -struct rte_event_eth_rx_adapter_queue_conf *queue_conf;
 +struct rte_event_eth_rx_adapter_queue_conf;
  
  /**
-@@ -593,5 +593,5 @@ typedef int (*eventdev_eth_rx_adapter_stop_t)
+@@ -576,5 +576,5 @@ typedef int (*eventdev_eth_rx_adapter_stop_t)
  					const struct rte_eth_dev *eth_dev);
  
 -struct rte_event_eth_rx_adapter_stats *stats;

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

* [dpdk-stable] patch 'net/virtio: register/unregister intr handler on start/stop' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (9 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'fix global variable issues' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: handle UIO read failure in interrupt handler' " Kevin Traynor
                   ` (56 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Brian Russell, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 6771b50519140b37d4477eab061aef81a4ea0be0 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Wed, 31 Oct 2018 18:39:43 +0000
Subject: [PATCH] net/virtio: register/unregister intr handler on start/stop

[ upstream commit f9b0d1902caf893493b5e07763ecf817c34fc75c ]

Register and unregister the virtio interrupt handler when the device is
started and stopped. This allows a virtio device to be hotplugged or
unplugged.

Fixes: c1f86306a026 ("virtio: add new driver")

Signed-off-by: Brian Russell <brussell@brocade.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 614357da7..3195443a1 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1680,9 +1680,4 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 		goto out;
 
-	/* Setup interrupt callback  */
-	if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
-		rte_intr_callback_register(eth_dev->intr_handle,
-			virtio_interrupt_handler, eth_dev);
-
 	return 0;
 
@@ -1710,9 +1705,4 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
 	eth_dev->data->mac_addrs = NULL;
 
-	/* reset interrupt callback  */
-	if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
-		rte_intr_callback_unregister(eth_dev->intr_handle,
-						virtio_interrupt_handler,
-						eth_dev);
 	if (eth_dev->device)
 		rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
@@ -1973,4 +1963,10 @@ virtio_dev_start(struct rte_eth_dev *dev)
 		virtio_intr_disable(dev);
 
+		/* Setup interrupt callback  */
+		if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+			rte_intr_callback_register(dev->intr_handle,
+						   virtio_interrupt_handler,
+						   dev);
+
 		if (virtio_intr_enable(dev) < 0) {
 			PMD_DRV_LOG(ERR, "interrupt enable failed");
@@ -2082,7 +2078,15 @@ virtio_dev_stop(struct rte_eth_dev *dev)
 
 	rte_spinlock_lock(&hw->state_lock);
-	if (intr_conf->lsc || intr_conf->rxq)
+	if (intr_conf->lsc || intr_conf->rxq) {
 		virtio_intr_disable(dev);
 
+		/* Reset interrupt callback  */
+		if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+			rte_intr_callback_unregister(dev->intr_handle,
+						     virtio_interrupt_handler,
+						     dev);
+		}
+	}
+
 	hw->started = 0;
 	memset(&link, 0, sizeof(link));
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.559733834 +0000
+++ 0012-net-virtio-register-unregister-intr-handler-on-start.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From f9b0d1902caf893493b5e07763ecf817c34fc75c Mon Sep 17 00:00:00 2001
+From 6771b50519140b37d4477eab061aef81a4ea0be0 Mon Sep 17 00:00:00 2001
 From: Luca Boccassi <bluca@debian.org>
 Date: Wed, 31 Oct 2018 18:39:43 +0000
 Subject: [PATCH] net/virtio: register/unregister intr handler on start/stop
 
+[ upstream commit f9b0d1902caf893493b5e07763ecf817c34fc75c ]
+
 Register and unregister the virtio interrupt handler when the device is
 started and stopped. This allows a virtio device to be hotplugged or
 unplugged.
 
 Fixes: c1f86306a026 ("virtio: add new driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Brian Russell <brussell@brocade.com>
 Signed-off-by: Luca Boccassi <bluca@debian.org>
@@ -18,7 +19,7 @@
  1 file changed, 15 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
-index 10a7e3fcc..da8717726 100644
+index 614357da7..3195443a1 100644
 --- a/drivers/net/virtio/virtio_ethdev.c
 +++ b/drivers/net/virtio/virtio_ethdev.c
 @@ -1680,9 +1680,4 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
@@ -31,8 +32,8 @@
 -
  	return 0;
  
-@@ -1707,9 +1702,4 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
- 	eth_dev->rx_pkt_burst = NULL;
+@@ -1710,9 +1705,4 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
+ 	eth_dev->data->mac_addrs = NULL;
  
 -	/* reset interrupt callback  */
 -	if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
@@ -41,7 +42,7 @@
 -						eth_dev);
  	if (eth_dev->device)
  		rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
-@@ -1970,4 +1960,10 @@ virtio_dev_start(struct rte_eth_dev *dev)
+@@ -1973,4 +1963,10 @@ virtio_dev_start(struct rte_eth_dev *dev)
  		virtio_intr_disable(dev);
  
 +		/* Setup interrupt callback  */
@@ -52,7 +53,7 @@
 +
  		if (virtio_intr_enable(dev) < 0) {
  			PMD_DRV_LOG(ERR, "interrupt enable failed");
-@@ -2079,7 +2075,15 @@ virtio_dev_stop(struct rte_eth_dev *dev)
+@@ -2082,7 +2078,15 @@ virtio_dev_stop(struct rte_eth_dev *dev)
  
  	rte_spinlock_lock(&hw->state_lock);
 -	if (intr_conf->lsc || intr_conf->rxq)

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

* [dpdk-stable] patch 'eal/linux: handle UIO read failure in interrupt handler' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (10 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: register/unregister intr handler on start/stop' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/vm_power: respect maximum CPUs' " Kevin Traynor
                   ` (55 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Brian Russell, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 59824b4c554cab7bbd48a0a3112fe1a8f9241f4f Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Wed, 31 Oct 2018 18:39:45 +0000
Subject: [PATCH] eal/linux: handle UIO read failure in interrupt handler

[ upstream commit 349ac52bbc5264d774c7e28c62c4e3941055b9c4 ]

If a device is unplugged while an interrupt is pending, the
read call to the uio device to remove it from the poll wait list
can fail resulting in it being continually polled forever. This
change checks for the read failing and if so, unregisters the device
as an interrupt source and causes the wait list to be rebuilt.

This race has been reported and observed in production.

Fixes: 0a45657a6794 ("pci: rework interrupt handling")

Signed-off-by: Brian Russell <brussell@brocade.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 4076c6d6c..34584db88 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -628,5 +628,5 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 	int n, bytes_read;
 	struct rte_intr_source *src;
-	struct rte_intr_callback *cb;
+	struct rte_intr_callback *cb, *next;
 	union rte_intr_read_buffer buf;
 	struct rte_intr_callback active_cb;
@@ -702,4 +702,21 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 					events[n].data.fd,
 					strerror(errno));
+				/*
+				 * The device is unplugged or buggy, remove
+				 * it as an interrupt source and return to
+				 * force the wait list to be rebuilt.
+				 */
+				rte_spinlock_lock(&intr_lock);
+				TAILQ_REMOVE(&intr_sources, src, next);
+				rte_spinlock_unlock(&intr_lock);
+
+				for (cb = TAILQ_FIRST(&src->callbacks); cb;
+							cb = next) {
+					next = TAILQ_NEXT(cb, next);
+					TAILQ_REMOVE(&src->callbacks, cb, next);
+					free(cb);
+				}
+				free(src);
+				return -1;
 			} else if (bytes_read == 0)
 				RTE_LOG(ERR, EAL, "Read nothing from file "
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.583949694 +0000
+++ 0013-eal-linux-handle-UIO-read-failure-in-interrupt-handl.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 349ac52bbc5264d774c7e28c62c4e3941055b9c4 Mon Sep 17 00:00:00 2001
+From 59824b4c554cab7bbd48a0a3112fe1a8f9241f4f Mon Sep 17 00:00:00 2001
 From: Luca Boccassi <bluca@debian.org>
 Date: Wed, 31 Oct 2018 18:39:45 +0000
 Subject: [PATCH] eal/linux: handle UIO read failure in interrupt handler
 
+[ upstream commit 349ac52bbc5264d774c7e28c62c4e3941055b9c4 ]
+
 If a device is unplugged while an interrupt is pending, the
 read call to the uio device to remove it from the poll wait list
 can fail resulting in it being continually polled forever. This
@@ -12,7 +14,6 @@
 This race has been reported and observed in production.
 
 Fixes: 0a45657a6794 ("pci: rework interrupt handling")
-Cc: stable@dpdk.org
 
 Signed-off-by: Brian Russell <brussell@brocade.com>
 Signed-off-by: Luca Boccassi <bluca@debian.org>
@@ -21,17 +22,17 @@
  1 file changed, 18 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
-index 39252a887..cbac451e1 100644
+index 4076c6d6c..34584db88 100644
 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
 +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
-@@ -701,5 +701,5 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
+@@ -628,5 +628,5 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
  	int n, bytes_read;
  	struct rte_intr_source *src;
 -	struct rte_intr_callback *cb;
 +	struct rte_intr_callback *cb, *next;
  	union rte_intr_read_buffer buf;
  	struct rte_intr_callback active_cb;
-@@ -781,4 +781,21 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
+@@ -702,4 +702,21 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
  					events[n].data.fd,
  					strerror(errno));
 +				/*

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

* [dpdk-stable] patch 'examples/vm_power: respect maximum CPUs' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (11 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: handle UIO read failure in interrupt handler' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'mk: disable gcc AVX512F support' " Kevin Traynor
                   ` (54 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: David Hunt; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From f604582776562e7788dcc616e3e884ddd123456b Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 31 Oct 2018 11:50:32 +0000
Subject: [PATCH] examples/vm_power: respect maximum CPUs

[ upstream commit c12ade20c27658d488439a55f4b6d88a6f0637bf ]

The vm_power_manager app was not respecting the POWER_MGR_MAX_CPUS
during initialisation, so if there were more CPUs than this value (64),
it would lead to buffer overruns of there were more then 64 cores in
the system.

Added in a check during init and un-init to only initialise up to
lcore_id 63.

This raises the question as to why not simply increase the value of
POWER_MGR_MAX_CPUS. Well, it's not that simple, as many of the APIs take
a uint64_t as a parameter for the core mask, and this will not work for
cores greater than 63. So some work needs to be done in the future to
remove this limitation. For now we'll fix the memory corruption.

Also, the patch that this fixes says "allow greater than 64 cores" but
that's not across the entire application, it's only for the out-of-band
monitoring. I'll add a notice for an API change in the next release to
clean this up, i.e. depricate any API calls that use masks.

Fixes: 6453b9284b64 ("examples/vm_power: allow greater than 64 cores")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/power_manager.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c
index b7769c3c3..f9e8c0abd 100644
--- a/examples/vm_power_manager/power_manager.c
+++ b/examples/vm_power_manager/power_manager.c
@@ -96,4 +96,5 @@ power_manager_init(void)
 	int ret = 0;
 	struct core_info *ci;
+	unsigned int max_core_num;
 
 	rte_power_set_env(PM_ENV_ACPI_CPUFREQ);
@@ -106,5 +107,10 @@ power_manager_init(void)
 	}
 
-	for (i = 0; i < ci->core_count; i++) {
+	if (ci->core_count > POWER_MGR_MAX_CPUS)
+		max_core_num = POWER_MGR_MAX_CPUS;
+	else
+		max_core_num = ci->core_count;
+
+	for (i = 0; i < max_core_num; i++) {
 		if (ci->cd[i].global_enabled_cpus) {
 			if (rte_power_init(i) < 0)
@@ -166,4 +172,5 @@ power_manager_exit(void)
 	int ret = 0;
 	struct core_info *ci;
+	unsigned int max_core_num;
 
 	ci = get_core_info();
@@ -174,5 +181,10 @@ power_manager_exit(void)
 	}
 
-	for (i = 0; i < ci->core_count; i++) {
+	if (ci->core_count > POWER_MGR_MAX_CPUS)
+		max_core_num = POWER_MGR_MAX_CPUS;
+	else
+		max_core_num = ci->core_count;
+
+	for (i = 0; i < max_core_num; i++) {
 		if (ci->cd[i].global_enabled_cpus) {
 			if (rte_power_exit(i) < 0) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.609972791 +0000
+++ 0014-examples-vm_power-respect-maximum-CPUs.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From c12ade20c27658d488439a55f4b6d88a6f0637bf Mon Sep 17 00:00:00 2001
+From f604582776562e7788dcc616e3e884ddd123456b Mon Sep 17 00:00:00 2001
 From: David Hunt <david.hunt@intel.com>
 Date: Wed, 31 Oct 2018 11:50:32 +0000
 Subject: [PATCH] examples/vm_power: respect maximum CPUs
 
+[ upstream commit c12ade20c27658d488439a55f4b6d88a6f0637bf ]
+
 The vm_power_manager app was not respecting the POWER_MGR_MAX_CPUS
 during initialisation, so if there were more CPUs than this value (64),
 it would lead to buffer overruns of there were more then 64 cores in
@@ -23,7 +25,6 @@
 clean this up, i.e. depricate any API calls that use masks.
 
 Fixes: 6453b9284b64 ("examples/vm_power: allow greater than 64 cores")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Hunt <david.hunt@intel.com>
 ---

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

* [dpdk-stable] patch 'mk: disable gcc AVX512F support' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (12 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/vm_power: respect maximum CPUs' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'crypto/scheduler: fix build with gcc 8.2' " Kevin Traynor
                   ` (53 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 7eb9c15c03b76ad9649356e1c52e21caf921f1aa Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Sat, 3 Nov 2018 01:06:32 +0000
Subject: [PATCH] mk: disable gcc AVX512F support

[ upstream commit 8d07c82b239f7782be0d3afbb626390e2cb0c8f5 ]

This is a workaround to prevent a crash, which might be caused by
optimization of newer gcc (7.3.0) on Intel Skylake.

This disables AVX512F support of gcc by adding -mno-avx512f if it is
disabled in DPDK (CONFIG_RTE_ENABLE_AVX512=n).

This does not apply to the meson build as that doesn't have such an option
but always enable AVX512F whenever supported.

Bugzilla ID: 97

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 mk/rte.cpuflags.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 43ed84155..c3291b17a 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -69,4 +69,9 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
 ifeq ($(CONFIG_RTE_ENABLE_AVX512),y)
 CPUFLAGS += AVX512F
+else
+# disable AVX512F support of gcc as a workaround for Bug 97
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+MACHINE_CFLAGS += -mno-avx512f
+endif
 endif
 endif
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.633556224 +0000
+++ 0015-mk-disable-gcc-AVX512F-support.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 8d07c82b239f7782be0d3afbb626390e2cb0c8f5 Mon Sep 17 00:00:00 2001
+From 7eb9c15c03b76ad9649356e1c52e21caf921f1aa Mon Sep 17 00:00:00 2001
 From: Yongseok Koh <yskoh@mellanox.com>
 Date: Sat, 3 Nov 2018 01:06:32 +0000
 Subject: [PATCH] mk: disable gcc AVX512F support
 
+[ upstream commit 8d07c82b239f7782be0d3afbb626390e2cb0c8f5 ]
+
 This is a workaround to prevent a crash, which might be caused by
 optimization of newer gcc (7.3.0) on Intel Skylake.
 
@@ -13,7 +15,6 @@
 but always enable AVX512F whenever supported.
 
 Bugzilla ID: 97
-Cc: stable@dpdk.org
 
 Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
 ---

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

* [dpdk-stable] patch 'crypto/scheduler: fix build with gcc 8.2' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (13 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'mk: disable gcc AVX512F support' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/dpaa: fix build with gcc 9.0' " Kevin Traynor
                   ` (52 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e6ce271d4197e252debbea4a840243748fb14bf4 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Sat, 3 Nov 2018 14:58:53 +0000
Subject: [PATCH] crypto/scheduler: fix build with gcc 8.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff ]

build_error:

drivers/crypto/scheduler/scheduler_pmd.c: In function ‘parse_name_arg’:
drivers/crypto/scheduler/scheduler_pmd.c:372:2: error: ‘strncpy’
specified bound 64 equals destination size [-Werror=stringop-truncation]
  strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
strncpy may result a not null-terminated string,
replaced it with strlcpy

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index a9221a946..71a48b65c 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -370,5 +370,5 @@ parse_name_arg(const char *key __rte_unused,
 	}
 
-	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+	strlcpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
 
 	return 0;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.657670307 +0000
+++ 0016-crypto-scheduler-fix-build-with-gcc-8.2.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,4 +1,4 @@
-From e5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff Mon Sep 17 00:00:00 2001
+From e6ce271d4197e252debbea4a840243748fb14bf4 Mon Sep 17 00:00:00 2001
 From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
 Date: Sat, 3 Nov 2018 14:58:53 +0000
 Subject: [PATCH] crypto/scheduler: fix build with gcc 8.2
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit e5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff ]
+
 build_error:
 
 drivers/crypto/scheduler/scheduler_pmd.c: In function ‘parse_name_arg’:
@@ -17,7 +19,6 @@
 replaced it with strlcpy
 
 Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
 ---
@@ -25,7 +26,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
-index 20198ccb0..a1632a2b9 100644
+index a9221a946..71a48b65c 100644
 --- a/drivers/crypto/scheduler/scheduler_pmd.c
 +++ b/drivers/crypto/scheduler/scheduler_pmd.c
 @@ -370,5 +370,5 @@ parse_name_arg(const char *key __rte_unused,

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

* [dpdk-stable] patch 'bus/dpaa: fix build with gcc 9.0' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (14 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'crypto/scheduler: fix build with gcc 8.2' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal: " Kevin Traynor
                   ` (51 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From dd595243159bfc6f50b7129c7d4aa0d8ee75eaed Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 2 Nov 2018 19:06:05 +0000
Subject: [PATCH] bus/dpaa: fix build with gcc 9.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 74f277101265ff3376c65270da2dcbc6d1325494 ]

build error:
In function ‘fman_if_init’,
    .../drivers/bus/dpaa/base/fman/fman.c:186:2:
    error: ‘strncpy’ output may be truncated copying 4095 bytes from a
           string of length 4095 [-Werror=stringop-truncation]
    strncpy(__if->node_path, dpa_node->full_name, PATH_MAX - 1);

strncpy may result a not null-terminated string,
replaced it with strlcpy

Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/bus/dpaa/base/fman/fman.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index bdb700423..06762e0f4 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -14,4 +14,5 @@
 #include <of.h>
 #include <rte_dpaa_logs.h>
+#include <rte_string_fns.h>
 
 #define QMI_PORT_REGS_OFFSET		0x400
@@ -184,5 +185,5 @@ fman_if_init(const struct device_node *dpa_node)
 	memset(__if, 0, sizeof(*__if));
 	INIT_LIST_HEAD(&__if->__if.bpool_list);
-	strncpy(__if->node_path, dpa_node->full_name, PATH_MAX - 1);
+	strlcpy(__if->node_path, dpa_node->full_name, PATH_MAX - 1);
 	__if->node_path[PATH_MAX - 1] = '\0';
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.680269571 +0000
+++ 0017-bus-dpaa-fix-build-with-gcc-9.0.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,4 +1,4 @@
-From 74f277101265ff3376c65270da2dcbc6d1325494 Mon Sep 17 00:00:00 2001
+From dd595243159bfc6f50b7129c7d4aa0d8ee75eaed Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Fri, 2 Nov 2018 19:06:05 +0000
 Subject: [PATCH] bus/dpaa: fix build with gcc 9.0
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 74f277101265ff3376c65270da2dcbc6d1325494 ]
+
 build error:
 In function ‘fman_if_init’,
     .../drivers/bus/dpaa/base/fman/fman.c:186:2:
@@ -17,7 +19,6 @@
 replaced it with strlcpy
 
 Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---

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

* [dpdk-stable] patch 'eal: fix build with gcc 9.0' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (15 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/dpaa: fix build with gcc 9.0' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix shaper profile parameters' " Kevin Traynor
                   ` (50 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b73ce2d5b1941a65ca48b25309f742ff571dd423 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 2 Nov 2018 19:06:06 +0000
Subject: [PATCH] eal: fix build with gcc 9.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 3370975b994d793a89812031d86534916067dd67 ]

build error:
In function ‘eal_plugin_add’,
    .../lib/librte_eal/common/eal_common_options.c:225:2:
    error: ‘strncpy’ output may be truncated copying 4095 bytes from a
           string of length 4095 [-Werror=stringop-truncation]
    strncpy(solib->name, path, PATH_MAX-1);

strncpy may result a not null-terminated string,
replaced it with strlcpy

Fixes: f9a08f650211 ("eal: add support for shared object drivers")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 873099acc..eb572587a 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -221,5 +221,5 @@ eal_plugin_add(const char *path)
 	}
 	memset(solib, 0, sizeof(*solib));
-	strncpy(solib->name, path, PATH_MAX-1);
+	strlcpy(solib->name, path, PATH_MAX-1);
 	solib->name[PATH_MAX-1] = 0;
 	TAILQ_INSERT_TAIL(&solib_list, solib, next);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.704048024 +0000
+++ 0018-eal-fix-build-with-gcc-9.0.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,4 +1,4 @@
-From 3370975b994d793a89812031d86534916067dd67 Mon Sep 17 00:00:00 2001
+From b73ce2d5b1941a65ca48b25309f742ff571dd423 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Fri, 2 Nov 2018 19:06:06 +0000
 Subject: [PATCH] eal: fix build with gcc 9.0
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 3370975b994d793a89812031d86534916067dd67 ]
+
 build error:
 In function ‘eal_plugin_add’,
     .../lib/librte_eal/common/eal_common_options.c:225:2:
@@ -17,7 +19,6 @@
 replaced it with strlcpy
 
 Fixes: f9a08f650211 ("eal: add support for shared object drivers")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
@@ -25,10 +26,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index b82f3ddd1..e31eca5c0 100644
+index 873099acc..eb572587a 100644
 --- a/lib/librte_eal/common/eal_common_options.c
 +++ b/lib/librte_eal/common/eal_common_options.c
-@@ -223,5 +223,5 @@ eal_plugin_add(const char *path)
+@@ -221,5 +221,5 @@ eal_plugin_add(const char *path)
  	}
  	memset(solib, 0, sizeof(*solib));
 -	strncpy(solib->name, path, PATH_MAX-1);

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

* [dpdk-stable] patch 'app/testpmd: fix shaper profile parameters' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (16 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'eal: " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix RED byte stats' " Kevin Traynor
                   ` (49 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Rosen Xu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 1556c205ea66059819a54c6a8ce6ba8a663c75db Mon Sep 17 00:00:00 2001
From: Rosen Xu <rosen.xu@intel.com>
Date: Mon, 22 Oct 2018 16:46:40 +0800
Subject: [PATCH] app/testpmd: fix shaper profile parameters

[ upstream commit c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 ]

As struct rte_tm_shaper_params defined, the command line of
testpmd should include committed and peak parameters, but
right now the command line doesn't identify whether it's
committed or peak parameter. This patch identifies and
adds the clarify definition

Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred profiles")

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
---
 app/test-pmd/cmdline.c                      |  3 +-
 app/test-pmd/cmdline_tm.c                   | 34 +++++++++++++++------
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  9 ++++--
 3 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 69c8e0499..3b24aac8b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -725,5 +725,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 
 			"add port tm node shaper profile (port_id) (shaper_profile_id)"
-			" (tb_rate) (tb_size) (packet_length_adjust)\n"
+			" (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)"
+			" (packet_length_adjust)\n"
 			"	Add port tm node private shaper profile.\n\n"
 
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 631f17995..8ee2785ad 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -772,6 +772,8 @@ struct cmd_add_port_tm_node_shaper_profile_result {
 	uint16_t port_id;
 	uint32_t shaper_id;
-	uint64_t tb_rate;
-	uint64_t tb_size;
+	uint64_t cmit_tb_rate;
+	uint64_t cmit_tb_size;
+	uint64_t peak_tb_rate;
+	uint64_t peak_tb_size;
 	uint32_t pktlen_adjust;
 };
@@ -808,12 +810,20 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_shaper_id =
 		struct cmd_add_port_tm_node_shaper_profile_result,
 			shaper_id, UINT32);
-cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_tb_rate =
+cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_cmit_tb_rate =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_shaper_profile_result,
-			tb_rate, UINT64);
-cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_tb_size =
+			cmit_tb_rate, UINT64);
+cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_cmit_tb_size =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_shaper_profile_result,
-			tb_size, UINT64);
+			cmit_tb_size, UINT64);
+cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_peak_tb_rate =
+	TOKEN_NUM_INITIALIZER(
+		struct cmd_add_port_tm_node_shaper_profile_result,
+			peak_tb_rate, UINT64);
+cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_peak_tb_size =
+	TOKEN_NUM_INITIALIZER(
+		struct cmd_add_port_tm_node_shaper_profile_result,
+			peak_tb_size, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_pktlen_adjust =
 	TOKEN_NUM_INITIALIZER(
@@ -839,6 +849,8 @@ static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result,
 	memset(&sp, 0, sizeof(struct rte_tm_shaper_params));
 	memset(&error, 0, sizeof(struct rte_tm_error));
-	sp.peak.rate = res->tb_rate;
-	sp.peak.size = res->tb_size;
+	sp.committed.rate = res->cmit_tb_rate;
+	sp.committed.size = res->cmit_tb_size;
+	sp.peak.rate = res->peak_tb_rate;
+	sp.peak.size = res->peak_tb_size;
 	sp.pkt_length_adjust = pkt_len_adjust;
 
@@ -863,6 +875,8 @@ cmdline_parse_inst_t cmd_add_port_tm_node_shaper_profile = {
 		(void *)&cmd_add_port_tm_node_shaper_profile_port_id,
 		(void *)&cmd_add_port_tm_node_shaper_profile_shaper_id,
-		(void *)&cmd_add_port_tm_node_shaper_profile_tb_rate,
-		(void *)&cmd_add_port_tm_node_shaper_profile_tb_size,
+		(void *)&cmd_add_port_tm_node_shaper_profile_cmit_tb_rate,
+		(void *)&cmd_add_port_tm_node_shaper_profile_cmit_tb_size,
+		(void *)&cmd_add_port_tm_node_shaper_profile_peak_tb_rate,
+		(void *)&cmd_add_port_tm_node_shaper_profile_peak_tb_size,
 		(void *)&cmd_add_port_tm_node_shaper_profile_pktlen_adjust,
 		NULL,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index c3e4005d6..c82094eca 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2452,11 +2452,14 @@ Add the port traffic management private shaper profile::
 
    testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \
-   (tb_rate) (tb_size) (packet_length_adjust)
+   (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size) \
+   (packet_length_adjust)
 
 where:
 
 * ``shaper_profile id``: Shaper profile ID for the new profile.
-* ``tb_rate``: Token bucket rate (bytes per second).
-* ``tb_size``: Token bucket size (bytes).
+* ``cmit_tb_rate``: Committed token bucket rate (bytes per second).
+* ``cmit_tb_size``: Committed token bucket size (bytes).
+* ``peak_tb_rate``: Peak token bucket rate (bytes per second).
+* ``peak_tb_size``: Peak token bucket size (bytes).
 * ``packet_length_adjust``: The value (bytes) to be added to the length of
   each packet for the purpose of shaping. This parameter value can be used to
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.729538821 +0000
+++ 0019-app-testpmd-fix-shaper-profile-parameters.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 Mon Sep 17 00:00:00 2001
+From 1556c205ea66059819a54c6a8ce6ba8a663c75db Mon Sep 17 00:00:00 2001
 From: Rosen Xu <rosen.xu@intel.com>
 Date: Mon, 22 Oct 2018 16:46:40 +0800
 Subject: [PATCH] app/testpmd: fix shaper profile parameters
 
+[ upstream commit c2c15f769ab978c8ec5f9e17bd7ae2d63176f276 ]
+
 As struct rte_tm_shaper_params defined, the command line of
 testpmd should include committed and peak parameters, but
 right now the command line doesn't identify whether it's
@@ -10,7 +12,6 @@
 adds the clarify definition
 
 Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred profiles")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rosen Xu <rosen.xu@intel.com>
 ---
@@ -20,10 +21,10 @@
  3 files changed, 32 insertions(+), 14 deletions(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index 1050fde96..c38367981 100644
+index 69c8e0499..3b24aac8b 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -729,5 +729,6 @@ static void cmd_help_long_parsed(void *parsed_result,
+@@ -725,5 +725,6 @@ static void cmd_help_long_parsed(void *parsed_result,
  
  			"add port tm node shaper profile (port_id) (shaper_profile_id)"
 -			" (tb_rate) (tb_size) (packet_length_adjust)\n"
@@ -32,7 +33,7 @@
  			"	Add port tm node private shaper profile.\n\n"
  
 diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
-index b43079746..4c763482a 100644
+index 631f17995..8ee2785ad 100644
 --- a/app/test-pmd/cmdline_tm.c
 +++ b/app/test-pmd/cmdline_tm.c
 @@ -772,6 +772,8 @@ struct cmd_add_port_tm_node_shaper_profile_result {
@@ -94,10 +95,10 @@
  		(void *)&cmd_add_port_tm_node_shaper_profile_pktlen_adjust,
  		NULL,
 diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-index e23079b6d..e3c4606d1 100644
+index c3e4005d6..c82094eca 100644
 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-@@ -2586,11 +2586,14 @@ Add the port traffic management private shaper profile::
+@@ -2452,11 +2452,14 @@ Add the port traffic management private shaper profile::
  
     testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \
 -   (tb_rate) (tb_size) (packet_length_adjust)

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

* [dpdk-stable] patch 'app/testpmd: fix RED byte stats' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (17 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix shaper profile parameters' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/ip_pipeline: fix port and table stats read' " Kevin Traynor
                   ` (48 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Leah Tekoa; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 51054444b66acd4aec2314f083e2720193f5aedb Mon Sep 17 00:00:00 2001
From: Leah Tekoa <leah@ethernitynet.com>
Date: Thu, 25 Oct 2018 06:05:14 +0000
Subject: [PATCH] app/testpmd: fix RED byte stats

[ upstream commit 930a030d2afbd46b7a446305c9c9ae16a5a3b099 ]

Y stands for Yellow, R stands for Red.

Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")

Signed-off-by: Leah Tekoa <leah@ethernitynet.com>
---
 app/test-pmd/cmdline_mtr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index 32a47305f..63f32828f 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -1441,5 +1441,5 @@ static void cmd_show_port_meter_stats_parsed(void *parsed_result,
 			stats.n_pkts[RTE_MTR_RED]);
 	if (stats_mask & RTE_MTR_STATS_N_BYTES_RED)
-		printf("\tBytes Y: %" PRIu64 "\n",
+		printf("\tBytes R: %" PRIu64 "\n",
 			stats.n_bytes[RTE_MTR_RED]);
 	if (stats_mask & RTE_MTR_STATS_N_PKTS_DROPPED)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.776918009 +0000
+++ 0020-app-testpmd-fix-RED-byte-stats.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,12 +1,13 @@
-From 930a030d2afbd46b7a446305c9c9ae16a5a3b099 Mon Sep 17 00:00:00 2001
+From 51054444b66acd4aec2314f083e2720193f5aedb Mon Sep 17 00:00:00 2001
 From: Leah Tekoa <leah@ethernitynet.com>
 Date: Thu, 25 Oct 2018 06:05:14 +0000
 Subject: [PATCH] app/testpmd: fix RED byte stats
 
+[ upstream commit 930a030d2afbd46b7a446305c9c9ae16a5a3b099 ]
+
 Y stands for Yellow, R stands for Red.
 
 Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Leah Tekoa <leah@ethernitynet.com>
 ---

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

* [dpdk-stable] patch 'examples/ip_pipeline: fix port and table stats read' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (18 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix RED byte stats' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'crypto/openssl: fix RSA verify operation' " Kevin Traynor
                   ` (47 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Jasvinder Singh, Hongjun Ni, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9f42c99f9fa195ce4afa24072d6453a53ee99802 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Tue, 30 Oct 2018 18:44:09 +0000
Subject: [PATCH] examples/ip_pipeline: fix port and table stats read

[ upstream commit c4160d303026ed11707e4a3a7a2e12b9be863d5a ]

Fix the pipeline port and table stats read operation.

Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
---
 examples/ip_pipeline/thread.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index b00ea0653..a6d665984 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -813,5 +813,5 @@ pipeline_port_in_stats_read(const char *pipeline_name,
 	/* Read response */
 	status = rsp->status;
-	if (status)
+	if (status == 0)
 		memcpy(stats, &rsp->port_in_stats_read.stats, sizeof(*stats));
 
@@ -961,5 +961,5 @@ pipeline_port_out_stats_read(const char *pipeline_name,
 	/* Read response */
 	status = rsp->status;
-	if (status)
+	if (status == 0)
 		memcpy(stats, &rsp->port_out_stats_read.stats, sizeof(*stats));
 
@@ -1017,5 +1017,5 @@ pipeline_table_stats_read(const char *pipeline_name,
 	/* Read response */
 	status = rsp->status;
-	if (status)
+	if (status == 0)
 		memcpy(stats, &rsp->table_stats_read.stats, sizeof(*stats));
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.801790701 +0000
+++ 0021-examples-ip_pipeline-fix-port-and-table-stats-read.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,12 +1,13 @@
-From c4160d303026ed11707e4a3a7a2e12b9be863d5a Mon Sep 17 00:00:00 2001
+From 9f42c99f9fa195ce4afa24072d6453a53ee99802 Mon Sep 17 00:00:00 2001
 From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 Date: Tue, 30 Oct 2018 18:44:09 +0000
 Subject: [PATCH] examples/ip_pipeline: fix port and table stats read
 
+[ upstream commit c4160d303026ed11707e4a3a7a2e12b9be863d5a ]
+
 Fix the pipeline port and table stats read operation.
 
 Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands")
-Cc: stable@dpdk.org
 
 Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
@@ -16,24 +17,24 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
-index e1b6fb684..272fbbeed 100644
+index b00ea0653..a6d665984 100644
 --- a/examples/ip_pipeline/thread.c
 +++ b/examples/ip_pipeline/thread.c
-@@ -821,5 +821,5 @@ pipeline_port_in_stats_read(const char *pipeline_name,
+@@ -813,5 +813,5 @@ pipeline_port_in_stats_read(const char *pipeline_name,
  	/* Read response */
  	status = rsp->status;
 -	if (status)
 +	if (status == 0)
  		memcpy(stats, &rsp->port_in_stats_read.stats, sizeof(*stats));
  
-@@ -969,5 +969,5 @@ pipeline_port_out_stats_read(const char *pipeline_name,
+@@ -961,5 +961,5 @@ pipeline_port_out_stats_read(const char *pipeline_name,
  	/* Read response */
  	status = rsp->status;
 -	if (status)
 +	if (status == 0)
  		memcpy(stats, &rsp->port_out_stats_read.stats, sizeof(*stats));
  
-@@ -1025,5 +1025,5 @@ pipeline_table_stats_read(const char *pipeline_name,
+@@ -1017,5 +1017,5 @@ pipeline_table_stats_read(const char *pipeline_name,
  	/* Read response */
  	status = rsp->status;
 -	if (status)

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

* [dpdk-stable] patch 'crypto/openssl: fix RSA verify operation' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (19 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/ip_pipeline: fix port and table stats read' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'compressdev: clarify usage of op structure' " Kevin Traynor
                   ` (46 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Akash Saxena; +Cc: Ayuj Verma, Shally Verma, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 412c098e517c9f4cfe8a70457b9d32e28d81be65 Mon Sep 17 00:00:00 2001
From: Akash Saxena <akash.saxena@caviumnetworks.com>
Date: Thu, 25 Oct 2018 10:00:56 +0000
Subject: [PATCH] crypto/openssl: fix RSA verify operation

[ upstream commit fe1606e0138cdfd460a21cd3d5ac2a81884ee288 ]

In lib cryptodev, RSA verify operation inputs plain message text and
corresponding signature and expected to return
RTE_CRYPTO_OP_STATUS_SUCCESS/FAILURE on a signature match/mismatch.
Current OpenSSL PMD RSA verify implementation overrides application passed
sign input by decrypted output which isn't expected.

This patch addresses this issue in OpenSSL PMD. Now, OpenSSL PMD use
tmp buffer to pass to OpenSSL sign API and memcmp output with
original plain text to verify signature match.
Set op->status = RTE_CRYPTO_OP_STATUS_ERROR on signature mismatch.

Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations")

Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com>
Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d263aba3..e0fbbab84 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1843,4 +1843,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
 	RSA *rsa = sess->u.r.rsa;
 	uint32_t pad = (op->rsa.pad);
+	uint8_t *tmp;
+
+	cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
 
 	switch (pad) {
@@ -1895,7 +1898,13 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
 
 	case RTE_CRYPTO_ASYM_OP_VERIFY:
+		tmp = rte_malloc(NULL, op->rsa.sign.length, 0);
+		if (tmp == NULL) {
+			OPENSSL_LOG(ERR, "Memory allocation failed");
+			cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
+			break;
+		}
 		ret = RSA_public_decrypt(op->rsa.sign.length,
 				op->rsa.sign.data,
-				op->rsa.sign.data,
+				tmp,
 				rsa,
 				pad);
@@ -1905,11 +1914,10 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
 				"length of message %zd\n",
 				ret, op->rsa.message.length);
-
-		if (memcmp(op->rsa.sign.data, op->rsa.message.data,
-					op->rsa.message.length)) {
-			OPENSSL_LOG(ERR,
-					"RSA sign Verification failed");
-			return -1;
+		if ((ret <= 0) || (memcmp(tmp, op->rsa.message.data,
+				op->rsa.message.length))) {
+			OPENSSL_LOG(ERR, "RSA sign Verification failed");
+			cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
 		}
+		rte_free(tmp);
 		break;
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.830115159 +0000
+++ 0022-crypto-openssl-fix-RSA-verify-operation.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From fe1606e0138cdfd460a21cd3d5ac2a81884ee288 Mon Sep 17 00:00:00 2001
+From 412c098e517c9f4cfe8a70457b9d32e28d81be65 Mon Sep 17 00:00:00 2001
 From: Akash Saxena <akash.saxena@caviumnetworks.com>
 Date: Thu, 25 Oct 2018 10:00:56 +0000
 Subject: [PATCH] crypto/openssl: fix RSA verify operation
 
+[ upstream commit fe1606e0138cdfd460a21cd3d5ac2a81884ee288 ]
+
 In lib cryptodev, RSA verify operation inputs plain message text and
 corresponding signature and expected to return
 RTE_CRYPTO_OP_STATUS_SUCCESS/FAILURE on a signature match/mismatch.
@@ -15,7 +17,6 @@
 Set op->status = RTE_CRYPTO_OP_STATUS_ERROR on signature mismatch.
 
 Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com>
 Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
@@ -26,10 +27,10 @@
  1 file changed, 15 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
-index 003116dcc..11ea0d190 100644
+index 7d263aba3..e0fbbab84 100644
 --- a/drivers/crypto/openssl/rte_openssl_pmd.c
 +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
-@@ -1844,4 +1844,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
+@@ -1843,4 +1843,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
  	RSA *rsa = sess->u.r.rsa;
  	uint32_t pad = (op->rsa.pad);
 +	uint8_t *tmp;
@@ -37,7 +38,7 @@
 +	cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
  
  	switch (pad) {
-@@ -1896,7 +1899,13 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
+@@ -1895,7 +1898,13 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
  
  	case RTE_CRYPTO_ASYM_OP_VERIFY:
 +		tmp = rte_malloc(NULL, op->rsa.sign.length, 0);
@@ -52,7 +53,7 @@
 +				tmp,
  				rsa,
  				pad);
-@@ -1906,11 +1915,10 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
+@@ -1905,11 +1914,10 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
  				"length of message %zd\n",
  				ret, op->rsa.message.length);
 -

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

* [dpdk-stable] patch 'compressdev: clarify usage of op structure' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (20 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'crypto/openssl: fix RSA verify operation' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'compressdev: fix op allocation' " Kevin Traynor
                   ` (45 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Shally Verma, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From a83d3c6cfb66a89e3afae710c87c0074b00e187b Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Sat, 27 Oct 2018 01:13:54 +0100
Subject: [PATCH] compressdev: clarify usage of op structure

[ upstream commit 1fca14d7dd4fed32e67cb2622546552c57b00c38 ]

Add note on usage of op structure and when it can be
accessed and freed.

Fixes: 63f4bfd5328b ("compressdev: add enqueue/dequeue functions")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
---
 lib/librte_compressdev/rte_compressdev.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/librte_compressdev/rte_compressdev.h b/lib/librte_compressdev/rte_compressdev.h
index 5b4fca4dc..7b68170a5 100644
--- a/lib/librte_compressdev/rte_compressdev.h
+++ b/lib/librte_compressdev/rte_compressdev.h
@@ -409,4 +409,11 @@ rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
  * as the size of the output data is different to the size of the input data.
  *
+ * @note The rte_comp_op contains both input and output parameters and is the
+ * vehicle for the application to pass data into and out of the PMD. While an
+ * op is inflight, i.e. once it has been enqueued, the private_xform or stream
+ * attached to it and any mbufs or memory referenced by it should not be altered
+ * or freed by the application. The PMD may use or change some of this data at
+ * any time until it has been returned in a dequeue operation.
+ *
  * @note The flush flag only applies to operations which return SUCCESS.
  * In OUT_OF_SPACE cases whether STATEFUL or STATELESS, data in dest buffer
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.859824048 +0000
+++ 0023-compressdev-clarify-usage-of-op-structure.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 1fca14d7dd4fed32e67cb2622546552c57b00c38 Mon Sep 17 00:00:00 2001
+From a83d3c6cfb66a89e3afae710c87c0074b00e187b Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe@intel.com>
 Date: Sat, 27 Oct 2018 01:13:54 +0100
 Subject: [PATCH] compressdev: clarify usage of op structure
 
+[ upstream commit 1fca14d7dd4fed32e67cb2622546552c57b00c38 ]
+
 Add note on usage of op structure and when it can be
 accessed and freed.
 
 Fixes: 63f4bfd5328b ("compressdev: add enqueue/dequeue functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
 Acked-by: Shally Verma <shally.verma@caviumnetworks.com>

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

* [dpdk-stable] patch 'compressdev: fix op allocation' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (21 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'compressdev: clarify usage of op structure' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'compress/isal: fix uncleared compression states' " Kevin Traynor
                   ` (44 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Sabyasachi Sengupta, Shally Verma, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From d196689b3c83321988c198abc4e1f5d34e4f228e Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Sat, 27 Oct 2018 01:43:07 +0100
Subject: [PATCH] compressdev: fix op allocation

[ upstream commit 30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e ]

Fixed bad logic in rte_comp_op_alloc() checking return
value from rte_comp_op_raw_bulk_alloc(). This
could have resulted in a seg-fault in error case.
Made rte_comp_ob_bulk_alloc() code consistent
with rte_comp_op_alloc().

Fixes: 96086db5a369 ("compressdev: add operation management")

Reported-by: Sabyasachi Sengupta <sabyasg@hpe.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
---
 lib/librte_compressdev/rte_comp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index c663be595..4634c1274 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -175,5 +175,5 @@ rte_comp_op_alloc(struct rte_mempool *mempool)
 
 	retval = rte_comp_op_raw_bulk_alloc(mempool, &op, 1);
-	if (unlikely(retval < 0))
+	if (unlikely(retval != 1))
 		return NULL;
 
@@ -187,10 +187,10 @@ rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
 		struct rte_comp_op **ops, uint16_t nb_ops)
 {
-	int ret;
+	int retval;
 	uint16_t i;
 
-	ret = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops);
-	if (unlikely(ret < nb_ops))
-		return ret;
+	retval = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops);
+	if (unlikely(retval != nb_ops))
+		return 0;
 
 	for (i = 0; i < nb_ops; i++)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.883875540 +0000
+++ 0024-compressdev-fix-op-allocation.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e Mon Sep 17 00:00:00 2001
+From d196689b3c83321988c198abc4e1f5d34e4f228e Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe@intel.com>
 Date: Sat, 27 Oct 2018 01:43:07 +0100
 Subject: [PATCH] compressdev: fix op allocation
 
+[ upstream commit 30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e ]
+
 Fixed bad logic in rte_comp_op_alloc() checking return
 value from rte_comp_op_raw_bulk_alloc(). This
 could have resulted in a seg-fault in error case.
@@ -10,7 +12,6 @@
 with rte_comp_op_alloc().
 
 Fixes: 96086db5a369 ("compressdev: add operation management")
-Cc: stable@dpdk.org
 
 Reported-by: Sabyasachi Sengupta <sabyasg@hpe.com>
 Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>

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

* [dpdk-stable] patch 'compress/isal: fix uncleared compression states' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (22 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'compressdev: fix op allocation' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'ring/c11: synchronize load and store of the tail' " Kevin Traynor
                   ` (43 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Lee Daly; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 8f1066348d4cbedfa7a6ae3563aa61d01f56b4b3 Mon Sep 17 00:00:00 2001
From: Lee Daly <lee.daly@intel.com>
Date: Thu, 1 Nov 2018 11:48:19 +0000
Subject: [PATCH] compress/isal: fix uncleared compression states

[ upstream commit 1713ad8bc5578db230830c3713d140184b364a3d ]

Fixing uncleared states of compression & decompression engines post op.

Fixes: 788e748d3845 ("compress/isal: support chained mbufs")
Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality")
Fixes: 7bf4f0630af6 ("compress/isal: add ISA-L decomp functionality")

Signed-off-by: Lee Daly <lee.daly@intel.com>
---
 drivers/compress/isal/isal_compress_pmd.c | 29 ++++++++++++-----------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index e943336b3..9f1e96888 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -315,22 +315,21 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
 		ret = isal_inflate(qp->state);
 
+		if (ret != ISAL_DECOMP_OK) {
+			ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
+			op->status = RTE_COMP_OP_STATUS_ERROR;
+			return ret;
+		}
+
 		/* Check for first segment, offset needs to be accounted for */
 		if (remaining_data == op->src.length) {
-			consumed_data = src->data_len - qp->state->avail_in -
-					src_remaining_offset;
+			consumed_data = src->data_len - src_remaining_offset;
 		} else
-			consumed_data = src->data_len - qp->state->avail_in;
-
-		op->consumed += consumed_data;
-		remaining_data -= consumed_data;
-
-		if (ret != ISAL_DECOMP_OK) {
-			ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
-			op->status = RTE_COMP_OP_STATUS_ERROR;
-			return ret;
-		}
+			consumed_data = src->data_len;
 
 		if (qp->state->avail_in == 0
 				&& op->consumed != op->src.length) {
+			op->consumed += consumed_data;
+			remaining_data -= consumed_data;
+
 			if (src->next != NULL) {
 				src = src->next;
@@ -461,6 +460,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
 		}
 	}
-		op->consumed = qp->stream->total_in;
-		op->produced = qp->stream->total_out;
+	op->consumed = qp->stream->total_in;
+	op->produced = qp->stream->total_out;
+	isal_deflate_reset(qp->stream);
 
 	return ret;
@@ -539,4 +539,5 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp)
 	}
 		op->produced = qp->state->total_out;
+	isal_inflate_reset(qp->state);
 
 	return ret;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.908504510 +0000
+++ 0025-compress-isal-fix-uncleared-compression-states.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From 1713ad8bc5578db230830c3713d140184b364a3d Mon Sep 17 00:00:00 2001
+From 8f1066348d4cbedfa7a6ae3563aa61d01f56b4b3 Mon Sep 17 00:00:00 2001
 From: Lee Daly <lee.daly@intel.com>
 Date: Thu, 1 Nov 2018 11:48:19 +0000
 Subject: [PATCH] compress/isal: fix uncleared compression states
 
+[ upstream commit 1713ad8bc5578db230830c3713d140184b364a3d ]
+
 Fixing uncleared states of compression & decompression engines post op.
 
 Fixes: 788e748d3845 ("compress/isal: support chained mbufs")
 Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality")
 Fixes: 7bf4f0630af6 ("compress/isal: add ISA-L decomp functionality")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lee Daly <lee.daly@intel.com>
 ---

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

* [dpdk-stable] patch 'ring/c11: synchronize load and store of the tail' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (23 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'compress/isal: fix uncleared compression states' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'ring/c11: move atomic load of head above the loop' " Kevin Traynor
                   ` (42 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Honnappa Nagarahalli, Steve Capper, Ola Liljedahl, Jia He,
	Jerin Jacob, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From f57da12160802dfe41ef7b82c7d41316769d9179 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 2 Nov 2018 19:21:27 +0800
Subject: [PATCH] ring/c11: synchronize load and store of the tail

[ upstream commit 9ed877062898dd1eb7150bca56ebbd5329e96ee4 ]

Synchronize the load-acquire of the tail and the store-release
within update_tail, the store release ensures all the ring operations,
enqueue or dequeue, are seen by the observers on the other side as soon
as they see the updated tail. The load-acquire is needed here as the
data dependency is not a reliable way for ordering as the compiler might
break it by saving to temporary values to boost performance.
When computing the free_entries and avail_entries, use atomic semantics
to load the heads and tails instead.

The patch was benchmarked with test/ring_perf_autotest and it decreases
the enqueue/dequeue latency by 5% ~ 27.6% with two lcores, the real gains
are dependent on the number of lcores, depth of the ring, SPSC or MPMC.
For 1 lcore, it also improves a little, about 3 ~ 4%.
It is a big improvement, in case of MPMC, with two lcores and ring size
of 32, it saves latency up to (3.26-2.36)/3.26 = 27.6%.

This patch is a bug fix, while the improvement is a bonus. In our analysis
the improvement comes from the cacheline pre-filling after hoisting load-
acquire from _atomic_compare_exchange_n up above.

The test command:
$sudo ./test/test/test -l 16-19,44-47,72-75,100-103 -n 4 --socket-mem=\
1024 -- -i

Test result with this patch(two cores):
 SP/SC bulk enq/dequeue (size: 8): 5.86
 MP/MC bulk enq/dequeue (size: 8): 10.15
 SP/SC bulk enq/dequeue (size: 32): 1.94
 MP/MC bulk enq/dequeue (size: 32): 2.36

In comparison of the test result without this patch:
 SP/SC bulk enq/dequeue (size: 8): 6.67
 MP/MC bulk enq/dequeue (size: 8): 13.12
 SP/SC bulk enq/dequeue (size: 32): 2.04
 MP/MC bulk enq/dequeue (size: 32): 3.26

Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Jia He <justin.he@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ring/rte_ring_c11_mem.h | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index 94df3c4a6..52da95a21 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -58,4 +58,5 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 {
 	const uint32_t capacity = r->capacity;
+	uint32_t cons_tail;
 	unsigned int max = n;
 	int success;
@@ -68,11 +69,16 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 					__ATOMIC_ACQUIRE);
 
-		/*
-		 *  The subtraction is done between two unsigned 32bits value
+		/* load-acquire synchronize with store-release of ht->tail
+		 * in update_tail.
+		 */
+		cons_tail = __atomic_load_n(&r->cons.tail,
+					__ATOMIC_ACQUIRE);
+
+		/* The subtraction is done between two unsigned 32bits value
 		 * (the result is always modulo 32 bits even if we have
 		 * *old_head > cons_tail). So 'free_entries' is always between 0
 		 * and capacity (which is < size).
 		 */
-		*free_entries = (capacity + r->cons.tail - *old_head);
+		*free_entries = (capacity + cons_tail - *old_head);
 
 		/* check that we have enough room in ring */
@@ -126,4 +132,5 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 {
 	unsigned int max = n;
+	uint32_t prod_tail;
 	int success;
 
@@ -132,7 +139,14 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 		/* Restore n as it may change every loop */
 		n = max;
+
 		*old_head = __atomic_load_n(&r->cons.head,
 					__ATOMIC_ACQUIRE);
 
+		/* this load-acquire synchronize with store-release of ht->tail
+		 * in update_tail.
+		 */
+		prod_tail = __atomic_load_n(&r->prod.tail,
+					__ATOMIC_ACQUIRE);
+
 		/* The subtraction is done between two unsigned 32bits value
 		 * (the result is always modulo 32 bits even if we have
@@ -140,5 +154,5 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 		 * and size(ring)-1.
 		 */
-		*entries = (r->prod.tail - *old_head);
+		*entries = (prod_tail - *old_head);
 
 		/* Set the actual entries for dequeue */
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.936963738 +0000
+++ 0026-ring-c11-synchronize-load-and-store-of-the-tail.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 9ed877062898dd1eb7150bca56ebbd5329e96ee4 Mon Sep 17 00:00:00 2001
+From f57da12160802dfe41ef7b82c7d41316769d9179 Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 2 Nov 2018 19:21:27 +0800
 Subject: [PATCH] ring/c11: synchronize load and store of the tail
 
+[ upstream commit 9ed877062898dd1eb7150bca56ebbd5329e96ee4 ]
+
 Synchronize the load-acquire of the tail and the store-release
 within update_tail, the store release ensures all the ring operations,
 enqueue or dequeue, are seen by the observers on the other side as soon
@@ -40,7 +42,6 @@
  MP/MC bulk enq/dequeue (size: 32): 3.26
 
 Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

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

* [dpdk-stable] patch 'ring/c11: move atomic load of head above the loop' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (24 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'ring/c11: synchronize load and store of the tail' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/i40e: fix offload not supported mask' " Kevin Traynor
                   ` (41 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Honnappa Nagarahalli, Steve Capper, Ola Liljedahl, Jia He,
	Jerin Jacob, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b687a72eb402f07dc3fcdf1beb88a60e2cac422f Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 2 Nov 2018 19:21:28 +0800
Subject: [PATCH] ring/c11: move atomic load of head above the loop

[ upstream commit 047adc17245892198be31c54cf6658080df3dc6d ]

In __rte_ring_move_prod_head, move the __atomic_load_n up and out of
the do {} while loop as upon failure the old_head will be updated,
another load is costly and not necessary.

This helps a little on the latency,about 1~5%.

 Test result with the patch(two cores):
 SP/SC bulk enq/dequeue (size: 8): 5.64
 MP/MC bulk enq/dequeue (size: 8): 9.58
 SP/SC bulk enq/dequeue (size: 32): 1.98
 MP/MC bulk enq/dequeue (size: 32): 2.30

Fixes: 39368ebfc606 ("ring: introduce C11 memory model barrier option")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Jia He <justin.he@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ring/rte_ring_c11_mem.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index 52da95a21..7bc74a4cb 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -62,11 +62,9 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 	int success;
 
+	*old_head = __atomic_load_n(&r->prod.head, __ATOMIC_ACQUIRE);
 	do {
 		/* Reset n to the initial burst count */
 		n = max;
 
-		*old_head = __atomic_load_n(&r->prod.head,
-					__ATOMIC_ACQUIRE);
-
 		/* load-acquire synchronize with store-release of ht->tail
 		 * in update_tail.
@@ -94,4 +92,5 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 			r->prod.head = *new_head, success = 1;
 		else
+			/* on failure, *old_head is updated */
 			success = __atomic_compare_exchange_n(&r->prod.head,
 					old_head, *new_head,
@@ -136,11 +135,9 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 
 	/* move cons.head atomically */
+	*old_head = __atomic_load_n(&r->cons.head, __ATOMIC_ACQUIRE);
 	do {
 		/* Restore n as it may change every loop */
 		n = max;
 
-		*old_head = __atomic_load_n(&r->cons.head,
-					__ATOMIC_ACQUIRE);
-
 		/* this load-acquire synchronize with store-release of ht->tail
 		 * in update_tail.
@@ -167,4 +164,5 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 			r->cons.head = *new_head, success = 1;
 		else
+			/* on failure, *old_head will be updated */
 			success = __atomic_compare_exchange_n(&r->cons.head,
 							old_head, *new_head,
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.960223892 +0000
+++ 0027-ring-c11-move-atomic-load-of-head-above-the-loop.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 047adc17245892198be31c54cf6658080df3dc6d Mon Sep 17 00:00:00 2001
+From b687a72eb402f07dc3fcdf1beb88a60e2cac422f Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 2 Nov 2018 19:21:28 +0800
 Subject: [PATCH] ring/c11: move atomic load of head above the loop
 
+[ upstream commit 047adc17245892198be31c54cf6658080df3dc6d ]
+
 In __rte_ring_move_prod_head, move the __atomic_load_n up and out of
 the do {} while loop as upon failure the old_head will be updated,
 another load is costly and not necessary.
@@ -16,7 +18,6 @@
  MP/MC bulk enq/dequeue (size: 32): 2.30
 
 Fixes: 39368ebfc606 ("ring: introduce C11 memory model barrier option")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
@@ -27,29 +28,9 @@
 Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>
 ---
- doc/guides/rel_notes/release_18_11.rst | 10 ++++++++++
- lib/librte_ring/rte_ring_c11_mem.h     | 10 ++++------
- 2 files changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
-index c60879c69..cfa92b8c0 100644
---- a/doc/guides/rel_notes/release_18_11.rst
-+++ b/doc/guides/rel_notes/release_18_11.rst
-@@ -70,4 +70,14 @@ New Features
-   one device has addressing limitations, the dma mask is the more restricted one.
- 
-+* **Updated the C11 memory model version of ring library.**
-+
-+  The latency is decreased for architectures using the C11 memory model
-+  version of the ring library.
-+
-+  On Cavium ThunderX2 platform, the changes decreased latency by 27~29%
-+  and 3~15% for MPMC and SPSC cases respectively (with 2 lcores). The
-+  real improvements may vary with the number of contending lcores and
-+  the size of ring.
-+
- * **Added hot-unplug handle mechanism.**
- 
+ lib/librte_ring/rte_ring_c11_mem.h | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
 diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
 index 52da95a21..7bc74a4cb 100644
 --- a/lib/librte_ring/rte_ring_c11_mem.h

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

* [dpdk-stable] patch 'net/i40e: fix offload not supported mask' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (25 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'ring/c11: move atomic load of head above the loop' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/mlx5: use pkg-config to handle SUSE libmnl' " Kevin Traynor
                   ` (40 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 8d3c198d31cc0cc7932d6b86c85f6b619cb73a73 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Fri, 26 Oct 2018 14:33:14 +0800
Subject: [PATCH] net/i40e: fix offload not supported mask

[ upstream commit 09a62d75691fb935c7767d51b750df5910825985 ]

Just as the name I40E_TX_OFFLOAD_NOTSUP_MASK indicates, it should be the
mask of unsupported features (either not in PKT_TX_OFFLOAD_MASK or in
I40E_TX_OFFLOAD_MASK), however, xor will not get desired result here,
assume bit 0 of PKT_TX_OFFLOAD_MASK and I40E_TX_OFFLOAD_MAKS are 0 which
means corresponding feature is not supported in both sides, then we get
value of bit 0 of I40E_TX_OFFLOAD_NOTSUP_MASK which is 0 via xor, it
implies that it is supported which doesn't meet our expectation.

Correct it by a NOT-AND operation.

Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index de49f4478..26c2f17bd 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -70,5 +70,5 @@
 
 #define I40E_TX_OFFLOAD_NOTSUP_MASK \
-		(PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
+		~(PKT_TX_OFFLOAD_MASK & I40E_TX_OFFLOAD_MASK)
 
 static inline void
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:54.985789217 +0000
+++ 0028-net-i40e-fix-offload-not-supported-mask.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 09a62d75691fb935c7767d51b750df5910825985 Mon Sep 17 00:00:00 2001
+From 8d3c198d31cc0cc7932d6b86c85f6b619cb73a73 Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Fri, 26 Oct 2018 14:33:14 +0800
 Subject: [PATCH] net/i40e: fix offload not supported mask
 
+[ upstream commit 09a62d75691fb935c7767d51b750df5910825985 ]
+
 Just as the name I40E_TX_OFFLOAD_NOTSUP_MASK indicates, it should be the
 mask of unsupported features (either not in PKT_TX_OFFLOAD_MASK or in
 I40E_TX_OFFLOAD_MASK), however, xor will not get desired result here,
@@ -14,7 +16,6 @@
 Correct it by a NOT-AND operation.
 
 Fixes: 3f33e643e5c6 ("net/i40e: add Tx preparation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -23,7 +24,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index 8bfa25178..e76412207 100644
+index de49f4478..26c2f17bd 100644
 --- a/drivers/net/i40e/i40e_rxtx.c
 +++ b/drivers/net/i40e/i40e_rxtx.c
 @@ -70,5 +70,5 @@

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

* [dpdk-stable] patch 'net/mlx5: use pkg-config to handle SUSE libmnl' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (26 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/i40e: fix offload not supported mask' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/vhost: fix parameters string' " Kevin Traynor
                   ` (39 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Yongseok Koh, Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From a2b805348b9ab46043fd338d649b8818e1f6c88f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 25 Oct 2018 13:29:38 -0700
Subject: [PATCH] net/mlx5: use pkg-config to handle SUSE libmnl

[ upstream commit b6b87939193a178ffaf48b180df101548620f00f ]

SUSE decided to install the libmnl include file in a non-standard
place: /usr/include/libmnl/libmnl/libmnl.h

This was probably a mistake by the SUSE package maintainer,
but hard to get fixed. Workaround the problem by pkg-config to find
the necessary include directive for libmnl.

Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/mlx5/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 2e70dec5b..08b616567 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -50,4 +50,5 @@ CFLAGS += -D_XOPEN_SOURCE=600
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -Wno-strict-prototypes
+CFLAGS += $(shell pkg-config --cflags libmnl)
 ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
 CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
@@ -58,5 +59,5 @@ else
 LDLIBS += -libverbs -lmlx5
 endif
-LDLIBS += -lmnl
+LDLIBS += $(shell pkg-config --libs libmnl)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.013903097 +0000
+++ 0029-net-mlx5-use-pkg-config-to-handle-SUSE-libmnl.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From b6b87939193a178ffaf48b180df101548620f00f Mon Sep 17 00:00:00 2001
+From a2b805348b9ab46043fd338d649b8818e1f6c88f Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 25 Oct 2018 13:29:38 -0700
 Subject: [PATCH] net/mlx5: use pkg-config to handle SUSE libmnl
 
+[ upstream commit b6b87939193a178ffaf48b180df101548620f00f ]
+
 SUSE decided to install the libmnl include file in a non-standard
 place: /usr/include/libmnl/libmnl/libmnl.h
 
@@ -11,7 +13,6 @@
 the necessary include directive for libmnl.
 
 Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Yongseok Koh <yskoh@mellanox.com>
@@ -21,16 +22,16 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
-index fecb57c18..0beb139ea 100644
+index 2e70dec5b..08b616567 100644
 --- a/drivers/net/mlx5/Makefile
 +++ b/drivers/net/mlx5/Makefile
-@@ -52,4 +52,5 @@ CFLAGS += -D_XOPEN_SOURCE=600
+@@ -50,4 +50,5 @@ CFLAGS += -D_XOPEN_SOURCE=600
  CFLAGS += $(WERROR_FLAGS)
  CFLAGS += -Wno-strict-prototypes
 +CFLAGS += $(shell pkg-config --cflags libmnl)
  ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
  CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
-@@ -60,5 +61,5 @@ else
+@@ -58,5 +59,5 @@ else
  LDLIBS += -libverbs -lmlx5
  endif
 -LDLIBS += -lmnl

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

* [dpdk-stable] patch 'net/vhost: fix parameters string' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (27 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/mlx5: use pkg-config to handle SUSE libmnl' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not stop stopped device again' " Kevin Traynor
                   ` (38 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 111f4e9c9e2fe2d5e8c2f897fcfd558ca96a2e8a Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Thu, 25 Oct 2018 17:46:59 +0800
Subject: [PATCH] net/vhost: fix parameters string

[ upstream commit 1a7a39eb3d380b6f49ad9d1e29a01bcfb306cba4 ]

Add the missing params to the param string.

Fixes: 39cac2adcad0 ("net/vhost: add client option")
Fixes: 4ce97c6f6b4f ("net/vhost: add an option to enable dequeue zero copy")
Fixes: 447e0d379756 ("net/vhost: add parameter to enable IOMMU feature")
Fixes: 6d6e95cec455 ("net/vhost: add parameter to enable postcopy")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index e58f32211..24a30ebd5 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1457,5 +1457,9 @@ RTE_PMD_REGISTER_ALIAS(net_vhost, eth_vhost);
 RTE_PMD_REGISTER_PARAM_STRING(net_vhost,
 	"iface=<ifc> "
-	"queues=<int>");
+	"queues=<int> "
+	"client=<0|1> "
+	"dequeue-zero-copy=<0|1> "
+	"iommu-support=<0|1> "
+	"postcopy-support=<0|1>");
 
 RTE_INIT(vhost_init_log)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.039797302 +0000
+++ 0030-net-vhost-fix-parameters-string.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From 1a7a39eb3d380b6f49ad9d1e29a01bcfb306cba4 Mon Sep 17 00:00:00 2001
+From 111f4e9c9e2fe2d5e8c2f897fcfd558ca96a2e8a Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Thu, 25 Oct 2018 17:46:59 +0800
 Subject: [PATCH] net/vhost: fix parameters string
 
+[ upstream commit 1a7a39eb3d380b6f49ad9d1e29a01bcfb306cba4 ]
+
 Add the missing params to the param string.
 
 Fixes: 39cac2adcad0 ("net/vhost: add client option")
 Fixes: 4ce97c6f6b4f ("net/vhost: add an option to enable dequeue zero copy")
 Fixes: 447e0d379756 ("net/vhost: add parameter to enable IOMMU feature")
 Fixes: 6d6e95cec455 ("net/vhost: add parameter to enable postcopy")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -18,10 +19,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
-index b38a4b6b1..42bdfcbd5 100644
+index e58f32211..24a30ebd5 100644
 --- a/drivers/net/vhost/rte_eth_vhost.c
 +++ b/drivers/net/vhost/rte_eth_vhost.c
-@@ -1468,5 +1468,9 @@ RTE_PMD_REGISTER_ALIAS(net_vhost, eth_vhost);
+@@ -1457,5 +1457,9 @@ RTE_PMD_REGISTER_ALIAS(net_vhost, eth_vhost);
  RTE_PMD_REGISTER_PARAM_STRING(net_vhost,
  	"iface=<ifc> "
 -	"queues=<int>");

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

* [dpdk-stable] patch 'net/virtio-user: do not stop stopped device again' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (28 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/vhost: fix parameters string' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not make vhost channel non-block' " Kevin Traynor
                   ` (37 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Stephen Hemminger, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9129ff86041f8751d6b0903a5a622770010fc5fd Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 29 Oct 2018 13:28:03 +0800
Subject: [PATCH] net/virtio-user: do not stop stopped device again

[ upstream commit f457e9007a117a2ca8fd00ed9ee29e734d04752d ]

Without this change, virtio-user still works, but it will show
annoying error messages like this on shutdown:

vhost_kernel_set_backend(): VHOST_NET_SET_BACKEND fails, Operation not permitted
vhost_kernel_ioctl(): VHOST_RESET_OWNER failed: Operation not permitted

Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 55a82e4b0..bef253488 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -185,4 +185,7 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)
 
 	pthread_mutex_lock(&dev->mutex);
+	if (!dev->started)
+		goto out;
+
 	for (i = 0; i < dev->max_queue_pairs; ++i)
 		dev->ops->enable_qp(dev, i, 0);
@@ -194,4 +197,5 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)
 	}
 	dev->started = false;
+out:
 	pthread_mutex_unlock(&dev->mutex);
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.062310127 +0000
+++ 0031-net-virtio-user-do-not-stop-stopped-device-again.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From f457e9007a117a2ca8fd00ed9ee29e734d04752d Mon Sep 17 00:00:00 2001
+From 9129ff86041f8751d6b0903a5a622770010fc5fd Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Mon, 29 Oct 2018 13:28:03 +0800
 Subject: [PATCH] net/virtio-user: do not stop stopped device again
 
+[ upstream commit f457e9007a117a2ca8fd00ed9ee29e734d04752d ]
+
 Without this change, virtio-user still works, but it will show
 annoying error messages like this on shutdown:
 
@@ -11,7 +13,6 @@
 
 Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
 Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug")
-Cc: stable@dpdk.org
 
 Reported-by: Stephen Hemminger <stephen@networkplumber.org>
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -21,7 +22,7 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-index b4997ee3f..0e3563051 100644
+index 55a82e4b0..bef253488 100644
 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
 +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
 @@ -185,4 +185,7 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)

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

* [dpdk-stable] patch 'net/virtio-user: do not make vhost channel non-block' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (29 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not stop stopped device again' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not reset owner when driver resets' " Kevin Traynor
                   ` (36 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From aa188c690120aab8bf8aa9a10760dc65f97373b7 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 29 Oct 2018 13:28:04 +0800
Subject: [PATCH] net/virtio-user: do not make vhost channel non-block

[ upstream commit 86d4b0618495faf58ef5e698b3c8ea76e82b54d6 ]

There is no need to make the vhost user channel nonblock, and
making it nonblock will make vhost_user_read() fail with EAGAIN
when vhost messages need a reply.

Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 525d16cab..ba8e59e58 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -29,5 +29,4 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
 {
 	int ret;
-	int flag;
 	int connectfd;
 	struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
@@ -50,7 +49,4 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
 	dev->features &= dev->device_features;
 
-	flag = fcntl(connectfd, F_GETFD);
-	fcntl(connectfd, F_SETFL, flag | O_NONBLOCK);
-
 	ret = virtio_user_start_device(dev);
 	if (ret < 0)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.087650036 +0000
+++ 0032-net-virtio-user-do-not-make-vhost-channel-non-block.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From 86d4b0618495faf58ef5e698b3c8ea76e82b54d6 Mon Sep 17 00:00:00 2001
+From aa188c690120aab8bf8aa9a10760dc65f97373b7 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Mon, 29 Oct 2018 13:28:04 +0800
 Subject: [PATCH] net/virtio-user: do not make vhost channel non-block
 
+[ upstream commit 86d4b0618495faf58ef5e698b3c8ea76e82b54d6 ]
+
 There is no need to make the vhost user channel nonblock, and
 making it nonblock will make vhost_user_read() fail with EAGAIN
 when vhost messages need a reply.
 
 Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -17,7 +18,7 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
-index 3cf8bc100..a31b9b44a 100644
+index 525d16cab..ba8e59e58 100644
 --- a/drivers/net/virtio/virtio_user_ethdev.c
 +++ b/drivers/net/virtio/virtio_user_ethdev.c
 @@ -29,5 +29,4 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)

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

* [dpdk-stable] patch 'net/virtio-user: do not reset owner when driver resets' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (30 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not make vhost channel non-block' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: fix device features for server mode' " Kevin Traynor
                   ` (35 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e08b77f3ffdbcfad32bbbe69c6f2c998ee700c69 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 29 Oct 2018 13:28:05 +0800
Subject: [PATCH] net/virtio-user: do not reset owner when driver resets

[ upstream commit 74dc6746a0f195907ec487df7de18a856108482f ]

When driver resets the device, virtio-user just needs to send
GET_VRING_BASE messages to stop the vhost backend, and that's
what QEMU does. With this change, we won't need to set owner
when starting virtio-user device anymore. This will help us to
get rid of below error message on startup:

vhost_kernel_ioctl(): VHOST_SET_OWNER failed: Device or resource busy

Fixes: bce7e9050f9b ("net/virtio-user: fix start with kernel vhost")
Fixes: 0d6a8752ac9d ("net/virtio-user: fix crash as features change")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 .../net/virtio/virtio_user/virtio_user_dev.c  | 22 ++++++++++++-------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index bef253488..85c35246b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -135,7 +135,4 @@ virtio_user_start_device(struct virtio_user_dev *dev)
 		goto error;
 
-	/* Do not check return as already done in init, or reset in stop */
-	dev->ops->send_request(dev, VHOST_USER_SET_OWNER, NULL);
-
 	/* Step 0: tell vhost to create queues */
 	if (virtio_user_queue_setup(dev, virtio_user_create_queue) < 0)
@@ -182,5 +179,7 @@ error:
 int virtio_user_stop_device(struct virtio_user_dev *dev)
 {
+	struct vhost_vring_state state;
 	uint32_t i;
+	int error = 0;
 
 	pthread_mutex_lock(&dev->mutex);
@@ -191,14 +190,21 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)
 		dev->ops->enable_qp(dev, i, 0);
 
-	if (dev->ops->send_request(dev, VHOST_USER_RESET_OWNER, NULL) < 0) {
-		PMD_DRV_LOG(INFO, "Failed to reset the device\n");
-		pthread_mutex_unlock(&dev->mutex);
-		return -1;
+	/* Stop the backend. */
+	for (i = 0; i < dev->max_queue_pairs * 2; ++i) {
+		state.index = i;
+		if (dev->ops->send_request(dev, VHOST_USER_GET_VRING_BASE,
+					   &state) < 0) {
+			PMD_DRV_LOG(ERR, "get_vring_base failed, index=%u\n",
+				    i);
+			error = -1;
+			goto out;
+		}
 	}
+
 	dev->started = false;
 out:
 	pthread_mutex_unlock(&dev->mutex);
 
-	return 0;
+	return error;
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.113234621 +0000
+++ 0033-net-virtio-user-do-not-reset-owner-when-driver-reset.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 74dc6746a0f195907ec487df7de18a856108482f Mon Sep 17 00:00:00 2001
+From e08b77f3ffdbcfad32bbbe69c6f2c998ee700c69 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Mon, 29 Oct 2018 13:28:05 +0800
 Subject: [PATCH] net/virtio-user: do not reset owner when driver resets
 
+[ upstream commit 74dc6746a0f195907ec487df7de18a856108482f ]
+
 When driver resets the device, virtio-user just needs to send
 GET_VRING_BASE messages to stop the vhost backend, and that's
 what QEMU does. With this change, we won't need to set owner
@@ -13,7 +15,6 @@
 
 Fixes: bce7e9050f9b ("net/virtio-user: fix start with kernel vhost")
 Fixes: 0d6a8752ac9d ("net/virtio-user: fix crash as features change")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -22,7 +23,7 @@
  1 file changed, 14 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-index 0e3563051..0eb0f244b 100644
+index bef253488..85c35246b 100644
 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
 +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
 @@ -135,7 +135,4 @@ virtio_user_start_device(struct virtio_user_dev *dev)

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

* [dpdk-stable] patch 'net/virtio-user: fix device features for server mode' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (31 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not reset owner when driver resets' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix guest announce support' " Kevin Traynor
                   ` (34 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 3f2cf62ac5e52c86a672fc0e76a40f2fcfce0003 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 29 Oct 2018 13:28:06 +0800
Subject: [PATCH] net/virtio-user: fix device features for server mode

[ upstream commit bb97d2dd96c0425b0cd9a58749de252ddf675b47 ]

We need to save the supported frontend features (which won't be
announced by vhost backend), otherwise we will lost them when the
connection to vhost-user backend is established in server mode.

Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 8 +++++---
 drivers/net/virtio/virtio_user/virtio_user_dev.h | 1 +
 drivers/net/virtio/virtio_user_ethdev.c          | 2 ++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 85c35246b..5c10bf8e0 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -416,4 +416,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	dev->queue_size = queue_size;
 	dev->mac_specified = 0;
+	dev->frontend_features = 0;
 	dev->unsupported_features = 0;
 	parse_mac(dev, mac);
@@ -463,5 +464,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 
 	if (dev->mac_specified) {
-		dev->device_features |= (1ull << VIRTIO_NET_F_MAC);
+		dev->frontend_features |= (1ull << VIRTIO_NET_F_MAC);
 	} else {
 		dev->device_features &= ~(1ull << VIRTIO_NET_F_MAC);
@@ -473,5 +474,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		 * so if necessary, we just claim to support CQ
 		 */
-		dev->device_features |= (1ull << VIRTIO_NET_F_CTRL_VQ);
+		dev->frontend_features |= (1ull << VIRTIO_NET_F_CTRL_VQ);
 	} else {
 		dev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);
@@ -494,6 +495,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	/* The backend will not report this feature, we add it explicitly */
 	if (is_vhost_user_by_type(dev->path))
-		dev->device_features |= (1ull << VIRTIO_NET_F_STATUS);
+		dev->frontend_features |= (1ull << VIRTIO_NET_F_STATUS);
 
+	dev->device_features |= dev->frontend_features;
 	dev->device_features &= VIRTIO_USER_SUPPORTED_FEATURES;
 	dev->unsupported_features |= ~VIRTIO_USER_SUPPORTED_FEATURES;
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index d6e0e137b..c42ce5d4b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -34,4 +34,5 @@ struct virtio_user_dev {
 				   */
 	uint64_t	device_features; /* supported features by device */
+	uint64_t	frontend_features; /* enabled frontend features */
 	uint64_t	unsupported_features; /* unsupported features mask */
 	uint8_t		status;
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index ba8e59e58..b9860a23e 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -44,4 +44,6 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
 	}
 
+	dev->device_features |= dev->frontend_features;
+
 	/* umask vhost-user unsupported features */
 	dev->device_features &= ~(dev->unsupported_features);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.143409903 +0000
+++ 0034-net-virtio-user-fix-device-features-for-server-mode.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From bb97d2dd96c0425b0cd9a58749de252ddf675b47 Mon Sep 17 00:00:00 2001
+From 3f2cf62ac5e52c86a672fc0e76a40f2fcfce0003 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Mon, 29 Oct 2018 13:28:06 +0800
 Subject: [PATCH] net/virtio-user: fix device features for server mode
 
+[ upstream commit bb97d2dd96c0425b0cd9a58749de252ddf675b47 ]
+
 We need to save the supported frontend features (which won't be
 announced by vhost backend), otherwise we will lost them when the
 connection to vhost-user backend is established in server mode.
 
 Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -19,30 +20,30 @@
  3 files changed, 8 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-index 0eb0f244b..ff1c2034f 100644
+index 85c35246b..5c10bf8e0 100644
 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
 +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-@@ -422,4 +422,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
+@@ -416,4 +416,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
  	dev->queue_size = queue_size;
  	dev->mac_specified = 0;
 +	dev->frontend_features = 0;
  	dev->unsupported_features = 0;
  	parse_mac(dev, mac);
-@@ -469,5 +470,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
+@@ -463,5 +464,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
  
  	if (dev->mac_specified) {
 -		dev->device_features |= (1ull << VIRTIO_NET_F_MAC);
 +		dev->frontend_features |= (1ull << VIRTIO_NET_F_MAC);
  	} else {
  		dev->device_features &= ~(1ull << VIRTIO_NET_F_MAC);
-@@ -479,5 +480,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
+@@ -473,5 +474,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
  		 * so if necessary, we just claim to support CQ
  		 */
 -		dev->device_features |= (1ull << VIRTIO_NET_F_CTRL_VQ);
 +		dev->frontend_features |= (1ull << VIRTIO_NET_F_CTRL_VQ);
  	} else {
  		dev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);
-@@ -500,6 +501,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
+@@ -494,6 +495,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
  	/* The backend will not report this feature, we add it explicitly */
  	if (is_vhost_user_by_type(dev->path))
 -		dev->device_features |= (1ull << VIRTIO_NET_F_STATUS);
@@ -62,7 +63,7 @@
  	uint64_t	unsupported_features; /* unsupported features mask */
  	uint8_t		status;
 diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
-index a31b9b44a..61b7c0a38 100644
+index ba8e59e58..b9860a23e 100644
 --- a/drivers/net/virtio/virtio_user_ethdev.c
 +++ b/drivers/net/virtio/virtio_user_ethdev.c
 @@ -44,4 +44,6 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)

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

* [dpdk-stable] patch 'net/virtio: fix guest announce support' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (32 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: fix device features for server mode' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net: fix build with pedantic' " Kevin Traynor
                   ` (33 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 5571a20d74f1c604838aac76cd862bd1af04a090 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 29 Oct 2018 13:28:08 +0800
Subject: [PATCH] net/virtio: fix guest announce support

[ upstream commit 5db1684e7593c6fc8769b19765c8c6b9d4697f45 ]

We need to check the status field in virtio net config structure
instead of the bits read from ISR register to know whether we need
to do guest announce.

Fixes: 7365504f77e3 ("net/virtio: support guest announce")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 3195443a1..4745899c6 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1289,4 +1289,5 @@ virtio_interrupt_handler(void *param)
 	struct virtio_hw *hw = dev->data->dev_private;
 	uint8_t isr;
+	uint16_t status;
 
 	/* Read interrupt status which clears interrupt */
@@ -1302,10 +1303,15 @@ virtio_interrupt_handler(void *param)
 						      RTE_ETH_EVENT_INTR_LSC,
 						      NULL);
-	}
 
-	if (isr & VIRTIO_NET_S_ANNOUNCE) {
-		virtio_notify_peers(dev);
-		if (hw->cvq)
-			virtio_ack_link_announce(dev);
+		if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
+			vtpci_read_dev_config(hw,
+				offsetof(struct virtio_net_config, status),
+				&status, sizeof(status));
+			if (status & VIRTIO_NET_S_ANNOUNCE) {
+				virtio_notify_peers(dev);
+				if (hw->cvq)
+					virtio_ack_link_announce(dev);
+			}
+		}
 	}
 }
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.168158428 +0000
+++ 0035-net-virtio-fix-guest-announce-support.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From 5db1684e7593c6fc8769b19765c8c6b9d4697f45 Mon Sep 17 00:00:00 2001
+From 5571a20d74f1c604838aac76cd862bd1af04a090 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Mon, 29 Oct 2018 13:28:08 +0800
 Subject: [PATCH] net/virtio: fix guest announce support
 
+[ upstream commit 5db1684e7593c6fc8769b19765c8c6b9d4697f45 ]
+
 We need to check the status field in virtio net config structure
 instead of the bits read from ISR register to know whether we need
 to do guest announce.
 
 Fixes: 7365504f77e3 ("net/virtio: support guest announce")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -17,7 +18,7 @@
  1 file changed, 11 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
-index da8717726..cb6248eb6 100644
+index 3195443a1..4745899c6 100644
 --- a/drivers/net/virtio/virtio_ethdev.c
 +++ b/drivers/net/virtio/virtio_ethdev.c
 @@ -1289,4 +1289,5 @@ virtio_interrupt_handler(void *param)

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

* [dpdk-stable] patch 'net: fix build with pedantic' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (33 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix guest announce support' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/ixgbe: fix busy polling while fiber link update' " Kevin Traynor
                   ` (32 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 36ed45061b9d2e5d98f7f51d385fdf8b397c26b0 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Thu, 1 Nov 2018 14:46:45 +0200
Subject: [PATCH] net: fix build with pedantic

[ upstream commit be685863a9ea636bf7924f0a8034bb4c21fb1402 ]

The following error popped when compiling with -pedantic:

In file included from
 drivers/net/mlx5/mlx5_flow_dv.c:28:0:
 include/rte_gre.h:20:2:
 error: type of bit-field 'res2' is a GCC  extension [-Werror=pedantic]
 uint16_t res2:4; /**< Reserved */

Fixing by adding the __extension__ attribute.

Fixes: 894f71a3805d ("net: add GRE header structure")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_net/rte_gre.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_net/rte_gre.h b/lib/librte_net/rte_gre.h
index 69499bb82..05aa9d143 100644
--- a/lib/librte_net/rte_gre.h
+++ b/lib/librte_net/rte_gre.h
@@ -16,4 +16,5 @@ extern "C" {
  * GRE Header
  */
+__extension__
 struct gre_hdr {
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.194452270 +0000
+++ 0036-net-fix-build-with-pedantic.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From be685863a9ea636bf7924f0a8034bb4c21fb1402 Mon Sep 17 00:00:00 2001
+From 36ed45061b9d2e5d98f7f51d385fdf8b397c26b0 Mon Sep 17 00:00:00 2001
 From: Shahaf Shuler <shahafs@mellanox.com>
 Date: Thu, 1 Nov 2018 14:46:45 +0200
 Subject: [PATCH] net: fix build with pedantic
 
+[ upstream commit be685863a9ea636bf7924f0a8034bb4c21fb1402 ]
+
 The following error popped when compiling with -pedantic:
 
 In file included from
@@ -14,7 +16,6 @@
 Fixing by adding the __extension__ attribute.
 
 Fixes: 894f71a3805d ("net: add GRE header structure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/ixgbe: fix busy polling while fiber link update' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (34 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net: fix build with pedantic' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: do not re-enter clean up routines' " Kevin Traynor
                   ` (31 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ilya Maximets; +Cc: Qi Zhang, Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From dd7b21ed335e5334d5188b5438b61c6aeaa29e45 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Thu, 1 Nov 2018 19:04:59 +0300
Subject: [PATCH] net/ixgbe: fix busy polling while fiber link update

[ upstream commit 0408f47ba4d67f0cb96f5e907bc9336b6cbff0dd ]

If the multispeed fiber link is in DOWN state, ixgbe_setup_link
could take around a second of busy polling. This is highly
inconvenient for the case where single thread periodically
checks the link statuses. For example, OVS main thread
periodically updates the link statuses and hangs for a really
long time busy waiting on ixgbe_setup_link() for a DOWN fiber
ports. For case with 3 down ports it hangs for a 3 seconds and
unable to do anything including packet processing.
Fix that by shifting that workaround to a separate thread by
alarm handler that will try to set up link if it is DOWN.

Fixes: c12d22f65b13 ("net/ixgbe: ensure link status is updated")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 43 ++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index eab9e2e7e..0293022b2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -222,4 +222,6 @@ static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev,
 static void ixgbe_dev_interrupt_handler(void *param);
 static void ixgbe_dev_interrupt_delayed_handler(void *param);
+static void ixgbe_dev_setup_link_alarm_handler(void *param);
+
 static int ixgbe_add_rar(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
 			 uint32_t index, uint32_t pool);
@@ -2797,4 +2799,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
+	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
+
 	/* disable interrupts */
 	ixgbe_disable_intr(hw);
@@ -3975,4 +3979,23 @@ out:
 }
 
+static void
+ixgbe_dev_setup_link_alarm_handler(void *param)
+{
+	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ixgbe_interrupt *intr =
+		IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
+	u32 speed;
+	bool autoneg = false;
+
+	speed = hw->phy.autoneg_advertised;
+	if (!speed)
+		ixgbe_get_link_capabilities(hw, &speed, &autoneg);
+
+	ixgbe_setup_link(hw, speed, true);
+
+	intr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
+}
+
 /* return 0 means link status changed, -1 means not changed */
 int
@@ -3987,7 +4010,5 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	int link_up;
 	int diag;
-	u32 speed = 0;
 	int wait = 1;
-	bool autoneg = false;
 
 	memset(&link, 0, sizeof(link));
@@ -3999,11 +4020,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	hw->mac.get_link_status = true;
 
-	if ((intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG) &&
-		ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
-		speed = hw->phy.autoneg_advertised;
-		if (!speed)
-			ixgbe_get_link_capabilities(hw, &speed, &autoneg);
-		ixgbe_setup_link(hw, speed, true);
-	}
+	if (intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG)
+		return rte_eth_linkstatus_set(dev, &link);
 
 	/* check if it needs to wait to complete, if lsc interrupt is enabled */
@@ -4023,9 +4039,12 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 
 	if (link_up == 0) {
-		intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
+		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
+			rte_eal_alarm_set(10,
+				ixgbe_dev_setup_link_alarm_handler, dev);
+		}
 		return rte_eth_linkstatus_set(dev, &link);
 	}
 
-	intr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
 	link.link_status = ETH_LINK_UP;
 	link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -5134,4 +5153,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
+	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
+
 	ixgbevf_intr_disable(dev);
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.220436825 +0000
+++ 0037-net-ixgbe-fix-busy-polling-while-fiber-link-update.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 0408f47ba4d67f0cb96f5e907bc9336b6cbff0dd Mon Sep 17 00:00:00 2001
+From dd7b21ed335e5334d5188b5438b61c6aeaa29e45 Mon Sep 17 00:00:00 2001
 From: Ilya Maximets <i.maximets@samsung.com>
 Date: Thu, 1 Nov 2018 19:04:59 +0300
 Subject: [PATCH] net/ixgbe: fix busy polling while fiber link update
 
+[ upstream commit 0408f47ba4d67f0cb96f5e907bc9336b6cbff0dd ]
+
 If the multispeed fiber link is in DOWN state, ixgbe_setup_link
 could take around a second of busy polling. This is highly
 inconvenient for the case where single thread periodically
@@ -15,7 +17,6 @@
 alarm handler that will try to set up link if it is DOWN.
 
 Fixes: c12d22f65b13 ("net/ixgbe: ensure link status is updated")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
 Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -25,24 +26,24 @@
  1 file changed, 32 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 5a2c35143..c9e82d515 100644
+index eab9e2e7e..0293022b2 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -221,4 +221,6 @@ static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev);
+@@ -222,4 +222,6 @@ static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev,
  static void ixgbe_dev_interrupt_handler(void *param);
  static void ixgbe_dev_interrupt_delayed_handler(void *param);
 +static void ixgbe_dev_setup_link_alarm_handler(void *param);
 +
  static int ixgbe_add_rar(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
  			 uint32_t index, uint32_t pool);
-@@ -2794,4 +2796,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2797,4 +2799,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
  	PMD_INIT_FUNC_TRACE();
  
 +	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
 +
  	/* disable interrupts */
  	ixgbe_disable_intr(hw);
-@@ -3972,4 +3976,23 @@ out:
+@@ -3975,4 +3979,23 @@ out:
  }
  
 +static void
@@ -66,7 +67,7 @@
 +
  /* return 0 means link status changed, -1 means not changed */
  int
-@@ -3984,7 +4007,5 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -3987,7 +4010,5 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  	int link_up;
  	int diag;
 -	u32 speed = 0;
@@ -74,7 +75,7 @@
 -	bool autoneg = false;
  
  	memset(&link, 0, sizeof(link));
-@@ -3996,11 +4017,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -3999,11 +4020,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  	hw->mac.get_link_status = true;
  
 -	if ((intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG) &&
@@ -88,7 +89,7 @@
 +		return rte_eth_linkstatus_set(dev, &link);
  
  	/* check if it needs to wait to complete, if lsc interrupt is enabled */
-@@ -4020,9 +4036,12 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4023,9 +4039,12 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  
  	if (link_up == 0) {
 -		intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
@@ -103,7 +104,7 @@
 -	intr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
  	link.link_status = ETH_LINK_UP;
  	link.link_duplex = ETH_LINK_FULL_DUPLEX;
-@@ -5129,4 +5148,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
+@@ -5134,4 +5153,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
  	PMD_INIT_FUNC_TRACE();
  
 +	rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);

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

* [dpdk-stable] patch 'net/virtio: do not re-enter clean up routines' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (35 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/ixgbe: fix busy polling while fiber link update' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'ethdev: fix redundant function pointer check' " Kevin Traynor
                   ` (30 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Chas Williams; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9ca7220ac5a4c0372ffd78565a5d69c49bcdecaf Mon Sep 17 00:00:00 2001
From: Chas Williams <ciwillia@brocade.com>
Date: Mon, 17 Jul 2017 19:05:22 -0400
Subject: [PATCH] net/virtio: do not re-enter clean up routines

[ upstream commit 2a821d81f355a40508c81c006f1e3002a1ba2494 ]

.dev_uninit calls .dev_stop and .dev_close.  The work that is done in
those routines doesn't need repeated.  Use started and opened to track
the adapter's status.

Fixes: c1f86306a026 ("virtio: add new driver")

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 16 +++++++++++++---
 drivers/net/virtio/virtio_pci.h    |  3 ++-
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 4745899c6..b8693ff80 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -589,4 +589,8 @@ virtio_dev_close(struct rte_eth_dev *dev)
 	PMD_INIT_LOG(DEBUG, "virtio_dev_close");
 
+	if (!hw->opened)
+		return;
+	hw->opened = false;
+
 	/* reset the NIC */
 	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
@@ -1928,4 +1932,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 		hw->use_simple_rx = 0;
 
+	hw->opened = true;
+
 	return 0;
 }
@@ -2018,5 +2024,5 @@ virtio_dev_start(struct rte_eth_dev *dev)
 
 	set_rxtx_funcs(dev);
-	hw->started = 1;
+	hw->started = true;
 
 	/* Initialize Link state */
@@ -2084,4 +2090,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
 
 	rte_spinlock_lock(&hw->state_lock);
+	if (!hw->started)
+		goto out_unlock;
+	hw->started = false;
+
 	if (intr_conf->lsc || intr_conf->rxq) {
 		virtio_intr_disable(dev);
@@ -2095,7 +2105,7 @@ virtio_dev_stop(struct rte_eth_dev *dev)
 	}
 
-	hw->started = 0;
 	memset(&link, 0, sizeof(link));
 	rte_eth_linkstatus_set(dev, &link);
+out_unlock:
 	rte_spinlock_unlock(&hw->state_lock);
 }
@@ -2113,5 +2123,5 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
 	link.link_autoneg = ETH_LINK_FIXED;
 
-	if (hw->started == 0) {
+	if (!hw->started) {
 		link.link_status = ETH_LINK_DOWN;
 	} else if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 58fdd3d45..7ffd443e1 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -233,5 +233,5 @@ struct virtio_hw {
 	uint64_t    guest_features;
 	uint32_t    max_queue_pairs;
-	uint16_t    started;
+	bool        started;
 	uint16_t	max_mtu;
 	uint16_t    vtnet_hdr_size;
@@ -259,4 +259,5 @@ struct virtio_hw {
 	rte_spinlock_t state_lock;
 	struct rte_mbuf **inject_pkts;
+	bool        opened;
 
 	struct virtqueue **vqs;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.253419471 +0000
+++ 0038-net-virtio-do-not-re-enter-clean-up-routines.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From 2a821d81f355a40508c81c006f1e3002a1ba2494 Mon Sep 17 00:00:00 2001
+From 9ca7220ac5a4c0372ffd78565a5d69c49bcdecaf Mon Sep 17 00:00:00 2001
 From: Chas Williams <ciwillia@brocade.com>
 Date: Mon, 17 Jul 2017 19:05:22 -0400
 Subject: [PATCH] net/virtio: do not re-enter clean up routines
 
+[ upstream commit 2a821d81f355a40508c81c006f1e3002a1ba2494 ]
+
 .dev_uninit calls .dev_stop and .dev_close.  The work that is done in
 those routines doesn't need repeated.  Use started and opened to track
 the adapter's status.
 
 Fixes: c1f86306a026 ("virtio: add new driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chas Williams <ciwillia@brocade.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -18,7 +19,7 @@
  2 files changed, 15 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
-index cb6248eb6..e1fe36a23 100644
+index 4745899c6..b8693ff80 100644
 --- a/drivers/net/virtio/virtio_ethdev.c
 +++ b/drivers/net/virtio/virtio_ethdev.c
 @@ -589,4 +589,8 @@ virtio_dev_close(struct rte_eth_dev *dev)
@@ -30,21 +31,21 @@
 +
  	/* reset the NIC */
  	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
-@@ -1925,4 +1929,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -1928,4 +1932,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
  		hw->use_simple_rx = 0;
  
 +	hw->opened = true;
 +
  	return 0;
  }
-@@ -2015,5 +2021,5 @@ virtio_dev_start(struct rte_eth_dev *dev)
+@@ -2018,5 +2024,5 @@ virtio_dev_start(struct rte_eth_dev *dev)
  
  	set_rxtx_funcs(dev);
 -	hw->started = 1;
 +	hw->started = true;
  
  	/* Initialize Link state */
-@@ -2081,4 +2087,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
+@@ -2084,4 +2090,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
  
  	rte_spinlock_lock(&hw->state_lock);
 +	if (!hw->started)
@@ -53,7 +54,7 @@
 +
  	if (intr_conf->lsc || intr_conf->rxq) {
  		virtio_intr_disable(dev);
-@@ -2092,7 +2102,7 @@ virtio_dev_stop(struct rte_eth_dev *dev)
+@@ -2095,7 +2105,7 @@ virtio_dev_stop(struct rte_eth_dev *dev)
  	}
  
 -	hw->started = 0;
@@ -62,7 +63,7 @@
 +out_unlock:
  	rte_spinlock_unlock(&hw->state_lock);
  }
-@@ -2110,5 +2120,5 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
+@@ -2113,5 +2123,5 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
  	link.link_autoneg = ETH_LINK_FIXED;
  
 -	if (hw->started == 0) {
@@ -70,17 +71,17 @@
  		link.link_status = ETH_LINK_DOWN;
  	} else if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
 diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
-index 64ba6ecbc..e961a58ca 100644
+index 58fdd3d45..7ffd443e1 100644
 --- a/drivers/net/virtio/virtio_pci.h
 +++ b/drivers/net/virtio/virtio_pci.h
-@@ -232,5 +232,5 @@ struct virtio_hw {
+@@ -233,5 +233,5 @@ struct virtio_hw {
  	uint64_t    guest_features;
  	uint32_t    max_queue_pairs;
 -	uint16_t    started;
 +	bool        started;
  	uint16_t	max_mtu;
  	uint16_t    vtnet_hdr_size;
-@@ -258,4 +258,5 @@ struct virtio_hw {
+@@ -259,4 +259,5 @@ struct virtio_hw {
  	rte_spinlock_t state_lock;
  	struct rte_mbuf **inject_pkts;
 +	bool        opened;

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

* [dpdk-stable] patch 'ethdev: fix redundant function pointer check' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (36 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: do not re-enter clean up routines' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix Tx offload flags' " Kevin Traynor
                   ` (29 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 52ed89a09e572a5f694cae107417e23b9404d6a3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 01:46:50 +0000
Subject: [PATCH] ethdev: fix redundant function pointer check

[ upstream commit 11745065a5b98957dc834b04a3b175c62ae8a70b ]

RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.

Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index a20498711..07335a1d6 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3542,9 +3542,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
 
 	RTE_FUNC_PTR_OR_ERR_RET(*ethdev_uninit, -EINVAL);
-	if (ethdev_uninit) {
-		ret = ethdev_uninit(ethdev);
-		if (ret)
-			return ret;
-	}
+
+	ret = ethdev_uninit(ethdev);
+	if (ret)
+		return ret;
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.277802387 +0000
+++ 0039-ethdev-fix-redundant-function-pointer-check.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,12 +1,13 @@
-From 11745065a5b98957dc834b04a3b175c62ae8a70b Mon Sep 17 00:00:00 2001
+From 52ed89a09e572a5f694cae107417e23b9404d6a3 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 01:46:50 +0000
 Subject: [PATCH] ethdev: fix redundant function pointer check
 
+[ upstream commit 11745065a5b98957dc834b04a3b175c62ae8a70b ]
+
 RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.
 
 Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
@@ -15,10 +16,10 @@
  1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 9d3481389..36e5389b3 100644
+index a20498711..07335a1d6 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -3648,9 +3648,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
+@@ -3542,9 +3542,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
  
  	RTE_FUNC_PTR_OR_ERR_RET(*ethdev_uninit, -EINVAL);
 -	if (ethdev_uninit) {
@@ -31,7 +32,7 @@
 +	if (ret)
 +		return ret;
  
- 	return rte_eth_dev_release_port(ethdev);
+ 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 -- 
 2.19.0
 

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

* [dpdk-stable] patch 'app/testpmd: fix Tx offload flags' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (37 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'ethdev: fix redundant function pointer check' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/bonding: fix crash on probe' " Kevin Traynor
                   ` (28 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 6c16bdfdefc7a957d547c64dafa28e577d7ce263 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 02:16:39 +0000
Subject: [PATCH] app/testpmd: fix Tx offload flags

[ upstream commit 2482a004d6dc501cb2438e83e09cb76b8997e81b ]

ol_flags can be wrong if DEV_TX_OFFLOAD_VLAN_INSERT is not set in
tx_offloads

Fixes: 3eecba267cd6 ("app/testpmd: cleanup internal Tx offloads flags field")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/flowgen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 0531b5d27..3214e3c95 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -124,5 +124,5 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	struct udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
-	uint64_t ol_flags;
+	uint64_t ol_flags = 0;
 	uint16_t nb_rx;
 	uint16_t nb_tx;
@@ -156,5 +156,5 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	tx_offloads = ports[fs->tx_port].dev_conf.txmode.offloads;
 	if (tx_offloads	& DEV_TX_OFFLOAD_VLAN_INSERT)
-		ol_flags = PKT_TX_VLAN_PKT;
+		ol_flags |= PKT_TX_VLAN_PKT;
 	if (tx_offloads & DEV_TX_OFFLOAD_QINQ_INSERT)
 		ol_flags |= PKT_TX_QINQ_PKT;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.307204799 +0000
+++ 0040-app-testpmd-fix-Tx-offload-flags.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 2482a004d6dc501cb2438e83e09cb76b8997e81b Mon Sep 17 00:00:00 2001
+From 6c16bdfdefc7a957d547c64dafa28e577d7ce263 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 02:16:39 +0000
 Subject: [PATCH] app/testpmd: fix Tx offload flags
 
+[ upstream commit 2482a004d6dc501cb2438e83e09cb76b8997e81b ]
+
 ol_flags can be wrong if DEV_TX_OFFLOAD_VLAN_INSERT is not set in
 tx_offloads
 
 Fixes: 3eecba267cd6 ("app/testpmd: cleanup internal Tx offloads flags field")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

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

* [dpdk-stable] patch 'net/bonding: fix crash on probe' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (38 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix Tx offload flags' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'doc: clarify TSO Tx offload prerequisite' " Kevin Traynor
                   ` (27 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From ebd94d5c7d6180d31c9311f70a15c7a7ac2225c2 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 31 Oct 2018 15:50:08 +0000
Subject: [PATCH] net/bonding: fix crash on probe

[ upstream commit 7dc58bc7611a8ae899f654207aa6ddf4063a52d8 ]

After the patch below the call to rte_eth_bond_8023ad_agg_selection_set
from probe() segfaults; there is no need to call the function, just set
the mode directly.
Also, reverted 1620175b400e.

Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing")
Fixes: 1620175b400e ("net/bonding: fix invalid port id")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 0afc31bd6..d03f7ce7e 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3199,6 +3199,4 @@ bond_probe(struct rte_vdev_device *dev)
 	internals->kvlist = kvlist;
 
-	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
-
 	if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) {
 		if (rte_kvargs_process(kvlist,
@@ -3213,10 +3211,10 @@ bond_probe(struct rte_vdev_device *dev)
 
 		if (internals->mode == BONDING_MODE_8023AD)
-			rte_eth_bond_8023ad_agg_selection_set(port_id,
-					agg_mode);
+			internals->mode4.agg_selection = agg_mode;
 	} else {
-		rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE);
+		internals->mode4.agg_selection = AGG_STABLE;
 	}
 
+	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
 	RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on "
 			"socket %u.",	name, port_id, bonding_mode, socket_id);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.330728684 +0000
+++ 0041-net-bonding-fix-crash-on-probe.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 7dc58bc7611a8ae899f654207aa6ddf4063a52d8 Mon Sep 17 00:00:00 2001
+From ebd94d5c7d6180d31c9311f70a15c7a7ac2225c2 Mon Sep 17 00:00:00 2001
 From: Radu Nicolau <radu.nicolau@intel.com>
 Date: Wed, 31 Oct 2018 15:50:08 +0000
 Subject: [PATCH] net/bonding: fix crash on probe
 
+[ upstream commit 7dc58bc7611a8ae899f654207aa6ddf4063a52d8 ]
+
 After the patch below the call to rte_eth_bond_8023ad_agg_selection_set
 from probe() segfaults; there is no need to call the function, just set
 the mode directly.
@@ -10,7 +12,6 @@
 
 Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing")
 Fixes: 1620175b400e ("net/bonding: fix invalid port id")
-Cc: stable@dpdk.org
 
 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
 Acked-by: Chas Williams <chas3@att.com>
@@ -19,17 +20,17 @@
  1 file changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index 156f31c6b..1a6d8e4df 100644
+index 0afc31bd6..d03f7ce7e 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
-@@ -3217,6 +3217,4 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3199,6 +3199,4 @@ bond_probe(struct rte_vdev_device *dev)
  	internals->kvlist = kvlist;
  
 -	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
 -
  	if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) {
  		if (rte_kvargs_process(kvlist,
-@@ -3231,10 +3229,10 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3213,10 +3211,10 @@ bond_probe(struct rte_vdev_device *dev)
  
  		if (internals->mode == BONDING_MODE_8023AD)
 -			rte_eth_bond_8023ad_agg_selection_set(port_id,

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

* [dpdk-stable] patch 'doc: clarify TSO Tx offload prerequisite' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (39 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/bonding: fix crash on probe' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'vhost/crypto: fix inferred misuse of enum' " Kevin Traynor
                   ` (26 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 4d14441811f6c2eae1eb8468fbcbf8fb212dccc7 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Thu, 1 Nov 2018 08:46:42 +0000
Subject: [PATCH] doc: clarify TSO Tx offload prerequisite

[ upstream commit 25b85ae5db74820aab71e07f88e01c3d93932eff ]

Based on the PKT_TX_TCP_SEG definition,
the application needs to update PKT_TX_IPV4 or PKT_TX_IPV6
based on IPV4 or IPV6 packet and PKT_TX_IP_CKSUM ol_flags
to enable Tx TSO offload.

Fixes: dad1ec72a377 ("doc: document NIC features")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/nics/features.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index bccc27f49..4ad265ee4 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -209,5 +209,5 @@ Supports TCP Segmentation Offloading.
 * **[uses]       rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFLOAD_TCP_TSO``.
 * **[uses]       rte_eth_desc_lim**: ``nb_seg_max``, ``nb_mtu_seg_max``.
-* **[uses]       mbuf**: ``mbuf.ol_flags:PKT_TX_TCP_SEG``.
+* **[uses]       mbuf**: ``mbuf.ol_flags:`` ``PKT_TX_TCP_SEG``, ``PKT_TX_IPV4``, ``PKT_TX_IPV6``, ``PKT_TX_IP_CKSUM``.
 * **[uses]       mbuf**: ``mbuf.tso_segsz``, ``mbuf.l2_len``, ``mbuf.l3_len``, ``mbuf.l4_len``.
 * **[implements] datapath**: ``TSO functionality``.
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.358506082 +0000
+++ 0042-doc-clarify-TSO-Tx-offload-prerequisite.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From 25b85ae5db74820aab71e07f88e01c3d93932eff Mon Sep 17 00:00:00 2001
+From 4d14441811f6c2eae1eb8468fbcbf8fb212dccc7 Mon Sep 17 00:00:00 2001
 From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
 Date: Thu, 1 Nov 2018 08:46:42 +0000
 Subject: [PATCH] doc: clarify TSO Tx offload prerequisite
 
+[ upstream commit 25b85ae5db74820aab71e07f88e01c3d93932eff ]
+
 Based on the PKT_TX_TCP_SEG definition,
 the application needs to update PKT_TX_IPV4 or PKT_TX_IPV6
 based on IPV4 or IPV6 packet and PKT_TX_IP_CKSUM ol_flags
 to enable Tx TSO offload.
 
 Fixes: dad1ec72a377 ("doc: document NIC features")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,7 +19,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
-index 3fa5cb745..d3f904839 100644
+index bccc27f49..4ad265ee4 100644
 --- a/doc/guides/nics/features.rst
 +++ b/doc/guides/nics/features.rst
 @@ -209,5 +209,5 @@ Supports TCP Segmentation Offloading.

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

* [dpdk-stable] patch 'vhost/crypto: fix inferred misuse of enum' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (40 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'doc: clarify TSO Tx offload prerequisite' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/igb: update Tx offload mask' " Kevin Traynor
                   ` (25 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 758086d0110dc6d1a939ac7e8db78f192d78141b Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Thu, 1 Nov 2018 14:15:04 +0000
Subject: [PATCH] vhost/crypto: fix inferred misuse of enum

[ upstream commit d09328567e3212306b91d314a28214f81e0e9adf ]

Fix inffered misuse of enum rte_crypto_cipher_algorithm and
rte_crypto_auth_algorithm

Coverity issue: 277202
Fixes: e80a98708166 ("vhost/crypto: add session message handler")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 57341ef8f..1affeddfe 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -239,5 +239,5 @@ transform_cipher_param(struct rte_crypto_sym_xform *xform,
 
 	xform->type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	xform->cipher.algo = (uint32_t)ret;
+	xform->cipher.algo = (enum rte_crypto_cipher_algorithm)ret;
 	xform->cipher.key.length = param->cipher_key_len;
 	if (xform->cipher.key.length > 0)
@@ -289,5 +289,5 @@ transform_chain_param(struct rte_crypto_sym_xform *xforms,
 		return ret;
 	xform_cipher->type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	xform_cipher->cipher.algo = (uint32_t)ret;
+	xform_cipher->cipher.algo = (enum rte_crypto_cipher_algorithm)ret;
 	xform_cipher->cipher.key.length = param->cipher_key_len;
 	xform_cipher->cipher.key.data = param->cipher_key_buf;
@@ -303,5 +303,5 @@ transform_chain_param(struct rte_crypto_sym_xform *xforms,
 	if (unlikely(ret < 0))
 		return ret;
-	xform_auth->auth.algo = (uint32_t)ret;
+	xform_auth->auth.algo = (enum rte_crypto_auth_algorithm)ret;
 	xform_auth->auth.digest_length = param->digest_len;
 	xform_auth->auth.key.length = param->auth_key_len;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.381234090 +0000
+++ 0043-vhost-crypto-fix-inferred-misuse-of-enum.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From d09328567e3212306b91d314a28214f81e0e9adf Mon Sep 17 00:00:00 2001
+From 758086d0110dc6d1a939ac7e8db78f192d78141b Mon Sep 17 00:00:00 2001
 From: Fan Zhang <roy.fan.zhang@intel.com>
 Date: Thu, 1 Nov 2018 14:15:04 +0000
 Subject: [PATCH] vhost/crypto: fix inferred misuse of enum
 
+[ upstream commit d09328567e3212306b91d314a28214f81e0e9adf ]
+
 Fix inffered misuse of enum rte_crypto_cipher_algorithm and
 rte_crypto_auth_algorithm
 
 Coverity issue: 277202
 Fixes: e80a98708166 ("vhost/crypto: add session message handler")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -17,7 +18,7 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
-index 9811a232a..5472bead0 100644
+index 57341ef8f..1affeddfe 100644
 --- a/lib/librte_vhost/vhost_crypto.c
 +++ b/lib/librte_vhost/vhost_crypto.c
 @@ -239,5 +239,5 @@ transform_cipher_param(struct rte_crypto_sym_xform *xform,

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

* [dpdk-stable] patch 'net/igb: update Tx offload mask' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (41 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'vhost/crypto: fix inferred misuse of enum' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/avf/base: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
                   ` (24 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Zhirun Yan; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From cebccc2ea2865209f4b1f7fc0c3b547a55cdaeb4 Mon Sep 17 00:00:00 2001
From: Zhirun Yan <zhirun.yan@intel.com>
Date: Mon, 5 Nov 2018 12:56:44 +0000
Subject: [PATCH] net/igb: update Tx offload mask

[ upstream commit ac60b2de4f551be7486292cd8c555f4dd955944a ]

Tx offload mask is updated in following commit 1037ed842c37
("mbuf: fix Tx offload mask") Currently, the new added offload
flags are not supported in PMD and application will fail to call
PMD transmit prepare function.

This patch updates IGB_TX_OFFFLOAD_MASK.

Fixes: 1037ed842c37 ("mbuf: fix Tx offload mask")

Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index e97b244ff..fa4746167 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -51,4 +51,8 @@
 /* Bit Mask to indicate what bits required for building TX context */
 #define IGB_TX_OFFLOAD_MASK (			 \
+		PKT_TX_OUTER_IPV6 |	 \
+		PKT_TX_OUTER_IPV4 |	 \
+		PKT_TX_IPV6 |		 \
+		PKT_TX_IPV4 |		 \
 		PKT_TX_VLAN_PKT |		 \
 		PKT_TX_IP_CKSUM |		 \
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.406848890 +0000
+++ 0044-net-igb-update-Tx-offload-mask.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From ac60b2de4f551be7486292cd8c555f4dd955944a Mon Sep 17 00:00:00 2001
+From cebccc2ea2865209f4b1f7fc0c3b547a55cdaeb4 Mon Sep 17 00:00:00 2001
 From: Zhirun Yan <zhirun.yan@intel.com>
 Date: Mon, 5 Nov 2018 12:56:44 +0000
 Subject: [PATCH] net/igb: update Tx offload mask
 
+[ upstream commit ac60b2de4f551be7486292cd8c555f4dd955944a ]
+
 Tx offload mask is updated in following commit 1037ed842c37
 ("mbuf: fix Tx offload mask") Currently, the new added offload
 flags are not supported in PMD and application will fail to call
@@ -11,7 +13,6 @@
 This patch updates IGB_TX_OFFFLOAD_MASK.
 
 Fixes: 1037ed842c37 ("mbuf: fix Tx offload mask")
-Cc: stable@dpdk.org
 
 Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,7 +21,7 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
-index 25ff5f68f..ab0a80e15 100644
+index e97b244ff..fa4746167 100644
 --- a/drivers/net/e1000/igb_rxtx.c
 +++ b/drivers/net/e1000/igb_rxtx.c
 @@ -51,4 +51,8 @@

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

* [dpdk-stable] patch 'net/avf/base: fix shifting 32-bit signed variable 31 times' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (42 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/igb: update Tx offload mask' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/i40e: fix Rx instability with vector mode' " Kevin Traynor
                   ` (23 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b0e7ad911f9bef92543efb95c30d986648f72df6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 03:51:33 +0000
Subject: [PATCH] net/avf/base: fix shifting 32-bit signed variable 31 times

[ upstream commit 37cf9ea83dc27be4917dbd01aaae182df9800c7f ]

Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/avf/base/avf_register.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/avf/base/avf_register.h b/drivers/net/avf/base/avf_register.h
index ba5a9f3fa..adb989583 100644
--- a/drivers/net/avf/base/avf_register.h
+++ b/drivers/net/avf/base/avf_register.h
@@ -77,5 +77,5 @@ POSSIBILITY OF SUCH DAMAGE.
 #define AVF_ARQLEN1_ARQCRIT_MASK    AVF_MASK(0x1, AVF_ARQLEN1_ARQCRIT_SHIFT)
 #define AVF_ARQLEN1_ARQENABLE_SHIFT 31
-#define AVF_ARQLEN1_ARQENABLE_MASK  AVF_MASK(0x1, AVF_ARQLEN1_ARQENABLE_SHIFT)
+#define AVF_ARQLEN1_ARQENABLE_MASK  AVF_MASK(0x1U, AVF_ARQLEN1_ARQENABLE_SHIFT)
 #define AVF_ARQT1            0x00007000 /* Reset: EMPR */
 #define AVF_ARQT1_ARQT_SHIFT 0
@@ -100,5 +100,5 @@ POSSIBILITY OF SUCH DAMAGE.
 #define AVF_ATQLEN1_ATQCRIT_MASK    AVF_MASK(0x1, AVF_ATQLEN1_ATQCRIT_SHIFT)
 #define AVF_ATQLEN1_ATQENABLE_SHIFT 31
-#define AVF_ATQLEN1_ATQENABLE_MASK  AVF_MASK(0x1, AVF_ATQLEN1_ATQENABLE_SHIFT)
+#define AVF_ATQLEN1_ATQENABLE_MASK  AVF_MASK(0x1U, AVF_ATQLEN1_ATQENABLE_SHIFT)
 #define AVF_ATQT1            0x00008400 /* Reset: EMPR */
 #define AVF_ATQT1_ATQT_SHIFT 0
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.431530149 +0000
+++ 0045-net-avf-base-fix-shifting-32-bit-signed-variable-31-.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,10 +1,11 @@
-From 37cf9ea83dc27be4917dbd01aaae182df9800c7f Mon Sep 17 00:00:00 2001
+From b0e7ad911f9bef92543efb95c30d986648f72df6 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 03:51:33 +0000
 Subject: [PATCH] net/avf/base: fix shifting 32-bit signed variable 31 times
 
+[ upstream commit 37cf9ea83dc27be4917dbd01aaae182df9800c7f ]
+
 Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>

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

* [dpdk-stable] patch 'net/i40e: fix Rx instability with vector mode' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (43 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/avf/base: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/bnxt: fix uninitialized variable access' " Kevin Traynor
                   ` (22 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b9d615675c577192f26e1203c54c70aa22f483fd Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Mon, 5 Nov 2018 11:18:12 +0800
Subject: [PATCH] net/i40e: fix Rx instability with vector mode

[ upstream commit 054d1be48cc114c5d3bf87c7ebdf46703876e8d5 ]

Previously, there is instability during vector Rx if descriptor
number is not power of 2, e.g. process hang and some Rx packets
are unexpectedly empty. That's because vector Rx mode assumes Rx
descriptor number is power of 2 when doing bit mask.
This patch allows vector mode only when the number of Rx descriptor
is power of 2.

Fixes: 8e109464c022 ("i40e: allow vector Rx and Tx usage")
Fixes: a3c83a2527e1 ("net/i40e: enable runtime queue setup")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 doc/guides/nics/i40e.rst                | 29 +++++++++++++++++++
 drivers/net/i40e/i40e_rxtx.c            |  5 ++++
 drivers/net/i40e/i40e_rxtx_vec_common.h | 38 +++++++++++++++++++++++++
 3 files changed, 72 insertions(+)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 65d87f869..003257ccc 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -164,4 +164,33 @@ Runtime Config Options
   representors must be specified on the creation of the PF.
 
+<<<<<<< HEAD
+||||||| merged common ancestors
+- ``Use latest supported vector`` (default ``disable``)
+
+  Latest supported vector path may not always get the best perf so vector path was
+  recommended to use only on later platform. But users may want the latest vector path
+  since it can get better perf in some real work loading cases. So ``devargs`` param
+  ``use-latest-supported-vec`` is introduced, for example::
+
+  -w 84:00.0,use-latest-supported-vec=1
+
+=======
+- ``Use latest supported vector`` (default ``disable``)
+
+  Latest supported vector path may not always get the best perf so vector path was
+  recommended to use only on later platform. But users may want the latest vector path
+  since it can get better perf in some real work loading cases. So ``devargs`` param
+  ``use-latest-supported-vec`` is introduced, for example::
+
+  -w 84:00.0,use-latest-supported-vec=1
+
+Vector RX Pre-conditions
+~~~~~~~~~~~~~~~~~~~~~~~~
+For Vector RX it is assumed that the number of descriptor rings will be a power
+of 2. With this pre-condition, the ring pointer can easily scroll back to the
+head after hitting the tail without a conditional check. In addition Vector RX
+can use this assumption to do a bit mask using ``ring_size - 1``.
+
+>>>>>>> net/i40e: fix Rx instability with vector mode
 Driver compilation and testing
 ------------------------------
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 26c2f17bd..e0d53d022 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1741,4 +1741,9 @@ i40e_dev_rx_queue_setup_runtime(struct rte_eth_dev *dev,
 		i40e_set_rx_function(dev);
 		return 0;
+	} else if (ad->rx_vec_allowed && !rte_is_power_of_2(rxq->nb_rx_desc)) {
+		PMD_DRV_LOG(ERR, "Vector mode is allowed, but descriptor"
+			    " number %d of queue %d isn't power of 2",
+			    rxq->nb_rx_desc, rxq->queue_id);
+		return -EINVAL;
 	}
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
index 63cb17742..ccaffef99 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
@@ -193,6 +193,11 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
 {
 #ifndef RTE_LIBRTE_IEEE1588
+	struct i40e_adapter *ad =
+		I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 	struct rte_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
+	struct i40e_rx_queue *rxq;
+	uint16_t desc, i;
+	bool first_queue;
 
 	/* no fdir support */
@@ -210,4 +215,37 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
 		return -1;
 
+	/**
+	 * Vector mode is allowed only when number of Rx queue
+	 * descriptor is power of 2.
+	 */
+	if (!dev->data->dev_started) {
+		first_queue = true;
+		for (i = 0; i < dev->data->nb_rx_queues; i++) {
+			rxq = dev->data->rx_queues[i];
+			if (!rxq)
+				continue;
+			desc = rxq->nb_rx_desc;
+			if (first_queue)
+				ad->rx_vec_allowed =
+					rte_is_power_of_2(desc);
+			else
+				ad->rx_vec_allowed =
+					ad->rx_vec_allowed ?
+					rte_is_power_of_2(desc) :
+					ad->rx_vec_allowed;
+			first_queue = false;
+		}
+	} else {
+		/* Only check the first queue's descriptor number */
+		for (i = 0; i < dev->data->nb_rx_queues; i++) {
+			rxq = dev->data->rx_queues[i];
+			if (!rxq)
+				continue;
+			desc = rxq->nb_rx_desc;
+			ad->rx_vec_allowed = rte_is_power_of_2(desc);
+			break;
+		}
+	}
+
 	return 0;
 #else
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.456409870 +0000
+++ 0046-net-i40e-fix-Rx-instability-with-vector-mode.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 054d1be48cc114c5d3bf87c7ebdf46703876e8d5 Mon Sep 17 00:00:00 2001
+From b9d615675c577192f26e1203c54c70aa22f483fd Mon Sep 17 00:00:00 2001
 From: Beilei Xing <beilei.xing@intel.com>
 Date: Mon, 5 Nov 2018 11:18:12 +0800
 Subject: [PATCH] net/i40e: fix Rx instability with vector mode
 
+[ upstream commit 054d1be48cc114c5d3bf87c7ebdf46703876e8d5 ]
+
 Previously, there is instability during vector Rx if descriptor
 number is not power of 2, e.g. process hang and some Rx packets
 are unexpectedly empty. That's because vector Rx mode assumes Rx
@@ -12,23 +14,43 @@
 
 Fixes: 8e109464c022 ("i40e: allow vector Rx and Tx usage")
 Fixes: a3c83a2527e1 ("net/i40e: enable runtime queue setup")
-Cc: stable@dpdk.org
 
 Signed-off-by: Beilei Xing <beilei.xing@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
- doc/guides/nics/i40e.rst                |  7 +++++
+ doc/guides/nics/i40e.rst                | 29 +++++++++++++++++++
  drivers/net/i40e/i40e_rxtx.c            |  5 ++++
  drivers/net/i40e/i40e_rxtx_vec_common.h | 38 +++++++++++++++++++++++++
- 3 files changed, 50 insertions(+)
+ 3 files changed, 72 insertions(+)
 
 diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
-index ab3928a68..bfacbd117 100644
+index 65d87f869..003257ccc 100644
 --- a/doc/guides/nics/i40e.rst
 +++ b/doc/guides/nics/i40e.rst
-@@ -173,4 +173,11 @@ Runtime Config Options
-   -w 84:00.0,use-latest-supported-vec=1
+@@ -164,4 +164,33 @@ Runtime Config Options
+   representors must be specified on the creation of the PF.
  
++<<<<<<< HEAD
++||||||| merged common ancestors
++- ``Use latest supported vector`` (default ``disable``)
++
++  Latest supported vector path may not always get the best perf so vector path was
++  recommended to use only on later platform. But users may want the latest vector path
++  since it can get better perf in some real work loading cases. So ``devargs`` param
++  ``use-latest-supported-vec`` is introduced, for example::
++
++  -w 84:00.0,use-latest-supported-vec=1
++
++=======
++- ``Use latest supported vector`` (default ``disable``)
++
++  Latest supported vector path may not always get the best perf so vector path was
++  recommended to use only on later platform. But users may want the latest vector path
++  since it can get better perf in some real work loading cases. So ``devargs`` param
++  ``use-latest-supported-vec`` is introduced, for example::
++
++  -w 84:00.0,use-latest-supported-vec=1
++
 +Vector RX Pre-conditions
 +~~~~~~~~~~~~~~~~~~~~~~~~
 +For Vector RX it is assumed that the number of descriptor rings will be a power
@@ -36,13 +58,14 @@
 +head after hitting the tail without a conditional check. In addition Vector RX
 +can use this assumption to do a bit mask using ``ring_size - 1``.
 +
++>>>>>>> net/i40e: fix Rx instability with vector mode
  Driver compilation and testing
  ------------------------------
 diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index e76412207..e1152ff0e 100644
+index 26c2f17bd..e0d53d022 100644
 --- a/drivers/net/i40e/i40e_rxtx.c
 +++ b/drivers/net/i40e/i40e_rxtx.c
-@@ -1742,4 +1742,9 @@ i40e_dev_rx_queue_setup_runtime(struct rte_eth_dev *dev,
+@@ -1741,4 +1741,9 @@ i40e_dev_rx_queue_setup_runtime(struct rte_eth_dev *dev,
  		i40e_set_rx_function(dev);
  		return 0;
 +	} else if (ad->rx_vec_allowed && !rte_is_power_of_2(rxq->nb_rx_desc)) {
@@ -53,7 +76,7 @@
  	}
  
 diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
-index f00f6d648..0e6ffa007 100644
+index 63cb17742..ccaffef99 100644
 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h
 +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
 @@ -193,6 +193,11 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
@@ -68,7 +91,7 @@
 +	bool first_queue;
  
  	/* no fdir support */
-@@ -208,4 +213,37 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
+@@ -210,4 +215,37 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
  		return -1;
  
 +	/**

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

* [dpdk-stable] patch 'net/bnxt: fix uninitialized variable access' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (44 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/i40e: fix Rx instability with vector mode' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'lib: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
                   ` (21 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 0262f01d631ffb47ca1564f375f7a94acc488b0c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 04:35:42 +0000
Subject: [PATCH] net/bnxt: fix uninitialized variable access

[ upstream commit c06aee624d69f91f253fa8e6f0c809c03ef126ce ]

ag_cons is used uninitialized, it is used when DEBUG enabled, remove
debug code.

Fixes: 0958d8b6435d ("net/bnxt: support LRO")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index c7bc88481..1bfc63d93 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -103,23 +103,4 @@ static inline void bnxt_reuse_rx_mbuf(struct bnxt_rx_ring_info *rxr,
 }
 
-#ifdef BNXT_DEBUG
-static void bnxt_reuse_ag_mbuf(struct bnxt_rx_ring_info *rxr, uint16_t cons,
-			       struct rte_mbuf *mbuf)
-{
-	uint16_t prod = rxr->ag_prod;
-	struct bnxt_sw_rx_bd *prod_rx_buf;
-	struct rx_prod_pkt_bd *prod_bd, *cons_bd;
-
-	prod_rx_buf = &rxr->ag_buf_ring[prod];
-
-	prod_rx_buf->mbuf = mbuf;
-
-	prod_bd = &rxr->ag_desc_ring[prod];
-	cons_bd = &rxr->ag_desc_ring[cons];
-
-	prod_bd->address = cons_bd->addr;
-}
-#endif
-
 static inline
 struct rte_mbuf *bnxt_consume_rx_buf(struct bnxt_rx_ring_info *rxr,
@@ -378,7 +359,4 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	uint16_t cons, prod, cp_cons =
 	    RING_CMP(cpr->cp_ring_struct, tmp_raw_cons);
-#ifdef BNXT_DEBUG
-	uint16_t ag_cons;
-#endif
 	struct rte_mbuf *mbuf;
 	int rc = 0;
@@ -483,6 +461,4 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 		/* Re-install the mbuf back to the rx ring */
 		bnxt_reuse_rx_mbuf(rxr, cons, mbuf);
-		if (agg_buf)
-			bnxt_reuse_ag_mbuf(rxr, ag_cons, mbuf);
 
 		rc = -EIO;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.484551877 +0000
+++ 0047-net-bnxt-fix-uninitialized-variable-access.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From c06aee624d69f91f253fa8e6f0c809c03ef126ce Mon Sep 17 00:00:00 2001
+From 0262f01d631ffb47ca1564f375f7a94acc488b0c Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 04:35:42 +0000
 Subject: [PATCH] net/bnxt: fix uninitialized variable access
 
+[ upstream commit c06aee624d69f91f253fa8e6f0c809c03ef126ce ]
+
 ag_cons is used uninitialized, it is used when DEBUG enabled, remove
 debug code.
 
 Fixes: 0958d8b6435d ("net/bnxt: support LRO")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

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

* [dpdk-stable] patch 'lib: fix shifting 32-bit signed variable 31 times' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (45 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/bnxt: fix uninitialized variable access' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'service: fix possible null access' " Kevin Traynor
                   ` (20 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 085051008e491e50fe91b1863003f41b6281127e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 01:08:44 +0000
Subject: [PATCH] lib: fix shifting 32-bit signed variable 31 times

[ upstream commit 9eb06884120091a21fdfc35850167f6245c2109e ]

Fix cppcheck warning by marking variable as unsigned.

Fixes: dc276b5780c2 ("acl: new library")
Fixes: 986ff526fb84 ("net: add CRC computation API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_acl/acl_gen.c     | 2 +-
 lib/librte_net/rte_net_crc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_acl/acl_gen.c b/lib/librte_acl/acl_gen.c
index bed66be08..35a0140b4 100644
--- a/lib/librte_acl/acl_gen.c
+++ b/lib/librte_acl/acl_gen.c
@@ -164,5 +164,5 @@ acl_count_sequential_groups(struct rte_acl_bitset *bits, int zero_one)
 	for (n = QRANGE_MIN; n < UINT8_MAX + 1; n++) {
 		if (bits->bits[n / (sizeof(bits_t) * 8)] &
-				(1 << (n % (sizeof(bits_t) * 8)))) {
+				(1U << (n % (sizeof(bits_t) * 8)))) {
 			if (zero_one == 1 && last_bit != 1)
 				ranges++;
diff --git a/lib/librte_net/rte_net_crc.c b/lib/librte_net/rte_net_crc.c
index 73ac3a959..dca0830e2 100644
--- a/lib/librte_net/rte_net_crc.c
+++ b/lib/librte_net/rte_net_crc.c
@@ -70,6 +70,6 @@ reflect_32bits(uint32_t val)
 
 	for (i = 0; i < 32; i++)
-		if ((val & (1 << i)) != 0)
-			res |= (uint32_t)(1 << (31 - i));
+		if ((val & (1U << i)) != 0)
+			res |= (uint32_t)(1U << (31 - i));
 
 	return res;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.508423003 +0000
+++ 0048-lib-fix-shifting-32-bit-signed-variable-31-times.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 9eb06884120091a21fdfc35850167f6245c2109e Mon Sep 17 00:00:00 2001
+From 085051008e491e50fe91b1863003f41b6281127e Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 01:08:44 +0000
 Subject: [PATCH] lib: fix shifting 32-bit signed variable 31 times
 
+[ upstream commit 9eb06884120091a21fdfc35850167f6245c2109e ]
+
 Fix cppcheck warning by marking variable as unsigned.
 
 Fixes: dc276b5780c2 ("acl: new library")
 Fixes: 986ff526fb84 ("net: add CRC computation API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---

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

* [dpdk-stable] patch 'service: fix possible null access' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (46 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'lib: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'vhost: fix possible out of bound " Kevin Traynor
                   ` (19 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 1cc2853ea870a1a5d0197d96b42693b6d848b627 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 01:08:45 +0000
Subject: [PATCH] service: fix possible null access

[ upstream commit c8b506e4b661c23264debc66f52c7270f903a00e ]

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 8767c7225..0f3695c4b 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -796,4 +796,7 @@ rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s,
 	}
 
+	if (f == NULL)
+		return;
+
 	fprintf(f, "  %s: stats %d\tcalls %"PRIu64"\tcycles %"
 			PRIu64"\tavg: %"PRIu64"\n",
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.531376173 +0000
+++ 0049-service-fix-possible-null-access.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,10 +1,11 @@
-From c8b506e4b661c23264debc66f52c7270f903a00e Mon Sep 17 00:00:00 2001
+From 1cc2853ea870a1a5d0197d96b42693b6d848b627 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 01:08:45 +0000
 Subject: [PATCH] service: fix possible null access
 
+[ upstream commit c8b506e4b661c23264debc66f52c7270f903a00e ]
+
 Fixes: 21698354c832 ("service: introduce service cores concept")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

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

* [dpdk-stable] patch 'vhost: fix possible out of bound access' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (47 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'service: fix possible null access' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'ip_frag: check fragment length of incoming packet' " Kevin Traynor
                   ` (18 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e1008b430ca92c3d9ce5b61731a1cda54dc1e368 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Sun, 28 Oct 2018 01:08:46 +0000
Subject: [PATCH] vhost: fix possible out of bound access

[ upstream commit 7b178300accc661b7bbd47da93380106378dba1c ]

Fixes: d7280c9fffcb ("vhost: support selective datapath")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vdpa.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c
index c82fd4370..1b12e87f6 100644
--- a/lib/librte_vhost/vdpa.c
+++ b/lib/librte_vhost/vdpa.c
@@ -64,4 +64,7 @@ rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
 	}
 
+	if (i == MAX_VHOST_DEVICE)
+		return -1;
+
 	sprintf(device_name, "vdpa-dev-%d", i);
 	dev = rte_zmalloc(device_name, sizeof(struct rte_vdpa_device),
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.555736957 +0000
+++ 0050-vhost-fix-possible-out-of-bound-access.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,10 +1,11 @@
-From 7b178300accc661b7bbd47da93380106378dba1c Mon Sep 17 00:00:00 2001
+From e1008b430ca92c3d9ce5b61731a1cda54dc1e368 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Sun, 28 Oct 2018 01:08:46 +0000
 Subject: [PATCH] vhost: fix possible out of bound access
 
+[ upstream commit 7b178300accc661b7bbd47da93380106378dba1c ]
+
 Fixes: d7280c9fffcb ("vhost: support selective datapath")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -13,7 +14,7 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c
-index c2c5dff1d..e7d849ee0 100644
+index c82fd4370..1b12e87f6 100644
 --- a/lib/librte_vhost/vdpa.c
 +++ b/lib/librte_vhost/vdpa.c
 @@ -64,4 +64,7 @@ rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,

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

* [dpdk-stable] patch 'ip_frag: check fragment length of incoming packet' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (48 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'vhost: fix possible out of bound " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/pci: fix config r/w access' " Kevin Traynor
                   ` (17 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Ryan E Hall, Alexander V Gutkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 8110ef175034b7a54ff2dfab80aabbf0fc1a7f22 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Mon, 5 Nov 2018 12:18:57 +0000
Subject: [PATCH] ip_frag: check fragment length of incoming packet

[ upstream commit 7f0983ee331c9f08dabdb5b7f555ddf399003dcf ]

Under some conditions ill-formed fragments might cause
reassembly code to corrupt mbufs and/or crash.
Let say the following fragments sequence:
<ofs=0,len=100, flags=MF>
<ofs=96,len=100, flags=MF>
<ofs=200,len=0,flags=MF>
<ofs=200,len=100,flags=0>
can trigger the problem.
To overcome such situation, added check that fragment length
of incoming value is greater than zero.

Fixes: 601e279df074 ("ip_frag: move fragmentation/reassembly headers into a library")
Fixes: 4f1a8f633862 ("ip_frag: add IPv6 reassembly")

Reported-by: Ryan E Hall <ryan.e.hall@intel.com>
Reported-by: Alexander V Gutkin <alexander.v.gutkin@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_reassembly.c | 22 +++++++++++++------
 lib/librte_ip_frag/rte_ipv6_reassembly.c | 28 +++++++++++++++++-------
 2 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index 4956b99ea..1029b7abc 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -37,6 +37,9 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp)
 			if(fp->frags[i].ofs + fp->frags[i].len == ofs) {
 
+				RTE_ASSERT(curr_idx != i);
+
 				/* adjust start of the last fragment data. */
-				rte_pktmbuf_adj(m, (uint16_t)(m->l2_len + m->l3_len));
+				rte_pktmbuf_adj(m,
+					(uint16_t)(m->l2_len + m->l3_len));
 				rte_pktmbuf_chain(fp->frags[i].mb, m);
 
@@ -97,12 +100,12 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp)
 struct rte_mbuf *
 rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
-		struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
-		struct ipv4_hdr *ip_hdr)
+	struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
+	struct ipv4_hdr *ip_hdr)
 {
 	struct ip_frag_pkt *fp;
 	struct ip_frag_key key;
 	const unaligned_uint64_t *psd;
-	uint16_t ip_len;
 	uint16_t flag_offset, ip_ofs, ip_flag;
+	int32_t ip_len;
 
 	flag_offset = rte_be_to_cpu_16(ip_hdr->fragment_offset);
@@ -117,10 +120,9 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 
 	ip_ofs *= IPV4_HDR_OFFSET_UNITS;
-	ip_len = (uint16_t)(rte_be_to_cpu_16(ip_hdr->total_length) -
-		mb->l3_len);
+	ip_len = rte_be_to_cpu_16(ip_hdr->total_length) - mb->l3_len;
 
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
 		"mbuf: %p, tms: %" PRIu64
-		", key: <%" PRIx64 ", %#x>, ofs: %u, len: %u, flags: %#x\n"
+		", key: <%" PRIx64 ", %#x>, ofs: %u, len: %d, flags: %#x\n"
 		"tbl: %p, max_cycles: %" PRIu64 ", entry_mask: %#x, "
 		"max_entries: %u, use_entries: %u\n\n",
@@ -130,4 +132,10 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		tbl->use_entries);
 
+	/* check that fragment length is greater then zero. */
+	if (ip_len <= 0) {
+		IP_FRAG_MBUF2DR(dr, mb);
+		return NULL;
+	}
+
 	/* try to find/add entry into the fragment's table. */
 	if ((fp = ip_frag_find(tbl, dr, &key, tms)) == NULL) {
diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c
index db249fe60..855e3f740 100644
--- a/lib/librte_ip_frag/rte_ipv6_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c
@@ -60,6 +60,9 @@ ipv6_frag_reassemble(struct ip_frag_pkt *fp)
 			if (fp->frags[i].ofs + fp->frags[i].len == ofs) {
 
+				RTE_ASSERT(curr_idx != i);
+
 				/* adjust start of the last fragment data. */
-				rte_pktmbuf_adj(m, (uint16_t)(m->l2_len + m->l3_len));
+				rte_pktmbuf_adj(m,
+					(uint16_t)(m->l2_len + m->l3_len));
 				rte_pktmbuf_chain(fp->frags[i].mb, m);
 
@@ -136,10 +139,11 @@ ipv6_frag_reassemble(struct ip_frag_pkt *fp)
 struct rte_mbuf *
 rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
-		struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
-		struct ipv6_hdr *ip_hdr, struct ipv6_extension_fragment *frag_hdr)
+	struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
+	struct ipv6_hdr *ip_hdr, struct ipv6_extension_fragment *frag_hdr)
 {
 	struct ip_frag_pkt *fp;
 	struct ip_frag_key key;
-	uint16_t ip_len, ip_ofs;
+	uint16_t ip_ofs;
+	int32_t ip_len;
 
 	rte_memcpy(&key.src_dst[0], ip_hdr->src_addr, 16);
@@ -152,7 +156,8 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 
 	/*
-	 * as per RFC2460, payload length contains all extension headers as well.
-	 * since we don't support anything but frag headers, this is what we remove
-	 * from the payload len.
+	 * as per RFC2460, payload length contains all extension headers
+	 * as well.
+	 * since we don't support anything but frag headers,
+	 * this is what we remove from the payload len.
 	 */
 	ip_len = rte_be_to_cpu_16(ip_hdr->payload_len) - sizeof(*frag_hdr);
@@ -160,5 +165,6 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
 		"mbuf: %p, tms: %" PRIu64
-		", key: <" IPv6_KEY_BYTES_FMT ", %#x>, ofs: %u, len: %u, flags: %#x\n"
+		", key: <" IPv6_KEY_BYTES_FMT ", %#x>, "
+		"ofs: %u, len: %d, flags: %#x\n"
 		"tbl: %p, max_cycles: %" PRIu64 ", entry_mask: %#x, "
 		"max_entries: %u, use_entries: %u\n\n",
@@ -169,4 +175,10 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		tbl->use_entries);
 
+	/* check that fragment length is greater then zero. */
+	if (ip_len <= 0) {
+		IP_FRAG_MBUF2DR(dr, mb);
+		return NULL;
+	}
+
 	/* try to find/add entry into the fragment's table. */
 	fp = ip_frag_find(tbl, dr, &key, tms);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.580563827 +0000
+++ 0051-ip_frag-check-fragment-length-of-incoming-packet.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 7f0983ee331c9f08dabdb5b7f555ddf399003dcf Mon Sep 17 00:00:00 2001
+From 8110ef175034b7a54ff2dfab80aabbf0fc1a7f22 Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Mon, 5 Nov 2018 12:18:57 +0000
 Subject: [PATCH] ip_frag: check fragment length of incoming packet
 
+[ upstream commit 7f0983ee331c9f08dabdb5b7f555ddf399003dcf ]
+
 Under some conditions ill-formed fragments might cause
 reassembly code to corrupt mbufs and/or crash.
 Let say the following fragments sequence:
@@ -16,7 +18,6 @@
 
 Fixes: 601e279df074 ("ip_frag: move fragmentation/reassembly headers into a library")
 Fixes: 4f1a8f633862 ("ip_frag: add IPv6 reassembly")
-Cc: stable@dpdk.org
 
 Reported-by: Ryan E Hall <ryan.e.hall@intel.com>
 Reported-by: Alexander V Gutkin <alexander.v.gutkin@intel.com>

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

* [dpdk-stable] patch 'bus/pci: fix config r/w access' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (49 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'ip_frag: check fragment length of incoming packet' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/flow_filtering: filter out unsupported offloads' " Kevin Traynor
                   ` (16 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From bc4816f2aa5cfc0fd35782a95e62d42eaa842766 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Thu, 1 Nov 2018 12:10:09 +0000
Subject: [PATCH] bus/pci: fix config r/w access

[ upstream commit a38eafedda1de14c9fd7219e769e89e4aec92a45 ]

The recent change to rte_pci_read/write_config() missed
uio_pci_generic case.

Fixes: 630deed612ca ("bus/pci: compare kernel driver instead of interrupt handler")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/pci/linux/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 58b615a47..563e36c46 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -678,4 +678,5 @@ int rte_pci_read_config(const struct rte_pci_device *device,
 	switch (device->kdrv) {
 	case RTE_KDRV_IGB_UIO:
+	case RTE_KDRV_UIO_GENERIC:
 		return pci_uio_read_config(intr_handle, buf, len, offset);
 #ifdef VFIO_PRESENT
@@ -701,4 +702,5 @@ int rte_pci_write_config(const struct rte_pci_device *device,
 	switch (device->kdrv) {
 	case RTE_KDRV_IGB_UIO:
+	case RTE_KDRV_UIO_GENERIC:
 		return pci_uio_write_config(intr_handle, buf, len, offset);
 #ifdef VFIO_PRESENT
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.605832009 +0000
+++ 0052-bus-pci-fix-config-r-w-access.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From a38eafedda1de14c9fd7219e769e89e4aec92a45 Mon Sep 17 00:00:00 2001
+From bc4816f2aa5cfc0fd35782a95e62d42eaa842766 Mon Sep 17 00:00:00 2001
 From: Fan Zhang <roy.fan.zhang@intel.com>
 Date: Thu, 1 Nov 2018 12:10:09 +0000
 Subject: [PATCH] bus/pci: fix config r/w access
 
+[ upstream commit a38eafedda1de14c9fd7219e769e89e4aec92a45 ]
+
 The recent change to rte_pci_read/write_config() missed
 uio_pci_generic case.
 
 Fixes: 630deed612ca ("bus/pci: compare kernel driver instead of interrupt handler")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
@@ -16,16 +17,16 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
-index f87533c5c..c99d523f0 100644
+index 58b615a47..563e36c46 100644
 --- a/drivers/bus/pci/linux/pci.c
 +++ b/drivers/bus/pci/linux/pci.c
-@@ -714,4 +714,5 @@ int rte_pci_read_config(const struct rte_pci_device *device,
+@@ -678,4 +678,5 @@ int rte_pci_read_config(const struct rte_pci_device *device,
  	switch (device->kdrv) {
  	case RTE_KDRV_IGB_UIO:
 +	case RTE_KDRV_UIO_GENERIC:
  		return pci_uio_read_config(intr_handle, buf, len, offset);
  #ifdef VFIO_PRESENT
-@@ -737,4 +738,5 @@ int rte_pci_write_config(const struct rte_pci_device *device,
+@@ -701,4 +702,5 @@ int rte_pci_write_config(const struct rte_pci_device *device,
  	switch (device->kdrv) {
  	case RTE_KDRV_IGB_UIO:
 +	case RTE_KDRV_UIO_GENERIC:

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

* [dpdk-stable] patch 'examples/flow_filtering: filter out unsupported offloads' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (50 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'bus/pci: fix config r/w access' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/flow_filtering: remove VLAN item' " Kevin Traynor
                   ` (15 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ori Kam; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 4c95a590c322fa75b517568f98b17b4dd61d7010 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Mon, 5 Nov 2018 09:35:27 +0000
Subject: [PATCH] examples/flow_filtering: filter out unsupported offloads

[ upstream commit c82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d ]

Some of the requested offloads are not supported by all devices.

This patch fixes this issue by setting only the supported offloads.

Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup process")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
---
 examples/flow_filtering/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index ce91e8a6f..86b8f4457 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -154,4 +154,6 @@ init_port(void)
 	struct rte_eth_dev_info dev_info;
 
+	rte_eth_dev_info_get(port_id, &dev_info);
+	port_conf.txmode.offloads &= dev_info.rx_offload_capa;
 	printf(":: initializing port: %d\n", port_id);
 	ret = rte_eth_dev_configure(port_id,
@@ -163,5 +165,4 @@ init_port(void)
 	}
 
-	rte_eth_dev_info_get(port_id, &dev_info);
 	rxq_conf = dev_info.default_rxconf;
 	rxq_conf.offloads = port_conf.rxmode.offloads;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.629302454 +0000
+++ 0053-examples-flow_filtering-filter-out-unsupported-offlo.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From c82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d Mon Sep 17 00:00:00 2001
+From 4c95a590c322fa75b517568f98b17b4dd61d7010 Mon Sep 17 00:00:00 2001
 From: Ori Kam <orika@mellanox.com>
 Date: Mon, 5 Nov 2018 09:35:27 +0000
 Subject: [PATCH] examples/flow_filtering: filter out unsupported offloads
 
+[ upstream commit c82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d ]
+
 Some of the requested offloads are not supported by all devices.
 
 This patch fixes this issue by setting only the supported offloads.
 
 Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ori Kam <orika@mellanox.com>
 Acked-by: Wei Zhao <wei.zhao1@intel.com>
@@ -17,17 +18,17 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
-index a73d120e3..27e287ae7 100644
+index ce91e8a6f..86b8f4457 100644
 --- a/examples/flow_filtering/main.c
 +++ b/examples/flow_filtering/main.c
-@@ -137,4 +137,6 @@ init_port(void)
+@@ -154,4 +154,6 @@ init_port(void)
  	struct rte_eth_dev_info dev_info;
  
 +	rte_eth_dev_info_get(port_id, &dev_info);
 +	port_conf.txmode.offloads &= dev_info.rx_offload_capa;
  	printf(":: initializing port: %d\n", port_id);
  	ret = rte_eth_dev_configure(port_id,
-@@ -146,5 +148,4 @@ init_port(void)
+@@ -163,5 +165,4 @@ init_port(void)
  	}
  
 -	rte_eth_dev_info_get(port_id, &dev_info);

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

* [dpdk-stable] patch 'examples/flow_filtering: remove VLAN item' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (51 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/flow_filtering: filter out unsupported offloads' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:26 ` [dpdk-stable] patch 'test/hash: fix build' " Kevin Traynor
                   ` (14 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Ori Kam; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From f3024a9af4d1a2242ff75032181a6c0c7f5a2874 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Mon, 5 Nov 2018 09:35:28 +0000
Subject: [PATCH] examples/flow_filtering: remove VLAN item

[ upstream commit 9af4eb5657107b05b0e06141291b7c6e6162bb36 ]

Since the VLAN is not in use and some PMD can't support vlan = 0
this item was removed.

Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API")

Signed-off-by: Ori Kam <orika@mellanox.com>
---
 examples/flow_filtering/flow_blocks.c | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/examples/flow_filtering/flow_blocks.c b/examples/flow_filtering/flow_blocks.c
index 4da459285..bae711699 100644
--- a/examples/flow_filtering/flow_blocks.c
+++ b/examples/flow_filtering/flow_blocks.c
@@ -47,6 +47,4 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	struct rte_flow_item_eth eth_spec;
 	struct rte_flow_item_eth eth_mask;
-	struct rte_flow_item_vlan vlan_spec;
-	struct rte_flow_item_vlan vlan_mask;
 	struct rte_flow_item_ipv4 ip_spec;
 	struct rte_flow_item_ipv4 ip_mask;
@@ -85,15 +83,4 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	pattern[0].mask = &eth_mask;
 
-	/*
-	 * setting the second level of the pattern (vlan).
-	 * since in this example we just want to get the
-	 * ipv4 we also set this level to allow all.
-	 */
-	memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan));
-	memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan));
-	pattern[1].type = RTE_FLOW_ITEM_TYPE_VLAN;
-	pattern[1].spec = &vlan_spec;
-	pattern[1].mask = &vlan_mask;
-
 	/*
 	 * setting the third level of the pattern (ip).
@@ -107,10 +94,10 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	ip_spec.hdr.src_addr = htonl(src_ip);
 	ip_mask.hdr.src_addr = src_mask;
-	pattern[2].type = RTE_FLOW_ITEM_TYPE_IPV4;
-	pattern[2].spec = &ip_spec;
-	pattern[2].mask = &ip_mask;
+	pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
+	pattern[1].spec = &ip_spec;
+	pattern[1].mask = &ip_mask;
 
 	/* the final level must be always type end */
-	pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
+	pattern[2].type = RTE_FLOW_ITEM_TYPE_END;
 
 	res = rte_flow_validate(port_id, &attr, pattern, action, error);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.653991899 +0000
+++ 0054-examples-flow_filtering-remove-VLAN-item.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 9af4eb5657107b05b0e06141291b7c6e6162bb36 Mon Sep 17 00:00:00 2001
+From f3024a9af4d1a2242ff75032181a6c0c7f5a2874 Mon Sep 17 00:00:00 2001
 From: Ori Kam <orika@mellanox.com>
 Date: Mon, 5 Nov 2018 09:35:28 +0000
 Subject: [PATCH] examples/flow_filtering: remove VLAN item
 
+[ upstream commit 9af4eb5657107b05b0e06141291b7c6e6162bb36 ]
+
 Since the VLAN is not in use and some PMD can't support vlan = 0
 this item was removed.
 
 Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ori Kam <orika@mellanox.com>
 ---

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

* [dpdk-stable] patch 'test/hash: fix build' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (52 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'examples/flow_filtering: remove VLAN item' " Kevin Traynor
@ 2018-11-23 10:26 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'eal/x86: remove unused memcpy file' " Kevin Traynor
                   ` (13 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:26 UTC (permalink / raw)
  To: Dharmik Thakkar; +Cc: Honnappa Nagarahalli, Gavin Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 370924fdecabe9872b76c93f5e6d0fef66d79696 Mon Sep 17 00:00:00 2001
From: Dharmik Thakkar <dharmik.thakkar@arm.com>
Date: Fri, 26 Oct 2018 16:43:03 -0500
Subject: [PATCH] test/hash: fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 57ed574e263444928b793fff0d287121112fba84 ]

Enable print_key_info() function compilation always.

Compilation error message:
'test_hash.c: In function ‘print_key_info’:
test_hash.c:90:15: error: cast discards ‘const’ qualifier from pointer
target type [-Werror=cast-qual]
  uint8_t *p = (uint8_t *)key;
               ^
cc1: all warnings being treated as errors'

Fixes: af75078fece36 ("first public release")

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 test/test/test_hash.c | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/test/test/test_hash.c b/test/test/test_hash.c
index b3db9fd10..db6442a2b 100644
--- a/test/test/test_hash.c
+++ b/test/test/test_hash.c
@@ -81,27 +81,21 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys,
 }
 
+#define UNIT_TEST_HASH_VERBOSE	0
 /*
  * Print out result of unit test hash operation.
  */
-#if defined(UNIT_TEST_HASH_VERBOSE)
 static void print_key_info(const char *msg, const struct flow_key *key,
 								int32_t pos)
 {
-	uint8_t *p = (uint8_t *)key;
-	unsigned i;
+	if (UNIT_TEST_HASH_VERBOSE) {
+		const uint8_t *p = (const uint8_t *)key;
+		unsigned int i;
 
-	printf("%s key:0x", msg);
-	for (i = 0; i < sizeof(struct flow_key); i++) {
-		printf("%02X", p[i]);
+		printf("%s key:0x", msg);
+		for (i = 0; i < sizeof(struct flow_key); i++)
+			printf("%02X", p[i]);
+		printf(" @ pos %d\n", pos);
 	}
-	printf(" @ pos %d\n", pos);
 }
-#else
-static void print_key_info(__attribute__((unused)) const char *msg,
-		__attribute__((unused)) const struct flow_key *key,
-		__attribute__((unused)) int32_t pos)
-{
-}
-#endif
 
 /* Keys used by unit test functions */
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.677347644 +0000
+++ 0055-test-hash-fix-build.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,4 +1,4 @@
-From 57ed574e263444928b793fff0d287121112fba84 Mon Sep 17 00:00:00 2001
+From 370924fdecabe9872b76c93f5e6d0fef66d79696 Mon Sep 17 00:00:00 2001
 From: Dharmik Thakkar <dharmik.thakkar@arm.com>
 Date: Fri, 26 Oct 2018 16:43:03 -0500
 Subject: [PATCH] test/hash: fix build
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 57ed574e263444928b793fff0d287121112fba84 ]
+
 Enable print_key_info() function compilation always.
 
 Compilation error message:
@@ -17,7 +19,6 @@
 cc1: all warnings being treated as errors'
 
 Fixes: af75078fece36 ("first public release")
-Cc: stable@dpdk.org
 
 Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
@@ -28,7 +29,7 @@
  1 file changed, 8 insertions(+), 14 deletions(-)
 
 diff --git a/test/test/test_hash.c b/test/test/test_hash.c
-index 6d06eb24c..fe607fadf 100644
+index b3db9fd10..db6442a2b 100644
 --- a/test/test/test_hash.c
 +++ b/test/test/test_hash.c
 @@ -81,27 +81,21 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys,

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

* [dpdk-stable] patch 'eal/x86: remove unused memcpy file' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (53 preceding siblings ...)
  2018-11-23 10:26 ` [dpdk-stable] patch 'test/hash: fix build' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'test: fix build' " Kevin Traynor
                   ` (12 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 52fe752859a49a8f5f3c025e1f063a579ff3db77 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 9 Nov 2018 14:42:54 +0100
Subject: [PATCH] eal/x86: remove unused memcpy file

[ upstream commit 6bdf14455386f39c3cb33d1046a419c235605da9 ]

The use of rte_memcpy_ptr was removed in revert below,
but it was missing removing the file arch/x86/rte_memcpy.c.

Fixes: d35cc1fe6a7a ("eal/x86: revert select optimized memcpy at run-time")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/common/arch/x86/rte_memcpy.c | 29 ---------------------
 1 file changed, 29 deletions(-)
 delete mode 100644 lib/librte_eal/common/arch/x86/rte_memcpy.c

diff --git a/lib/librte_eal/common/arch/x86/rte_memcpy.c b/lib/librte_eal/common/arch/x86/rte_memcpy.c
deleted file mode 100644
index 648c8f680..000000000
--- a/lib/librte_eal/common/arch/x86/rte_memcpy.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2017 Intel Corporation
- */
-
-#include <rte_memcpy.h>
-#include <rte_cpuflags.h>
-#include <rte_log.h>
-
-void *(*rte_memcpy_ptr)(void *dst, const void *src, size_t n) = NULL;
-
-RTE_INIT(rte_memcpy_init)
-{
-#ifdef CC_SUPPORT_AVX512F
-	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F)) {
-		rte_memcpy_ptr = rte_memcpy_avx512f;
-		RTE_LOG(DEBUG, EAL, "AVX512 memcpy is using!\n");
-		return;
-	}
-#endif
-#ifdef CC_SUPPORT_AVX2
-	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2)) {
-		rte_memcpy_ptr = rte_memcpy_avx2;
-		RTE_LOG(DEBUG, EAL, "AVX2 memcpy is using!\n");
-		return;
-	}
-#endif
-	rte_memcpy_ptr = rte_memcpy_sse;
-	RTE_LOG(DEBUG, EAL, "Default SSE/AVX memcpy is using!\n");
-}
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.704764908 +0000
+++ 0056-eal-x86-remove-unused-memcpy-file.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 6bdf14455386f39c3cb33d1046a419c235605da9 Mon Sep 17 00:00:00 2001
+From 52fe752859a49a8f5f3c025e1f063a579ff3db77 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Fri, 9 Nov 2018 14:42:54 +0100
 Subject: [PATCH] eal/x86: remove unused memcpy file
 
+[ upstream commit 6bdf14455386f39c3cb33d1046a419c235605da9 ]
+
 The use of rte_memcpy_ptr was removed in revert below,
 but it was missing removing the file arch/x86/rte_memcpy.c.
 
 Fixes: d35cc1fe6a7a ("eal/x86: revert select optimized memcpy at run-time")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'test: fix build' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (54 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'eal/x86: remove unused memcpy file' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'ring/c11: keep deterministic order allowing retry to work' " Kevin Traynor
                   ` (11 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Neil Horman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 80f97cf77c56ec0a7e89428cf68ba674cb059d7f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 6 Nov 2018 14:35:01 +0000
Subject: [PATCH] test: fix build

[ upstream commit fac66b12954d5e00419056a59861ba299fe2c9b6 ]

With "make -C test/" command getting following warnings:
 awk: cmd. line:1: fatal: cannot open file `/cmdline_test/cmdline_test/'
      for reading (No such file or directory)
 awk: cmd. line:1: fatal: cannot open file
      `/test-pipeline/test-pipeline/' for reading (No such file or
      directory)
 awk: cmd. line:1: fatal: cannot open file `/test-acl/test-acl/'
      for reading (No such file or directory)

This is because unexpected/invalid MAPFILE param passed to
check-experimental-syms.sh

There is no easy way to unify MAPFILE for different build options,
instead add an input verification to script, and silently ignore wrong
values.

Fixes: a6ec31597a0b ("mk: add experimental tag check")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 buildtools/check-experimental-syms.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index 5bc8cda17..4ed7ac46d 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.sh
@@ -6,4 +6,10 @@ MAPFILE=$1
 OBJFILE=$2
 
+# added check for "make -C test/" usage
+if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ]
+then
+	exit 0
+fi
+
 if [ -d $MAPFILE ]
 then
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.729009202 +0000
+++ 0057-test-fix-build.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From fac66b12954d5e00419056a59861ba299fe2c9b6 Mon Sep 17 00:00:00 2001
+From 80f97cf77c56ec0a7e89428cf68ba674cb059d7f Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 6 Nov 2018 14:35:01 +0000
 Subject: [PATCH] test: fix build
 
+[ upstream commit fac66b12954d5e00419056a59861ba299fe2c9b6 ]
+
 With "make -C test/" command getting following warnings:
  awk: cmd. line:1: fatal: cannot open file `/cmdline_test/cmdline_test/'
       for reading (No such file or directory)
@@ -20,7 +22,6 @@
 values.
 
 Fixes: a6ec31597a0b ("mk: add experimental tag check")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Neil Horman <nhorman@tuxdriver.com>
@@ -29,7 +30,7 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
-index d0915102d..7d1f3a568 100755
+index 5bc8cda17..4ed7ac46d 100755
 --- a/buildtools/check-experimental-syms.sh
 +++ b/buildtools/check-experimental-syms.sh
 @@ -6,4 +6,10 @@ MAPFILE=$1

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

* [dpdk-stable] patch 'ring/c11: keep deterministic order allowing retry to work' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (55 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'test: fix build' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'ring/c11: relax ordering for load and store of the head' " Kevin Traynor
                   ` (10 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Honnappa Nagarahalli, Steve Capper, Ola Liljedahl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 20a505bd4cc15804bfafd8e401c19c14cf2fe17c Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 9 Nov 2018 19:42:46 +0800
Subject: [PATCH] ring/c11: keep deterministic order allowing retry to work

[ upstream commit 86757c2c3ed5006940f93725d39131dfb0d09b60 ]

Use case scenario:
1) Thread 1 is enqueuing. It reads prod.head and gets stalled for some
   reasons (running out of cpu time, preempted,...)
2) Thread 2 is enqueuing. It succeeds in enqueuing and moves prod.head
   forward.
3) Thread 3 is dequeuing. It succeeds in dequeuing and moves the cons.tail
   beyond the prod.head read by thread 1.
4) Thread 1 is re-scheduled. It reads cons.tail.

cpu1(producer)      cpu2(producer)          cpu3(consumer)
load r->prod.head
    ^               load r->prod.head
    |               load r->cons.tail
    |               store r->prod.head(+n)
  stalled           <-- enqueue ----->
    |               store r->prod.tail(+n)
    |                                        load r->cons.head
    |                                        load r->prod.tail
    |                                        store r->cons.head(+n)
    |                                        <...dequeue.....>
    v                                        store r->cons.tail(+n)
load r->cons.tail

For thread 1, the __atomic_compare_exchange_n detects the outdated
prod.head and retry the flow with the new one. This retry flow works ok on
strong ordering platform(eg:x86). But for weak ordering platforms(arm,
ppc), loading cons.tail and prod.head might be re-ordered, prod.head is new
but cons.tail becomes too old, the retry flow, based on the detection of
outdated head, does not trigger as expected, thus the outdate cons.tail
causes wrong free_entries.

Similarly, for dequeuing, outdated prod.tail leads to wrong avail_entries.

The fix is to keep the deterministic order of two loads allowing the retry
to work.

Run the ring perf test on the following testbed:
HW: ThunderX2 B0 CPU CN9975 v2.0, 2 sockets, 28core, 4 threads/core, 2.5GHz
OS: Ubuntu 16.04.5 LTS, Kernel: 4.15.0-36-generic
DPDK: 18.08, Configuration: arm64-armv8a-linuxapp-gcc
gcc: 8.1.0
$sudo ./test/test/test -l 16-19,44-47,72-75,100-103 -n 4 \
--socket-mem=1024 -- -i

Without the patch:
*** Testing using two physical cores ***
SP/SC bulk enq/dequeue (size: 8): 5.64
MP/MC bulk enq/dequeue (size: 8): 9.58
SP/SC bulk enq/dequeue (size: 32): 1.98
MP/MC bulk enq/dequeue (size: 32): 2.30

With the patch:
*** Testing using two physical cores ***
SP/SC bulk enq/dequeue (size: 8): 5.75
MP/MC bulk enq/dequeue (size: 8): 10.18
SP/SC bulk enq/dequeue (size: 32): 1.80
MP/MC bulk enq/dequeue (size: 32): 2.34

The results showed the thread fence degrade the performance slightly, but
it is required for correctness.

Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
---
 lib/librte_ring/rte_ring_c11_mem.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index 7bc74a4cb..dc49a998f 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -67,4 +67,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 		n = max;
 
+		/* Ensure the head is read before tail */
+		__atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		/* load-acquire synchronize with store-release of ht->tail
 		 * in update_tail.
@@ -140,4 +143,7 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 		n = max;
 
+		/* Ensure the head is read before tail */
+		__atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		/* this load-acquire synchronize with store-release of ht->tail
 		 * in update_tail.
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.753727339 +0000
+++ 0058-ring-c11-keep-deterministic-order-allowing-retry-to-.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 86757c2c3ed5006940f93725d39131dfb0d09b60 Mon Sep 17 00:00:00 2001
+From 20a505bd4cc15804bfafd8e401c19c14cf2fe17c Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 9 Nov 2018 19:42:46 +0800
 Subject: [PATCH] ring/c11: keep deterministic order allowing retry to work
 
+[ upstream commit 86757c2c3ed5006940f93725d39131dfb0d09b60 ]
+
 Use case scenario:
 1) Thread 1 is enqueuing. It reads prod.head and gets stalled for some
    reasons (running out of cpu time, preempted,...)
@@ -65,7 +67,6 @@
 it is required for correctness.
 
 Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

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

* [dpdk-stable] patch 'ring/c11: relax ordering for load and store of the head' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (56 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'ring/c11: keep deterministic order allowing retry to work' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'pci: fix parsing of address without function number' " Kevin Traynor
                   ` (9 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Honnappa Nagarahalli, Steve Capper, Ola Liljedahl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9514283c5c6663b4926b8f752f96e36b6a9fa723 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 9 Nov 2018 19:42:47 +0800
Subject: [PATCH] ring/c11: relax ordering for load and store of the head

[ upstream commit 49594a63147a994d9674b1f479d0107e70fe1cbc ]

When calling __atomic_compare_exchange_n, use relaxed ordering for the
success case, as multiple producers/consumers do not release updates to
each other so no need for acquire or release ordering.

Because the thread fence in place, ordering for the first iteration can
be relaxed.

Run the ring perf test on the following testbed:
HW: ThunderX2 B0 CPU CN9975 v2.0, 2 sockets, 28core,4 threads/core,2.5GHz
OS: Ubuntu 16.04.5 LTS, Kernel: 4.15.0-36-generic
DPDK: 18.08, Configuration: arm64-armv8a-linuxapp-gcc
gcc: 8.1.0
$sudo ./test/test/test -l 16-19,44-47,72-75,100-103 -n 4 \
--socket-mem=1024 -- -i

Without the patch:
*** Testing using two physical cores ***
SP/SC bulk enq/dequeue (size: 8): 5.75
MP/MC bulk enq/dequeue (size: 8): 10.18
SP/SC bulk enq/dequeue (size: 32): 1.80
MP/MC bulk enq/dequeue (size: 32): 2.34

With the patch:
*** Testing using two physical cores ***
SP/SC bulk enq/dequeue (size: 8): 5.59
MP/MC bulk enq/dequeue (size: 8): 10.54
SP/SC bulk enq/dequeue (size: 32): 1.73
MP/MC bulk enq/dequeue (size: 32): 2.38

No significant improvement, nor regression was seen, as the optimisation
is not at the critical path.

Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
---
 lib/librte_ring/rte_ring_c11_mem.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index dc49a998f..0fb73a337 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -62,5 +62,5 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 	int success;
 
-	*old_head = __atomic_load_n(&r->prod.head, __ATOMIC_ACQUIRE);
+	*old_head = __atomic_load_n(&r->prod.head, __ATOMIC_RELAXED);
 	do {
 		/* Reset n to the initial burst count */
@@ -98,5 +98,5 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 			success = __atomic_compare_exchange_n(&r->prod.head,
 					old_head, *new_head,
-					0, __ATOMIC_ACQUIRE,
+					0, __ATOMIC_RELAXED,
 					__ATOMIC_RELAXED);
 	} while (unlikely(success == 0));
@@ -138,5 +138,5 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 
 	/* move cons.head atomically */
-	*old_head = __atomic_load_n(&r->cons.head, __ATOMIC_ACQUIRE);
+	*old_head = __atomic_load_n(&r->cons.head, __ATOMIC_RELAXED);
 	do {
 		/* Restore n as it may change every loop */
@@ -173,5 +173,5 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 			success = __atomic_compare_exchange_n(&r->cons.head,
 							old_head, *new_head,
-							0, __ATOMIC_ACQUIRE,
+							0, __ATOMIC_RELAXED,
 							__ATOMIC_RELAXED);
 	} while (unlikely(success == 0));
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.777704374 +0000
+++ 0059-ring-c11-relax-ordering-for-load-and-store-of-the-he.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 49594a63147a994d9674b1f479d0107e70fe1cbc Mon Sep 17 00:00:00 2001
+From 9514283c5c6663b4926b8f752f96e36b6a9fa723 Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 9 Nov 2018 19:42:47 +0800
 Subject: [PATCH] ring/c11: relax ordering for load and store of the head
 
+[ upstream commit 49594a63147a994d9674b1f479d0107e70fe1cbc ]
+
 When calling __atomic_compare_exchange_n, use relaxed ordering for the
 success case, as multiple producers/consumers do not release updates to
 each other so no need for acquire or release ordering.
@@ -36,7 +38,6 @@
 is not at the critical path.
 
 Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

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

* [dpdk-stable] patch 'pci: fix parsing of address without function number' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (57 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'ring/c11: relax ordering for load and store of the head' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'bpf: fix x86 JIT for immediate loads' " Kevin Traynor
                   ` (8 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Wisam Jaddo, Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From bd2f855f1def22d267469acab5952f0582b3bb24 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 12 Nov 2018 00:58:56 +0100
Subject: [PATCH] pci: fix parsing of address without function number

[ upstream commit 31f19a9beb8d88b67be6e469404081eb834d199c ]

If the last part of the PCI address (function number) is missing,
the parsing was successful, assuming function 0.
The call to strtoul is not returning an error in such a case,
so an explicit check is inserted before.

This bug has always been there in older parsing macros:
	- GET_PCIADDR_FIELD
	- GET_BLACKLIST_FIELD

Fixes: af75078fece3 ("first public release")

Reported-by: Wisam Jaddo <wisamm@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/librte_pci/rte_pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c
index 530738dbd..f400178bb 100644
--- a/lib/librte_pci/rte_pci.c
+++ b/lib/librte_pci/rte_pci.c
@@ -31,4 +31,8 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm)
 	char *end;
 
+	/* empty string is an error though strtoul() returns 0 */
+	if (*in == '\0')
+		return NULL;
+
 	errno = 0;
 	val = strtoul(in, &end, 16);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.801130165 +0000
+++ 0060-pci-fix-parsing-of-address-without-function-number.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 31f19a9beb8d88b67be6e469404081eb834d199c Mon Sep 17 00:00:00 2001
+From bd2f855f1def22d267469acab5952f0582b3bb24 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Mon, 12 Nov 2018 00:58:56 +0100
 Subject: [PATCH] pci: fix parsing of address without function number
 
+[ upstream commit 31f19a9beb8d88b67be6e469404081eb834d199c ]
+
 If the last part of the PCI address (function number) is missing,
 the parsing was successful, assuming function 0.
 The call to strtoul is not returning an error in such a case,
@@ -13,7 +15,6 @@
 	- GET_BLACKLIST_FIELD
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Reported-by: Wisam Jaddo <wisamm@mellanox.com>
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

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

* [dpdk-stable] patch 'bpf: fix x86 JIT for immediate loads' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (58 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'pci: fix parsing of address without function number' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'ipc: remove panic in async request' " Kevin Traynor
                   ` (7 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 7e5b6aa6cc75c0129cc23cd1778c8d743fafbf81 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Thu, 8 Nov 2018 12:36:43 +0000
Subject: [PATCH] bpf: fix x86 JIT for immediate loads

[ upstream commit 95df7307a77de5d28b4c81151a8dcc100be8172c ]

x86 jit can generate invalid code for (BPF_LD | BPF_IMM | EBPF_DW)
instructions, when immediate value is bigger then INT32_MAX.

Fixes: cc752e43e079 ("bpf: add JIT compilation for x86_64 ISA")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_bpf/bpf_jit_x86.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/lib/librte_bpf/bpf_jit_x86.c b/lib/librte_bpf/bpf_jit_x86.c
index 68ea389f2..f70cd6be5 100644
--- a/lib/librte_bpf/bpf_jit_x86.c
+++ b/lib/librte_bpf/bpf_jit_x86.c
@@ -209,4 +209,17 @@ emit_sib(struct bpf_jit_state *st, uint32_t scale, uint32_t idx, uint32_t base)
 }
 
+/*
+ * emit OPCODE+REGIDX byte
+ */
+static void
+emit_opcode(struct bpf_jit_state *st, uint8_t ops, uint32_t reg)
+{
+	uint8_t v;
+
+	v = ops | (reg & 7);
+	emit_bytes(st, &v, sizeof(v));
+}
+
+
 /*
  * emit xchg %<sreg>, %<dreg>
@@ -473,17 +486,16 @@ emit_ld_imm64(struct bpf_jit_state *st, uint32_t dreg, uint32_t imm0,
 	uint32_t imm1)
 {
+	uint32_t op;
+
 	const uint8_t ops = 0xB8;
 
-	if (imm1 == 0) {
-		emit_mov_imm(st, EBPF_ALU64 | EBPF_MOV | BPF_K, dreg, imm0);
-		return;
-	}
+	op = (imm1 == 0) ? BPF_ALU : EBPF_ALU64;
 
-	emit_rex(st, EBPF_ALU64, 0, dreg);
-	emit_bytes(st, &ops, sizeof(ops));
-	emit_modregrm(st, MOD_DIRECT, 0, dreg);
+	emit_rex(st, op, 0, dreg);
+	emit_opcode(st, ops, dreg);
 
 	emit_imm(st, imm0, sizeof(imm0));
-	emit_imm(st, imm1, sizeof(imm1));
+	if (imm1 != 0)
+		emit_imm(st, imm1, sizeof(imm1));
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.825256066 +0000
+++ 0061-bpf-fix-x86-JIT-for-immediate-loads.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 95df7307a77de5d28b4c81151a8dcc100be8172c Mon Sep 17 00:00:00 2001
+From 7e5b6aa6cc75c0129cc23cd1778c8d743fafbf81 Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Thu, 8 Nov 2018 12:36:43 +0000
 Subject: [PATCH] bpf: fix x86 JIT for immediate loads
 
+[ upstream commit 95df7307a77de5d28b4c81151a8dcc100be8172c ]
+
 x86 jit can generate invalid code for (BPF_LD | BPF_IMM | EBPF_DW)
 instructions, when immediate value is bigger then INT32_MAX.
 
 Fixes: cc752e43e079 ("bpf: add JIT compilation for x86_64 ISA")
-Cc: stable@dpdk.org
 
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---

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

* [dpdk-stable] patch 'ipc: remove panic in async request' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (59 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'bpf: fix x86 JIT for immediate loads' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'hash: fix TSX aborts with newer gcc' " Kevin Traynor
                   ` (6 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 13f9973d55a67efb40fd67d2ea3d976d0058db0d Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 13 Nov 2018 18:03:52 +0000
Subject: [PATCH] ipc: remove panic in async request

[ upstream commit 45e5f49e87fba07c1e63f1630a3c76fc89a198a4 ]

EAL should not crash when setting alarm fails. Also, remove the
profanity in error message.

Fixes: daf9bfca717e ("ipc: remove thread for async requests")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_proc.c | 31 ++++++++++++++++++-------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index 97663d3ba..f65ef56c0 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -801,5 +801,5 @@ mp_request_async(const char *dst, struct rte_mp_msg *req,
 	struct rte_mp_msg *reply_msg;
 	struct pending_request *pending_req, *exist;
-	int ret;
+	int ret = -1;
 
 	pending_req = calloc(1, sizeof(*pending_req));
@@ -828,4 +828,26 @@ mp_request_async(const char *dst, struct rte_mp_msg *req,
 	}
 
+	/*
+	 * set the alarm before sending message. there are two possible error
+	 * scenarios to consider here:
+	 *
+	 * - if the alarm set fails, we free the memory right there
+	 * - if the alarm set succeeds but sending message fails, then the alarm
+	 *   will trigger and clean up the memory
+	 *
+	 * Even if the alarm triggers too early (i.e. immediately), we're still
+	 * holding the lock to pending requests queue, so the interrupt thread
+	 * will just spin until we release the lock, and either release the
+	 * memory, or doesn't find any pending requests in the queue because we
+	 * never added any due to send message failure.
+	 */
+	if (rte_eal_alarm_set(ts->tv_sec * 1000000 + ts->tv_nsec / 1000,
+			      async_reply_handle, pending_req) < 0) {
+		RTE_LOG(ERR, EAL, "Fail to set alarm for request %s:%s\n",
+			dst, req->name);
+		ret = -1;
+		goto fail;
+	}
+
 	ret = send_msg(dst, req, MP_REQ);
 	if (ret < 0) {
@@ -842,11 +864,4 @@ mp_request_async(const char *dst, struct rte_mp_msg *req,
 	param->user_reply.nb_sent++;
 
-	if (rte_eal_alarm_set(ts->tv_sec * 1000000 + ts->tv_nsec / 1000,
-			      async_reply_handle, pending_req) < 0) {
-		RTE_LOG(ERR, EAL, "Fail to set alarm for request %s:%s\n",
-			dst, req->name);
-		rte_panic("Fix the above shit to properly free all memory\n");
-	}
-
 	return 0;
 fail:
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.850275211 +0000
+++ 0062-ipc-remove-panic-in-async-request.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From 45e5f49e87fba07c1e63f1630a3c76fc89a198a4 Mon Sep 17 00:00:00 2001
+From 13f9973d55a67efb40fd67d2ea3d976d0058db0d Mon Sep 17 00:00:00 2001
 From: Anatoly Burakov <anatoly.burakov@intel.com>
 Date: Tue, 13 Nov 2018 18:03:52 +0000
 Subject: [PATCH] ipc: remove panic in async request
 
+[ upstream commit 45e5f49e87fba07c1e63f1630a3c76fc89a198a4 ]
+
 EAL should not crash when setting alarm fails. Also, remove the
 profanity in error message.
 
 Fixes: daf9bfca717e ("ipc: remove thread for async requests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
 Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

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

* [dpdk-stable] patch 'hash: fix TSX aborts with newer gcc' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (60 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'ipc: remove panic in async request' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'bus/vmbus: fix directory handle leak on error' " Kevin Traynor
                   ` (5 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 88779d06afa7a00ded5d9e4c569147ca0683e481 Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Mon, 12 Nov 2018 10:47:16 +0000
Subject: [PATCH] hash: fix TSX aborts with newer gcc

[ upstream commit 606bd11736a210aa79fe5da4ea0cb3a9cbcde4a0 ]

gcc 7 and 8 with O3 will generate vzeroupper from rte_memcpy
into TSX region which may abort the TSX transaction.

This fix changes rte_memcpy to memcpy which will not insert
extra vzeroupper into the library.

Fixes: f2e3001b53ec ("hash: support read/write concurrency")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_hash/rte_cmp_x86.h     | 2 ++
 lib/librte_hash/rte_cuckoo_hash.c | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_hash/rte_cmp_x86.h b/lib/librte_hash/rte_cmp_x86.h
index e82b4c089..13a583635 100644
--- a/lib/librte_hash/rte_cmp_x86.h
+++ b/lib/librte_hash/rte_cmp_x86.h
@@ -3,4 +3,6 @@
  */
 
+#include <rte_vect.h>
+
 /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
 static int
diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 9a99a415e..be75e66ed 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -13,5 +13,4 @@
 #include <rte_memory.h>         /* for definition of RTE_CACHE_LINE_SIZE */
 #include <rte_log.h>
-#include <rte_memcpy.h>
 #include <rte_prefetch.h>
 #include <rte_branch_prediction.h>
@@ -777,5 +776,5 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
 	new_idx = (uint32_t)((uintptr_t) slot_id);
 	/* Copy key */
-	rte_memcpy(new_k->key, key, h->key_len);
+	memcpy(new_k->key, key, h->key_len);
 	new_k->pdata = data;
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.875430016 +0000
+++ 0063-hash-fix-TSX-aborts-with-newer-gcc.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,8 +1,10 @@
-From 606bd11736a210aa79fe5da4ea0cb3a9cbcde4a0 Mon Sep 17 00:00:00 2001
+From 88779d06afa7a00ded5d9e4c569147ca0683e481 Mon Sep 17 00:00:00 2001
 From: Yipeng Wang <yipeng1.wang@intel.com>
 Date: Mon, 12 Nov 2018 10:47:16 +0000
 Subject: [PATCH] hash: fix TSX aborts with newer gcc
 
+[ upstream commit 606bd11736a210aa79fe5da4ea0cb3a9cbcde4a0 ]
+
 gcc 7 and 8 with O3 will generate vzeroupper from rte_memcpy
 into TSX region which may abort the TSX transaction.
 
@@ -10,7 +12,6 @@
 extra vzeroupper into the library.
 
 Fixes: f2e3001b53ec ("hash: support read/write concurrency")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -31,22 +32,22 @@
  /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
  static int
 diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
-index e68bf336b..c55a4f263 100644
+index 9a99a415e..be75e66ed 100644
 --- a/lib/librte_hash/rte_cuckoo_hash.c
 +++ b/lib/librte_hash/rte_cuckoo_hash.c
-@@ -14,5 +14,4 @@
+@@ -13,5 +13,4 @@
  #include <rte_memory.h>         /* for definition of RTE_CACHE_LINE_SIZE */
  #include <rte_log.h>
 -#include <rte_memcpy.h>
  #include <rte_prefetch.h>
  #include <rte_branch_prediction.h>
-@@ -983,5 +982,5 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
+@@ -777,5 +776,5 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
  	new_idx = (uint32_t)((uintptr_t) slot_id);
  	/* Copy key */
 -	rte_memcpy(new_k->key, key, h->key_len);
 +	memcpy(new_k->key, key, h->key_len);
- 	/* Key can be of arbitrary length, so it is not possible to store
- 	 * it atomically. Hence the new key element's memory stores
+ 	new_k->pdata = data;
+ 
 -- 
 2.19.0
 

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

* [dpdk-stable] patch 'bus/vmbus: fix directory handle leak on error' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (61 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'hash: fix TSX aborts with newer gcc' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix file descriptor " Kevin Traynor
                   ` (4 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 4e6f5483695e6f2b596b3c64d66170860351904e Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 6 Nov 2018 11:30:03 -0800
Subject: [PATCH] bus/vmbus: fix directory handle leak on error

[ upstream commit 6521c9a2f7e00b0fcee940e0570ee12fcd9ca8dc ]

If sysfs directory was incorrectly formatted then the vmbus
setup code would leak a directory handle in the error path.

Coverity issue: 302848
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/bus/vmbus/linux/vmbus_uio.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 856c6d667..12e97e3a4 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -330,4 +330,5 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 	struct dirent *ent;
 	DIR *chan_dir;
+	int err;
 
 	snprintf(chan_path, sizeof(chan_path),
@@ -345,5 +346,4 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 		unsigned long relid, subid, monid;
 		char *endp;
-		int err;
 
 		if (ent->d_name[0] == '.')
@@ -365,6 +365,5 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 			VMBUS_LOG(NOTICE, "invalid subchannel id %lu",
 				  subid);
-			closedir(chan_dir);
-			return err;
+			goto fail;
 		}
 
@@ -383,5 +382,5 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 			VMBUS_LOG(NOTICE, "invalid monitor id %lu",
 				  monid);
-			return err;
+			goto fail;
 		}
 
@@ -389,5 +388,5 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 		if (err) {
 			VMBUS_LOG(NOTICE, "subchannel setup failed");
-			return err;
+			goto fail;
 		}
 		break;
@@ -396,3 +395,6 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 
 	return (ent == NULL) ? -ENOENT : 0;
+fail:
+	closedir(chan_dir);
+	return err;
 }
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.902566326 +0000
+++ 0064-bus-vmbus-fix-directory-handle-leak-on-error.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From 6521c9a2f7e00b0fcee940e0570ee12fcd9ca8dc Mon Sep 17 00:00:00 2001
+From 4e6f5483695e6f2b596b3c64d66170860351904e Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 6 Nov 2018 11:30:03 -0800
 Subject: [PATCH] bus/vmbus: fix directory handle leak on error
 
+[ upstream commit 6521c9a2f7e00b0fcee940e0570ee12fcd9ca8dc ]
+
 If sysfs directory was incorrectly formatted then the vmbus
 setup code would leak a directory handle in the error path.
 
 Coverity issue: 302848
 Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/tap: fix file descriptor leak on error' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (62 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'bus/vmbus: fix directory handle leak on error' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix file descriptor check' " Kevin Traynor
                   ` (3 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 43927b903f18c48b10d69c74345edb22fa87710c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 6 Nov 2018 11:30:04 -0800
Subject: [PATCH] net/tap: fix file descriptor leak on error

[ upstream commit cc02c977189c46f0fa7de4e25f5f79c9a92cd052 ]

If netlink socket setup fails the file descriptor was leaked.

Coverity issue: 257040
Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/tap_netlink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index 6cb510092..14bbbec75 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -52,12 +52,15 @@ tap_nl_init(uint32_t nl_groups)
 	if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, sizeof(int))) {
 		TAP_LOG(ERR, "Unable to set socket buffer send size");
+		close(fd);
 		return -1;
 	}
 	if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf_size, sizeof(int))) {
 		TAP_LOG(ERR, "Unable to set socket buffer receive size");
+		close(fd);
 		return -1;
 	}
 	if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) {
 		TAP_LOG(ERR, "Unable to bind to the netlink socket");
+		close(fd);
 		return -1;
 	}
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.926772033 +0000
+++ 0065-net-tap-fix-file-descriptor-leak-on-error.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,13 +1,14 @@
-From cc02c977189c46f0fa7de4e25f5f79c9a92cd052 Mon Sep 17 00:00:00 2001
+From 43927b903f18c48b10d69c74345edb22fa87710c Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 6 Nov 2018 11:30:04 -0800
 Subject: [PATCH] net/tap: fix file descriptor leak on error
 
+[ upstream commit cc02c977189c46f0fa7de4e25f5f79c9a92cd052 ]
+
 If netlink socket setup fails the file descriptor was leaked.
 
 Coverity issue: 257040
 Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Keith Wiles <keith.wiles@intel.com>

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

* [dpdk-stable] patch 'net/tap: fix file descriptor check' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (63 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix file descriptor " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'examples/flow_filtering: fix capability setting' " Kevin Traynor
                   ` (2 subsequent siblings)
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e001235f8a80b7b6f404d7317a636a905f8d5264 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 6 Nov 2018 11:30:05 -0800
Subject: [PATCH] net/tap: fix file descriptor check

[ upstream commit e0a10f4691c2fa74d228a1c21772456afef1e060 ]

Static analysis tools don't like the fact that fd could be zero
in the error path. This won't happen in real world because
stdin would have to be closed, then other error occurring.

Coverity issue: 14079
Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index e05c7ba72..745405467 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -232,5 +232,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive)
 
 error:
-	if (fd > 0)
+	if (fd >= 0)
 		close(fd);
 	return -1;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.949553581 +0000
+++ 0066-net-tap-fix-file-descriptor-check.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From e0a10f4691c2fa74d228a1c21772456afef1e060 Mon Sep 17 00:00:00 2001
+From e001235f8a80b7b6f404d7317a636a905f8d5264 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 6 Nov 2018 11:30:05 -0800
 Subject: [PATCH] net/tap: fix file descriptor check
 
+[ upstream commit e0a10f4691c2fa74d228a1c21772456afef1e060 ]
+
 Static analysis tools don't like the fact that fd could be zero
 in the error path. This won't happen in real world because
 stdin would have to be closed, then other error occurring.
 
 Coverity issue: 14079
 Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Keith Wiles <keith.wiles@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
-index e7817e896..75b82f2b3 100644
+index e05c7ba72..745405467 100644
 --- a/drivers/net/tap/rte_eth_tap.c
 +++ b/drivers/net/tap/rte_eth_tap.c
-@@ -249,5 +249,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive)
+@@ -232,5 +232,5 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive)
  
  error:
 -	if (fd > 0)

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

* [dpdk-stable] patch 'examples/flow_filtering: fix capability setting' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (64 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix file descriptor check' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'app/testpmd: fix Rx offload search' " Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix probe for multiq or flowq failure' " Kevin Traynor
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Ori Kam; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 223baf0330c92c95c2eb5340db4348e28609308b Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Tue, 6 Nov 2018 06:32:20 +0000
Subject: [PATCH] examples/flow_filtering: fix capability setting

[ upstream commit a5e7c52dac2d369af379c59a7770bfd507ccf153 ]

The tx offloads should be compared to tx capability

Fixes: c82f2f8b4b3a ("examples/flow_filtering: filter out unsupported offloads")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
---
 examples/flow_filtering/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index 86b8f4457..55ba6e6bf 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -155,5 +155,5 @@ init_port(void)
 
 	rte_eth_dev_info_get(port_id, &dev_info);
-	port_conf.txmode.offloads &= dev_info.rx_offload_capa;
+	port_conf.txmode.offloads &= dev_info.tx_offload_capa;
 	printf(":: initializing port: %d\n", port_id);
 	ret = rte_eth_dev_configure(port_id,
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.975538968 +0000
+++ 0067-examples-flow_filtering-fix-capability-setting.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,12 +1,13 @@
-From a5e7c52dac2d369af379c59a7770bfd507ccf153 Mon Sep 17 00:00:00 2001
+From 223baf0330c92c95c2eb5340db4348e28609308b Mon Sep 17 00:00:00 2001
 From: Ori Kam <orika@mellanox.com>
 Date: Tue, 6 Nov 2018 06:32:20 +0000
 Subject: [PATCH] examples/flow_filtering: fix capability setting
 
+[ upstream commit a5e7c52dac2d369af379c59a7770bfd507ccf153 ]
+
 The tx offloads should be compared to tx capability
 
 Fixes: c82f2f8b4b3a ("examples/flow_filtering: filter out unsupported offloads")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ori Kam <orika@mellanox.com>
 Acked-by: Wei Zhao <wei.zhao1@intel.com>
@@ -15,10 +16,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
-index 27e287ae7..a582ac075 100644
+index 86b8f4457..55ba6e6bf 100644
 --- a/examples/flow_filtering/main.c
 +++ b/examples/flow_filtering/main.c
-@@ -138,5 +138,5 @@ init_port(void)
+@@ -155,5 +155,5 @@ init_port(void)
  
  	rte_eth_dev_info_get(port_id, &dev_info);
 -	port_conf.txmode.offloads &= dev_info.rx_offload_capa;

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

* [dpdk-stable] patch 'app/testpmd: fix Rx offload search' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (65 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'examples/flow_filtering: fix capability setting' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix probe for multiq or flowq failure' " Kevin Traynor
  67 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Yuan Peng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From deaa87d24e7e9f4f0f88ad8c7f85fbb2f8f335e0 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 7 Nov 2018 14:14:29 +0800
Subject: [PATCH] app/testpmd: fix Rx offload search

[ upstream commit 054075ea9031edb5d3355cb76e821c0794410ca4 ]

There is an error in function search_rx_offload(),
it will break when get unexpected return value from function
rte_eth_dev_rx_offload_name(), but rte_eth_dev_rx_offload_name()
will return some unexpected value indeed.

Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
---
 app/test-pmd/cmdline.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3b24aac8b..18612d763 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17406,8 +17406,5 @@ search_tx_offload(const char *name)
 			found = 1;
 			break;
-		} else if (!strcasecmp(single_name, "UNKNOWN"))
-			break;
-		else if (single_name == NULL)
-			break;
+		}
 		single_offload <<= 1;
 	}
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:55.998193222 +0000
+++ 0068-app-testpmd-fix-Rx-offload-search.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,15 +1,16 @@
-From 054075ea9031edb5d3355cb76e821c0794410ca4 Mon Sep 17 00:00:00 2001
+From deaa87d24e7e9f4f0f88ad8c7f85fbb2f8f335e0 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Wed, 7 Nov 2018 14:14:29 +0800
 Subject: [PATCH] app/testpmd: fix Rx offload search
 
+[ upstream commit 054075ea9031edb5d3355cb76e821c0794410ca4 ]
+
 There is an error in function search_rx_offload(),
 it will break when get unexpected return value from function
 rte_eth_dev_rx_offload_name(), but rte_eth_dev_rx_offload_name()
 will return some unexpected value indeed.
 
 Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Tested-by: Yuan Peng <yuan.peng@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 4 deletions(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index 5e08a1b9b..127507410 100644
+index 3b24aac8b..18612d763 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -17806,8 +17806,5 @@ search_rx_offload(const char *name)
+@@ -17406,8 +17406,5 @@ search_tx_offload(const char *name)
  			found = 1;
  			break;
 -		} else if (!strcasecmp(single_name, "UNKNOWN"))

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

* [dpdk-stable] patch 'net/tap: fix probe for multiq or flowq failure' has been queued to stable release 18.08.1
  2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (66 preceding siblings ...)
  2018-11-23 10:27 ` [dpdk-stable] patch 'app/testpmd: fix Rx offload search' " Kevin Traynor
@ 2018-11-23 10:27 ` Kevin Traynor
  2018-11-23 11:02   ` Varghese, Vipin
  67 siblings, 1 reply; 72+ messages in thread
From: Kevin Traynor @ 2018-11-23 10:27 UTC (permalink / raw)
  To: Vipin Varghese; +Cc: Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From c5a5783a73f430c336523dbad83b332279fc68f0 Mon Sep 17 00:00:00 2001
From: Vipin Varghese <vipin.varghese@intel.com>
Date: Wed, 7 Nov 2018 19:28:17 +0530
Subject: [PATCH] net/tap: fix probe for multiq or flowq failure

[ upstream commit 126372ce72107b7dc885e3e4f35c1aa732203e17 ]

In scenarios for multiq or flowq setup failure
`rte_eth_dev_probing_finish()` has to be invoked for successful device
registration.

Fixes: fbe90cdd776c ("ethdev: add probing finish function")

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 745405467..0cdfcf5fa 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1800,4 +1800,5 @@ disable_rte_flow:
 		goto error_exit;
 	}
+	rte_eth_dev_probing_finish(dev);
 	return 0;
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-23 10:22:56.042511403 +0000
+++ 0069-net-tap-fix-probe-for-multiq-or-flowq-failure.patch	2018-11-23 10:22:54.000000000 +0000
@@ -1,14 +1,15 @@
-From 126372ce72107b7dc885e3e4f35c1aa732203e17 Mon Sep 17 00:00:00 2001
+From c5a5783a73f430c336523dbad83b332279fc68f0 Mon Sep 17 00:00:00 2001
 From: Vipin Varghese <vipin.varghese@intel.com>
 Date: Wed, 7 Nov 2018 19:28:17 +0530
 Subject: [PATCH] net/tap: fix probe for multiq or flowq failure
 
+[ upstream commit 126372ce72107b7dc885e3e4f35c1aa732203e17 ]
+
 In scenarios for multiq or flowq setup failure
 `rte_eth_dev_probing_finish()` has to be invoked for successful device
 registration.
 
 Fixes: fbe90cdd776c ("ethdev: add probing finish function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
 Acked-by: Keith Wiles <keith.wiles@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
-index 75b82f2b3..49afd38dd 100644
+index 745405467..0cdfcf5fa 100644
 --- a/drivers/net/tap/rte_eth_tap.c
 +++ b/drivers/net/tap/rte_eth_tap.c
-@@ -1849,4 +1849,5 @@ disable_rte_flow:
+@@ -1800,4 +1800,5 @@ disable_rte_flow:
  		goto error_exit;
  	}
 +	rte_eth_dev_probing_finish(dev);

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

* Re: [dpdk-stable] patch 'net/tap: fix probe for multiq or flowq failure' has been queued to stable release 18.08.1
  2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix probe for multiq or flowq failure' " Kevin Traynor
@ 2018-11-23 11:02   ` Varghese, Vipin
  0 siblings, 0 replies; 72+ messages in thread
From: Varghese, Vipin @ 2018-11-23 11:02 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Wiles, Keith, dpdk stable

Thanks Kevin for the update.

> -----Original Message-----
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Friday, November 23, 2018 3:57 PM
> To: Varghese, Vipin <vipin.varghese@intel.com>
> Cc: Wiles, Keith <keith.wiles@intel.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'net/tap: fix probe for multiq or flowq failure' has been queued
> to stable release 18.08.1
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. If the code is different (ie: not only metadata
> diffs), due for example to a change in context or macro names, please double
> check it.
> 
> Thanks.
> 
> Kevin Traynor
> 
> ---
> From c5a5783a73f430c336523dbad83b332279fc68f0 Mon Sep 17 00:00:00
> 2001
> From: Vipin Varghese <vipin.varghese@intel.com>
> Date: Wed, 7 Nov 2018 19:28:17 +0530
> Subject: [PATCH] net/tap: fix probe for multiq or flowq failure
> 
> [ upstream commit 126372ce72107b7dc885e3e4f35c1aa732203e17 ]
> 
> In scenarios for multiq or flowq setup failure `rte_eth_dev_probing_finish()`
> has to be invoked for successful device registration.
> 
> Fixes: fbe90cdd776c ("ethdev: add probing finish function")
> 
> Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
> Acked-by: Keith Wiles <keith.wiles@intel.com>
> ---
>  drivers/net/tap/rte_eth_tap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 745405467..0cdfcf5fa 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -1800,4 +1800,5 @@ disable_rte_flow:
>  		goto error_exit;
>  	}
> +	rte_eth_dev_probing_finish(dev);
>  	return 0;
> 
> --
> 2.19.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2018-11-23 10:22:56.042511403 +0000
> +++ 0069-net-tap-fix-probe-for-multiq-or-flowq-failure.patch	2018-11-23
> 10:22:54.000000000 +0000
> @@ -1,14 +1,15 @@
> -From 126372ce72107b7dc885e3e4f35c1aa732203e17 Mon Sep 17 00:00:00
> 2001
> +From c5a5783a73f430c336523dbad83b332279fc68f0 Mon Sep 17 00:00:00
> 2001
>  From: Vipin Varghese <vipin.varghese@intel.com>
>  Date: Wed, 7 Nov 2018 19:28:17 +0530
>  Subject: [PATCH] net/tap: fix probe for multiq or flowq failure
> 
> +[ upstream commit 126372ce72107b7dc885e3e4f35c1aa732203e17 ]
> +
>  In scenarios for multiq or flowq setup failure  `rte_eth_dev_probing_finish()`
> has to be invoked for successful device  registration.
> 
>  Fixes: fbe90cdd776c ("ethdev: add probing finish function")
> -Cc: stable@dpdk.org
> 
>  Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
>  Acked-by: Keith Wiles <keith.wiles@intel.com> @@ -17,10 +18,10 @@
>   1 file changed, 1 insertion(+)
> 
>  diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c -
> index 75b82f2b3..49afd38dd 100644
> +index 745405467..0cdfcf5fa 100644
>  --- a/drivers/net/tap/rte_eth_tap.c
>  +++ b/drivers/net/tap/rte_eth_tap.c
> -@@ -1849,4 +1849,5 @@ disable_rte_flow:
> +@@ -1800,4 +1800,5 @@ disable_rte_flow:
>   		goto error_exit;
>   	}
>  +	rte_eth_dev_probing_finish(dev);

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

* Re: [dpdk-stable] patch 'net/virtio: fix PCI config error handling' has been queued to stable release 18.08.1
  2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix PCI config error handling' " Kevin Traynor
@ 2018-11-26  2:02   ` Tiwei Bie
  2018-11-26 15:42     ` Kevin Traynor
  0 siblings, 1 reply; 72+ messages in thread
From: Tiwei Bie @ 2018-11-26  2:02 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Brian Russell, Luca Boccassi, dpdk stable

On Fri, Nov 23, 2018 at 10:26:10AM +0000, Kevin Traynor wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
> shout if anyone has objections.

Hi,

This patch can't be backported, as it depends on some API
change in newer release.

Thanks,
Tiwei

> 
> Also note that after the patch there's a diff of the upstream commit vs the patch applied
> to the branch. If the code is different (ie: not only metadata diffs), due for example to
> a change in context or macro names, please double check it.
> 
> Thanks.
> 
> Kevin Traynor
> 
> ---
> From e0af7542c97f172f44d633389d33920b889e8b22 Mon Sep 17 00:00:00 2001
> From: Brian Russell <brussell@brocade.com>
> Date: Tue, 28 Aug 2018 11:12:40 +0100
> Subject: [PATCH] net/virtio: fix PCI config error handling
> 
> [ upstream commit 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd ]
> 
> In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
> the number of bytes read from PCI config or < 0 on error.
> If less than the expected number of bytes are read then log the
> failure and return rather than carrying on with garbage.
> 
> Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
> 
> Signed-off-by: Brian Russell <brussell@brocade.com>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>  drivers/net/virtio/virtio_pci.c | 65 ++++++++++++++++++++++++---------
>  1 file changed, 48 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
> index 6bd22e54a..b6a3c80b4 100644
> --- a/drivers/net/virtio/virtio_pci.c
> +++ b/drivers/net/virtio/virtio_pci.c
> @@ -568,14 +568,16 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>  
>  	ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
> -	if (ret < 0) {
> -		PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
> +	if (ret != 1) {
> +		PMD_INIT_LOG(DEBUG,
> +			     "failed to read pci capability list, ret %d", ret);
>  		return -1;
>  	}
>  
>  	while (pos) {
> -		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
> -		if (ret < 0) {
> -			PMD_INIT_LOG(ERR,
> -				"failed to read pci cap at pos: %x", pos);
> +		ret = rte_pci_read_config(dev, &cap, 2, pos);
> +		if (ret != 2) {
> +			PMD_INIT_LOG(DEBUG,
> +				     "failed to read pci cap at pos: %x ret %d",
> +				     pos, ret);
>  			break;
>  		}
> @@ -587,5 +589,14 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>  			 * cap; next two bytes are the flags.
>  			 */
> -			uint16_t flags = ((uint16_t *)&cap)[1];
> +			uint16_t flags;
> +
> +			ret = rte_pci_read_config(dev, &flags, sizeof(flags),
> +					pos + 2);
> +			if (ret != sizeof(flags)) {
> +				PMD_INIT_LOG(DEBUG,
> +					     "failed to read pci cap at pos:"
> +					     " %x ret %d", pos + 2, ret);
> +				break;
> +			}
>  
>  			if (flags & PCI_MSIX_ENABLE)
> @@ -602,4 +613,12 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>  		}
>  
> +		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
> +		if (ret != sizeof(cap)) {
> +			PMD_INIT_LOG(DEBUG,
> +				     "failed to read pci cap at pos: %x ret %d",
> +				     pos, ret);
> +			break;
> +		}
> +
>  		PMD_INIT_LOG(DEBUG,
>  			"[%2x] cfg type: %u, bar: %u, offset: %04x, len: %u",
> @@ -690,23 +709,35 @@ vtpci_msix_detect(struct rte_pci_device *dev)
>  {
>  	uint8_t pos;
> -	struct virtio_pci_cap cap;
>  	int ret;
>  
>  	ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
> -	if (ret < 0) {
> -		PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
> +	if (ret != 1) {
> +		PMD_INIT_LOG(DEBUG,
> +			     "failed to read pci capability list, ret %d", ret);
>  		return VIRTIO_MSIX_NONE;
>  	}
>  
>  	while (pos) {
> -		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
> -		if (ret < 0) {
> -			PMD_INIT_LOG(ERR,
> -				"failed to read pci cap at pos: %x", pos);
> +		uint8_t cap[2];
> +
> +		ret = rte_pci_read_config(dev, cap, sizeof(cap), pos);
> +		if (ret != sizeof(cap)) {
> +			PMD_INIT_LOG(DEBUG,
> +				     "failed to read pci cap at pos: %x ret %d",
> +				     pos, ret);
>  			break;
>  		}
>  
> -		if (cap.cap_vndr == PCI_CAP_ID_MSIX) {
> -			uint16_t flags = ((uint16_t *)&cap)[1];
> +		if (cap[0] == PCI_CAP_ID_MSIX) {
> +			uint16_t flags;
> +
> +			ret = rte_pci_read_config(dev, &flags, sizeof(flags),
> +					pos + sizeof(cap));
> +			if (ret != sizeof(flags)) {
> +				PMD_INIT_LOG(DEBUG,
> +					     "failed to read pci cap at pos:"
> +					     " %x ret %d", pos + 2, ret);
> +				break;
> +			}
>  
>  			if (flags & PCI_MSIX_ENABLE)
> @@ -716,5 +747,5 @@ vtpci_msix_detect(struct rte_pci_device *dev)
>  		}
>  
> -		pos = cap.cap_next;
> +		pos = cap[1];
>  	}
>  
> -- 
> 2.19.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -	2018-11-23 10:22:54.406494254 +0000
> +++ 0006-net-virtio-fix-PCI-config-error-handling.patch	2018-11-23 10:22:54.000000000 +0000
> @@ -1,15 +1,16 @@
> -From 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd Mon Sep 17 00:00:00 2001
> +From e0af7542c97f172f44d633389d33920b889e8b22 Mon Sep 17 00:00:00 2001
>  From: Brian Russell <brussell@brocade.com>
>  Date: Tue, 28 Aug 2018 11:12:40 +0100
>  Subject: [PATCH] net/virtio: fix PCI config error handling
>  
> +[ upstream commit 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd ]
> +
>  In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
>  the number of bytes read from PCI config or < 0 on error.
>  If less than the expected number of bytes are read then log the
>  failure and return rather than carrying on with garbage.
>  
>  Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
> -Cc: stable@dpdk.org
>  
>  Signed-off-by: Brian Russell <brussell@brocade.com>
>  Signed-off-by: Luca Boccassi <bluca@debian.org>

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

* Re: [dpdk-stable] patch 'net/virtio: fix PCI config error handling' has been queued to stable release 18.08.1
  2018-11-26  2:02   ` Tiwei Bie
@ 2018-11-26 15:42     ` Kevin Traynor
  0 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2018-11-26 15:42 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Brian Russell, Luca Boccassi, dpdk stable

On 11/26/2018 02:02 AM, Tiwei Bie wrote:
> On Fri, Nov 23, 2018 at 10:26:10AM +0000, Kevin Traynor wrote:
>> Hi,
>>
>> FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please
>> shout if anyone has objections.
> 
> Hi,
> 
> This patch can't be backported, as it depends on some API
> change in newer release.
> 

Thanks Tiwei, I will drop from backports.

> Thanks,
> Tiwei
> 
>>
>> Also note that after the patch there's a diff of the upstream commit vs the patch applied
>> to the branch. If the code is different (ie: not only metadata diffs), due for example to
>> a change in context or macro names, please double check it.
>>
>> Thanks.
>>
>> Kevin Traynor
>>
>> ---
>> From e0af7542c97f172f44d633389d33920b889e8b22 Mon Sep 17 00:00:00 2001
>> From: Brian Russell <brussell@brocade.com>
>> Date: Tue, 28 Aug 2018 11:12:40 +0100
>> Subject: [PATCH] net/virtio: fix PCI config error handling
>>
>> [ upstream commit 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd ]
>>
>> In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
>> the number of bytes read from PCI config or < 0 on error.
>> If less than the expected number of bytes are read then log the
>> failure and return rather than carrying on with garbage.
>>
>> Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
>>
>> Signed-off-by: Brian Russell <brussell@brocade.com>
>> Signed-off-by: Luca Boccassi <bluca@debian.org>
>> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
>> ---
>>  drivers/net/virtio/virtio_pci.c | 65 ++++++++++++++++++++++++---------
>>  1 file changed, 48 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
>> index 6bd22e54a..b6a3c80b4 100644
>> --- a/drivers/net/virtio/virtio_pci.c
>> +++ b/drivers/net/virtio/virtio_pci.c
>> @@ -568,14 +568,16 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>>  
>>  	ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
>> -	if (ret < 0) {
>> -		PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
>> +	if (ret != 1) {
>> +		PMD_INIT_LOG(DEBUG,
>> +			     "failed to read pci capability list, ret %d", ret);
>>  		return -1;
>>  	}
>>  
>>  	while (pos) {
>> -		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
>> -		if (ret < 0) {
>> -			PMD_INIT_LOG(ERR,
>> -				"failed to read pci cap at pos: %x", pos);
>> +		ret = rte_pci_read_config(dev, &cap, 2, pos);
>> +		if (ret != 2) {
>> +			PMD_INIT_LOG(DEBUG,
>> +				     "failed to read pci cap at pos: %x ret %d",
>> +				     pos, ret);
>>  			break;
>>  		}
>> @@ -587,5 +589,14 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>>  			 * cap; next two bytes are the flags.
>>  			 */
>> -			uint16_t flags = ((uint16_t *)&cap)[1];
>> +			uint16_t flags;
>> +
>> +			ret = rte_pci_read_config(dev, &flags, sizeof(flags),
>> +					pos + 2);
>> +			if (ret != sizeof(flags)) {
>> +				PMD_INIT_LOG(DEBUG,
>> +					     "failed to read pci cap at pos:"
>> +					     " %x ret %d", pos + 2, ret);
>> +				break;
>> +			}
>>  
>>  			if (flags & PCI_MSIX_ENABLE)
>> @@ -602,4 +613,12 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
>>  		}
>>  
>> +		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
>> +		if (ret != sizeof(cap)) {
>> +			PMD_INIT_LOG(DEBUG,
>> +				     "failed to read pci cap at pos: %x ret %d",
>> +				     pos, ret);
>> +			break;
>> +		}
>> +
>>  		PMD_INIT_LOG(DEBUG,
>>  			"[%2x] cfg type: %u, bar: %u, offset: %04x, len: %u",
>> @@ -690,23 +709,35 @@ vtpci_msix_detect(struct rte_pci_device *dev)
>>  {
>>  	uint8_t pos;
>> -	struct virtio_pci_cap cap;
>>  	int ret;
>>  
>>  	ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
>> -	if (ret < 0) {
>> -		PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
>> +	if (ret != 1) {
>> +		PMD_INIT_LOG(DEBUG,
>> +			     "failed to read pci capability list, ret %d", ret);
>>  		return VIRTIO_MSIX_NONE;
>>  	}
>>  
>>  	while (pos) {
>> -		ret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);
>> -		if (ret < 0) {
>> -			PMD_INIT_LOG(ERR,
>> -				"failed to read pci cap at pos: %x", pos);
>> +		uint8_t cap[2];
>> +
>> +		ret = rte_pci_read_config(dev, cap, sizeof(cap), pos);
>> +		if (ret != sizeof(cap)) {
>> +			PMD_INIT_LOG(DEBUG,
>> +				     "failed to read pci cap at pos: %x ret %d",
>> +				     pos, ret);
>>  			break;
>>  		}
>>  
>> -		if (cap.cap_vndr == PCI_CAP_ID_MSIX) {
>> -			uint16_t flags = ((uint16_t *)&cap)[1];
>> +		if (cap[0] == PCI_CAP_ID_MSIX) {
>> +			uint16_t flags;
>> +
>> +			ret = rte_pci_read_config(dev, &flags, sizeof(flags),
>> +					pos + sizeof(cap));
>> +			if (ret != sizeof(flags)) {
>> +				PMD_INIT_LOG(DEBUG,
>> +					     "failed to read pci cap at pos:"
>> +					     " %x ret %d", pos + 2, ret);
>> +				break;
>> +			}
>>  
>>  			if (flags & PCI_MSIX_ENABLE)
>> @@ -716,5 +747,5 @@ vtpci_msix_detect(struct rte_pci_device *dev)
>>  		}
>>  
>> -		pos = cap.cap_next;
>> +		pos = cap[1];
>>  	}
>>  
>> -- 
>> 2.19.0
>>
>> ---
>>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
>> ---
>> --- -	2018-11-23 10:22:54.406494254 <sip:54406494254> +0000
>> +++ 0006-net-virtio-fix-PCI-config-error-handling.patch	2018-11-23 10:22:54.000000000 <sip:54000000000> +0000
>> @@ -1,15 +1,16 @@
>> -From 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd Mon Sep 17 00:00:00 2001
>> +From e0af7542c97f172f44d633389d33920b889e8b22 Mon Sep 17 00:00:00 2001
>>  From: Brian Russell <brussell@brocade.com>
>>  Date: Tue, 28 Aug 2018 11:12:40 +0100
>>  Subject: [PATCH] net/virtio: fix PCI config error handling
>>  
>> +[ upstream commit 49bb1f7a0ab760a0f1fb39e27c90a1cb2ad42edd ]
>> +
>>  In virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns
>>  the number of bytes read from PCI config or < 0 on error.
>>  If less than the expected number of bytes are read then log the
>>  failure and return rather than carrying on with garbage.
>>  
>>  Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
>> -Cc: stable@dpdk.org
>>  
>>  Signed-off-by: Brian Russell <brussell@brocade.com>
>>  Signed-off-by: Luca Boccassi <bluca@debian.org>

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

end of thread, other threads:[~2018-11-26 15:42 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-23 10:26 [dpdk-stable] patch 'ip_frag: fix overflow in key comparison' has been queued to stable release 18.08.1 Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: fix memory leak of logid' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'malloc: check size hint when reserving the biggest element' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'bus/vdev: fix devargs after multi-process bus scan' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: fix sPAPR IOMMU mapping' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix PCI config error handling' " Kevin Traynor
2018-11-26  2:02   ` Tiwei Bie
2018-11-26 15:42     ` Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'bus/pci: compare kernel driver instead of interrupt handler' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: check if group fd is already open' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: fix read of freed memory on getting container fd' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'vfio: share default container in multi-process' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'fix global variable issues' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: register/unregister intr handler on start/stop' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'eal/linux: handle UIO read failure in interrupt handler' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'examples/vm_power: respect maximum CPUs' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'mk: disable gcc AVX512F support' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'crypto/scheduler: fix build with gcc 8.2' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'bus/dpaa: fix build with gcc 9.0' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'eal: " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix shaper profile parameters' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix RED byte stats' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'examples/ip_pipeline: fix port and table stats read' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'crypto/openssl: fix RSA verify operation' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'compressdev: clarify usage of op structure' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'compressdev: fix op allocation' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'compress/isal: fix uncleared compression states' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'ring/c11: synchronize load and store of the tail' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'ring/c11: move atomic load of head above the loop' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/i40e: fix offload not supported mask' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/mlx5: use pkg-config to handle SUSE libmnl' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/vhost: fix parameters string' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not stop stopped device again' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not make vhost channel non-block' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: do not reset owner when driver resets' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio-user: fix device features for server mode' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: fix guest announce support' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net: fix build with pedantic' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/ixgbe: fix busy polling while fiber link update' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/virtio: do not re-enter clean up routines' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'ethdev: fix redundant function pointer check' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'app/testpmd: fix Tx offload flags' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/bonding: fix crash on probe' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'doc: clarify TSO Tx offload prerequisite' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'vhost/crypto: fix inferred misuse of enum' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/igb: update Tx offload mask' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/avf/base: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/i40e: fix Rx instability with vector mode' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'net/bnxt: fix uninitialized variable access' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'lib: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'service: fix possible null access' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'vhost: fix possible out of bound " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'ip_frag: check fragment length of incoming packet' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'bus/pci: fix config r/w access' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'examples/flow_filtering: filter out unsupported offloads' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'examples/flow_filtering: remove VLAN item' " Kevin Traynor
2018-11-23 10:26 ` [dpdk-stable] patch 'test/hash: fix build' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'eal/x86: remove unused memcpy file' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'test: fix build' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'ring/c11: keep deterministic order allowing retry to work' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'ring/c11: relax ordering for load and store of the head' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'pci: fix parsing of address without function number' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'bpf: fix x86 JIT for immediate loads' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'ipc: remove panic in async request' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'hash: fix TSX aborts with newer gcc' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'bus/vmbus: fix directory handle leak on error' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix file descriptor " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix file descriptor check' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'examples/flow_filtering: fix capability setting' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'app/testpmd: fix Rx offload search' " Kevin Traynor
2018-11-23 10:27 ` [dpdk-stable] patch 'net/tap: fix probe for multiq or flowq failure' " Kevin Traynor
2018-11-23 11:02   ` Varghese, Vipin

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).