[ovs-dev] [PATCH 1/7] ofproto-dpif-xlate: Don't translate action set when dropping.
Jarno Rajahalme
jrajahalme at nicira.com
Tue Feb 24 23:42:00 UTC 2015
Translate action set only if not dropping the packet.
Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
---
ofproto/ofproto-dpif-xlate.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 5b9f1c8..a3a0e4d 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4533,14 +4533,14 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
* packet, so drop it now if forwarding is disabled. */
if (in_port && (!xport_stp_forward_state(in_port) ||
!xport_rstp_forward_state(in_port))) {
+ /* Drop all actions added by do_xlate_actions() above. */
ofpbuf_set_size(ctx.xout->odp_actions, sample_actions_len);
+ } else if (ofpbuf_size(&ctx.action_set)) {
+ /* Translate action set only if not dropping the packet. */
+ xlate_action_set(&ctx);
}
}
- if (ofpbuf_size(&ctx.action_set)) {
- xlate_action_set(&ctx);
- }
-
if (ctx.xbridge->has_in_band
&& in_band_must_output_to_local_port(flow)
&& !actions_output_to_local_port(&ctx)) {
--
1.7.10.4
More information about the dev
mailing list