ofproto-dpif: Don't output to in_port even if in_port is OFPP_LOCAL.
authorAaron Rosen <arosen@clemson.edu>
Wed, 8 Feb 2012 18:59:41 +0000 (10:59 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 8 Feb 2012 19:10:29 +0000 (11:10 -0800)
Signed-off-by: Aaron Rosen <arosen@clemson.edu>
[Ben Pfaff added the test.]
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
ofproto/ofproto-dpif.c
tests/ofproto-dpif.at

diff --git a/AUTHORS b/AUTHORS
index d581266b201dab91de999435cb8d7af3298d9d1b..cd7c9d3b4ccbdbfbeb2263732037b2658297847e 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,6 +1,7 @@
 The following people, in alphabetical order, have either authored or
 signed off on commits in the Open vSwitch version control repository.
 
 The following people, in alphabetical order, have either authored or
 signed off on commits in the Open vSwitch version control repository.
 
+Aaron Rosen             arosen@clemson.edu
 Alexey I. Froloff       raorn@altlinux.org
 Andrew Evans            aevans@nicira.com
 Andrew Lambeth          wal@nicira.com
 Alexey I. Froloff       raorn@altlinux.org
 Andrew Evans            aevans@nicira.com
 Andrew Lambeth          wal@nicira.com
@@ -60,7 +61,6 @@ The following additional people are mentioned in commit logs as having
 provided helpful bug reports or suggestions.
 
 Aaron M. Ucko           ucko@debian.org
 provided helpful bug reports or suggestions.
 
 Aaron M. Ucko           ucko@debian.org
-Aaron Rosen             arosen@clemson.edu
 Ahmed Bilal             numan252@gmail.com
 Alan Shieh              ashieh@nicira.com
 Alban Browaeys          prahal@yahoo.com
 Ahmed Bilal             numan252@gmail.com
 Alan Shieh              ashieh@nicira.com
 Alban Browaeys          prahal@yahoo.com
index d19b6f7f3f0945065e0136736f1e7d06108bc5bb..8903a7f4e6b6b114373e591f7441b2bbd66510fe 100644 (file)
@@ -4545,11 +4545,9 @@ xlate_output_action__(struct action_xlate_ctx *ctx,
     case OFPP_CONTROLLER:
         execute_controller_action(ctx, max_len, OFPR_ACTION);
         break;
     case OFPP_CONTROLLER:
         execute_controller_action(ctx, max_len, OFPR_ACTION);
         break;
-    case OFPP_LOCAL:
-        compose_output_action(ctx, OFPP_LOCAL);
-        break;
     case OFPP_NONE:
         break;
     case OFPP_NONE:
         break;
+    case OFPP_LOCAL:
     default:
         if (port != ctx->flow.in_port) {
             compose_output_action(ctx, port);
     default:
         if (port != ctx->flow.in_port) {
             compose_output_action(ctx, port);
index f5c1358e7ceae36175103054c1a7580f35487ae9..a21d179c4999def7a490024514f55407bd5821cc 100644 (file)
@@ -151,6 +151,7 @@ OVS_VSWITCHD_START([dnl
         add-port br0 p7 -- set Interface p7 type=dummy ])
 
 AT_DATA([flows.txt], [dnl
         add-port br0 p7 -- set Interface p7 type=dummy ])
 
 AT_DATA([flows.txt], [dnl
+in_port=local actions=local,flood
 in_port=1 actions=flood
 in_port=2 actions=all
 in_port=3 actions=output:65534,output:1,output:2,output:3,output:4,output:5,output:6,output:7
 in_port=1 actions=flood
 in_port=2 actions=all
 in_port=3 actions=output:65534,output:1,output:2,output:3,output:4,output:5,output:6,output:7
@@ -160,6 +161,16 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
 
 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
 
+AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(0),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
+AT_CHECK([tail -1 stdout \
+| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
+1
+2
+3
+4
+7
+])
+
 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
 AT_CHECK([tail -1 stdout \
 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
 AT_CHECK([tail -1 stdout \
 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl