From dfd3954c0427422e2739b858d1e18503a5c59970 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 9 Nov 2020 10:09:42 +0000 Subject: docs: Update FIB documentation Type: docs Signed-off-by: Neale Ranns Change-Id: I3dfde4520a48c945ca9707accabbe1735c1a8799 --- src/vnet/fib/fib_source.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/vnet/fib') diff --git a/src/vnet/fib/fib_source.h b/src/vnet/fib/fib_source.h index 198ef194e2b..f4063a7819c 100644 --- a/src/vnet/fib/fib_source.h +++ b/src/vnet/fib/fib_source.h @@ -20,8 +20,11 @@ /** * The different sources that can create a route. - * The sources are defined here with their relative priority order. - * The lower the value the higher the priority + * + * A source is a combination of two concepts; priority and behaviour. + * Priority determines whether the source is contributing forwarding. + * Behaviour determines how FIB entries with this source interact with + * other elements of FIB. */ typedef enum fib_source_t_ { /** @@ -171,7 +174,7 @@ STATIC_ASSERT (sizeof(fib_source_t) == 1, } /** - * Each source is assigned a priority. lower priority is beeter. + * Each source is assigned a priority. lower priority is better. * the source with the best source with have its contribution added * to forwarding. the lesser sources will be 'remembered' by FIB and * added to forwarding should the best source be removed. @@ -190,12 +193,14 @@ typedef enum fib_source_priority_cmp_t_ /** * Each source has a defined behaviour that controls how entries - * behave that have that source + * behave that have that source. + * Sources with non-default behaviour may have a private data area + * in the fib_entry_src_t union. */ typedef enum fib_source_behaviour_t_ { /** - * If your adding a new source from a plugin pick one of these + * If you're adding a new source from a plugin pick one of these */ /** Default behaviour - always install a drop */ FIB_SOURCE_BH_DROP, @@ -216,7 +221,13 @@ typedef enum fib_source_behaviour_t_ FIB_SOURCE_BH_INTERFACE, /** interpose */ FIB_SOURCE_BH_INTERPOSE, - /** simple + source fib tracking */ + /** + * simple behaviour, plus the source specific data stores the + * FIB index that is used for subsequent lookups using the + * packet's source address. + * This doesn't need to be a LISP specific source, it's just + * 'simple' behaviour with a u32 stored in the source specific data. + */ FIB_SOURCE_BH_LISP, /** adj w/ cover tracking + refinement */ FIB_SOURCE_BH_ADJ, -- cgit 1.2.3-korg