Add device-type, to ensure that plan --novpp generates MTU statements

This commit is contained in:
Pim van Pelt
2023-05-25 16:54:01 +02:00
parent adf4378239
commit 9d1d8a32d6
4 changed files with 12 additions and 1 deletions

View File

@ -304,6 +304,8 @@ exist as a PHY in VPP (ie. `HundredGigabitEthernet12/0/0`) or as a specified `Bo
target interface.
* ***state***: An optional string that configures the link admin state, either `up` or `down`.
If it is not specified, the link is considered admin 'up'.
* ***device-type***: An optional interface type in VPP. Currently the only supported vlaue is
`dpdk`, and it is used to generate correct mock interfaces if the `--novpp` flag is used.
Further, top-level interfaces, that is to say those that do not have an encapsulation, are permitted
to have any number of sub-interfaces specified by `subid`, an integer between [0,2G), which further
@ -324,6 +326,7 @@ Examples:
```
interfaces:
HundredGigabitEthernet12/0/0:
device-type: dpdk
lcp: "ice0"
mtu: 9000
addresses: [ 192.0.2.1/30, 2001:db8:1::1/64 ]

View File

@ -271,6 +271,9 @@ with `head.vpp` (think of things like custom logging, plugin defaults, DPDK affi
then letting `vppcfg` do its part, and finally leaving the ability to also program the dataplane
with things that `vppcfg` does not (yet) support in `tail.vpp`.
***NOTE***: For MTU values to be generated in `--novpp` mode, the interface device type must be
set (typically using `device-type: dpdk` in the PHY interface definition).
### vppcfg apply
Applying state is not (yet) implemented. Don't worry, it's not much work, but this is punted until

View File

@ -75,7 +75,8 @@ class Validator:
The purpose is to ensure that the YAML file is both syntactically correct,
which is ensured by Yamale, and semantically correct, which is ensured by a set
of built-in validators, and user-added validators (see the add_validator() method)."""
of built-in validators, and user-added validators (see the add_validator() method).
"""
def __init__(self, schema):
self.logger = logging.getLogger("vppcfg.config")

View File

@ -7,13 +7,16 @@ bondethernets:
interfaces:
GigabitEthernet3/0/0:
device-type: dpdk
mtu: 9000
description: "LAG #1"
GigabitEthernet3/0/1:
device-type: dpdk
mtu: 9000
description: "LAG #2"
HundredGigabitEthernet12/0/0:
device-type: dpdk
lcp: "ice12-0-0"
mac: f2:01:00:12:00:00
mtu: 9000
@ -34,6 +37,7 @@ interfaces:
exact-match: True
HundredGigabitEthernet12/0/1:
device-type: dpdk
mtu: 2000
description: "Bridged"