dpif-linux: Lookup netdev to get netdev type string.
authorJoe Stringer <joestringer@nicira.com>
Wed, 26 Feb 2014 21:22:35 +0000 (13:22 -0800)
committerAlex Wang <alexw@nicira.com>
Wed, 26 Feb 2014 21:30:24 +0000 (13:30 -0800)
commit6795ba0edd02291c9a93186d8cca6017e63ba95f
tree3b9b9c0811de53ff55fd3c4d06e2895cb2f75a56
parentdd2e44f835fac8c2df99f84c54250c3ca981f2f5
dpif-linux: Lookup netdev to get netdev type string.

When creating tap ports in dpif-linux, the "tap" type is treated the
same as "system", and the type is discarded. When dumping datapath
port types, this would cause "tap" type to be reported as a "system"
type.

Each time we see a port of the wrong type in bridge_reconfigure(), we
remove it and add a port with the correct configuration. This would
always occur for tap ports, causing deletion and re-creation of all tap
ports each time the bridge was reconfigured.

This patch makes dpif-linux use netdev to look up port types if the
datapath reports that they are of type OVS_VPORT_TYPE_NETDEV.

Bug #1196289.

Reported-by: James Schmidt <jschmidt@vmware.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/dpif-linux.c