Add newlink/delink processing.

- Can up/down a link.
- Can set MAC on a link, if it's a phy.
- Can set MTU on a link.
- Can delete link (including phy).

Because link state and mtu changes tend to go around in circles (from
netlink -> vpp; and then with lcp-sync on, as well from vpp -> netlink)
when we consume a batch of netlink messages, we'll temporarily turn off
lcp-sync if it's enabled.

TODO (in the next commit), the whole nine yards of creating interfaces
in VPP based on NEWLINK vlans that come in. Conceptualy not too
difficult: if NEWLINK doesn't have a LIP associated with it, but it's a
VLAN, and the parent of the VLAN is a link which _does_ have a LIP, then
we can create the subint in VPP in the correct way.
This commit is contained in:
Pim van Pelt
2021-08-24 18:11:51 +02:00
parent 6d2ce1cd83
commit e604dd3478
4 changed files with 183 additions and 4 deletions

View File

@ -44,10 +44,10 @@ column shows changes in LInux that are copied into VPP.
| Function | VPP -> Linux | Linux -> VPP |
| -------------- | ------------- | -------------|
| Up/Down Link | ✅ | 🟠 |
| Change MTU | ✅ | 🟠 |
| Change MAC | ❌ 1) | 🟠 |
| Add/Del IP4/IP6 Address | ✅ | 🟠 |
| Up/Down Link | ✅ | |
| Change MTU | ✅ | |
| Change MAC | ❌ 1) | |
| Add/Del IP4/IP6 Address | ✅ | |
| MPLS | ❌ | ❌ |
| Route | ❌ 2) | 🟠 |
| Add/Del Tunnel | ❌ | ❌ |