All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mbuf: replace c memcpy code semantics with optimized rte_memcpy
@ 2016-05-24 14:50 Jerin Jacob
  2016-05-24 14:59 ` Olivier Matz
  2016-05-26  8:07 ` [PATCH v2] mempool: " Jerin Jacob
  0 siblings, 2 replies; 32+ messages in thread
From: Jerin Jacob @ 2016-05-24 14:50 UTC (permalink / raw)
  To: dev; +Cc: thomas.monjalon, bruce.richardson, konstantin.ananyev, Jerin Jacob

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_mempool/rte_mempool.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index ed2c110..ebe399a 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -74,6 +74,7 @@
 #include <rte_memory.h>
 #include <rte_branch_prediction.h>
 #include <rte_ring.h>
+#include <rte_memcpy.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -917,7 +918,6 @@ __mempool_put_bulk(struct rte_mempool *mp, void * const *obj_table,
 		    unsigned n, __rte_unused int is_mp)
 {
 	struct rte_mempool_cache *cache;
-	uint32_t index;
 	void **cache_objs;
 	unsigned lcore_id = rte_lcore_id();
 	uint32_t cache_size = mp->cache_size;
@@ -946,8 +946,7 @@ __mempool_put_bulk(struct rte_mempool *mp, void * const *obj_table,
 	 */
 
 	/* Add elements back into the cache */
-	for (index = 0; index < n; ++index, obj_table++)
-		cache_objs[index] = *obj_table;
+	rte_memcpy(&cache_objs[0], obj_table, sizeof(void *) * n);
 
 	cache->len += n;
 
-- 
2.5.5

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

end of thread, other threads:[~2016-07-07 13:51 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 14:50 [PATCH] mbuf: replace c memcpy code semantics with optimized rte_memcpy Jerin Jacob
2016-05-24 14:59 ` Olivier Matz
2016-05-24 15:17   ` Jerin Jacob
2016-05-27 10:24     ` Hunt, David
2016-05-27 11:42       ` Jerin Jacob
2016-05-27 15:05         ` Thomas Monjalon
2016-05-30  8:44           ` Olivier Matz
2016-05-27 13:45       ` Hunt, David
2016-06-24 15:56     ` Hunt, David
2016-06-24 16:02       ` Olivier Matz
2016-05-26  8:07 ` [PATCH v2] mempool: " Jerin Jacob
2016-05-30  8:45   ` Olivier Matz
2016-05-31 12:58     ` Jerin Jacob
2016-05-31 21:05       ` Olivier MATZ
2016-06-01  7:00         ` Jerin Jacob
2016-06-02  7:36           ` Olivier MATZ
2016-06-02  9:39             ` Jerin Jacob
2016-06-02 21:16               ` Olivier MATZ
2016-06-03  7:02                 ` Jerin Jacob
2016-06-17 10:40                   ` Olivier Matz
2016-06-24 16:04                     ` Olivier Matz
2016-06-30  9:41   ` Thomas Monjalon
2016-06-30 11:38     ` Jerin Jacob
2016-06-30 12:16   ` [PATCH v3] " Jerin Jacob
2016-06-30 17:28     ` Thomas Monjalon
2016-07-05  8:43       ` Ferruh Yigit
2016-07-05 11:32         ` Yuanhan Liu
2016-07-05 13:13           ` Jerin Jacob
2016-07-05 13:42             ` Yuanhan Liu
2016-07-05 14:09             ` Ferruh Yigit
2016-07-06 16:21               ` Ferruh Yigit
2016-07-07 13:51                 ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.