summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
AgeCommit message (Expand)AuthorFilesLines
2021-12-09build: fix PYTHONPYCACHEPREFIX pathDamjan Marion1-1/+1
2021-12-06build: leave to CMake to deal with -fPIEDamjan Marion1-2/+1
2021-12-02build: bump min cmake version to 3.13 and remove workaroundsDamjan Marion1-12/+3
2021-11-11tests: make code coverage for unit tests optionalOle Troan1-0/+8
2021-11-08build: -Wno-stringop-overflow during LTO phaseDamjan Marion1-0/+4
2021-11-06build: print compiler and library dirDamjan Marion1-0/+2
2021-11-02build: clang-13 supportDamjan Marion1-0/+1
2021-10-05build: don't hardcode triplet, allow specifying custom lib dirDamjan Marion1-1/+5
2021-09-30build: consistent use of CMAKE_INSTALL_LIBDIRNick Brown1-1/+1
2021-09-21vapi: compile vpp-api folder before the pluginsArthur de Kerhor1-2/+2
2021-09-17build: use GNUInstallDirs install destinationsNick Brown1-2/+3
2021-07-16build: fix formatting of CMake config outputDamjan Marion1-12/+12
2021-05-27build: kindly ask python not to polute src/Damjan Marion1-0/+1
2021-05-21bfd: use vnet cryptoKlement Sekera1-1/+1
2021-05-11build: compiler flags handling cleanupDamjan Marion1-46/+41
2021-05-05build: set CMAKE_EXPORT_COMPILE_COMMANDSDamjan Marion1-0/+2
2021-05-04build: add set-build-type-* targets to CMakeDamjan Marion1-2/+10
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-0/+9
2021-05-01build: add option to turn off some march variantsDamjan Marion1-1/+1
2021-04-30misc: experimental configure scriptDamjan Marion1-3/+33
2021-04-30build: switch release build to -O3Damjan Marion1-1/+1
2021-04-14misc: clang-12 supportDamjan Marion1-1/+9
2021-01-28build: do not _FORTIFY_SOURCE in debug modeMohammed Hawari1-1/+0
2021-01-20build: add the missing leading underscore to FORTIFY_SOURCENeale Ranns1-2/+2
2021-01-18build: make rpath optionalNathan Moos1-1/+4
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-1/+1
2020-11-05build: link time optimization for release buildsDamjan Marion1-1/+12
2020-10-12misc: clang-11 and gcc-10 supportDamjan Marion1-1/+1
2020-06-16vlib: address sanitizer support for stack switch, enable clangDamjan Marion1-1/+1
2020-06-16build: fix address sanitizer default argsBenoît Ganne1-1/+1
2020-05-27build: make address sanitizer options configurable with cmakeDamjan Marion1-0/+6
2020-05-08build: various improvementsDamjan Marion1-6/+11
2020-05-07misc: deprecate elftoolDamjan Marion1-1/+1
2020-04-30build: rework x86 CPU variantsDamjan Marion1-1/+1
2020-04-29misc: switch to clang-9Damjan Marion1-0/+2
2019-11-27misc: add address sanitizer heap instrumentationBenoît Ganne1-0/+11
2019-11-22build: add build types helpstring to cmake projectDamjan Marion1-0/+9
2019-11-08build: use cmake build typesDamjan Marion1-8/+33
2019-03-28AppImage packagingDave Barach1-1/+1
2019-03-18Fix build with newer linux headersDamjan Marion1-1/+1
2019-01-29cmake: fix out-of-git-tree buildDamjan Marion1-10/+1
2019-01-26cmake: add support for linking with DPDK shared libsDamjan Marion1-1/+1
2019-01-20Rework of debian packagingDamjan Marion1-1/+1
2019-01-18cmake: print all flagsDamjan Marion1-8/+19
2019-01-18Look for plugins in target triplet subdirDamjan Marion1-0/+1
2019-01-17cmake: initial cross-compilation supportDamjan Marion1-0/+11
2018-09-20rename vpp-dpdk-dev to vpp-ext-depsDamjan Marion1-0/+1
2018-09-14cpack: add deb/rpm packaging to VPP moduleDamjan Marion1-0/+9
2018-09-12cmake: create cmake VPP module, update sample-plugin so it uses itDamjan Marion1-1/+2
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion1-1/+1
an class="s">", tm->search_iter); before = clib_time_now (&tm->clib_time); for (j = 0; j < tm->search_iter; j++) { for (i = 0; i < tm->nitems; i++) { kv.key = (u64) tm->keys[i]; if (BV (clib_bihash_search) (h, &kv, &kv) < 0) if (BV (clib_bihash_search) (h, &kv, &kv) < 0) clib_warning ("[%d] search for key %lld failed unexpectedly\n", i, tm->keys[i]); if (kv.value != (u64) (i + 1)) clib_warning ("[%d] search for key %lld returned %lld, not %lld\n", i, tm->keys, kv.value, (u64) (i + 1)); } } delta = clib_time_now (&tm->clib_time) - before; total_searches = (uword) tm->search_iter * (uword) tm->nitems; if (delta > 0) fformat (stdout, "%.f searches per second\n", ((f64) total_searches) / delta); fformat (stdout, "%lld searches in %.6f seconds\n", total_searches, delta); fformat (stdout, "Standard E-hash search for items %d times...\n", tm->search_iter); before = clib_time_now (&tm->clib_time); for (j = 0; j < tm->search_iter; j++) { for (i = 0; i < tm->nitems; i++) { p = hash_get_mem (tm->key_hash, tm->keys[i]); if (p == 0 || p[0] != (uword) (i + 1)) clib_warning ("ugh, couldn't find %lld\n", tm->keys[i]); } } delta = clib_time_now (&tm->clib_time) - before; total_searches = (uword) tm->search_iter * (uword) tm->nitems; fformat (stdout, "%lld searches in %.6f seconds\n", total_searches, delta); if (delta > 0) fformat (stdout, "%.f searches per second\n", ((f64) total_searches) / delta); fformat (stdout, "Delete items...\n"); for (i = 0; i < tm->nitems; i++) { int j; int rv; kv.key = (u64) tm->keys[i]; kv.value = (u64) (i + 1); rv = BV (clib_bihash_add_del) (h, &kv, 0 /* is_add */ ); if (rv < 0) clib_warning ("delete key %lld not ok but should be", tm->keys[i]); if (tm->careful_delete_tests) { for (j = 0; j < tm->nitems; j++) { kv.key = (u64) tm->keys[j]; rv = BV (clib_bihash_search) (h, &kv, &kv); if (j <= i && rv >= 0) { clib_warning ("i %d j %d search ok but should not be, value %lld", i, j, kv.value); } if (j > i && rv < 0) { clib_warning ("i %d j %d search not ok but should be", i, j); } } } } fformat (stdout, "After deletions, should be empty...\n"); fformat (stdout, "%U", BV (format_bihash), h, 0 /* very verbose */ ); return 0; } clib_error_t * test_bihash_main (test_main_t * tm) { unformat_input_t *i = tm->input; clib_error_t *error; int which = 0; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "seed %u", &tm->seed)) ; else if (unformat (i, "nbuckets %d", &tm->nbuckets)) ; else if (unformat (i, "non-random-keys")) tm->non_random_keys = 1; else if (unformat (i, "nitems %d", &tm->nitems)) ; else if (unformat (i, "careful %d", &tm->careful_delete_tests)) ; else if (unformat (i, "verbose %d", &tm->verbose)) ; else if (unformat (i, "search %d", &tm->search_iter)) ; else if (unformat (i, "vec64")) which = 1; else if (unformat (i, "cache")) which = 2; else if (unformat (i, "verbose")) tm->verbose = 1; else return clib_error_return (0, "unknown input '%U'", format_unformat_error, i); } switch (which) { case 0: error = test_bihash (tm); break; default: return clib_error_return (0, "no such test?"); } return error; } #ifdef CLIB_UNIX int main (int argc, char *argv[]) { unformat_input_t i; clib_error_t *error; test_main_t *tm = &test_main; clib_mem_init (0, 3ULL << 30); tm->input = &i; tm->seed = 0xdeaddabe; tm->nbuckets = 2; tm->nitems = 5; tm->verbose = 1; tm->search_iter = 1; tm->careful_delete_tests = 0; tm->key_hash = hash_create_string (0, sizeof (uword)); clib_time_init (&tm->clib_time); unformat_init_command_line (&i, argv); error = test_bihash_main (tm); unformat_free (&i); if (error) { clib_error_report (error); return 1; } return 0; } #endif /* CLIB_UNIX */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */