summaryrefslogtreecommitdiffstats
path: root/docs
AgeCommit message (Expand)AuthorFilesLines
2020-05-02vlib: add nosyslog unix optionRuslan Babayev1-0/+12
2020-04-28docs: add missing spelling dictionaryPaul Vinciguerra1-0/+774
2020-04-22misc: asan: disable leak sanitizer by defaultBenoît Ganne1-5/+3
2020-04-09docs: Fix the Use Cases IndexJohn DeNisco1-15/+15
2020-04-02docs: Fix venv under python3Paul Vinciguerra5-19/+32
2020-04-02docs: add a timebase precision sectionDave Barach1-0/+20
2020-03-27docs ethernet: add docs for ethernet SectionPaul Vinciguerra1-0/+14
2020-03-27docs: minor typos in configuring/startup.rstPaul Vinciguerra1-2/+2
2020-03-27docs: document lxd container bootstrap procedureDave Barach1-0/+130
2020-03-23docs: add container functional test writeupDave Barach3-1/+512
2020-03-23docs: Fix build on fresh ubuntu 18.04John DeNisco2-14/+23
2020-03-11docs: Add feature build to publish scriptJohn DeNisco2-3/+18
2020-03-11docs: describe clib_time monotonic timebase supportDave Barach1-1/+69
2020-03-09docs: Add list of nodes for 'trace add'Paul Vinciguerra1-0/+22
2020-03-06docs: document the unformat '%_' optionPaul Vinciguerra1-0/+14
2020-02-23vppinfra: deprecate CLIB_VEC64Dave Barach1-3/+1
2020-02-11http_static: VPP web application HowToDave Barach2-1/+275
2020-01-31vppinfra: write up clib_time_tDave Barach1-0/+57
2020-01-24docs: Update the requirements and fix the buildJohn DeNisco4-35/+37
2020-01-23docs: add AddressSanitizer mini-howtoBenoît Ganne2-0/+47
2019-12-18docs: add physmem section in configuration parametersJieqiang Wang1-4/+30
2019-12-18docs: update troubleshooting commandsPaul Vinciguerra1-2/+2
2019-12-17docs: improve compressed core file documentationDave Barach1-5/+15
2019-12-11docs: Rework the startup configuration sectionJohn DeNisco13-1979/+1377
2019-12-05classify: vpp packet tracer supportDave Barach1-3/+10
2019-11-20classify: per-interface rx/tx pcap capture filtersDave Barach1-5/+13
2019-11-12docs: update logging configuration section.Paul Vinciguerra1-10/+10
2019-11-06docs: Rewrite the what is VPP (first) section, also fix the buildJohn DeNisco32-555/+161
2019-11-06docs: add spellcheck to 'make docs' sphinx docsPaul Vinciguerra17-59/+91
2019-10-29docs: Fix warning with sphinx build, add script to publish docsJohn DeNisco2-1/+73
2019-10-28docs: cleanup typos on readthroughPaul Vinciguerra51-102/+101
2019-10-09docs: Add macos build documentationNathan Skrzypczak2-0/+58
2019-10-07docs: grammar police raidDave Barach1-7/+9
2019-10-04docs: add packet-generator writeupDave Barach1-0/+183
2019-09-26misc: add vnet classify filter set supportDave Barach1-7/+20
2019-09-23misc: unify pcap rx / tx / drop traceDave Barach1-8/+16
2019-09-20misc: classifier-based packet trace filterDave Barach1-0/+108
2019-09-11docs: run-sphinx-docs-mergedjdenisco2-3/+3
2019-09-09docs: improve unformat documentationDave Barach1-8/+120
2019-08-26misc: 19.08 new featuresAndrew Yourtchenko2-0/+141
2019-08-08docs: Add Ray's ACL use casejdenisco5-0/+489
2019-08-08api: api socket respect unix runtime directoryOle Troan1-2/+2
2019-08-05docs: Add more quic plugin documentationNathan Skrzypczak4-0/+2
2019-08-01docs: Small fixes and orderingNathan Skrzypczak3-0/+20
2019-07-26docs: add binary api trace replay detailsDave Barach1-7/+81
2019-07-22docs: improve home gateway use-case documentationDave Barach1-18/+131
2019-07-19docs: Fix conf.py for read the docsjdenisco2-3/+2
2019-07-12docs: add compressed core file descriptionDave Barach1-0/+27
2019-07-12docs: how to enable coredump with systemdBenoît Ganne1-0/+4
2019-06-27docs: Update the vhost sectionjdenisco4-8/+11
eds; /** * The FIB index and prefix we are tracking */ fib_node_index_t faei_export_fib; fib_prefix_t faei_prefix; /** * The FIB index we are importing into */ fib_node_index_t faei_import_fib; } fib_ae_import_t; /** * A description of the need to export routes to one or more export tables */ typedef struct fib_ae_export_t_ { /** * The vector/list of import tracker indicies */ fib_node_index_t *faee_importers; /** * THe connected entry this export is acting on behalf of */ fib_node_index_t faee_ei; /** * Reference counting locks */ u32 faee_locks; } fib_ae_export_t; /* * memory pools for the importers and exporters */ static fib_ae_import_t *fib_ae_import_pool; static fib_ae_export_t *fib_ae_export_pool; static fib_ae_export_t * fib_entry_ae_add_or_lock (fib_node_index_t connected) { fib_entry_delegate_t *fed; fib_ae_export_t *export; fib_entry_t *entry; entry = fib_entry_get(connected); fed = fib_entry_delegate_get(entry, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT); if (NULL == fed) { fed = fib_entry_delegate_find_or_add(entry, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT); pool_get(fib_ae_export_pool, export); clib_memset(export, 0, sizeof(*export)); fed->fd_index = (export - fib_ae_export_pool); export->faee_ei = connected; } else { export = pool_elt_at_index(fib_ae_export_pool, fed->fd_index); } export->faee_locks++; return (export); } static void fib_entry_import_remove (fib_ae_import_t *import, fib_node_index_t entry_index) { u32 index; /* * find the index in the vector of the entry we are removing */ index = vec_search(import->faei_importeds, entry_index); if (index < vec_len(import->faei_importeds)) { /* * this is an entry that was previously imported */ fib_table_entry_special_remove(import->faei_import_fib, fib_entry_get_prefix(entry_index), FIB_SOURCE_AE); fib_entry_unlock(entry_index); vec_del1(import->faei_importeds, index); } } static void fib_entry_import_add (fib_ae_import_t *import, fib_node_index_t entry_index) { fib_node_index_t *existing; const fib_prefix_t *prefix; /* * ensure we only add the exported entry once, since * sourcing prefixes in the table is reference counted */ vec_foreach(existing, import->faei_importeds) { if (*existing == entry_index) { return; } } /* * this is the first time this export entry has been imported * Add it to the import FIB and to the list of importeds */ prefix = fib_entry_get_prefix(entry_index); /* * don't import entries that have the same prefix the import entry */ if (0 != fib_prefix_cmp(prefix, &import->faei_prefix)) { const dpo_id_t *dpo; dpo = fib_entry_contribute_ip_forwarding(entry_index); if (dpo_id_is_valid(dpo) && !dpo_is_drop(dpo)) { fib_table_entry_special_dpo_add(import->faei_import_fib, prefix, FIB_SOURCE_AE, (fib_entry_get_flags(entry_index) | FIB_ENTRY_FLAG_EXCLUSIVE), load_balance_get_bucket(dpo->dpoi_index, 0)); fib_entry_lock(entry_index); vec_add1(import->faei_importeds, entry_index); } /* * else * the entry currently has no valid forwarding. when it * does it will export itself */ } } /** * Call back when walking a connected prefix's covered prefixes for import */ static int fib_entry_covered_walk_import (fib_entry_t *cover, fib_node_index_t covered, void *ctx) { fib_ae_import_t *import = ctx; fib_entry_import_add(import, covered); return (0); } /* * fib_entry_ae_import_add * * Add an importer to a connected entry */ static void fib_ae_export_import_add (fib_ae_export_t *export, fib_ae_import_t *import) { fib_entry_t *entry; import->faei_exporter = (export - fib_ae_export_pool); entry = fib_entry_get(export->faee_ei); fib_entry_cover_walk(entry, fib_entry_covered_walk_import, import); } void fib_attached_export_import (fib_entry_t *fib_entry, fib_node_index_t export_fib) { fib_entry_delegate_t *fed; fib_ae_import_t *import; fib_node_index_t fei; /* * save index for later post-realloc retrieval */ fei = fib_entry_get_index(fib_entry); pool_get(fib_ae_import_pool, import); import->faei_import_fib = fib_entry->fe_fib_index; import->faei_export_fib = export_fib; import->faei_prefix = fib_entry->fe_prefix; import->faei_import_entry = fib_entry_get_index(fib_entry); import->faei_export_sibling = ~0; /* * do an exact match in the export table */ import->faei_export_entry = fib_table_lookup_exact_match(import->faei_export_fib, &import->faei_prefix); if (FIB_NODE_INDEX_INVALID == import->faei_export_entry) { /* * no exact matching entry in the export table. can't be good. * track the next best thing */ import->faei_export_entry = fib_table_lookup(import->faei_export_fib, &import->faei_prefix); import->faei_exporter = FIB_NODE_INDEX_INVALID; } else { /* * found the entry in the export table. import the * the prefixes that it covers. * only if the prefix found in the export FIB really is * attached do we want to import its covered */ if (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(fib_entry_get(import->faei_export_entry))) { fib_ae_export_t *export; export = fib_entry_ae_add_or_lock(import->faei_export_entry); vec_add1(export->faee_importers, (import - fib_ae_import_pool)); fib_ae_export_import_add(export, import); } } /* * track the entry in the export table so we can update appropriately * when it changes. * Exporting prefixes will have allocated new fib_entry_t objects, so the pool * may have realloc'd. */ fib_entry = fib_entry_get(fei); import->faei_export_sibling = fib_entry_cover_track(fib_entry_get(import->faei_export_entry), fei); fed = fib_entry_delegate_find_or_add(fib_entry, FIB_ENTRY_DELEGATE_ATTACHED_IMPORT); fed->fd_index = (import - fib_ae_import_pool); } /** * \brief All the imported entries need to be purged */ void fib_attached_export_purge (fib_entry_t *fib_entry) { fib_entry_delegate_t *fed; fed = fib_entry_delegate_get(fib_entry, FIB_ENTRY_DELEGATE_ATTACHED_IMPORT); if (NULL != fed) { fib_node_index_t *import_index; fib_entry_t *export_entry; fib_ae_import_t *import; fib_ae_export_t *export; import = pool_elt_at_index(fib_ae_import_pool, fed->fd_index); /* * remove each imported entry */ vec_foreach(import_index, import->faei_importeds) { fib_table_entry_delete(import->faei_import_fib, fib_entry_get_prefix(*import_index), FIB_SOURCE_AE); fib_entry_unlock(*import_index); } vec_free(import->faei_importeds); /* * stop tracking the export entry */ if (~0 != import->faei_export_sibling) { fib_entry_cover_untrack(fib_entry_get(import->faei_export_entry), import->faei_export_sibling); } import->faei_export_sibling = ~0; /* * remove this import tracker from the export's list, * if it is attached to one. It won't be in the case the tracked * export entry is not an attached exact match. */ if (FIB_NODE_INDEX_INVALID != import->faei_exporter) { fib_entry_delegate_t *fed; export_entry = fib_entry_get(import->faei_export_entry); fed = fib_entry_delegate_get(export_entry, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT); ASSERT(NULL != fed); export = pool_elt_at_index(fib_ae_export_pool, fed->fd_index); u32 index = vec_search(export->faee_importers, (import - fib_ae_import_pool)); ASSERT(index < vec_len(export->faee_importers)); vec_del1(export->faee_importers, index); /* * free the exporter if there are no longer importers */ if (0 == --export->faee_locks) { pool_put(fib_ae_export_pool, export); fib_entry_delegate_remove(export_entry, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT); } } /* * free the import tracker */ pool_put(fib_ae_import_pool, import); fib_entry_delegate_remove(fib_entry, FIB_ENTRY_DELEGATE_ATTACHED_IMPORT); } } void fib_attached_export_covered_added (fib_entry_t *cover, fib_node_index_t covered) { fib_entry_delegate_t *fed; fed = fib_entry_delegate_get(cover, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT); if (NULL != fed) { /* * the covering prefix is exporting to other tables */ fib_node_index_t *import_index; fib_ae_import_t *import; fib_ae_export_t *export; export = pool_elt_at_index(fib_ae_export_pool, fed->fd_index); /* * export the covered entry to each of the importers */ vec_foreach(import_index, export->faee_importers) { import = pool_elt_at_index(fib_ae_import_pool, *import_index); fib_entry_import_add(import, covered); } } } void fib_attached_export_covered_removed (fib_entry_t *cover, fib_node_index_t covered) { fib_entry_delegate_t *fed; fed = fib_entry_delegate_get(cover, FIB_ENTRY_DELEGATE_ATTACHED_EXPORT); if (NULL != fed) { /* * the covering prefix is exporting to other tables */ fib_node_index_t *import_index; fib_ae_import_t *import; fib_ae_export_t *export; export = pool_elt_at_index(fib_ae_export_pool, fed->fd_index); /* * remove the covered entry from each of the importers */ vec_foreach(import_index, export->faee_importers) { import = pool_elt_at_index(fib_ae_import_pool, *import_index); fib_entry_import_remove(import, covered); } } } static void fib_attached_export_cover_modified_i (fib_entry_t *fib_entry) { fib_entry_delegate_t *fed; fed = fib_entry_delegate_get(fib_entry, FIB_ENTRY_DELEGATE_ATTACHED_IMPORT); if (NULL != fed) { fib_ae_import_t *import; u32 export_fib; /* * safe the temporaries we need from the existing import * since it will be toast after the purge. */ import = pool_elt_at_index(fib_ae_import_pool, fed->fd_index); export_fib = import->faei_export_fib; /* * keep it simple. purge anything that was previously imported. * then re-evaluate the need to import. */ fib_attached_export_purge(fib_entry); fib_attached_export_import(fib_entry, export_fib); } } /** * \brief If this entry is tracking a cover (in another table) * then that cover has changed. re-evaluate import. */ void fib_attached_export_cover_change (fib_entry_t *fib_entry) { fib_attached_export_cover_modified_i(fib_entry); } /** * \brief If this entry is tracking a cover (in another table) * then that cover has been updated. re-evaluate import. */ void fib_attached_export_cover_update (fib_entry_t *fib_entry) { fib_attached_export_cover_modified_i(fib_entry); } u8* fib_ae_import_format (fib_node_index_t impi, u8* s) { fib_node_index_t *index; fib_ae_import_t *import; import = pool_elt_at_index(fib_ae_import_pool, impi); s = format(s, "\n Attached-Import:%d:[", (import - fib_ae_import_pool)); s = format(s, "export-prefix:%U ", format_fib_prefix, &import->faei_prefix); s = format(s, "export-entry:%d ", import->faei_export_entry); s = format(s, "export-sibling:%d ", import->faei_export_sibling); s = format(s, "exporter:%d ", import->faei_exporter); s = format(s, "export-fib:%d ", import->faei_export_fib); s = format(s, "import-entry:%d ", import->faei_import_entry); s = format(s, "import-fib:%d ", import->faei_import_fib); s = format(s, "importeds:["); vec_foreach(index, import->faei_importeds) { s = format(s, "%d, ", *index); } s = format(s, "]]"); return (s); } u8* fib_ae_export_format (fib_node_index_t expi, u8* s) { fib_node_index_t *index; fib_ae_export_t *export; export = pool_elt_at_index(fib_ae_export_pool, expi); s = format(s, "\n Attached-Export:%d:[", (export - fib_ae_export_pool)); s = format(s, "export-entry:%d ", export->faee_ei); s = format(s, "importers:["); vec_foreach(index, export->faee_importers) { s = format(s, "%d, ", *index); } s = format(s, "]]"); return (s); }