summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Vxlan.h
diff options
context:
space:
mode:
authorSamuel Ghinet <sghinet@cloudbasesolutions.com>2014-08-29 04:06:48 +0000
committerBen Pfaff <blp@nicira.com>2014-08-29 07:55:05 -0700
commitfa1324c92810c6b1e33b7e87caaaf2e6c4041040 (patch)
tree8e06f5d991d755215bb6839a997bc58721b2d754 /datapath-windows/ovsext/Vxlan.h
parentfd972eb87a888242fb1a8ec2394fa7b3030fbd7d (diff)
downloadopenvswitch-fa1324c92810c6b1e33b7e87caaaf2e6c4041040.tar.gz
datapath-windows: Rename files.
This patch includes the file renaming and accommodations needed for the file renaming to build the forwarding extension for Hyper-V. This patch is also a follow-up for the thread: http://openvswitch.org/pipermail/dev/2014-August/044005.html Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com> Co-authored-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Vxlan.h')
-rw-r--r--datapath-windows/ovsext/Vxlan.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Vxlan.h b/datapath-windows/ovsext/Vxlan.h
new file mode 100644
index 000000000..e77793328
--- /dev/null
+++ b/datapath-windows/ovsext/Vxlan.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2014 VMware, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __VXLAN_H_
+#define __VXLAN_H_ 1
+
+#include "NetProto.h"
+typedef struct _OVS_VXLAN_VPORT {
+ UINT32 dstPort;
+ UINT64 inPkts;
+ UINT64 outPkts;
+ UINT64 slowInPkts;
+ UINT64 slowOutPkts;
+ /*
+ * To be filled
+ */
+} OVS_VXLAN_VPORT, *POVS_VXLAN_VPORT;
+
+/* VXLAN header. */
+typedef struct VXLANHdr {
+ /* Flags. */
+ UINT32 flags1:2;
+ /* Packet needs replication to multicast group (used for multicast proxy). */
+ UINT32 locallyReplicate:1;
+ /* Instance ID flag, must be set to 1. */
+ UINT32 instanceID:1;
+ /* Flags. */
+ UINT32 flags2:4;
+ /* Reserved. */
+ UINT32 reserved1:24;
+ /* VXLAN ID. */
+ UINT32 vxlanID:24;
+ /* Reserved. */
+ UINT32 reserved2:8;
+} VXLANHdr;
+
+NTSTATUS OvsInitVxlanTunnel(POVS_VPORT_ENTRY vport,
+ POVS_VPORT_ADD_REQUEST addReq);
+
+VOID OvsCleanupVxlanTunnel(POVS_VPORT_ENTRY vport);
+
+NDIS_STATUS OvsSlowPathDecapVxlan(const PNET_BUFFER_LIST packet,
+ OvsIPv4TunnelKey *tunnelKey);
+
+NDIS_STATUS OvsEncapVxlan(PNET_BUFFER_LIST curNbl,
+ OvsIPv4TunnelKey *tunKey,
+ POVS_SWITCH_CONTEXT switchContext,
+ VOID *completionList,
+ POVS_PACKET_HDR_INFO layers,
+ PNET_BUFFER_LIST *newNbl);
+
+NDIS_STATUS OvsDoDecapVxlan(POVS_SWITCH_CONTEXT switchContext,
+ PNET_BUFFER_LIST curNbl,
+ OvsIPv4TunnelKey *tunKey,
+ PNET_BUFFER_LIST *newNbl);
+
+static __inline UINT32
+OvsGetVxlanTunHdrSize(VOID)
+{
+ /* XXX: Can L2 include VLAN at all? */
+ return sizeof (EthHdr) + sizeof (IPHdr) + sizeof (UDPHdr) +
+ sizeof (VXLANHdr);
+}
+
+#define VXLAN_UDP_PORT 4789
+#define VXLAN_UDP_PORT_NBO 0xB512
+
+#endif /* __VXLAN_H_ */