summaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/node.c
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-02-24 09:18:53 +0000
committerDamjan Marion <dmarion@me.com>2021-02-24 14:21:33 +0000
commit63ab85130cc3a5f52a5ee6b8f9c9bc6e9a2fcd72 (patch)
tree726657092d1765723578706f6de765d09ee04364 /src/vnet/crypto/node.c
parent48307fb4be6507e5fda450975cd4546f813cd0ce (diff)
crypto: A more memory efficient layout of the frame element struct
Type: improvement Also: - state as enum so my GDB life is easier - typo; s/indice/indices/; Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3320f5ef1ccd7d042071ef336488a41adfad7463
Diffstat (limited to 'src/vnet/crypto/node.c')
-rw-r--r--src/vnet/crypto/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/crypto/node.c b/src/vnet/crypto/node.c
index 63ed95e7d93..e1186f49c0a 100644
--- a/src/vnet/crypto/node.c
+++ b/src/vnet/crypto/node.c
@@ -87,9 +87,9 @@ crypto_dequeue_frame (vlib_main_t * vm, vlib_node_runtime_t * node,
{
if (cf)
{
- vec_validate (ct->buffer_indice, n_cache + cf->n_elts);
+ vec_validate (ct->buffer_indices, n_cache + cf->n_elts);
vec_validate (ct->nexts, n_cache + cf->n_elts);
- clib_memcpy_fast (ct->buffer_indice + n_cache, cf->buffer_indices,
+ clib_memcpy_fast (ct->buffer_indices + n_cache, cf->buffer_indices,
sizeof (u32) * cf->n_elts);
if (cf->state == VNET_CRYPTO_FRAME_STATE_SUCCESS)
{
@@ -114,7 +114,7 @@ crypto_dequeue_frame (vlib_main_t * vm, vlib_node_runtime_t * node,
n_cache += cf->n_elts;
if (n_cache >= VLIB_FRAME_SIZE)
{
- vlib_buffer_enqueue_to_next (vm, node, ct->buffer_indice,
+ vlib_buffer_enqueue_to_next (vm, node, ct->buffer_indices,
ct->nexts, n_cache);
n_cache = 0;
}
@@ -167,7 +167,7 @@ VLIB_NODE_FN (crypto_dispatch_node) (vlib_main_t * vm,
}
/* *INDENT-ON* */
if (n_cache)
- vlib_buffer_enqueue_to_next (vm, node, ct->buffer_indice, ct->nexts,
+ vlib_buffer_enqueue_to_next (vm, node, ct->buffer_indices, ct->nexts,
n_cache);
return n_dispatched;