summaryrefslogtreecommitdiffstats
path: root/build-root
AgeCommit message (Expand)AuthorFilesLines
2016-09-30Remove RPM package dependency on vpp-develJohn DeNisco1-1/+1
2016-09-27Fix RPM packaging dependenciesJohn DeNisco1-1/+1
2016-09-27VPP-308: Added workaround for failed vnet build. For some reasonThomas F Herbert1-0/+1
2016-09-27FIX sysctl configuration directoryMiroslav Miklus1-3/+3
2016-09-26Update CSIT tests 160919 -> 160925Jan1-1/+1
2016-09-23Python API: Preparation for RPM/DEB packaging.Ole Troan1-0/+32
2016-09-20Update CSIT tests 160912 -> 160919Jan1-1/+1
2016-09-13Update CSIT tests 160904 -> 160912Jan1-1/+1
2016-09-12Provide vpp-plugins rpm packagingEd Warnicke1-0/+31
2016-09-10VPP-367: Peg vpp and vpp-plugins to depend on specific versionsEd Warnicke1-2/+2
2016-09-07VPP-390: include *.so symlinks in vpp-libEd Warnicke1-0/+2
2016-09-07checkstyle: improve speed by checking only recently changed filesDamjan Marion1-3/+18
2016-09-05Update CSIT tests 160821 -> 160904Jan1-1/+1
2016-09-02VPP-374: getting jvppgen.py into rpm vpp-devel packageEd Warnicke1-0/+11
2016-09-02VPP-373: stop building from /vpp mountEd Warnicke3-5/+63
2016-08-22Update CSIT tests 160815 -> 160821Jan1-1/+1
2016-08-17Coding standards cleanup - remove trailing whitespace, fixes VPP-332Damjan Marion1-0/+4
2016-08-15Update CSIT tests 160807 -> 160815Jan1-1/+1
2016-08-12VPP-237: Checkstyle script to check for new checkstyle breakageEd Warnicke1-0/+73
2016-08-12VPP-237: Bracket VL_API_PACKED(...) macros, which indent manglesEd Warnicke1-0/+3
2016-08-12Bracket CLIB_PACKED(...) macros, which indent manglesDave Barach1-0/+4
2016-08-11Don't re-add *INDENT-OFF* ... *INDENT-ON* tagsDave Barach1-24/+58
2016-08-08VPP-311 Coding standards cleanup for vnet/vnet/*.[ch]Dave Barach1-0/+8
2016-08-08Update CSIT tests 160731 -> 160807Jan1-1/+1
2016-08-07VPP-243 - Coding style changes - updated emacs LISP styleifyKeith Burns (alagalah)1-0/+4
2016-08-05VPP-237 Coding standards cleanupDave Barach1-2/+8
2016-08-04Update coding style for hash_foreach_memKeith Burns (alagalah)1-0/+4
2016-08-02Fix for broken vagrant installs when using Vagrant 1.8.5.Thomas F Herbert1-0/+1
2016-08-01Update CSIT test 160727 -> 160731Jan1-1/+1
2016-07-28Update CSIT test 160710 -> 160727Andrej Kozemcak1-1/+1
2016-07-21build-root/vagrant: Fix SSE4.x for VBRay1-0/+4
2016-07-18Use oper-160710 CSIT branch for 'verify' jobsMiroslav Miklus1-1/+1
2016-07-18Improve "indent foo.c" prep scriptDave Barach1-29/+53
2016-07-13Add plugins debian packagingDamjan Marion2-0/+18
2016-07-08fd-io-styleify for svmDave Barach1-25/+55
2016-07-08fd-io-styleify passDave Barach1-0/+45
2016-07-08Update emacs plugin skeletonDamjan Marion2-25/+16
2016-07-08Multiple changes in the plugin build infraDamjan Marion1-1/+1
2016-06-25Vagrantfile RAM default is too small.Keith Burns (alagalah)2-2/+2
2016-06-21Vagrantfile syntax error correction - requires string input instead of integer.Srivatsa Sangli1-1/+1
2016-06-20Using env.sh file for Vagrantfile inputs, but assume some defaultsKeith Burns (alagalah)4-63/+98
2016-06-18Enhanced RPM build process to make rpm for any given platformSachin1-1/+1
2016-06-17Fix generate-deb-changelog to handle YY.MM releaseEd Warnicke1-1/+1
2016-06-09VPP-127 Removed spurious use of sudoEd Warnicke2-2/+2
2016-06-09VPP-129: Add build-root/scripts/csit-test-branch scriptEd Warnicke1-0/+2
2016-06-08VPP-127: Make rpm/deb provide vpp group to access vpp-apiEd Warnicke2-0/+8
2016-06-08VPP-124: Fix rpms to work out of the box.Ed Warnicke2-1/+3
2016-06-05VPP-94: Add build-data directory for plugins and Makefile targetPierre Pfister1-1/+1
2016-06-05VPP-112: linux kernel info missing from build logDave Wallace1-0/+9
2016-06-03Sample plugin moved to .../plugins/sample-pluginDave Barach1-4/+4
/span> vlib_node_runtime_perf_call_type_t; typedef struct { struct vlib_main_t *vm; vlib_node_runtime_t *node; vlib_frame_t *frame; uword packets; u64 cpu_time_now; vlib_node_runtime_perf_call_type_t call_type; } vlib_node_runtime_perf_callback_args_t; struct vlib_node_runtime_perf_callback_data_t; typedef void (*vlib_node_runtime_perf_callback_fp_t) (struct vlib_node_runtime_perf_callback_data_t * data, vlib_node_runtime_perf_callback_args_t * args); typedef struct vlib_node_runtime_perf_callback_data_t { vlib_node_runtime_perf_callback_fp_t fp; union { void *v; u64 u; } u[3]; } vlib_node_runtime_perf_callback_data_t; clib_callback_data_typedef (vlib_node_runtime_perf_callback_set_t, vlib_node_runtime_perf_callback_data_t); typedef struct vlib_main_t { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); /* Instruction level timing state. */ clib_time_t clib_time; /* Offset from main thread time */ f64 time_offset; f64 time_last_barrier_release; /* Time stamp of last node dispatch. */ u64 cpu_time_last_node_dispatch; /* Time stamp when main loop was entered (time 0). */ u64 cpu_time_main_loop_start; /* Incremented once for each main loop. */ volatile u32 main_loop_count; /* Count of vectors processed this main loop. */ u32 main_loop_vectors_processed; u32 main_loop_nodes_processed; /* Internal node vectors, calls */ u64 internal_node_vectors; u64 internal_node_calls; u64 internal_node_vectors_last_clear; u64 internal_node_calls_last_clear; /* Instantaneous vector rate */ u32 internal_node_last_vectors_per_main_loop; /* Main loop hw / sw performance counters */ vlib_node_runtime_perf_callback_set_t vlib_node_runtime_perf_callbacks; /* Every so often we switch to the next counter. */ #define VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE 7 /* Jump target to exit main loop with given code. */ u32 main_loop_exit_set; /* Set e.g. in the SIGTERM signal handler, checked in a safe place... */ volatile u32 main_loop_exit_now; clib_longjmp_t main_loop_exit; #define VLIB_MAIN_LOOP_EXIT_NONE 0 #define VLIB_MAIN_LOOP_EXIT_PANIC 1 /* Exit via CLI. */ #define VLIB_MAIN_LOOP_EXIT_CLI 2 /* Error marker to use when exiting main loop. */ clib_error_t *main_loop_error; /* Name for e.g. syslog. */ char *name; /* Start of the heap. */ void *heap_base; /* Truncated version, to create frame indices */ void *heap_aligned_base; /* Size of the heap */ uword heap_size; /* buffer main structure. */ vlib_buffer_main_t *buffer_main; /* physical memory main structure. */ vlib_physmem_main_t physmem_main; /* Node graph main structure. */ vlib_node_main_t node_main; /* Command line interface. */ vlib_cli_main_t cli_main; /* Packet trace buffer. */ vlib_trace_main_t trace_main; /* Pcap dispatch trace main */ pcap_main_t dispatch_pcap_main; uword dispatch_pcap_enable; uword dispatch_pcap_postmortem; u32 *dispatch_buffer_trace_nodes; u8 *pcap_buffer; /* pcap rx / tx tracing */ vnet_pcap_t pcap; /* Packet trace capture filter */ vlib_trace_filter_t trace_filter; /* Error handling. */ vlib_error_main_t error_main; /* Punt packets to underlying operating system for when fast switching code does not know what to do. */ void (*os_punt_frame) (struct vlib_main_t * vm, struct vlib_node_runtime_t * node, vlib_frame_t * frame); /* Stream index to use for distribution when MC is enabled. */ u32 mc_stream_index; vlib_one_time_waiting_process_t *procs_waiting_for_mc_stream_join; /* Event logger. */ elog_main_t elog_main; u32 configured_elog_ring_size; /* Event logger trace flags */ int elog_trace_api_messages; int elog_trace_cli_commands; int elog_trace_graph_dispatch; int elog_trace_graph_circuit; u32 elog_trace_graph_circuit_node_index; /* Node call and return event types. */ elog_event_type_t *node_call_elog_event_types; elog_event_type_t *node_return_elog_event_types; elog_event_type_t *error_elog_event_types; /* Seed for random number generator. */ uword random_seed; /* Buffer of random data for various uses. */ clib_random_buffer_t random_buffer; /* Hash table to record which init functions have been called. */ uword *init_functions_called; /* thread, cpu and numa_node indices */ u32 thread_index; u32 cpu_id; u32 numa_node; /* List of init functions to call, setup by constructors */ _vlib_init_function_list_elt_t *init_function_registrations; _vlib_init_function_list_elt_t *worker_init_function_registrations; _vlib_init_function_list_elt_t *main_loop_enter_function_registrations; _vlib_init_function_list_elt_t *main_loop_exit_function_registrations; _vlib_init_function_list_elt_t *api_init_function_registrations; vlib_config_function_runtime_t *config_function_registrations; /* control-plane API queue signal pending, length indication */ volatile u32 queue_signal_pending; volatile u32 api_queue_nonempty; void (*queue_signal_callback) (struct vlib_main_t *); u8 **argv; /* Top of (worker) dispatch loop callback */ void (**volatile worker_thread_main_loop_callbacks) (struct vlib_main_t *, u64 t); void (**volatile worker_thread_main_loop_callback_tmp) (struct vlib_main_t *, u64 t); clib_spinlock_t worker_thread_main_loop_callback_lock; /* debugging */ volatile int parked_at_barrier; /* Attempt to do a post-mortem elog dump */ int elog_post_mortem_dump; /* * Need to call vlib_worker_thread_node_runtime_update before * releasing worker thread barrier. Only valid in vlib_global_main. */ int need_vlib_worker_thread_node_runtime_update; /* Dispatch loop time accounting */ u64 loops_this_reporting_interval; f64 loop_interval_end; f64 loop_interval_start; f64 loops_per_second; f64 seconds_per_loop; f64 damping_constant; /* * Barrier epoch - Set to current time, each time barrier_sync or * barrier_release is called with zero recursion. */ f64 barrier_epoch; /* Earliest barrier can be closed again */ f64 barrier_no_close_before; /* Barrier counter callback */ void (**volatile barrier_perf_callbacks) (struct vlib_main_t *, u64 t, int leave); void (**volatile barrier_perf_callbacks_tmp) (struct vlib_main_t *, u64 t, int leave); /* Need to check the frame queues */ volatile uword check_frame_queues; /* RPC requests, main thread only */ uword *pending_rpc_requests; uword *processing_rpc_requests; clib_spinlock_t pending_rpc_lock; /* buffer fault injector */ u32 buffer_alloc_success_seed; f64 buffer_alloc_success_rate; #ifdef CLIB_SANITIZE_ADDR /* address sanitizer stack save */ void *asan_stack_save; #endif } vlib_main_t; /* Global main structure. */ extern vlib_main_t vlib_global_main; void vlib_worker_loop (vlib_main_t * vm); always_inline f64 vlib_time_now (vlib_main_t * vm) { #if CLIB_DEBUG > 0 extern __thread uword __os_thread_index; #endif /* * Make sure folks don't pass &vlib_global_main from a worker thread. */ ASSERT (vm->thread_index == __os_thread_index); return clib_time_now (&vm->clib_time) + vm->time_offset; } always_inline f64 vlib_time_now_ticks (vlib_main_t * vm, u64 n) { return clib_time_now_internal (&vm->clib_time, n); } /* Busy wait for specified time. */ always_inline void vlib_time_wait (vlib_main_t * vm, f64 wait) { f64 t = vlib_time_now (vm); f64 limit = t + wait; while (t < limit) t = vlib_time_now (vm); } /* Time a piece of code. */ #define vlib_time_code(vm,body) \ do { \ f64 _t[2]; \ _t[0] = vlib_time_now (vm); \ do { body; } while (0); \ _t[1] = vlib_time_now (vm); \ clib_warning ("%.7e", _t[1] - _t[0]); \ } while (0) #define vlib_wait_with_timeout(vm,suspend_time,timeout_time,test) \ ({ \ uword __vlib_wait_with_timeout = 0; \ f64 __vlib_wait_time = 0; \ while (! (__vlib_wait_with_timeout = (test)) \ && __vlib_wait_time < (timeout_time)) \ { \ vlib_process_suspend (vm, suspend_time); \ __vlib_wait_time += suspend_time; \ } \ __vlib_wait_with_timeout; \ }) always_inline void vlib_panic_with_error (vlib_main_t * vm, clib_error_t * error) { vm->main_loop_error = error; clib_longjmp (&vm->main_loop_exit, VLIB_MAIN_LOOP_EXIT_PANIC); } #define vlib_panic_with_msg(vm,args...) \ vlib_panic_with_error (vm, clib_error_return (0, args)) always_inline void vlib_panic (vlib_main_t * vm) { vlib_panic_with_error (vm, 0); } always_inline f64 vlib_internal_node_vector_rate (vlib_main_t * vm) { u64 vectors; u64 calls; calls = vm->internal_node_calls - vm->internal_node_calls_last_clear; if (PREDICT_FALSE (calls == 0)) return 0.0; vectors = vm->internal_node_vectors - vm->internal_node_vectors_last_clear; return (f64) vectors / (f64) calls; } always_inline void vlib_clear_internal_node_vector_rate (vlib_main_t * vm) { vm->internal_node_calls_last_clear = vm->internal_node_calls; vm->internal_node_vectors_last_clear = vm->internal_node_vectors; } always_inline void vlib_increment_main_loop_counter (vlib_main_t * vm) { vm->main_loop_count++; vm->internal_node_last_vectors_per_main_loop = 0; if (PREDICT_FALSE (vm->main_loop_exit_now)) clib_longjmp (&vm->main_loop_exit, VLIB_MAIN_LOOP_EXIT_CLI); } always_inline u32 vlib_last_vectors_per_main_loop (vlib_main_t * vm) { return vm->internal_node_last_vectors_per_main_loop; } always_inline void vlib_node_runtime_perf_counter (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame, uword n, u64 t, vlib_node_runtime_perf_call_type_t call_type) { vlib_node_runtime_perf_callback_data_t *v = clib_callback_data_check_and_get (&vm->vlib_node_runtime_perf_callbacks); if (vec_len (v)) { vlib_node_runtime_perf_callback_args_t args = { .vm = vm, .node = node, .frame = frame, .packets = n, .cpu_time_now = t, .call_type = call_type, }; clib_callback_data_call_vec (v, &args); } } always_inline void vlib_set_queue_signal_callback (vlib_main_t * vm, void (*fp) (vlib_main_t *)) { vm->queue_signal_callback = fp; } /* Main routine. */ int vlib_main (vlib_main_t * vm, unformat_input_t * input); /* Thread stacks, for os_get_thread_index */ extern u8 **vlib_thread_stacks; /* Number of thread stacks that the application needs */ u32 vlib_app_num_thread_stacks_needed (void) __attribute__ ((weak)); extern void vlib_node_sync_stats (vlib_main_t * vm, vlib_node_t * n); #define VLIB_PCAP_MAJOR_VERSION 1 #define VLIB_PCAP_MINOR_VERSION 0 typedef struct { u8 *filename; int enable; int status; int post_mortem; u32 packets_to_capture; u32 buffer_trace_node_index; u32 buffer_traces_to_capture; } vlib_pcap_dispatch_trace_args_t; int vlib_pcap_dispatch_trace_configure (vlib_pcap_dispatch_trace_args_t *); vlib_main_t *vlib_get_main_not_inline (void); elog_main_t *vlib_get_elog_main_not_inline (); #endif /* included_vlib_main_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */