basebox icon indicating copy to clipboard operation
basebox copied to clipboard

rework termination mac handling

Open KanjiMonster opened this issue 2 years ago • 0 comments

Rework termination mac handling by tying termination mac entries to interfaces:

  • create entries on interface creation
  • remove them on interface deletion

with the values of

  • port_id, vid 0 for the base port/bond interface (specific port, any vlan)
  • port_id, vid for vlan interfaces on top of those (specific port, specific vlan)
  • port_id 0, vid 0 for the base bridge interface (any port, any vlan)
  • port_id 0, vid for vlan interface on top of bridge (any port, specific vlan)

Since these combinations are unique, we can just add/remove the entries without the need of having refcounts.

Advantages:

  • simplication of code
  • ip addresses assigned to lo will just work

Disadvantages:

  • higher use of termination mac flows, which are limited (0.5k to 1k), so only (256 - ports) to (512 - ports) number of vlan/bridge/bond interfaces are supported
  • (this is a lie though, since both termination mac entries for an interface share the same underlying resource)

Open Questions:

  • Do other parts need termination mac entries, or the underlying resources?

Signed-off-by: Jonas Gorski [email protected]

KanjiMonster avatar Oct 27 '22 09:10 KanjiMonster