aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake
AgeCommit message (Expand)AuthorFilesLines
2019-02-14Add -fno-common compile optionBenoƮt Ganne2-2/+2
2019-01-26cmake: add support for linking with DPDK shared libsDamjan Marion1-0/+13
2019-01-25cmake: execute git from src directoryDamjan Marion1-0/+1
2019-01-22cmake: don't set SONAME for pluginsDamjan Marion1-0/+2
2019-01-20Rework of debian packagingDamjan Marion1-2/+1
2019-01-17cmake: initial cross-compilation supportDamjan Marion1-1/+4
2018-11-30API: Add dependency on compiler for API .json and .api generation.Ole Troan1-2/+2
2018-10-01Support dynamic dual/quad loop selection on aarch64Lijian Zhang1-0/+16
2018-09-14cpack: add deb/rpm packaging to VPP moduleDamjan Marion5-19/+91
2018-09-14cmake: use VPP package in VOMDamjan Marion1-1/+3
2018-09-12cmake: create cmake VPP module, update sample-plugin so it uses itDamjan Marion4-8/+83
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion3-7/+3
2018-09-07cmake: set packaging component for different filesDamjan Marion3-10/+18
2018-09-07Cavium OcteonTX: cache line fixMarco Varlese1-5/+9
2018-09-07cmake: Fix compilation for OCTEONTxNitin Saxena1-5/+5
2018-09-02cmake: cache line size detectionDamjan Marion1-0/+35
2018-09-01cmake: respect TERMDamjan Marion1-8/+11
2018-08-31cmake: detect vpp version, set soversion, pretty config printDamjan Marion2-0/+16
2018-08-30cmake: a bit of packaging workDamjan Marion3-18/+52
2018-08-28cmake: don't install some test executableDamjan Marion1-2/+4
2018-08-28cmake: compile libs and plugins with -WallDamjan Marion2-0/+2
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-1/+10
2018-08-27cmake: fix clang build and few minor fixesDamjan Marion1-4/+4
2018-08-27cmake: add vapi buildDamjan Marion3-5/+10
2018-08-27cmake: use lib64 for lib dirDamjan Marion3-3/+7
2018-08-26cmake: add add_vpp_library and add_vpp_executable macrosDamjan Marion2-0/+98
2018-08-26cmake: move functions to src/cmakeDamjan Marion7-0/+282
pan> .dpoi_proto = DPO_PROTO_IP6, .dpoi_index = 0, }; const dpo_id_t * ip6_ll_dpo_get (void) { return (&ip6_ll_dpo); } static void ip6_ll_dpo_lock (dpo_id_t * dpo) { /* * not maintaining a lock count on the ip6_ll, they are const global and * never die. */ } static void ip6_ll_dpo_unlock (dpo_id_t * dpo) { } static u8 * format_ip6_ll_dpo (u8 * s, va_list * ap) { CLIB_UNUSED (index_t index) = va_arg (*ap, index_t); CLIB_UNUSED (u32 indent) = va_arg (*ap, u32); return (format (s, "ip6-link-local")); } const static dpo_vft_t ip6_ll_vft = { .dv_lock = ip6_ll_dpo_lock, .dv_unlock = ip6_ll_dpo_unlock, .dv_format = format_ip6_ll_dpo, }; /** * @brief The per-protocol VLIB graph nodes that are assigned to a ip6_ll * object. * * this means that these graph nodes are ones from which a ip6_ll is the * parent object in the DPO-graph. */ const static char *const ip6_null_nodes[] = { "ip6-link-local", NULL, }; const static char *const *const ip6_ll_nodes[DPO_PROTO_NUM] = { [DPO_PROTO_IP6] = ip6_null_nodes, }; typedef struct ip6_ll_dpo_trace_t_ { u32 fib_index; u32 sw_if_index; } ip6_ll_dpo_trace_t; /** * @brief Exit nodes from a IP6_LL */ typedef enum ip6_ll_next_t_ { IP6_LL_NEXT_DROP, IP6_LL_NEXT_LOOKUP, IP6_LL_NEXT_NUM, } ip6_ll_next_t; typedef enum ip6_ll_error_t_ { IP6_LL_ERROR_NO_TABLE, } ip6_ll_error_t; always_inline uword ip6_ll_dpo_inline (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { u32 n_left_from, next_index, *from, *to_next; from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; next_index = node->cached_next_index; while (n_left_from > 0) { u32 n_left_to_next; vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); while (n_left_from > 0 && n_left_to_next > 0) { u32 bi0, fib_index0, next0; vlib_buffer_t *p0; bi0 = from[0]; to_next[0] = bi0; from += 1; to_next += 1; n_left_from -= 1; n_left_to_next -= 1; next0 = IP6_LL_NEXT_LOOKUP; p0 = vlib_get_buffer (vm, bi0); /* use the packet's RX interface to pick the link-local FIB */ fib_index0 = ip6_ll_fib_get (vnet_buffer (p0)->sw_if_index[VLIB_RX]); if (~0 == fib_index0) { next0 = IP6_LL_NEXT_DROP; p0->error = node->errors[IP6_LL_ERROR_NO_TABLE]; goto trace0; } /* write that fib index into the packet so it's used in the * lookup node next */ vnet_buffer (p0)->sw_if_index[VLIB_TX] = fib_index0; trace0: if (PREDICT_FALSE (p0->flags & VLIB_BUFFER_IS_TRACED)) { ip6_ll_dpo_trace_t *tr = vlib_add_trace (vm, node, p0, sizeof (*tr)); tr->sw_if_index = vnet_buffer (p0)->sw_if_index[VLIB_RX]; tr->fib_index = fib_index0; } vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); } vlib_put_next_frame (vm, node, next_index, n_left_to_next); } return frame->n_vectors; } static u8 * format_ip6_ll_dpo_trace (u8 * s, va_list * args) { CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); ip6_ll_dpo_trace_t *t = va_arg (*args, ip6_ll_dpo_trace_t *); s = format (s, "sw_if_index:%d fib_index:%d", t->sw_if_index, t->fib_index); return s; } static uword ip6_ll_dpo_switch (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return (ip6_ll_dpo_inline (vm, node, frame)); } static char *ip6_ll_dpo_error_strings[] = { [IP6_LL_ERROR_NO_TABLE] = "Interface is not mapped to an IP6-LL table", }; /** * @brief */ /* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_ll_dpo_node) = { .function = ip6_ll_dpo_switch, .name = "ip6-link-local", .vector_size = sizeof (u32), .format_trace = format_ip6_ll_dpo_trace, .n_errors = ARRAY_LEN (ip6_ll_dpo_error_strings), .error_strings = ip6_ll_dpo_error_strings, .n_next_nodes = IP6_LL_NEXT_NUM, .next_nodes = { [IP6_LL_NEXT_DROP] = "ip6-drop", [IP6_LL_NEXT_LOOKUP] = "ip6-lookup", }, }; /* *INDENT-ON* */ void ip6_ll_dpo_module_init (void) { dpo_register (DPO_IP6_LL, &ip6_ll_vft, ip6_ll_nodes); } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */