summaryrefslogtreecommitdiffstats
path: root/src/svm/fifo_segment.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-05 21:13:18 +0000
committerDave Barach <openvpp@barachs.net>2020-02-26 00:51:15 +0000
commit9e61d9a1aafbaecbc7b316fd94122b80c3f99905 (patch)
tree93b153faa3494a283b0d50314143bf3fec9630de /src/svm/fifo_segment.c
parentf7ab7b2d9bc0f42c1e766d22d49dd0dc4f28abb6 (diff)
svm: remove chunk add function
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I606eabbe0f3f387529e77d2483f5d63db7bde88a
Diffstat (limited to 'src/svm/fifo_segment.c')
-rw-r--r--src/svm/fifo_segment.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 7b1163e0750..2db07593bff 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -568,7 +568,7 @@ done:
static void
fsh_slice_collect_chunks (fifo_segment_header_t * fsh,
- fifo_segment_slice_t * fss, svm_fifo_chunk_t * cur)
+ fifo_segment_slice_t * fss, svm_fifo_chunk_t * c)
{
svm_fifo_chunk_t *next;
int fl_index;
@@ -576,16 +576,16 @@ fsh_slice_collect_chunks (fifo_segment_header_t * fsh,
clib_spinlock_lock (&fss->chunk_lock);
- while (cur)
+ while (c)
{
- next = cur->next;
- fl_index = fs_freelist_for_size (cur->length);
- cur->next = fss->free_chunks[fl_index];
- cur->enq_rb_index = RBTREE_TNIL_INDEX;
- cur->deq_rb_index = RBTREE_TNIL_INDEX;
- fss->free_chunks[fl_index] = cur;
+ next = c->next;
+ fl_index = fs_freelist_for_size (c->length);
+ c->next = fss->free_chunks[fl_index];
+ c->enq_rb_index = RBTREE_TNIL_INDEX;
+ c->deq_rb_index = RBTREE_TNIL_INDEX;
+ fss->free_chunks[fl_index] = c;
n_collect += fs_freelist_index_to_size (fl_index);
- cur = next;
+ c = next;
}
fss->n_fl_chunk_bytes += n_collect;
@@ -596,11 +596,11 @@ fsh_slice_collect_chunks (fifo_segment_header_t * fsh,
void
fsh_collect_chunks (fifo_segment_header_t * fsh, u32 slice_index,
- svm_fifo_chunk_t * cur)
+ svm_fifo_chunk_t * c)
{
fifo_segment_slice_t *fss;
fss = fsh_slice_get (fsh, slice_index);
- fsh_slice_collect_chunks (fsh, fss, cur);
+ fsh_slice_collect_chunks (fsh, fss, c);
}
/**