forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn: Add VLAN support for localnet ports.
This patch makes it possible use a localnet port for connecting to a specific VLAN on a locally accessible network. The only logical modeling change is that it is now valid to set the "tag" field on logical ports with a type of "localnet". Previously, the "tag" field was only use for child ports. We still use a single automatically created patch port between br-int and the bridge configured to provide connectivity to a given network (the ovn-controller bridge-mappings configuration). We use flows when necessary to either match on VLAN ID or to add the VLAN ID before sending the packet out. Matching for a localnet port with a VLAN ID is done at priority 150 in table 0, and is similar to how we match traffic from container child ports. These cases are conceptually similar in that they're separate logical ports on the same physical port. Most of the code changes are due to a change in data structures. We have to keep track of all of the localnet ports and then add flows for them at the end. Previously this code tracked them as: hash of localnet bindings, hased on network name localnet bindings: openflow port number list of port bindings Now we have: hash of localnet bindings, hased on network name localnet bindings: openflow port number hash of localnet vlans localnet vlans: VLAN ID (0 for untagged traffic) list of port bindings A detailed example of using localnet ports with a VLAN ID is provided in a later patch as a part of a larger OVN tutorial. Signed-off-by: Russell Bryant <[email protected]> Signed-off-by: Ben Pfaff <[email protected]>
- Loading branch information
Showing
3 changed files
with
107 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters