aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier_fmask.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-12-05 13:24:04 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-12-09 20:55:08 +0000
commit9128637ee8f7b0d903551f165a1447d427e8dd19 (patch)
tree244014dd1064643946d64066e352ee1627bf622c /src/vnet/bier/bier_fmask.h
parentcef87f1a5eb4d69cf11ce1cd3c5506edcfba74c4 (diff)
BIER in non-MPLS netowrks
as decsribed in section 2.2 ihttps://tools.ietf.org/html/draft-ietf-bier-mpls-encapsulation-10 with BIFT encoding from: https://tools.ietf.org/html/draft-wijnandsxu-bier-non-mpls-bift-encoding-00 changes: 1 - introduce the new BIFT lookup table. BIER tables that have an associated MPLS label are added to the MPLS-FIB. Those that don't are added to the BIER table 2 - BIER routes that have no associated output MPLS label will add a BIFT label. 3 - The BIER FMask has a path-list as a member to resolve via any possible path. Change-Id: I1fd4d9dbd074f0e855c16e9329b81460ebe1efce Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/bier/bier_fmask.h')
-rw-r--r--src/vnet/bier/bier_fmask.h59
1 files changed, 17 insertions, 42 deletions
diff --git a/src/vnet/bier/bier_fmask.h b/src/vnet/bier/bier_fmask.h
index 13eab5360e1..81b3923f54c 100644
--- a/src/vnet/bier/bier_fmask.h
+++ b/src/vnet/bier/bier_fmask.h
@@ -65,12 +65,14 @@ typedef enum bier_fmask_attributes_t_
BIER_FMASK_ATTR_FIRST,
BIER_FMASK_ATTR_FORWARDING = BIER_FMASK_ATTR_FIRST,
BIER_FMASK_ATTR_DISP,
+ BIER_FMASK_ATTR_MPLS,
BIER_FMASK_ATTR_LAST = BIER_FMASK_ATTR_DISP,
} bier_fmask_attributes_t;
#define BIER_FMASK_ATTR_NAMES { \
[BIER_FMASK_ATTR_FORWARDING] = "forwarding", \
[BIER_FMASK_ATTR_DISP] = "disposition", \
+ [BIER_FMASK_ATTR_MPLS] = "mpls", \
}
#define FOR_EACH_BIER_FMASK_ATTR(_item) \
@@ -82,6 +84,7 @@ typedef enum bier_fmask_flags_t_
{
BIER_FMASK_FLAG_FORWARDING = (1 << BIER_FMASK_ATTR_FORWARDING),
BIER_FMASK_FLAG_DISP = (1 << BIER_FMASK_ATTR_DISP),
+ BIER_FMASK_FLAG_MPLS = (1 << BIER_FMASK_ATTR_MPLS),
} bier_fmask_flags_t;
/**
@@ -110,47 +113,20 @@ typedef struct bier_fmask_t_ {
*/
bier_fmask_bits_t bfm_bits;
- struct
- {
- /**
- * The key to this fmask - used for store/lookup in the DB
- */
- bier_fmask_id_t bfm_id;
-
- /**
- * The BIER Table this Fmask is used in
- */
- index_t bfm_fib_index;
- };
-
- union
- {
- /**
- * For forwarding via a next-hop
- */
- struct
- {
- /**
- * The parent fib entry
- */
- fib_node_index_t bfm_fei;
- /**
- * The MPLS label to paint on the header during forwarding
- */
- mpls_label_t bfm_label;
- };
-
- /**
- * For disposition
- */
- struct
- {
- /**
- * The parent disposition table object
- */
- index_t bfm_disp;
- };
- };
+ /**
+ * The key to this fmask - used for store/lookup in the DB
+ */
+ bier_fmask_id_t *bfm_id;
+
+ /**
+ * The MPLS label to paint on the header during forwarding
+ */
+ mpls_label_t bfm_label;
+
+ /**
+ * The path-list
+ */
+ fib_node_index_t bfm_pl;
/**
* the index of this fmask in the parent's child list.
@@ -170,7 +146,6 @@ extern void bier_fmask_unlock(index_t bfmi);
extern void bier_fmask_lock(index_t bfmi);
extern index_t bier_fmask_create_and_lock(const bier_fmask_id_t *fmid,
- index_t bti,
const fib_route_path_t *rpath);
extern u8* format_bier_fmask(u8 *s, va_list *ap);