diff options
author | Jesse Gross <jesse@nicira.com> | 2014-10-03 18:35:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-06 00:32:21 -0400 |
commit | f5796684069e0c71c65bce6a6d4766114aec1396 (patch) | |
tree | a4906c8cba2b6c2d116e7b72a71f9e1020b476cb /net/openvswitch/datapath.c | |
parent | 6b205b2ca17e88ef5e10451b720056b790cc63a5 (diff) |
openvswitch: Add support for Geneve tunneling.
The Openvswitch implementation is completely agnostic to the options
that are in use and can handle newly defined options without
further work. It does this by simply matching on a byte array
of options and allowing userspace to setup flows on this array.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Singed-off-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 010125c48244..2e31d9e7f4dc 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -370,6 +370,7 @@ static size_t key_attr_size(void) | |||
370 | + nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT */ | 370 | + nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT */ |
371 | + nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_CSUM */ | 371 | + nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_CSUM */ |
372 | + nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_OAM */ | 372 | + nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_OAM */ |
373 | + nla_total_size(256) /* OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS */ | ||
373 | + nla_total_size(4) /* OVS_KEY_ATTR_IN_PORT */ | 374 | + nla_total_size(4) /* OVS_KEY_ATTR_IN_PORT */ |
374 | + nla_total_size(4) /* OVS_KEY_ATTR_SKB_MARK */ | 375 | + nla_total_size(4) /* OVS_KEY_ATTR_SKB_MARK */ |
375 | + nla_total_size(12) /* OVS_KEY_ATTR_ETHERNET */ | 376 | + nla_total_size(12) /* OVS_KEY_ATTR_ETHERNET */ |
@@ -556,10 +557,12 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) | |||
556 | 557 | ||
557 | err = ovs_nla_copy_actions(a[OVS_PACKET_ATTR_ACTIONS], | 558 | err = ovs_nla_copy_actions(a[OVS_PACKET_ATTR_ACTIONS], |
558 | &flow->key, 0, &acts); | 559 | &flow->key, 0, &acts); |
559 | rcu_assign_pointer(flow->sf_acts, acts); | ||
560 | if (err) | 560 | if (err) |
561 | goto err_flow_free; | 561 | goto err_flow_free; |
562 | 562 | ||
563 | rcu_assign_pointer(flow->sf_acts, acts); | ||
564 | |||
565 | OVS_CB(packet)->egress_tun_info = NULL; | ||
563 | OVS_CB(packet)->flow = flow; | 566 | OVS_CB(packet)->flow = flow; |
564 | packet->priority = flow->key.phy.priority; | 567 | packet->priority = flow->key.phy.priority; |
565 | packet->mark = flow->key.phy.skb_mark; | 568 | packet->mark = flow->key.phy.skb_mark; |