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>
This commit is contained in:

committed by
David S. Miller

parent
6b205b2ca1
commit
f579668406
@@ -370,6 +370,7 @@ static size_t key_attr_size(void)
|
||||
+ nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT */
|
||||
+ nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_CSUM */
|
||||
+ nla_total_size(0) /* OVS_TUNNEL_KEY_ATTR_OAM */
|
||||
+ nla_total_size(256) /* OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS */
|
||||
+ nla_total_size(4) /* OVS_KEY_ATTR_IN_PORT */
|
||||
+ nla_total_size(4) /* OVS_KEY_ATTR_SKB_MARK */
|
||||
+ 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)
|
||||
|
||||
err = ovs_nla_copy_actions(a[OVS_PACKET_ATTR_ACTIONS],
|
||||
&flow->key, 0, &acts);
|
||||
rcu_assign_pointer(flow->sf_acts, acts);
|
||||
if (err)
|
||||
goto err_flow_free;
|
||||
|
||||
rcu_assign_pointer(flow->sf_acts, acts);
|
||||
|
||||
OVS_CB(packet)->egress_tun_info = NULL;
|
||||
OVS_CB(packet)->flow = flow;
|
||||
packet->priority = flow->key.phy.priority;
|
||||
packet->mark = flow->key.phy.skb_mark;
|
||||
|
Reference in New Issue
Block a user