diff options
author | Damjan Marion <damarion@cisco.com> | 2016-03-13 02:22:06 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-04-22 17:29:47 +0200 |
commit | f1213b82771ce929c076339c24a777cfd59690e6 (patch) | |
tree | 3c74305e8848047d8ccd1228ee511d57cbf1b1a6 /svm | |
parent | 2b836cf4d1e4e59ca34229a9fdf49d79216da20e (diff) |
Add clib_memcpy macro based on DPDK rte_memcpy implementation
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'svm')
-rw-r--r-- | svm/svmdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svm/svmdb.c b/svm/svmdb.c index 08da4b32dbf..481224a6742 100644 --- a/svm/svmdb.c +++ b/svm/svmdb.c @@ -306,7 +306,7 @@ static void local_set_variable_nolock (svmdb_client_t *client, svmdb_value_t * oldvalue; oldvalue = pool_elt_at_index (client->shm->values, hp->value[0]); vec_alloc (oldvalue->value, vec_len(val)*elsize); - memcpy (oldvalue->value, val, vec_len(val)*elsize); + clib_memcpy (oldvalue->value, val, vec_len(val)*elsize); _vec_len (oldvalue->value) = vec_len(val); notify_value (oldvalue, SVMDB_ACTION_SET); } else { @@ -315,7 +315,7 @@ static void local_set_variable_nolock (svmdb_client_t *client, memset (newvalue, 0, sizeof (*newvalue)); newvalue->elsize = elsize; vec_alloc (newvalue->value, vec_len(val)*elsize); - memcpy (newvalue->value, val, vec_len(val)*elsize); + clib_memcpy (newvalue->value, val, vec_len(val)*elsize); _vec_len (newvalue->value) = vec_len(val); name = format (0, "%s%c", var, 0); hash_set_mem (h, name, newvalue - shm->values); @@ -448,7 +448,7 @@ void *svmdb_local_get_vec_variable (svmdb_client_t *client, char *var, if (rv && vec_len(rv)) { /* Make a copy in process-local memory */ vec_alloc (copy, vec_len(rv)*elsize); - memcpy (copy, rv, vec_len(rv)*elsize); + clib_memcpy (copy, rv, vec_len(rv)*elsize); _vec_len(copy) = vec_len(rv); region_unlock (client->db_rp); return (copy); |