diff options
author | Ansis Atteka <aatteka@nicira.com> | 2012-11-26 14:24:11 -0500 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-11-26 14:33:18 -0500 |
commit | 39c7caebc94e851f58b84b54659156dd30522e8e (patch) | |
tree | eacef2a7255d4e047c8e5d1a0d69041e4a71cf80 /net/openvswitch/datapath.c | |
parent | 404f2f1019c0293bd91dc1c03c8557ec97d9d104 (diff) |
openvswitch: add skb mark matching and set action
This patch adds support for skb mark matching and set action.
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 7b1d6d2b0c1..f996db34324 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -482,6 +482,7 @@ static int validate_set(const struct nlattr *a, | |||
482 | const struct ovs_key_ipv6 *ipv6_key; | 482 | const struct ovs_key_ipv6 *ipv6_key; |
483 | 483 | ||
484 | case OVS_KEY_ATTR_PRIORITY: | 484 | case OVS_KEY_ATTR_PRIORITY: |
485 | case OVS_KEY_ATTR_SKB_MARK: | ||
485 | case OVS_KEY_ATTR_ETHERNET: | 486 | case OVS_KEY_ATTR_ETHERNET: |
486 | break; | 487 | break; |
487 | 488 | ||
@@ -695,6 +696,7 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) | |||
695 | goto err_flow_free; | 696 | goto err_flow_free; |
696 | 697 | ||
697 | err = ovs_flow_metadata_from_nlattrs(&flow->key.phy.priority, | 698 | err = ovs_flow_metadata_from_nlattrs(&flow->key.phy.priority, |
699 | &flow->key.phy.skb_mark, | ||
698 | &flow->key.phy.in_port, | 700 | &flow->key.phy.in_port, |
699 | a[OVS_PACKET_ATTR_KEY]); | 701 | a[OVS_PACKET_ATTR_KEY]); |
700 | if (err) | 702 | if (err) |
@@ -714,6 +716,7 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) | |||
714 | 716 | ||
715 | OVS_CB(packet)->flow = flow; | 717 | OVS_CB(packet)->flow = flow; |
716 | packet->priority = flow->key.phy.priority; | 718 | packet->priority = flow->key.phy.priority; |
719 | packet->mark = flow->key.phy.skb_mark; | ||
717 | 720 | ||
718 | rcu_read_lock(); | 721 | rcu_read_lock(); |
719 | dp = get_dp(sock_net(skb->sk), ovs_header->dp_ifindex); | 722 | dp = get_dp(sock_net(skb->sk), ovs_header->dp_ifindex); |