[dpdk-stable] patch 'hash: remove unnecessary pause' has been queued to LTS release 16.11.9

Luca Boccassi bluca at debian.org
Mon Oct 29 13:53:19 CET 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/31/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.

Luca Boccassi

---
>From 4992ddc0bf16e7d290542bc8258b07b844707e69 Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang at intel.com>
Date: Fri, 26 Oct 2018 02:53:41 -0700
Subject: [PATCH] hash: remove unnecessary pause

[ upstream commit 2d28bb5ddd0fb7c3bed44f3f3fbc7a7bc449ea7a ]

There is a rte_pause in hash table reset function.
Since the loop is not a polling loop on shared
data structure, the rte_pause is not needed.

Fixes: b26473ff8f4a ("hash: add reset function")

Signed-off-by: Yipeng Wang <yipeng1.wang at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 5aaa6ccd0..2414c7f2d 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -407,7 +407,7 @@ rte_hash_reset(struct rte_hash *h)
 
 	/* clear the free ring */
 	while (rte_ring_dequeue(h->free_slots, &ptr) == 0)
-		rte_pause();
+		continue;
 
 	/* Repopulate the free slots ring. Entry zero is reserved for key misses */
 	if (h->hw_trans_mem_support)
-- 
2.19.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-10-29 12:48:14.660503844 +0000
+++ 0010-hash-remove-unnecessary-pause.patch	2018-10-29 12:48:14.446417982 +0000
@@ -1,50 +1,35 @@
-From 2d28bb5ddd0fb7c3bed44f3f3fbc7a7bc449ea7a Mon Sep 17 00:00:00 2001
+From 4992ddc0bf16e7d290542bc8258b07b844707e69 Mon Sep 17 00:00:00 2001
 From: Yipeng Wang <yipeng1.wang at intel.com>
 Date: Fri, 26 Oct 2018 02:53:41 -0700
 Subject: [PATCH] hash: remove unnecessary pause
 
+[ upstream commit 2d28bb5ddd0fb7c3bed44f3f3fbc7a7bc449ea7a ]
+
 There is a rte_pause in hash table reset function.
 Since the loop is not a polling loop on shared
 data structure, the rte_pause is not needed.
 
 Fixes: b26473ff8f4a ("hash: add reset function")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yipeng Wang <yipeng1.wang at intel.com>
 Acked-by: Bruce Richardson <bruce.richardson at intel.com>
 ---
- lib/librte_hash/rte_cuckoo_hash.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
+ lib/librte_hash/rte_cuckoo_hash.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
-index 0648a2294..5ddcccd87 100644
+index 5aaa6ccd0..2414c7f2d 100644
 --- a/lib/librte_hash/rte_cuckoo_hash.c
 +++ b/lib/librte_hash/rte_cuckoo_hash.c
-@@ -27,7 +27,6 @@
- #include <rte_spinlock.h>
- #include <rte_ring.h>
- #include <rte_compat.h>
--#include <rte_pause.h>
- 
- #include "rte_hash.h"
- #include "rte_cuckoo_hash.h"
-@@ -574,14 +573,14 @@ rte_hash_reset(struct rte_hash *h)
+@@ -407,7 +407,7 @@ rte_hash_reset(struct rte_hash *h)
  
  	/* clear the free ring */
  	while (rte_ring_dequeue(h->free_slots, &ptr) == 0)
 -		rte_pause();
 +		continue;
  
- 	/* clear free extendable bucket ring and memory */
- 	if (h->ext_table_support) {
- 		memset(h->buckets_ext, 0, h->num_buckets *
- 						sizeof(struct rte_hash_bucket));
- 		while (rte_ring_dequeue(h->free_ext_bkts, &ptr) == 0)
--			rte_pause();
-+			continue;
- 	}
- 
  	/* Repopulate the free slots ring. Entry zero is reserved for key misses */
+ 	if (h->hw_trans_mem_support)
 -- 
 2.19.1
 


More information about the stable mailing list