Allow TAP instances to be interfaces
- Cannot have LCP, Address or Sub-Interface - Cannot be PHY - Cannot be Bond member - Can be target of L2XC - Can be member of Bridge - interface.mtu must be the same as tap.host.mtu Add YAML tests for common mistakes. This unblocks taps becoming members of a bridgedomain, and allowing a very cool feature: slowpath networking!
This commit is contained in:
26
unittest/yaml/error-tap6.yaml
Normal file
26
unittest/yaml/error-tap6.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
test:
|
||||
description: "TAP interfaces cannot have LCP, address or sub-interfaces. MTU must match tap.host.mtu"
|
||||
errors:
|
||||
expected:
|
||||
- "interface .* is a TAP so its MTU .* must match host MTU .*"
|
||||
- "interface .* is a TAP so it cannot have an address"
|
||||
- "interface .* is a TAP so it cannot have an LCP"
|
||||
- "interface .* is a TAP so it cannot have sub-interfaces"
|
||||
count: 4
|
||||
---
|
||||
interfaces:
|
||||
tap0:
|
||||
addresses: [ 10.0.0.1/24 ]
|
||||
lcp: "mytap"
|
||||
mtu: 9216
|
||||
sub-interfaces:
|
||||
100:
|
||||
description: "TAP is not allowed to have a sub"
|
||||
taps:
|
||||
tap0:
|
||||
host:
|
||||
mac: 02:00:00:00:00:00
|
||||
name: vpp-tap0
|
||||
mtu: 1500
|
||||
bridge: vpp-br0
|
||||
namespace: vpp-test
|
Reference in New Issue
Block a user