diff --git a/src/tests/vnet/lisp-cp/test_cp_serdes.c b/src/tests/vnet/lisp-cp/test_cp_serdes.c
index 8e8c845..11d29d0 100644
--- a/src/tests/vnet/lisp-cp/test_cp_serdes.c
+++ b/src/tests/vnet/lisp-cp/test_cp_serdes.c
@@ -69,7 +69,7 @@
   int lp = 0x15, rp = 0x14;
 
   b = clib_mem_alloc (buff_len);
-  memset((u8 *)b, 0, buff_len);
+  clib_memset((u8 *)b, 0, buff_len);
   b->current_length = buff_len;
   b->current_data = sizeof(udp_header_t) + sizeof(ip4_header_t) +
     sizeof(ecm_hdr_t) + 1;
@@ -91,7 +91,7 @@
 
   ip4_header_t * ih = (ip4_header_t *) (lh + 1);
   /* clear ip checksum */
-  memset((u8 *)ih + 10, 0, 2);
+  clib_memset((u8 *)ih + 10, 0, 2);
 
   u8 expected_ip4_hdr[] = {
     0x45,                   /* version; IHL */
@@ -109,7 +109,7 @@
 
   udp_header_t * uh = (udp_header_t *) (ih + 1);
   /* clear udp checksum */
-  memset((u8 *)uh + 6, 0, 2);
+  clib_memset((u8 *)uh + 6, 0, 2);
 
   u8 expected_udp_hdr[] = {
     0x00, 0x15, /* src port */
@@ -134,7 +134,7 @@
   u32 buff_len = 500;
 
   b = clib_mem_alloc (buff_len);
-  memset((u8 *)b, 0, buff_len);
+  clib_memset((u8 *)b, 0, buff_len);
 
   u8 map_reply_records[] = {
     /* 1. record */
@@ -184,8 +184,8 @@
   u8 rloc_probe_set = 0;
   u64 nonce = 0;
   map_request_hdr_t * h = 0;
-  memset (deid, 0, sizeof (deid[0]));
-  memset (seid, 0, sizeof (seid[0]));
+  clib_memset (deid, 0, sizeof (deid[0]));
+  clib_memset (seid, 0, sizeof (seid[0]));
 
   gid_address_type (seid) = GID_ADDR_IP_PREFIX;
   ip_address_t * ip_addr = &gid_address_ip (seid);
@@ -208,7 +208,7 @@
 generate_rlocs (gid_address_t **rlocs, u32 * count)
 {
   gid_address_t gid_addr_data, * gid_addr = &gid_addr_data;
-  memset (gid_addr, 0, sizeof (gid_addr[0]));
+  clib_memset (gid_addr, 0, sizeof (gid_addr[0]));
   ip_address_t * addr = &gid_address_ip (gid_addr);
 
   gid_address_type (gid_addr) = GID_ADDR_IP_PREFIX;
@@ -237,7 +237,7 @@
   u32 rloc_count_parse = 0;
 
   u8 * data = clib_mem_alloc(500);
-  memset(data, 0, 500);
+  clib_memset(data, 0, 500);
   b = (vlib_buffer_t *) data;
 
   generate_rlocs (&rlocs_decode, &rloc_count_parse);
@@ -297,12 +297,12 @@
   vec_add1 (rlocs, g);
 
   u8 * data = clib_mem_alloc (500);
-  memset (data, 0, 500);
+  clib_memset (data, 0, 500);
 
   h = build_map_request (lcm, (vlib_buffer_t *) data, rlocs);
 
   /* clear Nonce to simplify comparison */
-  memset ((u8 *)h + 4, 0, 8);
+  clib_memset ((u8 *)h + 4, 0, 8);
 
   u8 expected_data[] =
     {
@@ -346,13 +346,13 @@
   u32 rloc_count = 0;
 
   u8 * data = clib_mem_alloc(500);
-  memset(data, 0, 500);
+  clib_memset(data, 0, 500);
 
   generate_rlocs (&rlocs, &rloc_count);
   h = build_map_request (lcm, (vlib_buffer_t *) data, rlocs);
 
   /* clear Nonce to simplify comparison */
-  memset((u8 *)h + 4, 0, 8);
+  clib_memset((u8 *)h + 4, 0, 8);
 
   print_map_request(h);
 
@@ -441,7 +441,7 @@
   mapping_t * records = build_test_map_records ();
 
   u8 * data = clib_mem_alloc(500);
-  memset(data, 0, 500);
+  clib_memset(data, 0, 500);
   b = (vlib_buffer_t *) data;
 
   lisp_msg_put_map_register (b, records, 1 /* want map notify */,
@@ -450,10 +450,10 @@
   free_test_map_records (records);
 
   /* clear Nonce to simplify comparison */
-  memset((u8 *)b->data + 4, 0, 8);
+  clib_memset((u8 *)b->data + 4, 0, 8);
 
   /* clear authentication data */
-  memset ((u8 *)b->data + 16, 0, 20);
+  clib_memset ((u8 *)b->data + 16, 0, 20);
 
   u8 expected_data[] = {
     0x30, 0x00, 0x01, 0x01, /* type; rsvd; want notify; REC count */
@@ -492,7 +492,7 @@
   vlib_buffer_t *b;
 
   u8 *buf_data = clib_mem_alloc(500);
-  memset (buf_data, 0, 500);
+  clib_memset (buf_data, 0, 500);
   b = (vlib_buffer_t *)buf_data;
 
   u8 * p = vlib_buffer_put_uninit (b, data_len);
@@ -545,7 +545,7 @@
   u32 buff_len = 500;
 
   b = clib_mem_alloc (buff_len);
-  memset ((u8 *)b, 0, buff_len);
+  clib_memset ((u8 *)b, 0, buff_len);
 
   u8 map_reply_records[] =
     {
diff --git a/src/tests/vnet/lisp-cp/test_lisp_types.c b/src/tests/vnet/lisp-cp/test_lisp_types.c
index 7c55a9c..ff25a3f 100644
--- a/src/tests/vnet/lisp-cp/test_lisp_types.c
+++ b/src/tests/vnet/lisp-cp/test_lisp_types.c
@@ -133,7 +133,7 @@
   clib_error_t * error = 0;
 
   u8 * b = clib_mem_alloc(500);
-  memset(b, 0, 500);
+  clib_memset(b, 0, 500);
 
   gid_address_t g =
     {
@@ -168,8 +168,8 @@
   gid_address_t _gid_addr, * gid_addr = &_gid_addr;
   gid_address_t _gid_addr_copy, * copy = &_gid_addr_copy;
 
-  memset (gid_addr, 0, sizeof (gid_addr[0]));
-  memset (copy, 0, sizeof (copy[0]));
+  clib_memset (gid_addr, 0, sizeof (gid_addr[0]));
+  clib_memset (copy, 0, sizeof (copy[0]));
 
   u8 data[] =
     {
@@ -201,8 +201,8 @@
   gid_address_t _gid_addr, * gid_addr = &_gid_addr;
   gid_address_t _gid_addr_copy, * gid_addr_copy = &_gid_addr_copy;
 
-  memset (gid_addr, 0, sizeof (gid_addr[0]));
-  memset (gid_addr_copy, 0, sizeof (gid_addr_copy[0]));
+  clib_memset (gid_addr, 0, sizeof (gid_addr[0]));
+  clib_memset (gid_addr_copy, 0, sizeof (gid_addr_copy[0]));
 
   u8 data[] =
     {
@@ -241,8 +241,8 @@
   gid_address_t _gid_addr, * gid_addr = &_gid_addr;
   gid_address_t _gid_addr_copy, * gid_addr_copy = &_gid_addr_copy;
 
-  memset (gid_addr, 0, sizeof (gid_addr[0]));
-  memset (gid_addr_copy, 0, sizeof (gid_addr_copy[0]));
+  clib_memset (gid_addr, 0, sizeof (gid_addr[0]));
+  clib_memset (gid_addr_copy, 0, sizeof (gid_addr_copy[0]));
 
   u8 data[] =
     {
@@ -335,7 +335,7 @@
   clib_error_t * error = 0;
 
   u8 * b = clib_mem_alloc(500);
-  memset(b, 0, 500);
+  clib_memset(b, 0, 500);
 
   gid_address_t g =
     {
@@ -373,7 +373,7 @@
   clib_error_t * error = 0;
 
   u8 * b = clib_mem_alloc(500);
-  memset(b, 0, 500);
+  clib_memset(b, 0, 500);
 
   gid_address_t g =
     {
@@ -401,7 +401,7 @@
 {
   clib_error_t * error = 0;
   u8 * b = clib_mem_alloc (500);
-  memset (b, 0, 500);
+  clib_memset (b, 0, 500);
 
   fid_address_t src =
     {
@@ -472,7 +472,7 @@
   _assert (0 == memcmp (expected_data, b, sizeof (expected_data)));
 
   gid_address_t p;
-  memset (&p, 0, sizeof (p));
+  clib_memset (&p, 0, sizeof (p));
   _assert (write_len == gid_address_parse (b, &p));
   _assert (0 == gid_address_cmp (&g, &p));
 done:
@@ -512,7 +512,7 @@
   clib_error_t * error = 0;
 
   u8 * b = clib_mem_alloc (500);
-  memset (b, 0, 500);
+  clib_memset (b, 0, 500);
 
   fid_address_t src =
     {
@@ -564,7 +564,7 @@
   _assert (0 == memcmp (expected_data, b, sizeof (expected_data)));
 
   gid_address_t p;
-  memset (&p, 0, sizeof (p));
+  clib_memset (&p, 0, sizeof (p));
   _assert (write_len == gid_address_parse (b, &p));
   _assert (0 == gid_address_cmp (&g, &p));
 done:
@@ -578,7 +578,7 @@
   ip_prefix_t ippref_data, * ippref = &ippref_data;
 
   u8 * b = clib_mem_alloc(500);
-  memset(b, 0, 500);
+  clib_memset(b, 0, 500);
 
   ip_prefix_version (ippref) = IP4;
   ip_prefix_len (ippref) = 9;
diff --git a/src/tests/vnet/session/tcp_echo.c b/src/tests/vnet/session/tcp_echo.c
index 140a198..1a0df31 100644
--- a/src/tests/vnet/session/tcp_echo.c
+++ b/src/tests/vnet/session/tcp_echo.c
@@ -284,7 +284,7 @@
   vl_api_application_tls_key_add_t *key_mp;
 
   bmp = vl_msg_api_alloc (sizeof (*bmp));
-  memset (bmp, 0, sizeof (*bmp));
+  clib_memset (bmp, 0, sizeof (*bmp));
 
   bmp->_vl_msg_id = ntohs (VL_API_APPLICATION_ATTACH);
   bmp->client_index = em->my_client_index;
@@ -301,7 +301,7 @@
   vl_msg_api_send_shmem (em->vl_input_queue, (u8 *) & bmp);
 
   cert_mp = vl_msg_api_alloc (sizeof (*cert_mp) + test_srv_crt_rsa_len);
-  memset (cert_mp, 0, sizeof (*cert_mp));
+  clib_memset (cert_mp, 0, sizeof (*cert_mp));
   cert_mp->_vl_msg_id = ntohs (VL_API_APPLICATION_TLS_CERT_ADD);
   cert_mp->client_index = em->my_client_index;
   cert_mp->context = ntohl (0xfeedface);
@@ -310,7 +310,7 @@
   vl_msg_api_send_shmem (em->vl_input_queue, (u8 *) & cert_mp);
 
   key_mp = vl_msg_api_alloc (sizeof (*key_mp) + test_srv_key_rsa_len);
-  memset (key_mp, 0, sizeof (*key_mp) + test_srv_key_rsa_len);
+  clib_memset (key_mp, 0, sizeof (*key_mp) + test_srv_key_rsa_len);
   key_mp->_vl_msg_id = ntohs (VL_API_APPLICATION_TLS_KEY_ADD);
   key_mp->client_index = em->my_client_index;
   key_mp->context = ntohl (0xfeedface);
@@ -336,7 +336,7 @@
 {
   vl_api_application_detach_t *bmp;
   bmp = vl_msg_api_alloc (sizeof (*bmp));
-  memset (bmp, 0, sizeof (*bmp));
+  clib_memset (bmp, 0, sizeof (*bmp));
 
   bmp->_vl_msg_id = ntohs (VL_API_APPLICATION_DETACH);
   bmp->client_index = em->my_client_index;
@@ -352,7 +352,7 @@
   svm_fifo_segment_create_args_t _a, *a = &_a;
   int rv;
 
-  memset (a, 0, sizeof (*a));
+  clib_memset (a, 0, sizeof (*a));
   a->segment_name = (char *) name;
   a->segment_type = type;
 
@@ -517,7 +517,7 @@
   svm_fifo_segment_create_args_t _a, *a = &_a;
   int rv;
 
-  memset (a, 0, sizeof (*a));
+  clib_memset (a, 0, sizeof (*a));
   a->segment_name = (char *) mp->segment_name;
   a->segment_size = mp->segment_size;
   /* Attach to the segment vpp created */
@@ -703,7 +703,7 @@
 {
   vl_api_connect_uri_t *cmp;
   cmp = vl_msg_api_alloc (sizeof (*cmp));
-  memset (cmp, 0, sizeof (*cmp));
+  clib_memset (cmp, 0, sizeof (*cmp));
 
   cmp->_vl_msg_id = ntohs (VL_API_CONNECT_URI);
   cmp->client_index = em->my_client_index;
@@ -717,7 +717,7 @@
 {
   vl_api_disconnect_session_t *dmp;
   dmp = vl_msg_api_alloc (sizeof (*dmp));
-  memset (dmp, 0, sizeof (*dmp));
+  clib_memset (dmp, 0, sizeof (*dmp));
   dmp->_vl_msg_id = ntohs (VL_API_DISCONNECT_SESSION);
   dmp->client_index = em->my_client_index;
   dmp->handle = s->vpp_session_handle;
@@ -729,7 +729,7 @@
 {
   client_send_disconnect (em, s);
   pool_put (em->sessions, s);
-  memset (s, 0xfe, sizeof (*s));
+  clib_memset (s, 0xfe, sizeof (*s));
   return 0;
 }
 
@@ -816,7 +816,7 @@
    */
 
   pool_get (em->sessions, session);
-  memset (session, 0, sizeof (*session));
+  clib_memset (session, 0, sizeof (*session));
   session_index = session - em->sessions;
 
   rx_fifo = uword_to_pointer (mp->server_rx_fifo, svm_fifo_t *);
@@ -1232,7 +1232,7 @@
 {
   vl_api_bind_uri_t *bmp;
   bmp = vl_msg_api_alloc (sizeof (*bmp));
-  memset (bmp, 0, sizeof (*bmp));
+  clib_memset (bmp, 0, sizeof (*bmp));
 
   bmp->_vl_msg_id = ntohs (VL_API_BIND_URI);
   bmp->client_index = em->my_client_index;
@@ -1259,7 +1259,7 @@
   vl_api_unbind_uri_t *ump;
 
   ump = vl_msg_api_alloc (sizeof (*ump));
-  memset (ump, 0, sizeof (*ump));
+  clib_memset (ump, 0, sizeof (*ump));
 
   ump->_vl_msg_id = ntohs (VL_API_UNBIND_URI);
   ump->client_index = em->my_client_index;
@@ -1289,7 +1289,7 @@
   for (i = 0; i < 200000; i++)
     {
       pool_get (em->sessions, session);
-      memset (session, 0, sizeof (*session));
+      clib_memset (session, 0, sizeof (*session));
     }
   for (i = 0; i < 200000; i++)
     pool_put_index (em->sessions, i);
@@ -1395,7 +1395,7 @@
 
   clib_mem_init_thread_safe (0, 256 << 20);
 
-  memset (em, 0, sizeof (*em));
+  clib_memset (em, 0, sizeof (*em));
   em->session_index_by_vpp_handles = hash_create (0, sizeof (uword));
   em->my_pid = getpid ();
   em->configured_segment_size = 1 << 20;
diff --git a/src/tests/vnet/session/udp_echo.c b/src/tests/vnet/session/udp_echo.c
index 9872eed..9ab7751 100644
--- a/src/tests/vnet/session/udp_echo.c
+++ b/src/tests/vnet/session/udp_echo.c
@@ -302,7 +302,7 @@
 {
   vl_api_application_attach_t *bmp;
   bmp = vl_msg_api_alloc (sizeof (*bmp));
-  memset (bmp, 0, sizeof (*bmp));
+  clib_memset (bmp, 0, sizeof (*bmp));
 
   bmp->_vl_msg_id = ntohs (VL_API_APPLICATION_ATTACH);
   bmp->client_index = utm->my_client_index;
@@ -325,7 +325,7 @@
 {
   vl_api_application_detach_t *bmp;
   bmp = vl_msg_api_alloc (sizeof (*bmp));
-  memset (bmp, 0, sizeof (*bmp));
+  clib_memset (bmp, 0, sizeof (*bmp));
 
   bmp->_vl_msg_id = ntohs (VL_API_APPLICATION_DETACH);
   bmp->client_index = utm->my_client_index;
@@ -508,7 +508,7 @@
   tx_fifo = uword_to_pointer (mp->server_tx_fifo, svm_fifo_t *);
 
   pool_get (utm->sessions, session);
-  memset (session, 0, sizeof (*session));
+  clib_memset (session, 0, sizeof (*session));
   session_index = session - utm->sessions;
   session->session_index = session_index;
 
@@ -687,7 +687,7 @@
   tx_fifo = uword_to_pointer (mp->tx_fifo, svm_fifo_t *);
 
   pool_get (utm->sessions, session);
-  memset (session, 0, sizeof (*session));
+  clib_memset (session, 0, sizeof (*session));
   session_index = session - utm->sessions;
 
   rx_fifo->client_session_index = session_index;
@@ -730,7 +730,7 @@
 {
   vl_api_connect_uri_t *cmp;
   cmp = vl_msg_api_alloc (sizeof (*cmp));
-  memset (cmp, 0, sizeof (*cmp));
+  clib_memset (cmp, 0, sizeof (*cmp));
 
   cmp->_vl_msg_id = ntohs (VL_API_CONNECT_URI);
   cmp->client_index = utm->my_client_index;
@@ -894,7 +894,7 @@
   tx_fifo = uword_to_pointer (mp->tx_fifo, svm_fifo_t *);
 
   pool_get (utm->sessions, session);
-  memset (session, 0, sizeof (*session));
+  clib_memset (session, 0, sizeof (*session));
   session_index = session - utm->sessions;
 
   rx_fifo->client_session_index = session_index;
@@ -919,7 +919,7 @@
   u8 *seg_name;
   int rv;
 
-  memset (a, 0, sizeof (*a));
+  clib_memset (a, 0, sizeof (*a));
   a->segment_name = (char *) mp->segment_name;
   a->segment_size = mp->segment_size;
   /* Attach to the segment vpp created */
@@ -1154,7 +1154,7 @@
   vl_api_unbind_uri_t *ump;
 
   ump = vl_msg_api_alloc (sizeof (*ump));
-  memset (ump, 0, sizeof (*ump));
+  clib_memset (ump, 0, sizeof (*ump));
 
   ump->_vl_msg_id = ntohs (VL_API_UNBIND_URI);
   ump->client_index = utm->my_client_index;
@@ -1168,7 +1168,7 @@
   vl_api_bind_uri_t *bmp;
 
   bmp = vl_msg_api_alloc (sizeof (*bmp));
-  memset (bmp, 0, sizeof (*bmp));
+  clib_memset (bmp, 0, sizeof (*bmp));
 
   bmp->_vl_msg_id = ntohs (VL_API_BIND_URI);
   bmp->client_index = utm->my_client_index;
@@ -1303,7 +1303,7 @@
   for (i = 0; i < 200000; i++)
     {
       pool_get (utm->sessions, session);
-      memset (session, 0, sizeof (*session));
+      clib_memset (session, 0, sizeof (*session));
     }
   for (i = 0; i < 200000; i++)
     pool_put_index (utm->sessions, i);
