aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnsis Atteka <aatteka@nicira.com>2013-02-13 16:48:46 -0800
committerAnsis Atteka <aatteka@nicira.com>2013-02-15 13:04:35 -0800
commit33b371d752b5a63e4ffd69f6ca7d9d1fe52fe5b6 (patch)
tree3686227b5160fea2a7616076f9028f69839ca637 /lib
parent709aa777119db1fda5ffd57ed0f9daba80f1453a (diff)
tunnel: set skb mark for IPsec tunnel packets
The new ovs-monitor-ipsec implementation will use skb marks in IPsec policies. This patch will configure datapath to use these skb marks for IPsec tunnel packets. Issue: 14870 Signed-off-by: Ansis Atteka <aatteka@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/odp-util.c11
-rw-r--r--lib/odp-util.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/odp-util.c b/lib/odp-util.c
index 7e489814..503e51ae 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -2061,6 +2061,14 @@ commit_set_action(struct ofpbuf *odp_actions, enum ovs_key_attr key_type,
nl_msg_end_nested(odp_actions, offset);
}
+void
+odp_put_skb_mark_action(const uint32_t skb_mark,
+ struct ofpbuf *odp_actions)
+{
+ commit_set_action(odp_actions, OVS_KEY_ATTR_SKB_MARK, &skb_mark,
+ sizeof(skb_mark));
+}
+
/* If any of the flow key data that ODP actions can modify are different in
* 'base->tunnel' and 'flow->tunnel', appends a set_tunnel ODP action to
* 'odp_actions' that change the flow tunneling information in key from
@@ -2255,8 +2263,7 @@ commit_set_skb_mark_action(const struct flow *flow, struct flow *base,
}
base->skb_mark = flow->skb_mark;
- commit_set_action(odp_actions, OVS_KEY_ATTR_SKB_MARK,
- &base->skb_mark, sizeof(base->skb_mark));
+ odp_put_skb_mark_action(base->skb_mark, odp_actions);
}
/* If any of the flow key data that ODP actions can modify are different in
* 'base' and 'flow', appends ODP actions to 'odp_actions' that change the flow
diff --git a/lib/odp-util.h b/lib/odp-util.h
index ccf6c2a2..ff87bf18 100644
--- a/lib/odp-util.h
+++ b/lib/odp-util.h
@@ -156,6 +156,8 @@ size_t odp_put_userspace_action(uint32_t pid,
struct ofpbuf *odp_actions);
void odp_put_tunnel_action(const struct flow_tnl *tunnel,
struct ofpbuf *odp_actions);
+void odp_put_skb_mark_action(const uint32_t skb_mark,
+ struct ofpbuf *odp_actions);
/* Reasons why a subfacet might not be fast-pathable. */
enum slow_path_reason {