vppinfra: fix issue when copying 16 bytes with clib_memcpy
[vpp.git] / src / vppinfra / memcpy_avx.h
index e3feb76..d95bbad 100644 (file)
@@ -185,6 +185,11 @@ clib_memcpy (void *dst, const void *src, size_t n)
        /**
          * Fast way when copy size doesn't exceed 512 bytes
          */
+  if (n == 16)
+    {
+      clib_mov16 ((u8 *) dst, (const u8 *) src);
+      return ret;
+    }
   if (n <= 32)
     {
       clib_mov16 ((u8 *) dst, (const u8 *) src);