aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.h
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-10-06 08:05:13 -0400
committerPravin B Shelar <pshelar@nicira.com>2014-11-06 02:52:33 -0500
commit25cd9ba0abc0749e5cb78e6493c6f6b3311ec6c5 (patch)
treefbfb953b27fbdcc27d0a50a6e3444532f51f5ffa /net/openvswitch/flow.h
parent59b93b41e7fa71138734a911b11b044340dd16bd (diff)
openvswitch: Add basic MPLS support to kernel
Allow datapath to recognize and extract MPLS labels into flow keys and execute actions which push, pop, and set labels on packets. Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer. Cc: Ravi K <rkerur@gmail.com> Cc: Leo Alterman <lalterman@nicira.com> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Joe Stringer <joe@wand.net.nz> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'net/openvswitch/flow.h')
-rw-r--r--net/openvswitch/flow.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index 71813318c8c7..4962bee81a11 100644
--- a/net/openvswitch/flow.h
+++ b/net/openvswitch/flow.h
@@ -102,12 +102,17 @@ struct sw_flow_key {
102 __be16 tci; /* 0 if no VLAN, VLAN_TAG_PRESENT set otherwise. */ 102 __be16 tci; /* 0 if no VLAN, VLAN_TAG_PRESENT set otherwise. */
103 __be16 type; /* Ethernet frame type. */ 103 __be16 type; /* Ethernet frame type. */
104 } eth; 104 } eth;
105 struct { 105 union {
106 u8 proto; /* IP protocol or lower 8 bits of ARP opcode. */ 106 struct {
107 u8 tos; /* IP ToS. */ 107 __be32 top_lse; /* top label stack entry */
108 u8 ttl; /* IP TTL/hop limit. */ 108 } mpls;
109 u8 frag; /* One of OVS_FRAG_TYPE_*. */ 109 struct {
110 } ip; 110 u8 proto; /* IP protocol or lower 8 bits of ARP opcode. */
111 u8 tos; /* IP ToS. */
112 u8 ttl; /* IP TTL/hop limit. */
113 u8 frag; /* One of OVS_FRAG_TYPE_*. */
114 } ip;
115 };
111 struct { 116 struct {
112 __be16 src; /* TCP/UDP/SCTP source port. */ 117 __be16 src; /* TCP/UDP/SCTP source port. */
113 __be16 dst; /* TCP/UDP/SCTP destination port. */ 118 __be16 dst; /* TCP/UDP/SCTP destination port. */