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.
bridge: open_type should be used for netdev_open
ofproto_port_open_type should be used for netdev_open, but not for other tests. For example, STP/RSTP check for interfaces of internal type, but that check will fail when the netdev datapath is used. The same thing goes for setting MAC address of internal Interfaces. That fails for the netdev datapath because the interface type is set to "tap", but they are still interfaces of type "internal", just their netdev implementation is different. Use a netdev_type for the type that needs to be used for netdev_open and ofproto_port, while we still keep the type as the normalized configured type in the database. Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Jesse Gross <[email protected]>
- Loading branch information
1 parent
9144032
commit a5bdd3b
Showing
4 changed files
with
38 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
AT_BANNER([netdev-type]) | ||
|
||
dnl Setting MAC address of netdev internal port fails | ||
AT_SETUP([bridge - set MAC address of internal port]) | ||
OVS_VSWITCHD_START | ||
|
||
# Add an internal port and make sure that it shows up in the datapath. | ||
add_of_ports br0 1 | ||
AT_CHECK([ovs-appctl dpif/show], [0], [dnl | ||
dummy@ovs-dummy: hit:0 missed:0 | ||
br0: | ||
br0 65534/100: (dummy) | ||
p1 1/1: (dummy) | ||
]) | ||
# | ||
# Set MAC address of dummy device and check that it has been set | ||
AT_CHECK([ovs-vsctl set Interface p1 type=internal mac=\"aa:55:c0:ff:ee:00\"]) | ||
AT_CHECK([ovs-vsctl get Interface p1 mac_in_use], [0], [dnl | ||
"aa:55:c0:ff:ee:00" | ||
]) | ||
|
||
OVS_APP_EXIT_AND_WAIT([ovs-vswitchd]) | ||
OVS_APP_EXIT_AND_WAIT([ovsdb-server]) | ||
AT_CLEANUP |
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