ofproto-dpif-xlate: Do not clear ports with frags in xlate_actions().
authorJarno Rajahalme <jrajahalme@nicira.com>
Mon, 3 Nov 2014 22:40:22 +0000 (14:40 -0800)
committerJarno Rajahalme <jrajahalme@nicira.com>
Mon, 3 Nov 2014 22:41:34 +0000 (14:41 -0800)
Transport ports are already cleared for lookup if need be, and they
should be available for action processing, so do not clear them in
xlate_actions().

A drop flow takes care of dropping the packet, so no special case is
needed in xlate_actions().

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c
tests/ofproto-dpif.at

index e9bb4ff..12bfb9f 100644 (file)
@@ -4255,29 +4255,6 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
         orig_flow = *flow;
     }
 
-    if (flow->nw_frag & FLOW_NW_FRAG_ANY) {
-        switch (ctx.xbridge->frag) {
-        case OFPC_FRAG_NORMAL:
-            /* We must pretend that transport ports are unavailable. */
-            flow->tp_src = ctx.base_flow.tp_src = htons(0);
-            flow->tp_dst = ctx.base_flow.tp_dst = htons(0);
-            break;
-
-        case OFPC_FRAG_DROP:
-            return;
-
-        case OFPC_FRAG_REASM:
-            OVS_NOT_REACHED();
-
-        case OFPC_FRAG_NX_MATCH:
-            /* Nothing to do. */
-            break;
-
-        case OFPC_INVALID_TTL_TO_CONTROLLER:
-            OVS_NOT_REACHED();
-        }
-    }
-
     in_port = get_ofp_port(ctx.xbridge, flow->in_port.ofp_port);
     if (in_port && in_port->is_tunnel) {
         if (ctx.xin->resubmit_stats) {
index 33cf2b0..05bb0e3 100644 (file)
@@ -3323,7 +3323,7 @@ do
     if test $mode = drop && test $type != no; then
         echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
         echo "Datapath actions: $exp_output" >> expout
-    elif test $mode = normal && test $type != no; then
+    elif test $mode = normal && test $type = later; then
         echo "Datapath actions: $exp_output" >> expout
     elif test $mode = nx-match && test $type = later; then
         echo "Datapath actions: $exp_output" >> expout