summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/DpInternal.h
diff options
context:
space:
mode:
Diffstat (limited to 'datapath-windows/ovsext/DpInternal.h')
-rw-r--r--datapath-windows/ovsext/DpInternal.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/datapath-windows/ovsext/DpInternal.h b/datapath-windows/ovsext/DpInternal.h
index 58e7ed8e2..b5027e35e 100644
--- a/datapath-windows/ovsext/DpInternal.h
+++ b/datapath-windows/ovsext/DpInternal.h
@@ -137,7 +137,7 @@ typedef struct L2Key {
#define NUM_PKT_ATTR_REQUIRED 35
#define TUN_OPT_MAX_LEN 255
-typedef union OvsIPv4TunnelKey {
+typedef union OvsIPTunnelKey {
/* Options should always be the first member of tunnel key.
* They are stored at the end of the array if they are less than the
* maximum size. This allows us to get the benefits of variable length
@@ -146,8 +146,9 @@ typedef union OvsIPv4TunnelKey {
struct {
UINT8 tunOpts[TUN_OPT_MAX_LEN]; /* Tunnel options. */
UINT8 tunOptLen; /* Tunnel option length in byte. */
- ovs_be32 dst;
- ovs_be32 src;
+
+ SOCKADDR_INET dst; /* IPv4/6 destination address. */
+ SOCKADDR_INET src; /* IPv4/6 source address. */
ovs_be64 tunnelId;
uint16_t flags;
uint8_t tos;
@@ -161,24 +162,24 @@ typedef union OvsIPv4TunnelKey {
};
};
uint64_t attr[NUM_PKT_ATTR_REQUIRED];
-} OvsIPv4TunnelKey; /* Size of 280 byte. */
+} OvsIPTunnelKey; /* Size of 280+40-8= 312 byte. */
static __inline uint8_t
-TunnelKeyGetOptionsOffset(const OvsIPv4TunnelKey *key)
+IPTunnelKeyGetOptionsOffset(const OvsIPTunnelKey *key)
{
return TUN_OPT_MAX_LEN - key->tunOptLen;
}
static __inline uint8_t *
-TunnelKeyGetOptions(OvsIPv4TunnelKey *key)
+IPTunnelKeyGetOptions(OvsIPTunnelKey *key)
{
- return key->tunOpts + TunnelKeyGetOptionsOffset(key);
+ return key->tunOpts + IPTunnelKeyGetOptionsOffset(key);
}
static __inline uint16_t
-TunnelKeyGetRealSize(OvsIPv4TunnelKey *key)
+IPTunnelKeyGetRealSize(OvsIPTunnelKey *key)
{
- return sizeof(OvsIPv4TunnelKey) - TunnelKeyGetOptionsOffset(key);
+ return sizeof(OvsIPTunnelKey) - IPTunnelKeyGetOptionsOffset(key);
}
typedef struct MplsKey {
@@ -187,7 +188,7 @@ typedef struct MplsKey {
} MplsKey; /* Size of 8 bytes. */
typedef __declspec(align(8)) struct OvsFlowKey {
- OvsIPv4TunnelKey tunKey; /* 280 bytes */
+ OvsIPTunnelKey tunKey; /* 280 bytes? */
L2Key l2; /* 32 bytes */
union {
/* These headers are mutually exclusive. */
@@ -209,7 +210,7 @@ typedef __declspec(align(8)) struct OvsFlowKey {
} ct; /* Connection Tracking Flags */
} OvsFlowKey;
-#define OVS_WIN_TUNNEL_KEY_SIZE (sizeof (OvsIPv4TunnelKey))
+#define OVS_WIN_IP_TUNNEL_KEY_SIZE (sizeof (OvsIPTunnelKey))
#define OVS_L2_KEY_SIZE (sizeof (L2Key))
#define OVS_IP_KEY_SIZE (sizeof (IpKey))
#define OVS_IPV6_KEY_SIZE (sizeof (Ipv6Key))
@@ -295,7 +296,7 @@ typedef struct _OVS_PACKET_INFO {
uint32_t queue;
uint32_t inPort;
uint32_t cmd;
- OvsIPv4TunnelKey tunnelKey;
+ OvsIPTunnelKey tunnelKey;
uint8_t *payload;
/* Includes user data defined as chain of netlink attributes followed by the
* packet data. */