summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
AgeCommit message (Expand)AuthorFilesLines
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion3-5/+3
2022-03-22memif: fix the maxmimum number of txqsMohsin Kazmi1-1/+1
2022-03-18memif: fix rx/txqueue RC on connectedNathan Skrzypczak1-9/+12
2022-03-15memif: fix memif_process_desc indexingMauro Sardara1-4/+2
2022-02-18vnet: add set_max_frame_size callbacks for several interfacesArtem Glazychev1-0/+9
2022-02-13memif: Fix underflowNathan Skrzypczak1-2/+2
2022-02-07memif: memory leak when deleting memif interfaceSteven Luong1-0/+1
2022-01-07ethernet: new interface registration functionDamjan Marion1-4/+7
2022-01-05interface: refactor interface capabilities codeDamjan Marion1-3/+1
2021-12-22memif: refactor descriptor handling in the input nodeDamjan Marion3-184/+446
2021-12-08memif: fix the memory leak when memif cli getting wrong parameters inputsHan Wu1-4/+12
2021-12-03interface: add multi tx-queues support for new tx infraMohsin Kazmi1-2/+2
2021-11-15memif: fix the coverity warningMohsin Kazmi1-5/+8
2021-11-12memif: fix the default txq placementMohsin Kazmi1-3/+9
2021-11-09memif: memif linkstate can't become upDaniel Béreš1-1/+8
2021-10-16memif: Enhance show memif descriptors to display regionSteven Luong1-14/+13
2021-10-12memif: fix the memif crash when slave disconnectMohsin Kazmi1-1/+2
2021-10-04memif: integrate with new tx infraMohsin Kazmi3-15/+17
2021-09-27misc: api move continuedFlorin Coras1-2/+1
2021-09-17memif: avoid double pool_put on a clib_fileSteven Luong1-1/+2
2021-08-04memif: fix offsetArtem Glazychev1-1/+1
2021-07-15misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}Damjan Marion2-16/+12
2021-06-30memif: fix tx desc length for chained buffers in copy modeBenoît Ganne1-0/+1
2021-06-30memif: fix chain buffer length in zero-copy modeBenoît Ganne1-0/+1
2021-06-11memif: fix crash with zero-copy slaveDamjan Marion1-1/+1
2021-06-10memif: fix the spinlock and unlock issue.fangtong1-1/+2
2021-05-26vppinfra: explicit blocking mode for sock connectsFlorin Coras1-2/+3
2021-05-21memif: fix gcc-10 build error on arm platformTianyu Li1-1/+1
2021-05-20memif: fix input node buffer prefetchTianyu Li1-4/+4
2021-05-19memif: remove dead codeDamjan Marion1-1/+1
2021-05-17memif: remove unused codeDamjan Marion1-46/+13
2021-05-17memif: remove duplicate code in txDamjan Marion1-53/+39
2021-05-17memif: optimize zero-copy rx ring refillDamjan Marion2-65/+47
2021-05-17memif: fix "remove barriers" commitDamjan Marion1-2/+2
2021-05-17memif: remove barriersDamjan Marion2-22/+33
2021-05-13tests: move test source to vpp/testDave Wallace2-448/+0
2021-05-08memif: Fix delete on errorNathan Skrzypczak1-8/+0
2021-05-06vlib: rename vl_counter_t to vlib_error_desc_tOle Troan2-2/+2
2021-05-06memif: add severity to countersOle Troan2-14/+14
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-2/+0
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion1-1/+0
2021-04-16tests: cpus awarenessKlement Sekera1-1/+14
2021-04-08memif: Use log_debug for clib_file_add and clib_file_delSteven Luong1-15/+24
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion3-4/+4
2021-03-19interface: add capabilities flagsMohsin Kazmi1-1/+1
2021-03-04memif: Validate descriptors within process boudarySteven Luong1-20/+27
2021-01-22tests: add generalized tags for tests, use them for run-solo testsAndrew Yourtchenko1-4/+2
2021-01-21memif: adapt to new rxq frameworkMohammed Hawari3-61/+59
2021-01-20memif: fix vpp to go link up immediately on admin upEd Warnicke3-16/+23
2020-12-14misc: move to new pool_foreach macrosDamjan Marion3-8/+7
{ return vec_header_bytes (sizeof (heap_header_t)); } always_inline void heap_dup_header (heap_header_t * old, heap_header_t * new) { uword i; new[0] = old[0]; new->elts = vec_dup (new->elts); new->free_elts = vec_dup (new->free_elts); new->free_lists = vec_dup (new->free_lists); for (i = 0; i < vec_len (new->free_lists); i++) new->free_lists[i] = vec_dup (new->free_lists[i]); new->used_elt_bitmap = clib_bitmap_dup (new->used_elt_bitmap); new->small_free_elt_free_index = vec_dup (new->small_free_elt_free_index); } /* Make a duplicate copy of a heap. */ #define heap_dup(v) _heap_dup(v, vec_len (v) * sizeof (v[0])) always_inline void * _heap_dup (void *v_old, uword v_bytes) { heap_header_t *h_old, *h_new; void *v_new; h_old = heap_header (v_old); if (!v_old) return v_old; v_new = 0; v_new = _vec_resize (v_new, _vec_len (v_old), v_bytes, sizeof (heap_header_t), HEAP_DATA_ALIGN); h_new = heap_header (v_new); heap_dup_header (h_old, h_new); clib_memcpy (v_new, v_old, v_bytes); return v_new; } always_inline uword heap_elts (void *v) { heap_header_t *h = heap_header (v); return h->used_count; } uword heap_bytes (void *v); always_inline void * _heap_new (u32 len, u32 n_elt_bytes) { void *v = _vec_resize ((void *) 0, len, (uword) len * n_elt_bytes, sizeof (heap_header_t), HEAP_DATA_ALIGN); heap_header (v)->elt_bytes = n_elt_bytes; return v; } #define heap_new(v) (v) = _heap_new (0, sizeof ((v)[0])) always_inline void heap_set_format (void *v, format_function_t * format_elt) { ASSERT (v); heap_header (v)->format_elt = format_elt; } always_inline void heap_set_max_len (void *v, uword max_len) { ASSERT (v); heap_header (v)->max_len = max_len; } always_inline uword heap_get_max_len (void *v) { return v ? heap_header (v)->max_len : 0; } /* Create fixed size heap with given block of memory. */ always_inline void * heap_create_from_memory (void *memory, uword max_len, uword elt_bytes) { heap_header_t *h; void *v; if (max_len * elt_bytes < sizeof (h[0])) return 0; h = memory; memset (h, 0, sizeof (h[0])); h->max_len = max_len; h->elt_bytes = elt_bytes; h->flags = HEAP_IS_STATIC; v = (void *) (memory + heap_header_bytes ()); _vec_len (v) = 0; return v; } /* Execute BODY for each allocated heap element. */ #define heap_foreach(var,len,heap,body) \ do { \ if (vec_len (heap) > 0) \ { \ heap_header_t * _h = heap_header (heap); \ heap_elt_t * _e = _h->elts + _h->head; \ heap_elt_t * _end = _h->elts + _h->tail; \ while (1) \ { \ if (! heap_is_free (_e)) \ { \ (var) = (heap) + heap_offset (_e); \ (len) = heap_elt_size ((heap), _e); \ do { body; } while (0); \ } \ if (_e == _end) \ break; \ _e = heap_next (_e); \ } \ } \ } while (0) #define heap_elt_at_index(v,index) vec_elt_at_index(v,index) always_inline heap_elt_t * heap_get_elt (void *v, uword handle) { heap_header_t *h = heap_header (v); heap_elt_t *e = vec_elt_at_index (h->elts, handle); ASSERT (!heap_is_free (e)); return e; } #define heap_elt_with_handle(v,handle) \ ({ \ heap_elt_t * _e = heap_get_elt ((v), (handle)); \ (v) + heap_offset (_e); \ }) always_inline uword heap_is_free_handle (void *v, uword heap_handle) { heap_header_t *h = heap_header (v); heap_elt_t *e = vec_elt_at_index (h->elts, heap_handle); return heap_is_free (e); } extern uword heap_len (void *v, word handle); /* Low level allocation call. */ extern void *_heap_alloc (void *v, uword size, uword alignment, uword elt_bytes, uword * offset, uword * handle); #define heap_alloc_aligned(v,size,align,handle) \ ({ \ uword _o, _h; \ uword _a = (align); \ uword _s = (size); \ (v) = _heap_alloc ((v), _s, _a, sizeof ((v)[0]), &_o, &_h); \ (handle) = _h; \ _o; \ }) #define heap_alloc(v,size,handle) heap_alloc_aligned((v),(size),0,(handle)) extern void heap_dealloc (void *v, uword handle); extern void heap_validate (void *v); /* Format heap internal data structures as string. */ extern u8 *format_heap (u8 * s, va_list * va); void *_heap_free (void *v); #define heap_free(v) (v)=_heap_free(v) #endif /* included_heap_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */