summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
AgeCommit message (Expand)AuthorFilesLines
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-3/+3
2020-12-08fib: Adjacency flag for midchain to perfom flow hash (on inner packet)Neale Ranns4-27/+74
2020-12-08fib: Source Address SelectionNeale Ranns5-75/+269
2020-10-28misc: Break the big IP header files to improve compile timeNeale Ranns1-0/+2
2020-09-02fib: fix ADJ_NBR_ITF_OK param erroryedg1-1/+1
2020-09-01fib: detect wrong adj neighbour bugsBenoît Ganne1-0/+23
2020-08-06misc: harmonize namesDave Barach3-7/+7
2020-06-05fib: fix adj pool expand casesDave Barach1-1/+24
2020-05-29fib: Safe adj walkNeale Ranns1-8/+15
2020-05-26fib: Use basic hash for adjacency neighbour tableNeale Ranns1-82/+42
2020-05-13feature: Config end nodes are user specificNeale Ranns1-5/+5
2020-05-04fib: midchain adjacency optimisationsNeale Ranns12-345/+483
2020-04-10fib: fix adjacency cli command issueShivaShankarK1-3/+1
2020-02-21ipsec: IPSec protection for multi-point tunnel interfacesNeale Ranns2-4/+3
2020-02-20fib: adjacency midchain teardown (VPP-1841)Neale Ranns3-5/+40
2020-02-03fib: invalid check for adj types.Neale Ranns1-1/+1
2020-02-03fib: refresh adj pointer after fib_walk_sync due to possible reallocSteven Luong1-0/+6
2020-01-30fib: fix typos in doxygenPaul Vinciguerra1-10/+10
2020-01-27ipip: Multi-point interfaceNeale Ranns4-18/+33
2020-01-27fib: Reload the adj after possible realloc (VPP-1822)Neale Ranns1-0/+1
2020-01-22fib: Adjacency realloc during rewrite update walk (VPP-1822)Neale Ranns1-4/+4
2020-01-09misc: fix feature description spellingOle Troan1-2/+1
2020-01-03fib: add adjacency feature.yamlNeale Ranns1-0/+24
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns5-15/+24
2019-12-17fib: Adjacency walk fix for IPv6Neale Ranns1-1/+1
2019-12-16vppinfra: bihash walk cb typedef and continue/stop controlsNeale Ranns1-3/+6
2019-12-15fib: Adjacency creation notifications for dlegatesNeale Ranns6-1/+29
2019-12-03fib: constify the adjacency in the rewrite nodesNeale Ranns2-4/+4
2019-12-03fib feature: Code mechanics to decouple dependency of feature on adjNeale Ranns2-8/+5
2019-11-26fib: reduce save_rewrite_length to u8Klement Sekera2-7/+9
2019-10-16fib: fix use-after-free for interface adj removalBenoît Ganne1-0/+3
2019-09-25fib: fix some typos in fib/mtrieLijian.Zhang1-6/+6
2019-09-23fib: do not dump no-longer valid adjacenciesBenoît Ganne3-2/+17
2019-08-07fib tests: IP multicast over GRENeale Ranns1-0/+1
2019-07-24fib: remove unused input parameterZhiyong Yang1-5/+2
2019-07-23api: binary api cleanupDave Barach1-1/+1
2019-07-19fib: FIB Entry trackingNeale Ranns1-9/+7
2019-05-16init / exit function orderingDave Barach1-7/+7
2019-05-13remove dead code in rewrite.cNeale Ranns1-26/+0
2019-04-16ADJ: crash in format/show (VPP-1648)Neale Ranns1-1/+1
2019-04-08fixing typosJim Thompson2-3/+3
2019-03-28IPSEC: run encrpyt as a feautre on the tunnelNeale Ranns1-17/+5
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra8-27/+27
2019-03-26ADJ: midchain delegate to performing stackingNeale Ranns5-5/+237
2019-03-26Simplify adjacency rewrite codeBenoît Ganne2-142/+26
2019-03-07Honor vnet_rewrite_data_t data_bytes == 0Dave Barach1-1/+15
2019-03-04adj: migrate old MULTIARCH macros to VLIB_NODE_FNFilip Tehlar2-20/+6
2019-02-22Callback functions must have the correct signatureNeale Ranns1-1/+3
2018-12-16IP6-MFIB: replace the radix tree with bihash (VPP-1526)Neale Ranns1-0/+2
2018-12-07FIB recusrion loop checks traverse midchain adjacenciesNeale Ranns4-13/+282
pan class="k">for (unsigned cpu_mask = rtm->cpu_mask_write; cpu_mask; cpu_mask >>= 1) { if (!(cpu_mask & 1)) { cpu_id++; continue; } CPU_ZERO (&cpuset); CPU_SET (cpu_id, &cpuset); for (uword t_num = 0; t_num < rtm->threads_per_core; t_num++) { uword t_index = cores_set * rtm->threads_per_core + t_num; if ((error = pthread_create (&pthread[t_index], NULL, &write_shared_counter, rtm))) clib_unix_warning ("pthread_create failed with %d", error); if ((error = pthread_setaffinity_np (pthread[t_index], sizeof (cpu_set_t), &cpuset))) clib_unix_warning ("pthread_set_affinity_np failed with %d", error); } cores_set++; cpu_id++; } /* Launch all threads */ clib_atomic_store_rel_n (&all_threads_online, 1); for (uword thread_num = 0; thread_num < total_threads; thread_num++) { f64 *time; if ((error = pthread_join (pthread[thread_num], (void *) &time))) clib_unix_warning ("pthread_join failed with %d", error); *elapse_time += *time; vec_free (time); } fformat (stdout, "Time elapsed: %.4e\n", *elapse_time); return rtm->shared_count; } uword num_cores_in_cpu_mask (uword mask) { uword num_cores = 0; for (uword cpu_mask = mask; cpu_mask; cpu_mask >>= 1) num_cores += (cpu_mask & 1); return num_cores; } int test_rwlock_main (unformat_input_t * i) { rwlock_test_main_t _rtm, *rtm = &_rtm; clib_memset (rtm, 0, sizeof (rwlock_test_main_t)); while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (0 == unformat (i, "threads/core %d", &rtm->threads_per_core) && 0 == unformat (i, "cpu_mask_read %x", &rtm->cpu_mask_read) && 0 == unformat (i, "cpu_mask_write %x", &rtm->cpu_mask_write) && 0 == unformat (i, "increment %d", &rtm->increment_per_thread) && 0 == unformat (i, "iterations %d", &rtm->iterations)) { clib_unix_warning ("unknown input '%U'", format_unformat_error, i); return 1; } } rtm->read_cores = num_cores_in_cpu_mask (rtm->cpu_mask_read); rtm->write_cores = num_cores_in_cpu_mask (rtm->cpu_mask_write); uword total_increment = rtm->threads_per_core * rtm->write_cores * rtm->increment_per_thread; clib_rwlock_init (&rtm->rwlock); f64 average_time = 0; for (uword trial = 0; trial < rtm->iterations; trial++) { rtm->shared_count = 0; f64 elapse_time = 0; if (test_rwlock (rtm, &elapse_time) != total_increment) { clib_rwlock_free (&rtm->rwlock); fformat (stdout, "FAILED: expected count: %d, actual count: %d\n", total_increment, rtm->shared_count); return 1; } fformat (stdout, "Trial %d SUCCESS: %d = %d\n", trial, rtm->shared_count, total_increment); average_time = (average_time * trial + elapse_time) / (trial + 1); fformat (stdout, "Average lock/unlock cycles: %.4e\n", average_time); } clib_rwlock_free (&rtm->rwlock); return 0; } #ifdef CLIB_UNIX /** Launches a number of writer threads to simultaneously increment a global counter and a number of reader threads to continuously poll the counter, and records timestamps for rwlock performance benchmarking @param "threads/core [# threads/core]" - number of threads per core @param "cpu_mask_read [cpu_mask]" - reader thread cpu string e.g. input ff sets cpus 0 - 7 @param "cpu_mask_write [cpu_mask]" - writer thread cpu string @param "increment [# increments]" - number of increments per writer thread @param "iterations [# iterations]" - number of iterations @returns exit code */ int main (int argc, char *argv[]) { unformat_input_t i; i32 ret; clib_time_t time; clib_mem_init (0, 3ULL << 30); clib_time_init (&time); unformat_init_command_line (&i, argv); ret = test_rwlock_main (&i); unformat_free (&i); return ret; } #endif /* CLIB_UNIX */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */