aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
AgeCommit message (Expand)AuthorFilesLines
2021-07-16vppinfra: add array mask funcMohsin Kazmi3-0/+185
2021-07-15vppinfra: fix the vector funcs test for march variantsMohsin Kazmi1-1/+12
2021-07-15misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}Damjan Marion1-16/+19
2021-07-14vppinfra: remove old and unused vector macros and inlinesDamjan Marion3-257/+0
2021-07-13vppinfra: fix saturate add/sub NEON wrappersLijian.Zhang1-40/+60
2021-07-13vppinfra: put each vector function into own fileDamjan Marion7-79/+90
2021-07-13vppinfra: fix SIGSEGV in clib_mem_vm_unmapchenqijun1-4/+6
2021-06-21vppinfra: asan: fix overflow supportBenoît Ganne3-14/+89
2021-06-08vppinfra: pool_free_elts() now supports fixed-size poolsDave Barach1-29/+36
2021-05-26vppinfra: explicit blocking mode for sock connectsFlorin Coras2-2/+4
2021-05-26api: socket client connect set to blockingFlorin Coras1-0/+8
2021-05-19vppinfra: add more llist macrosFlorin Coras1-0/+38
2021-05-13tests: move test source to vpp/testDave Wallace2-114/+0
2021-05-11vppinfra: Add missing %oNathan Skrzypczak1-0/+4
2021-05-07vppinfra: add universal array mask_compare and compress funcsDamjan Marion8-17/+467
2021-05-06vppinfra: fix testsDamjan Marion17-87/+78
2021-05-06stats: memory heap countersOle Troan1-7/+10
2021-05-05vppinfra: enfoce function pointer cast in CLIB_MARCH_FN_POINTERDamjan Marion1-2/+2
2021-05-05vppinfra: fix x86 packs / packus wrappersDamjan Marion4-94/+52
2021-04-30misc: experimental configure scriptDamjan Marion1-2/+2
2021-04-30build: switch release build to -O3Damjan Marion1-18/+11
2021-04-28vppinfra: AArch64 NEON implementation of clib_compare_u16_x64()Damjan Marion1-1/+20
2021-04-28vppinfra: don't fail if config.h is missing, fallback to defaults insteadDamjan Marion2-0/+7
2021-04-27misc: fix dead storesDamjan Marion1-4/+1
2021-04-27vlib: improve enqueue_to_next buffer indices extractionDamjan Marion6-330/+72
2021-04-27vppinfra: silence coverity warnings related to clib_memcpy_u32()Damjan Marion1-0/+10
2021-04-27vppinfra: Fix a bug related to path_searchRyo Nishikawa1-1/+1
2021-04-27perfmon: top down level 1 supportmdr781-0/+1
2021-04-26vppinfra: clib_memcpy_u32() utilizing SIMD mask loads/storesDamjan Marion3-0/+158
2021-04-25vppinfra: add COMPILE_TIME_CONST() macroDamjan Marion2-1/+2
2021-04-25vppinfra: AVX512 mask load/stores and compress storeDamjan Marion3-37/+55
2021-04-25vppinfra: add clear_lowest_set_bit() function, use BMI2 if availableDamjan Marion1-0/+10
2021-04-21buffers: vlib_get_buffers() with 512-bit SIMDDamjan Marion1-0/+1
2021-04-21vppinfra: more avx512 inlines (compress, expand, from, is_equal_mask)Damjan Marion2-30/+80
2021-04-20pmalloc: tolerate move_pages failure on numa node #0Klement Sekera1-1/+2
2021-04-19vppinfra: momve clib_sysfs_list_to_bitmap to sysfs.cDamjan Marion2-0/+29
2021-04-18vppinfra: remove outdated and unused unix format functionsDamjan Marion2-486/+0
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion9-136/+51
2021-04-15vppinfra: move bitmap format functions to .c file, add format_bitmap_listDamjan Marion3-120/+172
2021-04-15vppinfra: correct intrinsic called by u16x16_from_u8x16Lijian.Zhang1-2/+2
2021-03-25tests: move vppinfra tests to src/vppinfra/testDave Wallace1-0/+40
2021-03-11vlib: refactor node function variantsDamjan Marion1-19/+22
2021-03-07dispatch-trace: move dispatch trace pcap code to pluginDamjan Marion1-39/+0
2021-03-04vppinfra: fix compiling error due to incompatible udphdr field namesJieqiang Wang1-6/+3
2021-02-26vppinfra: mem leak in show memory main-heapFlorin Coras1-1/+5
2021-02-19session vppinfra: asan fixesFlorin Coras1-4/+16
2021-02-16cjson: upgrade to new versionOle Troan1-14/+33
2021-02-15vppinfra: fix memcpy undefined behaviourBenoît Ganne6-80/+123
2021-02-11vppinfra: fix membulk coverity warningsFlorin Coras1-2/+2
2021-02-10vppinfra: fix bihash test-debug aarch64 sporadic failureDave Barach1-0/+3
an> &itv.it_value); if (setitimer (ITIMER_REAL, &itv, 0) < 0) clib_unix_error ("sititmer"); return; } } } void timer_block (sigset_t * save) { sigset_t block_timer; clib_memset (&block_timer, 0, sizeof (block_timer)); sigaddset (&block_timer, TIMER_SIGNAL); sigprocmask (SIG_BLOCK, &block_timer, save); } void timer_unblock (sigset_t * save) { sigprocmask (SIG_SETMASK, save, 0); } /* Arrange for function to be called some time, roughly equal to dt seconds, in the future. */ void timer_call (timer_func_t * func, any arg, f64 dt) { timer_callback_t *t; sigset_t save; /* Install signal handler on first call. */ static word signal_installed = 0; if (!signal_installed) { struct sigaction sa; /* Initialize time_resolution before first call to timer_interrupt */ time_resolution = 0.75 / (f64) HZ; clib_memset (&sa, 0, sizeof (sa)); sa.sa_handler = timer_interrupt; if (sigaction (TIMER_SIGNAL, &sa, 0) < 0) clib_panic ("sigaction"); signal_installed = 1; } timer_block (&save); /* Add new timer. */ vec_add2 (timers, t, 1); t->time = unix_time_now () + dt; t->func = func; t->arg = arg; { word reset_timer = vec_len (timers) == 1; if (_vec_len (timers) > 1) { reset_timer += t->time < (t - 1)->time; sort_timers (timers); } if (reset_timer) timer_interrupt (TIMER_SIGNAL); } timer_unblock (&save); } #ifdef TEST #include <vppinfra/random.h> /* Compute average delay of function calls to foo. If this is a small number over a lot of iterations we know the code is working. */ static f64 ave_delay = 0; static word ave_delay_count = 0; always_inline update (f64 delay) { ave_delay += delay; ave_delay_count += 1; } typedef struct { f64 time_requested, time_called; } foo_t; static f64 foo_base_time = 0; static foo_t *foos = 0; void foo (any arg, f64 delay) { foos[arg].time_called = unix_time_now () - foo_base_time; update (delay); } typedef struct { word count; word limit; } bar_t; void bar (any arg, f64 delay) { bar_t *b = (bar_t *) arg; fformat (stdout, "bar %d delay %g\n", b->count++, delay); update (delay); if (b->count < b->limit) timer_call (bar, arg, random_f64 ()); } int main (int argc, char *argv[]) { word i, n = atoi (argv[1]); word run_foo = argc > 2; bar_t b = { limit:10 }; if (run_foo) { f64 time_limit; time_limit = atof (argv[2]); vec_resize (foos, n); for (i = 0; i < n; i++) { foos[i].time_requested = time_limit * random_f64 (); foos[i].time_called = 1e100; } foo_base_time = unix_time_now (); for (i = 0; i < n; i++) timer_call (foo, i, foos[i].time_requested); } else timer_call (bar, (any) & b, random_f64 ()); while (vec_len (timers) > 0) os_sched_yield (); if (vec_len (foos) > 0) { f64 min = 1e100, max = -min; f64 ave = 0, rms = 0; for (i = 0; i < n; i++) { f64 dt = foos[i].time_requested - foos[i].time_called; if (dt < min) min = dt; if (dt > max) max = dt; ave += dt; rms += dt * dt; } ave /= n; rms = sqrt (rms / n - ave * ave); fformat (stdout, "error min %g max %g ave %g +- %g\n", min, max, ave, rms); } fformat (stdout, "%d function calls, ave. timer delay %g secs\n", ave_delay_count, ave_delay / ave_delay_count); return 0; } #endif /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */