aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
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/datapath.c
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/datapath.c')
-rw-r--r--net/openvswitch/datapath.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index f18302f32049..688cb9bc0ef1 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -560,7 +560,7 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info)
560 goto err_flow_free; 560 goto err_flow_free;
561 561
562 err = ovs_nla_copy_actions(a[OVS_PACKET_ATTR_ACTIONS], 562 err = ovs_nla_copy_actions(a[OVS_PACKET_ATTR_ACTIONS],
563 &flow->key, 0, &acts); 563 &flow->key, &acts);
564 if (err) 564 if (err)
565 goto err_flow_free; 565 goto err_flow_free;
566 566
@@ -846,7 +846,7 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
846 goto err_kfree_flow; 846 goto err_kfree_flow;
847 847
848 error = ovs_nla_copy_actions(a[OVS_FLOW_ATTR_ACTIONS], &new_flow->key, 848 error = ovs_nla_copy_actions(a[OVS_FLOW_ATTR_ACTIONS], &new_flow->key,
849 0, &acts); 849 &acts);
850 if (error) { 850 if (error) {
851 OVS_NLERR("Flow actions may not be safe on all matching packets.\n"); 851 OVS_NLERR("Flow actions may not be safe on all matching packets.\n");
852 goto err_kfree_acts; 852 goto err_kfree_acts;
@@ -953,7 +953,7 @@ static struct sw_flow_actions *get_flow_actions(const struct nlattr *a,
953 return acts; 953 return acts;
954 954
955 ovs_flow_mask_key(&masked_key, key, mask); 955 ovs_flow_mask_key(&masked_key, key, mask);
956 error = ovs_nla_copy_actions(a, &masked_key, 0, &acts); 956 error = ovs_nla_copy_actions(a, &masked_key, &acts);
957 if (error) { 957 if (error) {
958 OVS_NLERR("Flow actions may not be safe on all matching packets.\n"); 958 OVS_NLERR("Flow actions may not be safe on all matching packets.\n");
959 kfree(acts); 959 kfree(acts);