summaryrefslogtreecommitdiffstats
path: root/src/svm/queue.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-11-13 16:34:13 -0500
committerFlorin Coras <florin.coras@gmail.com>2018-11-14 15:54:01 +0000
commit178cf493d009995b28fdf220f04c98860ff79a9b (patch)
tree097c1be82b8f6fa9bc04b9b1e193158e2e4997eb /src/svm/queue.c
parent6917b94f2146aa51195a6a2a1ccd8416a1d74bf3 (diff)
Remove c-11 memcpy checks from perf-critical code
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/svm/queue.c')
-rw-r--r--src/svm/queue.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/svm/queue.c b/src/svm/queue.c
index 6972f14cd33..3577c783dba 100644
--- a/src/svm/queue.c
+++ b/src/svm/queue.c
@@ -201,7 +201,7 @@ svm_queue_add_nolock (svm_queue_t * q, u8 * elem)
}
tailp = (i8 *) (&q->data[0] + q->elsize * q->tail);
- clib_memcpy (tailp, elem, q->elsize);
+ clib_memcpy_fast (tailp, elem, q->elsize);
q->tail++;
q->cursize++;
@@ -222,7 +222,7 @@ svm_queue_add_raw (svm_queue_t * q, u8 * elem)
i8 *tailp;
tailp = (i8 *) (&q->data[0] + q->elsize * q->tail);
- clib_memcpy (tailp, elem, q->elsize);
+ clib_memcpy_fast (tailp, elem, q->elsize);
q->tail = (q->tail + 1) % q->maxsize;
q->cursize++;
@@ -264,7 +264,7 @@ svm_queue_add (svm_queue_t * q, u8 * elem, int nowait)
}
tailp = (i8 *) (&q->data[0] + q->elsize * q->tail);
- clib_memcpy (tailp, elem, q->elsize);
+ clib_memcpy_fast (tailp, elem, q->elsize);
q->tail++;
q->cursize++;
@@ -314,7 +314,7 @@ svm_queue_add2 (svm_queue_t * q, u8 * elem, u8 * elem2, int nowait)
}
tailp = (i8 *) (&q->data[0] + q->elsize * q->tail);
- clib_memcpy (tailp, elem, q->elsize);
+ clib_memcpy_fast (tailp, elem, q->elsize);
q->tail++;
q->cursize++;
@@ -325,7 +325,7 @@ svm_queue_add2 (svm_queue_t * q, u8 * elem, u8 * elem2, int nowait)
need_broadcast = (q->cursize == 1);
tailp = (i8 *) (&q->data[0] + q->elsize * q->tail);
- clib_memcpy (tailp, elem2, q->elsize);
+ clib_memcpy_fast (tailp, elem2, q->elsize);
q->tail++;
q->cursize++;
@@ -389,7 +389,7 @@ svm_queue_sub (svm_queue_t * q, u8 * elem, svm_q_conditional_wait_t cond,
}
headp = (i8 *) (&q->data[0] + q->elsize * q->head);
- clib_memcpy (elem, headp, q->elsize);
+ clib_memcpy_fast (elem, headp, q->elsize);
q->head++;
/* $$$$ JFC shouldn't this be == 0? */
@@ -423,7 +423,7 @@ svm_queue_sub2 (svm_queue_t * q, u8 * elem)
}
headp = (i8 *) (&q->data[0] + q->elsize * q->head);
- clib_memcpy (elem, headp, q->elsize);
+ clib_memcpy_fast (elem, headp, q->elsize);
q->head++;
need_broadcast = (q->cursize == q->maxsize / 2);
@@ -451,7 +451,7 @@ svm_queue_sub_raw (svm_queue_t * q, u8 * elem)
}
headp = (i8 *) (&q->data[0] + q->elsize * q->head);
- clib_memcpy (elem, headp, q->elsize);
+ clib_memcpy_fast (elem, headp, q->elsize);
q->head = (q->head + 1) % q->maxsize;
q->cursize--;