aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/marvell
AgeCommit message (Expand)AuthorFilesLines
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
2019-02-09buffers: fix typoDamjan Marion1-1/+1
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-1/+1
2019-01-20buffers: remove VLIB_BUFFER_DEFAULT_FREE_LIST macro and fl->n_data_bytesDamjan Marion1-1/+1
2019-01-18Add vlib_buffer_copy_indices inline functionDamjan Marion1-1/+1
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-10/+10
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-3/+3
2018-11-06marvell: bump musdk version to 18.09.3Damjan Marion5-17/+35
2018-10-23c11 safe string handling supportDave Barach1-1/+1
2018-10-22vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlinesDamjan Marion2-2/+3
2018-08-28cmake: fix marvell plugin buildBrian Brooks1-2/+5
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-1/+1
2018-08-18cmake: highlight warning and error messagesDamjan Marion1-3/+2
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+32
2018-07-26pp2: change default queue sizeBrian Brooks1-2/+2
2018-07-11avoid using thread local storage for thread indexDamjan Marion2-2/+2
2018-07-10pp2: increase recycle batch sizeBrian Brooks1-1/+3
2018-07-10pp2: use configured RX queue sizeBrian Brooks1-1/+1
2018-04-04Doc updates prior to branchChris Luke1-1/+1
2018-01-15Marvell device pluginDamjan Marion8-0/+1484
pan>, uword data_bytes, uword header_bytes, uword data_align) { vec_header_t *vh = _vec_find (v); uword old_alloc_bytes, new_alloc_bytes; void *old, *new; header_bytes = vec_header_bytes (header_bytes); data_bytes += header_bytes; if (!v) { new = clib_mem_alloc_aligned_at_offset (data_bytes, data_align, header_bytes, 1 /* yes, call os_out_of_memory */ ); data_bytes = clib_mem_size (new); clib_memset (new, 0, data_bytes); v = new + header_bytes; _vec_len (v) = length_increment; return v; } vh->len += length_increment; old = v - header_bytes; /* Vector header must start heap object. */ ASSERT (clib_mem_is_heap_object (old)); old_alloc_bytes = clib_mem_size (old); /* Need to resize? */ if (data_bytes <= old_alloc_bytes) return v; new_alloc_bytes = (old_alloc_bytes * 3) / 2; if (new_alloc_bytes < data_bytes) new_alloc_bytes = data_bytes; new = clib_mem_alloc_aligned_at_offset (new_alloc_bytes, data_align, header_bytes, 1 /* yes, call os_out_of_memory */ ); /* FIXME fail gracefully. */ if (!new) clib_panic ("vec_resize fails, length increment %d, data bytes %d, alignment %d", length_increment, data_bytes, data_align); clib_memcpy_fast (new, old, old_alloc_bytes); clib_mem_free (old); /* Allocator may give a bit of extra room. */ new_alloc_bytes = clib_mem_size (new); v = new; /* Zero new memory. */ memset (v + old_alloc_bytes, 0, new_alloc_bytes - old_alloc_bytes); return v + header_bytes; } uword clib_mem_is_vec_h (void *v, uword header_bytes) { return clib_mem_is_heap_object (vec_header (v, header_bytes)); } /** \cond */ #ifdef TEST #include <stdio.h> void main (int argc, char *argv[]) { word n = atoi (argv[1]); word i, *x = 0; typedef struct { word x, y, z; } FOO; FOO *foos = vec_init (FOO, 10), *f; vec_validate (foos, 100); foos[100].x = 99; _vec_len (foos) = 0; for (i = 0; i < n; i++) { vec_add1 (x, i); vec_add2 (foos, f, 1); f->x = 2 * i; f->y = 3 * i; f->z = 4 * i; } { word n = 2; word m = 42; vec_delete (foos, n, m); } { word n = 2; word m = 42; vec_insert (foos, n, m); } vec_free (x); vec_free (foos); exit (0); } #endif /** \endcond */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */