You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openvswitch/0001-ofproto-dpif-xlate-tra...

58 lines
2.3 KiB

From 118b21d93f55f4cdb511d770c90f0d49bd624187 Mon Sep 17 00:00:00 2001
From: Eric Garver <e@erig.me>
Date: Thu, 1 Mar 2018 17:59:41 -0500
Subject: [PATCH 1/2] ofproto-dpif-xlate: translate action_set in clone action
A clone action saves the action_set prior to performing the clone, then
restores it afterwards. However when xlating the actions it neglects to
consider the action_set so any write_action() inside a clone() are
ignored. Unfortunately patch ports are internally implemented via
clone(). So a frame traversing to a second bridge via patch port will
never be affected by write_action() in the second bridge's flow table.
Lets make clone() aware of the action_set.
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
ofproto/ofproto-dpif-xlate.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index cc450a896948..bc6429c25346 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -5303,6 +5303,9 @@ clone_xlate_actions(const struct ofpact *actions, size_t actions_len,
if (reversible_actions(actions, actions_len) || is_last_action) {
old_flow = ctx->xin->flow;
do_xlate_actions(actions, actions_len, ctx, is_last_action);
+ if (!ctx->freezing) {
+ xlate_action_set(ctx);
+ }
if (ctx->freezing) {
finish_freezing(ctx);
}
@@ -5324,6 +5327,9 @@ clone_xlate_actions(const struct ofpact *actions, size_t actions_len,
/* Use clone action as datapath clone. */
offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CLONE);
do_xlate_actions(actions, actions_len, ctx, true);
+ if (!ctx->freezing) {
+ xlate_action_set(ctx);
+ }
if (ctx->freezing) {
finish_freezing(ctx);
}
@@ -5337,6 +5343,9 @@ clone_xlate_actions(const struct ofpact *actions, size_t actions_len,
ac_offset = nl_msg_start_nested(ctx->odp_actions,
OVS_SAMPLE_ATTR_ACTIONS);
do_xlate_actions(actions, actions_len, ctx, true);
+ if (!ctx->freezing) {
+ xlate_action_set(ctx);
+ }
if (ctx->freezing) {
finish_freezing(ctx);
}
--
2.11.0