diff options
author | Samuel Ghinet <sghinet@cloudbasesolutions.com> | 2014-09-25 21:20:25 +0000 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-09-26 10:21:34 -0700 |
commit | e00afcf6427ab3b99c6ad0867c2a22bfe9ead180 (patch) | |
tree | 7bdcc7d23a609976e6faf73944a0b9cef79f8afa /datapath-windows/include | |
parent | 260f76b7e3cf6bd52a2a80d5186f2a68b0123017 (diff) | |
download | openvswitch-e00afcf6427ab3b99c6ad0867c2a22bfe9ead180.tar.gz |
datapath-windows: fix OVS_VPORT_TYPE
The windows ovs kernel uses an OVS_VPORT_TYPE enum that is incompatible with
the userspace counterpart (enum ovs_vport_type from openvswitch.h). We must use
the same enum type for the netlink communication to work properly.
This patch makes the fix: "typedef enum ovs_vport_type OVS_VPORT_TYPE" and
changes the afferent kernel driver code:
o) vport types synthetic and emulated turn to: netdev
o) vport type internal turns to: internal
o) vport type external truns to: netdev (plus, we hold a field in vport,
"isExternal"
Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/include')
-rw-r--r-- | datapath-windows/include/OvsDpInterfaceExt.h | 1 | ||||
-rw-r--r-- | datapath-windows/include/OvsPub.h | 25 |
2 files changed, 6 insertions, 20 deletions
diff --git a/datapath-windows/include/OvsDpInterfaceExt.h b/datapath-windows/include/OvsDpInterfaceExt.h index 64fd20e42..72b2e8e83 100644 --- a/datapath-windows/include/OvsDpInterfaceExt.h +++ b/datapath-windows/include/OvsDpInterfaceExt.h @@ -81,5 +81,6 @@ enum ovs_nl_mcast_attr { }; typedef struct ovs_dp_stats OVS_DP_STATS; +typedef enum ovs_vport_type OVS_VPORT_TYPE; #endif /* __OVS_DP_INTERFACE_EXT_H_ */ diff --git a/datapath-windows/include/OvsPub.h b/datapath-windows/include/OvsPub.h index 36814c482..ff0e8ce20 100644 --- a/datapath-windows/include/OvsPub.h +++ b/datapath-windows/include/OvsPub.h @@ -142,34 +142,19 @@ typedef struct _OVS_VPORT_GET { char name[OVS_MAX_PORT_NAME_LENGTH]; } OVS_VPORT_GET, *POVS_VPORT_GET; - -typedef enum { - OVSWIN_VPORT_TYPE_UNKNOWN, - OVSWIN_VPORT_TYPE_RESERVED, - OVSWIN_VPORT_TYPE_EXTERNAL, - OVSWIN_VPORT_TYPE_INTERNAL, - OVSWIN_VPORT_TYPE_SYNTHETIC, - OVSWIN_VPORT_TYPE_EMULATED, - OVSWIN_VPORT_TYPE_GRE, - OVSWIN_VPORT_TYPE_GRE64, - OVSWIN_VPORT_TYPE_VXLAN, - OVSWIN_VPORT_TYPE_LOCAL, /* For bridge local port. */ -} OVS_VPORT_TYPE; - static __inline const char * OvsVportTypeToStr(OVS_VPORT_TYPE t) { switch(t) { -#define STR(t) case OVSWIN_VPORT_TYPE_##t : return "VPORT_##t"; - STR(UNKNOWN) - STR(EXTERNAL) +#define STR(t) case OVS_VPORT_TYPE_##t : return "VPORT_##t"; + STR(UNSPEC) + STR(NETDEV) STR(INTERNAL) - STR(SYNTHETIC) - STR(EMULATED) STR(GRE) STR(GRE64) STR(VXLAN) - STR(LOCAL) + STR(GENEVE) + STR(LISP) } #undef STR |