aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
AgeCommit message (Expand)AuthorFilesLines
2019-01-20Rework of debian packagingDamjan Marion1-3/+4
2019-01-17cmake3 exsit in epel(centos), install epel-releasedrenfong.wang1-1/+1
2018-12-27install-dep: force osleap boost dep installFlorin Coras1-4/+4
2018-12-19vlib: support Hyper-v/Azure VMBusStephen Hemminger1-2/+3
2018-12-18make wipe: Clean up *.api.json files.Paul Vinciguerra1-0/+1
2018-12-18Build changes required for Fedora and CentOSThomas F Herbert1-11/+12
2018-11-29make test: create virtualenv under /test/Klement Sekera1-8/+7
2018-11-23make test: remove test-ext, fix test*-all targetsKlement Sekera1-6/+2
2018-10-31Makefile: support both RHEL and CentOS in install-depYichen Wang1-2/+6
2018-10-26Trivial: Fix Makefile typoPaul Vinciguerra1-1/+1
2018-10-25Run 'make test' verify job on ubuntu 18.04 instead of 16.04Damjan Marion1-1/+1
2018-09-24Add the sphinx docs build optionsjdenisco1-0/+19
2018-09-20rename vpp-dpdk-dev to vpp-ext-depsDamjan Marion1-10/+14
2018-09-02Switch to cmakeDamjan Marion1-4/+4
2018-08-23cmake: keep 'make test-debug' on autotools for nowDamjan Marion1-1/+1
2018-08-21Makefile: opensuse 15.0 reporting changeEd Kern1-0/+3
2018-08-20cmake: add packages for opensuseMarco Varlese1-2/+2
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+5
2018-08-01Move java api to extras/Damjan Marion1-1/+3
2018-07-22make test-ext: a new test target that builds VOM (existing one no longer do)Neale Ranns1-1/+7
2018-07-19Set default STARTUP_DIR to be toplevel dirDamjan Marion1-3/+3
2018-07-04openSUSE: add python2-ply dependencyMarco Varlese1-3/+3
2018-05-17Allow openSUSE tumbleweedMarco Varlese1-1/+1
2018-04-27Move VOM to extras/vomDamjan Marion1-1/+3
2018-04-26Makefile: Add new opensuse-leap os idEd Kern1-1/+11
2018-04-16Makefile: Removed clang build from verifyEd Kern1-7/+0
2018-04-10Makefile: Added new ifeq to cover opensuse leap15Ed Kern1-4/+9
2018-04-09plugins: unload plugin if early init failsDamjan Marion1-3/+4
2018-04-09Autodetect plugin pathDamjan Marion1-4/+2
2018-04-08Remove subunit from Centos requirements.Thomas F Herbert1-1/+2
2018-04-06Remove mbedtls from build requirement for CentosThomas F Herbert1-1/+2
2018-04-03Makefile: Alter VPP_PYTHON_PREFIX for preloading depsEd Kern1-1/+4
2018-03-28Build libmemif as part of verify jobDamjan Marion1-0/+2
2018-03-15remove bootstrap from top-level MakefileDamjan Marion1-16/+16
2018-03-15use system provided ccache linksDamjan Marion1-20/+0
2018-03-14fix 'make build'Damjan Marion1-1/+1
2018-03-14Clean up vpp build bootstrap stepDave Barach1-2/+7
2018-03-02session: first approximation implementation of tlsFlorin Coras1-3/+4
2018-01-30VPP-899: Run VPP under SELinuxBilly McFall1-0/+1
2018-01-25fixup python ply package name for fedora >= 25Gabriel Ganne1-2/+2
2018-01-24Makefile: Add python-ply to RPM_DEPENDS list.Jon Loeliger1-3/+3
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-4/+4
2017-12-12Simplify packages dependencyMarco Varlese1-5/+11
2017-11-23Tests clean-up when cleaning VPP code.Marco Varlese1-2/+2
2017-11-17subunit is required on centos as well as fedoraGabriel Ganne1-2/+1
2017-11-15add libffi-dev to DEB_DEPENDSGabriel Ganne1-1/+1
2017-11-06make test: add CACHE_OUTPUT optionKlement Sekera1-0/+1
2017-11-05dpdk: build nasm from sourceSergio Gonzalez Monroy1-14/+1
2017-11-01VPP Object Model (VOM)Neale Ranns1-0/+2
2017-10-25opensuse support: reworked SUSE DEPS variablesMarco Varlese1-6/+14
ee_list; /* Hash table mapping callers to trace index. */ uword *trace_by_callers; /* Hash table mapping mheap offset to trace index. */ uword *trace_index_by_offset; } mheap_trace_main_t; /* Without vector instructions don't bother with small object cache. */ #ifdef CLIB_HAVE_VEC128 #define MHEAP_HAVE_SMALL_OBJECT_CACHE 1 #else #define MHEAP_HAVE_SMALL_OBJECT_CACHE 0 #endif /* Small object bin i is for objects with user_size > sizeof (mheap_elt_t) + sizeof (mheap_elt_t) * (i - 1) user_size <= sizeof (mheap_elt_t) + sizeof (mheap_size_t) * i. */ #if MHEAP_HAVE_SMALL_OBJECT_CACHE > 0 #define MHEAP_LOG2_N_SMALL_OBJECT_BINS 8 #define MHEAP_N_SMALL_OBJECT_BINS (1 << MHEAP_LOG2_N_SMALL_OBJECT_BINS) #else #define MHEAP_LOG2_N_SMALL_OBJECT_BINS 0 #define MHEAP_N_SMALL_OBJECT_BINS 0 #endif #define MHEAP_N_BINS \ (MHEAP_N_SMALL_OBJECT_BINS \ + (STRUCT_BITS_OF (mheap_elt_t, user_data[0]) - MHEAP_LOG2_N_SMALL_OBJECT_BINS)) typedef struct { struct { u64 n_search_attempts; u64 n_objects_searched; u64 n_objects_found; } free_list; u64 n_vector_expands; u64 n_small_object_cache_hits; u64 n_small_object_cache_attempts; u64 n_gets, n_puts; u64 n_clocks_get, n_clocks_put; } mheap_stats_t; /* For objects with align == 4 and align_offset == 0 (e.g. vector strings). */ typedef struct { union { #ifdef CLIB_HAVE_VEC128 u8x16 as_u8x16[BITS (uword) / 16]; #endif /* Store bin + 1; zero means unused. */ u8 as_u8[BITS (uword)]; } bins; uword offsets[BITS (uword)]; u32 replacement_index; } mheap_small_object_cache_t; /* Vec header for heaps. */ typedef struct { /* User offsets for head of doubly-linked list of free objects of this size. */ #if CLIB_VEC64 > 0 u64 first_free_elt_uoffset_by_bin[MHEAP_N_BINS]; #else u32 first_free_elt_uoffset_by_bin[MHEAP_N_BINS]; #endif /* Bitmap of non-empty free list bins. */ uword non_empty_free_elt_heads[(MHEAP_N_BINS + BITS (uword) - 1) / BITS (uword)]; mheap_small_object_cache_t small_object_cache; u32 flags; #define MHEAP_FLAG_TRACE (1 << 0) #define MHEAP_FLAG_DISABLE_VM (1 << 1) #define MHEAP_FLAG_THREAD_SAFE (1 << 2) #define MHEAP_FLAG_SMALL_OBJECT_CACHE (1 << 3) #define MHEAP_FLAG_VALIDATE (1 << 4) /* Lock use when MHEAP_FLAG_THREAD_SAFE is set. */ volatile u32 lock; volatile u32 owner_cpu; int recursion_count; /* Number of allocated objects. */ u64 n_elts; /* Maximum size (in bytes) this heap is allowed to grow to. Set to ~0 to grow heap (via vec_resize) arbitrarily. */ u64 max_size; uword vm_alloc_offset_from_header; uword vm_alloc_size; /* Each successful mheap_validate call increments this serial number. Used to debug heap corruption problems. GDB breakpoints can be made conditional on validate_serial. */ u64 validate_serial; mheap_trace_main_t trace_main; mheap_stats_t stats; } mheap_t; always_inline mheap_t * mheap_header (u8 * v) { return vec_aligned_header (v, sizeof (mheap_t), 16); } always_inline u8 * mheap_vector (mheap_t * h) { return vec_aligned_header_end (h, sizeof (mheap_t), 16); } always_inline uword mheap_elt_uoffset (void *v, mheap_elt_t * e) { return (uword) e->user_data - (uword) v; } always_inline mheap_elt_t * mheap_user_pointer_to_elt (void *v) { return v - STRUCT_OFFSET_OF (mheap_elt_t, user_data); } /* For debugging we keep track of offsets for valid objects. We make sure user is not trying to free object with invalid offset. */ always_inline uword mheap_offset_is_valid (void *v, uword uo) { return uo >= MHEAP_ELT_OVERHEAD_BYTES && uo <= vec_len (v); } always_inline mheap_elt_t * mheap_elt_at_uoffset (void *v, uword uo) { ASSERT (mheap_offset_is_valid (v, uo)); return (mheap_elt_t *) (v + uo - STRUCT_OFFSET_OF (mheap_elt_t, user_data)); } always_inline void * mheap_elt_data (void *v, mheap_elt_t * e) { return v + mheap_elt_uoffset (v, e); } always_inline uword mheap_elt_data_bytes (mheap_elt_t * e) { return e->n_user_data * sizeof (e->user_data[0]); } always_inline uword mheap_data_bytes (void *v, uword uo) { mheap_elt_t *e = mheap_elt_at_uoffset (v, uo); return mheap_elt_data_bytes (e); } #define mheap_len(v,d) (mheap_data_bytes((v),(void *) (d) - (void *) (v)) / sizeof ((d)[0])) always_inline mheap_elt_t * mheap_next_elt (mheap_elt_t * e) { ASSERT (e->n_user_data < MHEAP_N_USER_DATA_INVALID); return (mheap_elt_t *) (e->user_data + e->n_user_data); } always_inline mheap_elt_t * mheap_prev_elt (mheap_elt_t * e) { ASSERT (e->prev_n_user_data < MHEAP_N_USER_DATA_INVALID); return ((void *) e - e->prev_n_user_data * sizeof (e->user_data[0]) - MHEAP_ELT_OVERHEAD_BYTES); } /* Exported operations. */ always_inline uword mheap_elts (void *v) { return v ? mheap_header (v)->n_elts : 0; } always_inline uword mheap_max_size (void *v) { return v ? mheap_header (v)->max_size : ~0; } /* Free previously allocated offset. */ void mheap_put (void *v, uword offset); /* Allocate object from mheap. */ void *mheap_get_aligned (void *v, uword size, uword align, uword align_offset, uword * offset_return); #endif /* included_mem_mheap_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */