109 pool_get(fib_ae_export_pool, export);
134 index =
vec_search(import->faei_importeds, entry_index);
136 if (index <
vec_len(import->faei_importeds))
146 vec_del1(import->faei_importeds, index);
163 if (*existing == entry_index)
179 &import->faei_prefix))
195 vec_add1(import->faei_importeds, entry_index);
252 pool_get(fib_ae_import_pool,
import);
255 import->faei_export_fib = export_fib;
256 import->faei_prefix = fib_entry->
fe_prefix;
258 import->faei_export_sibling = ~0;
263 import->faei_export_entry =
265 &import->faei_prefix);
273 import->faei_export_entry =
275 &import->faei_prefix);
304 import->faei_export_sibling =
347 if (~0 != import->faei_export_sibling)
350 import->faei_export_sibling);
352 import->faei_export_sibling = ~0;
372 (
import - fib_ae_import_pool));
382 pool_put(fib_ae_export_pool, export);
391 pool_put(fib_ae_import_pool,
import);
479 export_fib =
import->faei_export_fib;
519 s =
format(s,
"\n Attached-Import:%d:[", (
import - fib_ae_import_pool));
521 s =
format(s,
"export-entry:%d ", import->faei_export_entry);
522 s =
format(s,
"export-sibling:%d ", import->faei_export_sibling);
523 s =
format(s,
"exporter:%d ", import->faei_exporter);
524 s =
format(s,
"export-fib:%d ", import->faei_export_fib);
526 s =
format(s,
"import-entry:%d ", import->faei_import_entry);
527 s =
format(s,
"import-fib:%d ", import->faei_import_fib);
529 s =
format(s,
"importeds:[");
532 s =
format(s,
"%d, ", *index);
548 s =
format(s,
"\n Attached-Export:%d:[", (export - fib_ae_export_pool));
551 s =
format(s,
"importers:[");
554 s =
format(s,
"%d, ", *index);
void fib_entry_unlock(fib_node_index_t fib_entry_index)
fib_node_index_t fib_table_lookup_exact_match(u32 fib_index, const fib_prefix_t *prefix)
Perfom an exact match in the non-forwarding table.
fib_entry_flag_t fib_entry_get_flags_i(const fib_entry_t *fib_entry)
void fib_attached_export_cover_change(fib_entry_t *fib_entry)
If this entry is tracking a cover (in another table) then that cover has changed. ...
void fib_entry_cover_untrack(fib_entry_t *cover, u32 tracked_index)
A description of the need to import routes from the export table.
fib_node_index_t fd_index
Valid for the attached import cases.
static int dpo_id_is_valid(const dpo_id_t *dpoi)
Return true if the DPO object is valid, i.e.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
fib_node_index_t faei_exporter
The index of the exporter tracker.
fib_node_index_t faei_import_entry
The attached entry in the import table.
const fib_prefix_t * fib_entry_get_prefix(fib_node_index_t fib_entry_index)
fib_node_index_t faei_export_entry
The entry in the epxort table that this importer is importing covereds from.
u32 fe_fib_index
The index of the FIB table this entry is in.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static void fib_entry_import_add(fib_ae_import_t *import, fib_node_index_t entry_index)
fib_node_index_t faee_ei
THe connected entry this export is acting on behalf of.
void fib_attached_export_covered_added(fib_entry_t *cover, fib_node_index_t covered)
u32 fib_entry_cover_track(fib_entry_t *cover, fib_node_index_t covered)
void fib_attached_export_purge(fib_entry_t *fib_entry)
All the imported entries need to be pruged.
fib_node_index_t faei_export_fib
The FIB index and prefix we are tracking.
void fib_entry_delegate_remove(fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
u8 * fib_ae_export_format(fib_node_index_t expi, u8 *s)
u8 * format_fib_prefix(u8 *s, va_list *args)
Aggregrate type for a prefix.
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
#define vec_search(v, E)
Search a vector for the index of the entry that matches.
fib_entry_delegate_t * fib_entry_delegate_get(const fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
fib_node_index_t fib_table_lookup(u32 fib_index, const fib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
Attached import/export functionality.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct fib_ae_export_t_ fib_ae_export_t
A description of the need to export routes to one or more export tables.
#define pool_put(P, E)
Free an object E in pool P.
#define vec_del1(v, i)
Delete the element at index I.
const dpo_id_t * load_balance_get_bucket(index_t lbi, u32 bucket)
static void fib_ae_export_import_add(fib_ae_export_t *export, fib_ae_import_t *import)
u8 * fib_ae_import_format(fib_node_index_t impi, u8 *s)
u32 faee_locks
Reference counting locks.
void fib_attached_export_covered_removed(fib_entry_t *cover, fib_node_index_t covered)
#define vec_free(V)
Free vector's memory (no header).
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
u32 fib_node_index_t
A typedef of a node index.
fib_entry_t * fib_entry_get(fib_node_index_t index)
u32 faei_export_sibling
the sibling index on the cover
void fib_entry_lock(fib_node_index_t fib_entry_index)
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
A description of the need to export routes to one or more export tables.
fib_node_index_t * faee_importers
The vector/list of import tracker indicies.
void fib_attached_export_cover_update(fib_entry_t *fib_entry)
If this entry is tracking a cover (in another table) then that cover has been updated.
void fib_attached_export_import(fib_entry_t *fib_entry, fib_node_index_t export_fib)
FIB attached export.
void fib_entry_cover_walk(fib_entry_t *cover, fib_entry_covered_walk_t walk, void *args)
static fib_ae_import_t * fib_ae_import_pool
static fib_ae_export_t * fib_ae_export_pool
int fib_prefix_cmp(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for equality.
index_t dpoi_index
the index of objects of that type
#define FIB_NODE_INDEX_INVALID
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void fib_entry_import_remove(fib_ae_import_t *import, fib_node_index_t entry_index)
fib_node_index_t * faei_importeds
A vector/list of imported entry indicies.
int dpo_is_drop(const dpo_id_t *dpo)
The Drop DPO will drop all packets, no questions asked.
static void fib_attached_export_cover_modified_i(fib_entry_t *fib_entry)
#define vec_foreach(var, vec)
Vector iterator.
static fib_ae_export_t * fib_entry_ae_add_or_lock(fib_node_index_t connected)
fib_node_index_t faei_import_fib
The FIB index we are importing into.
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
fib_entry_delegate_t * fib_entry_delegate_find_or_add(fib_entry_t *fib_entry, fib_entry_delegate_type_t fdt)
static int fib_entry_covered_walk_import(fib_entry_t *cover, fib_node_index_t covered, void *ctx)
Call back when walking a connected prefix's covered prefixes for import.
const fib_prefix_t fe_prefix
The prefix of the route.
struct fib_ae_import_t_ fib_ae_import_t
A description of the need to import routes from the export table.
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)