diff options
author | 2016-11-24 19:42:43 +0200 | |
---|---|---|
committer | 2016-11-30 16:31:32 +0000 | |
commit | c5b136004543b9861a203af335d1ce61a976382d (patch) | |
tree | 5a4ad365f4086103afc65892a603a78be2ffbef1 /vnet/vnet/l2/l2_flood.c | |
parent | aff7077d2031545a15efd12e7f65eac723799491 (diff) |
VXLAN multicast dst (remote) address support
Added support for multicast vxlan tunnels which are used for bridge domain flooding instead
of flooding the all unicast tunnels in the bridge domain.
features added:
* conditional flooding to some of the BD members - based on existance of multicast tunnel member
* added local multicast adjacency - multicast packets are handled as the same as unicast - based on src (unicast) address
* refactored some of vxlan tunnel creation code - to unify ip4/6 handling
Change-Id: I60cca4124265a8dd4f6b2d6ea8701e52e7c1baa4
Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'vnet/vnet/l2/l2_flood.c')
-rw-r--r-- | vnet/vnet/l2/l2_flood.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/vnet/vnet/l2/l2_flood.c b/vnet/vnet/l2/l2_flood.c index 5e9881bf..ed9e5ac2 100644 --- a/vnet/vnet/l2/l2_flood.c +++ b/vnet/vnet/l2/l2_flood.c @@ -160,7 +160,7 @@ l2flood_process (vlib_main_t * vm, members = bd_config->members; /* Find first member that passes the reflection and SHG checks */ - current_member = vec_len (members) - 1; + current_member = bd_config->flood_count - 1; while ((current_member >= 0) && ((members[current_member].sw_if_index == *sw_if_index0) || (in_shg && members[current_member].shg == in_shg))) @@ -247,16 +247,7 @@ l2flood_process (vlib_main_t * vm, } /* Forward packet to the current member */ - - if (PREDICT_TRUE (members[current_member].flags == L2_FLOOD_MEMBER_NORMAL)) - { - /* Do normal L2 forwarding */ - vnet_buffer (b0)->sw_if_index[VLIB_TX] = - members[current_member].sw_if_index; - *next0 = L2FLOOD_NEXT_L2_OUTPUT; - - } - else + if (PREDICT_FALSE (members[current_member].flags & L2_FLOOD_MEMBER_BVI)) { /* Do BVI processing */ u32 rc; @@ -280,6 +271,14 @@ l2flood_process (vlib_main_t * vm, } } } + else + { + /* Do normal L2 forwarding */ + vnet_buffer (b0)->sw_if_index[VLIB_TX] = + members[current_member].sw_if_index; + *next0 = L2FLOOD_NEXT_L2_OUTPUT; + + } } |