Thank you.  I pushed it to master as follows, and I'm now backporting
it to previous branches.

>From a0fbe94a92c82ca604c059f9b62d1ac5b46d5a61 Mon Sep 17 00:00:00 2001
From: Aaron Rosen <aro...@clemson.edu>
Date: Wed, 8 Feb 2012 10:59:41 -0800
Subject: [PATCH] ofproto-dpif: Don't output to in_port even if in_port is 
OFPP_LOCAL.

Signed-off-by: Aaron Rosen <aro...@clemson.edu>
[Ben Pfaff added the test.]
Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 AUTHORS                |    2 +-
 ofproto/ofproto-dpif.c |    4 +---
 tests/ofproto-dpif.at  |   11 +++++++++++
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index d581266..cd7c9d3 100644
--- 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.
 
+Aaron Rosen             aro...@clemson.edu
 Alexey I. Froloff       ra...@altlinux.org
 Andrew Evans            aev...@nicira.com
 Andrew Lambeth          w...@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           u...@debian.org
-Aaron Rosen             aro...@clemson.edu
 Ahmed Bilal             numan...@gmail.com
 Alan Shieh              ash...@nicira.com
 Alban Browaeys          pra...@yahoo.com
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index d19b6f7..8903a7f 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -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_LOCAL:
-        compose_output_action(ctx, OFPP_LOCAL);
-        break;
     case OFPP_NONE:
         break;
+    case OFPP_LOCAL:
     default:
         if (port != ctx->flow.in_port) {
             compose_output_action(ctx, port);
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index f5c1358..a21d179 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -151,6 +151,7 @@ OVS_VSWITCHD_START([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
@@ -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-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
-- 
1.7.2.5



On Wed, Feb 08, 2012 at 02:09:05PM -0500, Aaron Rosen wrote:
> Yep,
> 
> Thanks
> 
> Aaron
> 
> Signed-off-by: Aaron Rosen <aro...@clemson.edu>
> 
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index d19b6f7..8903a7f 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -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_LOCAL:
> -        compose_output_action(ctx, OFPP_LOCAL);
> -        break;
>      case OFPP_NONE:
>          break;
> +    case OFPP_LOCAL:
>      default:
>          if (port != ctx->flow.in_port) {
>              compose_output_action(ctx, port);
> 
> On Wed, Feb 8, 2012 at 2:01 PM, Ben Pfaff <b...@nicira.com> wrote:
> > From: Aaron Rosen <aro...@clemson.edu>
> >
> > Test by Ben Pfaff.
> >
> > Signed-off-by: Ben Pfaff <b...@nicira.com>
> > ---
> > Aaron, can I get your Signed-off-by on this?
> >
> > Thanks,
> >
> > Ben.
> >
> >  ofproto/ofproto-dpif.c |    4 +---
> >  tests/ofproto-dpif.at  |   11 +++++++++++
> >  2 files changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> > index d19b6f7..8903a7f 100644
> > --- a/ofproto/ofproto-dpif.c
> > +++ b/ofproto/ofproto-dpif.c
> > @@ -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_LOCAL:
> > -        compose_output_action(ctx, OFPP_LOCAL);
> > -        break;
> >     case OFPP_NONE:
> >         break;
> > +    case OFPP_LOCAL:
> >     default:
> >         if (port != ctx->flow.in_port) {
> >             compose_output_action(ctx, port);
> > diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> > index f5c1358..a21d179 100644
> > --- a/tests/ofproto-dpif.at
> > +++ b/tests/ofproto-dpif.at
> > @@ -151,6 +151,7 @@ OVS_VSWITCHD_START([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
> > @@ -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-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
> > --
> > 1.7.2.5
> >
> 
> 
> 
> -- 
> Aaron O. Rosen
> Masters Student - Network Communication
> 306B Fluor Daniel
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to