diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2015-12-11 19:18:25 +0000 |
---|---|---|
committer | Justin Pettit <jpettit@ovn.org> | 2015-12-11 13:44:20 -0800 |
commit | 85571a3daa67603ce4096c12ba0522acded4deb0 (patch) | |
tree | 12d1b1f9b75f846350fc1f36398216257f4d6426 /datapath-windows/ovsext/Vport.h | |
parent | 3819692e6df7607eb94af8fd29a2976a1fc728ad (diff) | |
download | openvswitch-85571a3daa67603ce4096c12ba0522acded4deb0.tar.gz |
datapath-windows: Add GRE TEB support for windows datapath
This patch introduces the support for GRE TEB (trasparent ethernet bridging)
for the windows datapath.
The GRE support is based on http://tools.ietf.org/html/rfc2890, without
taking into account the GRE sequence, and it supports only the GRE protocol
type 6558 (trasparent ethernet bridging) like its linux counterpart.
Util.h: define the GRE pool tag
Vport.c/h: sort the includes alphabetically
add the function OvsFindTunnelVportByPortType which searches the
tunnelVportsArray for a given port type
Actions.c : sort the includes alphabetically
call the GRE encapsulation / decapsulation functions when needed
Gre.c/h : add GRE type defines
add initialization/cleanup functions
add encapsulation / decapsulation functions with software offloads
(hardware offloads will be added in a separate patch)
support
Tested using: PSPING
(https://technet.microsoft.com/en-us/sysinternals/psping.aspx)
(ICMP, TCP, UDP) with various packet lengths
IPERF3
(https://iperf.fr/iperf-download.php)
(TCP, UDP) with various options
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Vport.h')
-rw-r--r-- | datapath-windows/ovsext/Vport.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/datapath-windows/ovsext/Vport.h b/datapath-windows/ovsext/Vport.h index e9f3b0389..373896ddd 100644 --- a/datapath-windows/ovsext/Vport.h +++ b/datapath-windows/ovsext/Vport.h @@ -17,9 +17,10 @@ #ifndef __VPORT_H_ #define __VPORT_H_ 1 +#include "Gre.h" +#include "Stt.h" #include "Switch.h" #include "VxLan.h" -#include "Stt.h" #define OVS_MAX_DPPORTS MAXUINT16 #define OVS_DPPORT_NUMBER_INVALID OVS_MAX_DPPORTS @@ -147,6 +148,8 @@ POVS_VPORT_ENTRY OvsFindVportByPortIdAndNicIndex(POVS_SWITCH_CONTEXT switchConte POVS_VPORT_ENTRY OvsFindTunnelVportByDstPort(POVS_SWITCH_CONTEXT switchContext, UINT16 dstPort, OVS_VPORT_TYPE ovsVportType); +POVS_VPORT_ENTRY OvsFindTunnelVportByPortType(POVS_SWITCH_CONTEXT switchContext, + OVS_VPORT_TYPE ovsPortType); NDIS_STATUS OvsAddConfiguredSwitchPorts(struct _OVS_SWITCH_CONTEXT *switchContext); NDIS_STATUS OvsInitConfiguredSwitchNics(struct _OVS_SWITCH_CONTEXT *switchContext); @@ -256,16 +259,18 @@ GetPortFromPriv(POVS_VPORT_ENTRY vport) /* XXX would better to have a commom tunnel "parent" structure */ ASSERT(vportPriv); switch(vport->ovsType) { - case OVS_VPORT_TYPE_VXLAN: - dstPort = ((POVS_VXLAN_VPORT)vportPriv)->dstPort; + case OVS_VPORT_TYPE_GRE: break; case OVS_VPORT_TYPE_STT: dstPort = ((POVS_STT_VPORT)vportPriv)->dstPort; break; + case OVS_VPORT_TYPE_VXLAN: + dstPort = ((POVS_VXLAN_VPORT)vportPriv)->dstPort; + break; default: ASSERT(! "Port is not a tunnel port"); } - ASSERT(dstPort); + ASSERT(dstPort || vport->ovsType == OVS_VPORT_TYPE_GRE); return dstPort; } |