First part of a BVI refactor

The handling of BVI is awkward, with the autoderived interface name
"bviXX" based on the bridgedomain bd_id. Lots of special casing happens
on account of this decision, and to make matters worse there is poor
interaction (leading to VPP crashes) when BVIs and Loopbacks are used
at the same time: https://lists.fd.io/g/vpp-dev/message/21116

This is step one of a refactor of the logic. In this commit, I'm
removing all of the BVI logic from the codebase, rendering bridgedomains
unable to have IP interfaces. In the next commit, I will introduce new
behavior in the schema, allowing for 'bvi' to be a loopback
interfacename which will be used as BVI for a bridgedomain, restoring
the ability to use bridgedomains with IP interfaces (using a loop).
This commit is contained in:
Pim van Pelt
2022-03-27 20:04:22 +00:00
parent 90c23cf987
commit 850b982f2a
15 changed files with 25 additions and 248 deletions

View File

@ -256,7 +256,7 @@ def get_phys(yaml):
""" Return a list of all toplevel (ie. non-sub) interfaces which are
assumed to be physical network cards, eg TenGigabitEthernet1/0/0. Note
that derived/created interfaces such as Tunnels, BondEthernets and
Loopbacks/BVIs are not returned """
Loopbacks are not returned """
ret = []
if not 'interfaces' in yaml:
return ret
@ -279,8 +279,6 @@ def is_phy(yaml, ifname):
return False
if loopback.is_loopback(yaml, ifname):
return False
if bridgedomain.is_bvi(yaml, ifname):
return False
if vxlan_tunnel.is_vxlan_tunnel(yaml, ifname):
return False
return True