aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
AgeCommit message (Expand)AuthorFilesLines
2019-01-20buffers: keep buffer_main in vlib_main_tDamjan Marion1-1/+1
2019-01-18deprecate clib_memcpy64_x4Damjan Marion2-14/+18
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-0/+2
2018-11-20memif input-node improvementsDamjan Marion1-11/+34
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-26/+26
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-3/+3
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion1-5/+5
2018-10-23c11 safe string handling supportDave Barach4-12/+12
2018-10-09memif: coverity fixJakub Grajciar1-2/+4
2018-10-08memif: socket filename add/del bugfixJakub Grajciar1-3/+3
2018-10-03memif: include interface name in logsJuraj Sloboda3-29/+57
2018-10-03VPP-1440: clean up coverity warningsDave Barach1-2/+2
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-1/+1
2018-09-12Fix create memif socketEd Warnicke1-16/+0
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-0/+5
2018-08-27cmake: add missing vat pluginsDamjan Marion1-0/+3
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-4/+6
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+27
2018-08-13Multiarch handling in different constructor macrosDamjan Marion2-13/+8
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-17/+3
2018-07-31memif: socket filename fixJakub Grajciar1-11/+19
2018-07-25VPP-1332 memif: add/del socket filename bugfixJakub Grajciar1-1/+27
2018-07-17memif: vectorized buffer enqueue in input nodeDamjan Marion1-146/+121
2018-07-11avoid using thread local storage for thread indexDamjan Marion2-3/+3
2018-07-11memif: fix max number of ringsDamjan Marion2-4/+4
2018-06-29memif: minor fixesDamjan Marion1-1/+1
2018-06-27gcc8 and Wstringop-truncationMarco Varlese1-1/+1
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion2-22/+7
2018-05-25memif: Add support for loggingJakub Grajciar3-56/+90
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+2
2018-04-05memif: bug fixesDamjan Marion2-22/+74
2018-04-04memif: zero copy slaveDamjan Marion6-145/+653
2018-03-27memif: add private header size fieldDamjan Marion2-0/+5
2018-03-22memif: version 2Damjan Marion6-486/+558
2018-02-27memif: Fix a message initialization problem in VATJon Loeliger1-3/+2
2018-02-16memif: VPP-1172: Ensure memif_create reply contains sw_if_indexJon Loeliger1-1/+6
2018-02-09memif: fix crash caused by zero pkt len in memif and clear dirty cache while ...Chun Li5-12/+102
2018-02-06vlib: epoll on worker threadsDamjan Marion2-0/+11
2018-01-29memif: Add new API calls to manage memif socket names.Jon Loeliger7-102/+647
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
2018-01-11api: remove transport specific code from handlersFlorin Coras1-6/+6
2018-01-11Remove vpp_api_test interface name filter catalogDave Barach1-0/+1
2018-01-09memif: fix coverity divide by zeroSteven1-0/+1
2018-01-09api: refactor vlibmemoryFlorin Coras2-5/+5
2017-11-23memif: fix input node multiversion constructorDamjan Marion1-6/+6
2017-11-23memif: try harder to transmit packetsDamjan Marion1-13/+8
2017-11-23memif: multiversioningDamjan Marion2-19/+51
2017-11-15memif: fix uninitialized pointer read coverity errorSteven1-0/+2
2017-11-09memif: use clib_socket_t for socket connectionsDamjan Marion4-210/+122
2017-11-08memif: do not mask head and tail pointersDamjan Marion3-68/+40
="p">{ /* * next best source does not require activation, use its path list */ src->fes_pl = best_src->fes_pl; } } else { /* * find the covering prefix. become a dependent thereof. * for IP there should always be a cover, though it may be the default route. * For MPLS there is never a cover. */ if (FIB_PROTOCOL_MPLS == fib_entry->fe_prefix.fp_proto) { src->fes_pl = fib_path_list_create_special(DPO_PROTO_MPLS, FIB_PATH_LIST_FLAG_DROP, NULL); } else { src->u.interpose.fesi_cover = fib_table_get_less_specific(fib_entry->fe_fib_index, &fib_entry->fe_prefix); ASSERT(FIB_NODE_INDEX_INVALID != src->u.interpose.fesi_cover); cover = fib_entry_get(src->u.interpose.fesi_cover); src->u.interpose.fesi_sibling = fib_entry_cover_track(cover, fib_entry_get_index(fib_entry)); /* * if the cover is attached then install an attached-host path * (like an adj-fib). Otherwise inherit the forwarding from the cover */ if (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover)) { fib_entry_src_rr_resolve_via_connected(src, fib_entry, cover); } else { fib_entry_src_rr_use_covers_pl(src, fib_entry, cover); } } } fib_path_list_unlock(old_pl); fib_path_list_lock(src->fes_pl); /* * return go for install */ return (!0); } /** * Source Deactivate. * Called when the source is no longer best source on the entry */ static void fib_entry_src_interpose_deactivate (fib_entry_src_t *src, const fib_entry_t *fib_entry) { fib_entry_t *cover; if (FIB_NODE_INDEX_INVALID != src->u.interpose.fesi_cover) { /* * remove the depednecy on the covering entry, if that's * what was contributing the path-list */ cover = fib_entry_get(src->u.interpose.fesi_cover); fib_entry_cover_untrack(cover, src->u.interpose.fesi_sibling); src->u.interpose.fesi_cover = FIB_NODE_INDEX_INVALID; } else { fib_entry_src_t *best_src; best_src = fib_entry_src_rr_get_next_best(src, fib_entry); if (best_src) { best_src->fes_flags &= ~FIB_ENTRY_SRC_FLAG_CONTRIBUTING; /* * there is another source for this entry. activate it so it * can provide forwarding */ FIB_ENTRY_SRC_VFT_INVOKE(best_src, fesv_deactivate, (best_src, fib_entry)); } } fib_path_list_unlock(src->fes_pl); src->fes_pl = FIB_NODE_INDEX_INVALID; src->fes_entry_flags &= ~FIB_ENTRY_FLAGS_RR_INHERITED; } static int fib_entry_src_interpose_reactivate (fib_entry_src_t *src, const fib_entry_t *fib_entry) { fib_entry_src_interpose_deactivate(src, fib_entry); return (fib_entry_src_interpose_activate(src, fib_entry)); } static fib_entry_src_cover_res_t fib_entry_src_interpose_cover_change (fib_entry_src_t *src, const fib_entry_t *fib_entry) { fib_entry_src_cover_res_t res = { .install = !0, .bw_reason = FIB_NODE_BW_REASON_FLAG_NONE, }; if (FIB_NODE_INDEX_INVALID == src->u.interpose.fesi_cover) { /* * the source may be added, but it is not active * if it is not tracking the cover. */ return (res); } /* * this function is called when this entry's cover has a more specific * entry inserted benaeth it. That does not necessarily mean that this * entry is covered by the new prefix. check that */ if (src->u.interpose.fesi_cover != fib_table_get_less_specific(fib_entry->fe_fib_index, &fib_entry->fe_prefix)) { fib_entry_src_interpose_deactivate(src, fib_entry); fib_entry_src_interpose_activate(src, fib_entry); /* * dependent children need to re-resolve to the new forwarding info */ res.bw_reason = FIB_NODE_BW_REASON_FLAG_EVALUATE; } return (res); } static void fib_entry_src_interpose_add (fib_entry_src_t *src, const fib_entry_t *entry, fib_entry_flag_t flags, dpo_proto_t proto, const dpo_id_t *dpo) { dpo_copy(&src->u.interpose.fesi_dpo, dpo); } static void fib_entry_src_interpose_remove (fib_entry_src_t *src) { dpo_reset(&src->u.interpose.fesi_dpo); } static void fib_entry_src_interpose_set_data (fib_entry_src_t *src, const fib_entry_t *fib_entry, const void *data) { const dpo_id_t *dpo = data; dpo_copy(&src->u.interpose.fesi_dpo, dpo); } /** * Contribute forwarding to interpose in the chain */ const dpo_id_t* fib_entry_src_interpose_contribute(const fib_entry_src_t *src, const fib_entry_t *fib_entry) { return (&src->u.interpose.fesi_dpo); } static void fib_entry_src_interpose_copy (const fib_entry_src_t *orig_src, const fib_entry_t *fib_entry, fib_entry_src_t *copy_src) { copy_src->u.interpose.fesi_cover = orig_src->u.interpose.fesi_cover; if (FIB_NODE_INDEX_INVALID != copy_src->u.interpose.fesi_cover) { fib_entry_t *cover; cover = fib_entry_get(orig_src->u.interpose.fesi_cover); copy_src->u.interpose.fesi_sibling = fib_entry_cover_track(cover, fib_entry_get_index(fib_entry)); } dpo_copy(&copy_src->u.interpose.fesi_dpo, &orig_src->u.interpose.fesi_dpo); } static void fib_entry_src_interpose_flag_change (fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_entry_flag_t new_flags) { if (!(new_flags & FIB_ENTRY_FLAG_INTERPOSE)) { /* * stop tracking the source contributing forwarding * and reset the interposer DPO */ fib_entry_src_interpose_deactivate(src, fib_entry); fib_entry_src_interpose_deinit(src); } } static u8* fib_entry_src_interpose_format (fib_entry_src_t *src, u8* s) { s = format(s, " cover:%d interpose:\n%U%U", src->u.interpose.fesi_cover, format_white_space, 6, format_dpo_id, &src->u.interpose.fesi_dpo, 8); return (s); } const static fib_entry_src_vft_t interpose_src_vft = { .fesv_init = fib_entry_src_interpose_init, .fesv_deinit = fib_entry_src_interpose_deinit, .fesv_activate = fib_entry_src_interpose_activate, .fesv_reactivate = fib_entry_src_interpose_reactivate, .fesv_deactivate = fib_entry_src_interpose_deactivate, .fesv_cover_change = fib_entry_src_interpose_cover_change, .fesv_cover_update = fib_entry_src_rr_cover_update, .fesv_format = fib_entry_src_interpose_format, .fesv_add = fib_entry_src_interpose_add, .fesv_remove = fib_entry_src_interpose_remove, .fesv_contribute_interpose = fib_entry_src_interpose_contribute, .fesv_set_data = fib_entry_src_interpose_set_data, .fesv_copy = fib_entry_src_interpose_copy, .fesv_flags_change = fib_entry_src_interpose_flag_change, }; void fib_entry_src_interpose_register (void) { fib_entry_src_register(FIB_SOURCE_INTERPOSE, &interpose_src_vft); }