diff options
author | Anand Kumar <kumaranand@vmware.com> | 2019-01-10 16:45:24 -0800 |
---|---|---|
committer | Alin Gabriel Serdean <aserdean@ovn.org> | 2019-01-28 15:37:59 +0200 |
commit | c8915346be1fab8640f517277d5dc278582cff21 (patch) | |
tree | 07f873066be63b7d1c04800f44f0e0e05ebb5b89 /datapath-windows/ovsext/DpInternal.h | |
parent | 9da3207af770bd124dc2d8aea2249d593353feaa (diff) | |
download | openvswitch-c8915346be1fab8640f517277d5dc278582cff21.tar.gz |
datapath-windows: Add support for 'OVS_KEY_ATTR_ENCAP' key attribute.
Add a new structure in l2 header to accomodate vlan header,
based of commit "d7efce7beff25052bd9083419200e1a47f0d6066
datapath: 802.1AD Flow handling, actions, vlan parsing, netlink attributes"
Also reset vlan header in flow key, after deleting vlan tag from nbl
With this change a sample vlan flow would look like,
eth(src=0a:ea:8a:24:03:86,dst=0a:cd:fa:4d:15:5c),in_port(3),eth_type(0x8100),
vlan(vid=2239,pcp=0),encap(eth_type(0x0800),ipv4(src=13.12.11.149,dst=13.12.11.107,
proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))
Signed-off-by: Anand Kumar <kumaranand@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/DpInternal.h')
-rw-r--r-- | datapath-windows/ovsext/DpInternal.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/datapath-windows/ovsext/DpInternal.h b/datapath-windows/ovsext/DpInternal.h index 3e351b770..58e7ed8e2 100644 --- a/datapath-windows/ovsext/DpInternal.h +++ b/datapath-windows/ovsext/DpInternal.h @@ -112,6 +112,11 @@ typedef struct Icmp6Key { struct in6_addr ndTarget; /* IPv6 neighbor discovery (ND) target. */ } Icmp6Key; /* Size of 72 byte. */ +typedef struct VlanKey { + ovs_be16 vlanTci; /* If 802.1Q, TCI | VLAN_CFI; otherwise 0. */ + ovs_be16 vlanTpid; /* Vlan type. Generally 802.1q or 802.1ad.*/ +} VlanKey; + typedef struct L2Key { uint32_t inPort; /* Port number of input port. */ union { @@ -123,9 +128,10 @@ typedef struct L2Key { }; uint8_t dlSrc[6]; /* Ethernet source address. */ uint8_t dlDst[6]; /* Ethernet destination address. */ - ovs_be16 vlanTci; /* If 802.1Q, TCI | VLAN_CFI; otherwise 0. */ ovs_be16 dlType; /* Ethernet frame type. */ -} L2Key; /* Size of 24 byte. */ + struct VlanKey vlanKey; /* VLAN header. */ + uint16_t pad[3]; /* Padding 6 bytes. */ +} L2Key; /* Size of 32 byte. */ /* Number of packet attributes required to store OVS tunnel key. */ #define NUM_PKT_ATTR_REQUIRED 35 @@ -182,7 +188,7 @@ typedef struct MplsKey { typedef __declspec(align(8)) struct OvsFlowKey { OvsIPv4TunnelKey tunKey; /* 280 bytes */ - L2Key l2; /* 24 bytes */ + L2Key l2; /* 32 bytes */ union { /* These headers are mutually exclusive. */ IpKey ipKey; /* size 16 */ |