aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_learn.c
AgeCommit message (Expand)AuthorFilesLines
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-10/+10
2018-10-31l2fib:remove unused bucket arg in lookup functionsEyal Bari1-4/+1
2018-09-12L2-Learn: use vlib_buffer_enqueue_to_nextNeale Ranns1-195/+147
2018-09-11L2-learn; cache prefetch fixNeale Ranns1-11/+16
2018-09-07L2-FIB: replace bit-fields with flagsNeale Ranns1-8/+18
2018-03-14Improve l2_macs_events API to provide MAC move informationJohn Lo1-0/+1
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace1-0/+2
2017-10-03Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)John Lo1-3/+4
2017-09-03Improve L2FIB PDR/NDR performance (VPP-963)John Lo1-15/+27
2017-08-22Increase default MAC learn limit and check it in learn-update pathJohn Lo1-0/+2
2017-08-03Add support for API client to receive L2 MAC eventsJohn Lo1-10/+20
2017-07-23Improve L2 Input/Output Feature Infrastructure and UsageJohn Lo1-12/+2
2017-06-27L2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888)Eyal Bari1-64/+34
2017-06-19L2FWD:fix seq_num overwritten + validate l2fib entries when forwardingEyal Bari1-5/+8
2017-05-08L2FIB:CLI/API to flush all non-static entriesEyal Bari1-8/+4
2017-03-28Implement MAC Flush for BD or Interface from the L2FIBJohn Lo1-1/+9
2017-02-17l2 input: avoid per-packet trace checks in the fast pathDave Barach1-6/+13
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+597
/span> #undef vl_endianfun /* instantiate all the print functions we know about */ #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) #define vl_printfun #include <vnet/vnet_all_api_h.h> #undef vl_printfun #include <vlibapi/api_helper_macros.h> #define foreach_vpe_api_msg \ _(SW_INTERFACE_SPAN_ENABLE_DISABLE, sw_interface_span_enable_disable) \ _(SW_INTERFACE_SPAN_DUMP, sw_interface_span_dump) \ static void vl_api_sw_interface_span_enable_disable_t_handler (vl_api_sw_interface_span_enable_disable_t * mp) { vl_api_sw_interface_span_enable_disable_reply_t *rmp; int rv; vlib_main_t *vm = vlib_get_main (); rv = span_add_delete_entry (vm, ntohl (mp->sw_if_index_from), ntohl (mp->sw_if_index_to), mp->state, mp->is_l2 ? SPAN_FEAT_L2 : SPAN_FEAT_DEVICE); REPLY_MACRO (VL_API_SW_INTERFACE_SPAN_ENABLE_DISABLE_REPLY); } static void vl_api_sw_interface_span_dump_t_handler (vl_api_sw_interface_span_dump_t * mp) { vl_api_registration_t *reg; span_interface_t *si; vl_api_sw_interface_span_details_t *rmp; span_main_t *sm = &span_main; reg = vl_api_client_index_to_registration (mp->client_index); if (!reg) return; span_feat_t sf = mp->is_l2 ? SPAN_FEAT_L2 : SPAN_FEAT_DEVICE; /* *INDENT-OFF* */ vec_foreach (si, sm->interfaces) { span_mirror_t * rxm = &si->mirror_rxtx[sf][VLIB_RX]; span_mirror_t * txm = &si->mirror_rxtx[sf][VLIB_TX]; if (rxm->num_mirror_ports || txm->num_mirror_ports) { clib_bitmap_t *b; u32 i; b = clib_bitmap_dup_or (rxm->mirror_ports, txm->mirror_ports); clib_bitmap_foreach (i, b, ( { rmp = vl_msg_api_alloc (sizeof (*rmp)); clib_memset (rmp, 0, sizeof (*rmp)); rmp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_SPAN_DETAILS); rmp->context = mp->context; rmp->sw_if_index_from = htonl (si - sm->interfaces); rmp->sw_if_index_to = htonl (i); rmp->state = (u8) (clib_bitmap_get (rxm->mirror_ports, i) + clib_bitmap_get (txm->mirror_ports, i) * 2); rmp->is_l2 = mp->is_l2; vl_api_send_msg (reg, (u8 *) rmp); })); clib_bitmap_free (b); } } /* *INDENT-ON* */ } /* * vpe_api_hookup * Add vpe's API message handlers to the table. * vlib has already mapped shared memory and * added the client registration handlers. * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process() */ #define vl_msg_name_crc_list #include <vnet/vnet_all_api_h.h> #undef vl_msg_name_crc_list static void setup_message_id_table (api_main_t * am) { #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); foreach_vl_msg_name_crc_span; #undef _ } static clib_error_t * span_api_hookup (vlib_main_t * vm) { api_main_t *am = &api_main; #define _(N,n) \ vl_msg_api_set_handlers(VL_API_##N, #n, \ vl_api_##n##_t_handler, \ vl_noop_handler, \ vl_api_##n##_t_endian, \ vl_api_##n##_t_print, \ sizeof(vl_api_##n##_t), 1); foreach_vpe_api_msg; #undef _ /* * Set up the (msg_name, crc, message-id) table */ setup_message_id_table (am); return 0; } VLIB_API_INIT_FUNCTION (span_api_hookup); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */