Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
VXLAN calculation and data plane #1989
Adds VXLAN calculator to the calc graph, as well as the Linux dataplane.
The dataplane is still pretty crude - a few things still need doing, including cleaning up old L2 entries (right now they stay around forever) and also just some general code cleanup.
I think the calc graph piece is getting there though. One thing it doesn't yet handle is nodes with duplicate IP / VXLAN tunnel addresses.
I think we can probably live with the latter (they are assigned through our IPAM, so should be unique).
For the former, if two nodes both have an IP address, we'll potentially send two VTEP updates to the dataplane, meaning we'll try to set up two static ARP entries for the same IP. Need to think about whether this is acceptable or not - it's clearly a misconfiguration, the question is how should we handle it and will the current code fix itself once the misconfiguration is resolved.
Since everything is keyed by node, rather than by address, they won't end up hiding each other in the calc graph.
We'll end up with two VTEP entries which share a tunnel address, which means we'll get two ARP entries for the same IP but with different MAC addresses. One of them will be programmed second, and will win out.
Once the duplicate IPs are fixed, it should resolve itself by sending updates with the new IP down to the data plane, at which point the ARP entries won't conflict and both will be programmed.
So, I think it should just work.
fasaxc left a comment
Just a couple of log-level nits. Would be nice to have a more efficient dataplane API rather than doing a resync every time but let's scale test first to see if it's needed.
Don't think I need to re-review.