diff options
author | Florin Coras <fcoras@cisco.com> | 2019-12-11 14:27:53 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-12-12 17:38:30 +0000 |
commit | ef4f3e7fea359f651c548182a7597abc066ca372 (patch) | |
tree | bf66226604821074452caaac343868784d261d55 /src/svm/fifo_segment.c | |
parent | 38277e407148dca4ca79784a2e8c29d486425829 (diff) |
session svm: support for segments larger than 4GB
Type: feature
Change-Id: I7d3017bbb369261d74f51807a226f2c12f45291c
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm/fifo_segment.c')
-rw-r--r-- | src/svm/fifo_segment.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c index 95b88836ddb..01fa65623c5 100644 --- a/src/svm/fifo_segment.c +++ b/src/svm/fifo_segment.c @@ -25,7 +25,7 @@ * @param fs fifo segment * @return number of free bytes */ -static u32 +static uword fs_free_space (fifo_segment_t * fs) { struct dlmallinfo dlminfo; @@ -870,7 +870,7 @@ fifo_segment_update_free_bytes (fifo_segment_t * fs) clib_atomic_store_rel_n (&fsh->n_free_bytes, fs_free_space (fs)); } -u32 +uword fifo_segment_free_bytes (fifo_segment_t * fs) { return fsh_n_free_bytes (fs->h); @@ -943,11 +943,11 @@ format_fifo_segment_type (u8 * s, va_list * args) u8 * format_fifo_segment (u8 * s, va_list * args) { - u32 count, indent, active_fifos, free_fifos, fifo_hdr = 0, chunk_size; + u32 count, indent, active_fifos, free_fifos, fifo_hdr = 0; fifo_segment_t *fs = va_arg (*args, fifo_segment_t *); int verbose __attribute__ ((unused)) = va_arg (*args, int); - u32 est_chunk_bytes, est_free_seg_bytes, free_chunks; - uword chunk_bytes = 0, free_seg_bytes; + uword est_chunk_bytes, est_free_seg_bytes, free_chunks; + uword chunk_bytes = 0, free_seg_bytes, chunk_size; fifo_segment_header_t *fsh; fifo_segment_slice_t *fss; svm_fifo_chunk_t *c; @@ -1020,11 +1020,11 @@ format_fifo_segment (u8 * s, va_list * args) fifo_segment_update_free_bytes (fs); free_seg_bytes = fifo_segment_free_bytes (fs); - s = format (s, "\n%Useg free bytes: %U (%u) estimated: %U (%u)\n", + s = format (s, "\n%Useg free bytes: %U (%lu) estimated: %U (%lu)\n", format_white_space, indent + 2, format_memory_size, free_seg_bytes, free_seg_bytes, format_memory_size, est_free_seg_bytes, est_free_seg_bytes); - s = format (s, "%Uchunk free bytes: %U (%lu) estimated: %U (%u)\n", + s = format (s, "%Uchunk free bytes: %U (%lu) estimated: %U (%lu)\n", format_white_space, indent + 2, format_memory_size, chunk_bytes, chunk_bytes, format_memory_size, est_chunk_bytes, est_chunk_bytes); |