diff options
author | Neale Ranns <nranns@cisco.com> | 2018-09-05 09:13:57 -0700 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2018-09-25 16:29:19 +0000 |
commit | b474380f82b75d9640f9bf6ee78c891a6794dbfb (patch) | |
tree | 1deee7eda6675a9886ddebb4a38249110f67170d /src/vnet/l2/l2_bd.h | |
parent | 6a30b5f9182a44989e97bbc044f29adccdef09b2 (diff) |
L2 BD: introduce a BD interface on which to send UU packets
Change-Id: I21ad6b04c19c8735d057174b1f260a59f2812241
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_bd.h')
-rw-r--r-- | src/vnet/l2/l2_bd.h | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/src/vnet/l2/l2_bd.h b/src/vnet/l2/l2_bd.h index ffc75339e97..226e30ecfd4 100644 --- a/src/vnet/l2/l2_bd.h +++ b/src/vnet/l2/l2_bd.h @@ -21,6 +21,13 @@ #include <vlib/vlib.h> #include <vnet/vnet.h> +typedef enum l2_bd_port_type_t_ +{ + L2_BD_PORT_TYPE_NORMAL = 0, + L2_BD_PORT_TYPE_BVI = 1, + L2_BD_PORT_TYPE_UU_FWD = 2, +} l2_bd_port_type_t; + typedef struct { /* hash bd_id -> bd_index */ @@ -53,16 +60,23 @@ typedef struct typedef struct { - u32 feature_bitmap; /* * Contains bit enables for flooding, learning, and forwarding. * All other feature bits should always be set. - * + */ + u32 feature_bitmap; + /* * identity of the bridge-domain's BVI interface * set to ~0 if there is no BVI */ u32 bvi_sw_if_index; + /* + * identity of the bridge-domain's UU flood interface + * set to ~0 if there is no such configuration + */ + u32 uu_fwd_sw_if_index; + /* bridge domain id, not to be confused with bd_index */ u32 bd_id; @@ -128,14 +142,18 @@ bd_add_member (l2_bridge_domain_t * bd_config, l2_flood_member_t * member); u32 bd_remove_member (l2_bridge_domain_t * bd_config, u32 sw_if_index); - -#define L2_LEARN (1<<0) -#define L2_FWD (1<<1) -#define L2_FLOOD (1<<2) -#define L2_UU_FLOOD (1<<3) -#define L2_ARP_TERM (1<<4) - -u32 bd_set_flags (vlib_main_t * vm, u32 bd_index, u32 flags, u32 enable); +typedef enum bd_flags_t_ +{ + L2_NONE = 0, + L2_LEARN = (1 << 0), + L2_FWD = (1 << 1), + L2_FLOOD = (1 << 2), + L2_UU_FLOOD = (1 << 3), + L2_ARP_TERM = (1 << 4), +} bd_flags_t; + +u32 bd_set_flags (vlib_main_t * vm, u32 bd_index, bd_flags_t flags, + u32 enable); void bd_set_mac_age (vlib_main_t * vm, u32 bd_index, u8 age); int bd_add_del (l2_bridge_domain_add_del_args_t * args); |