diff mbox

[ovs-dev] physical: Preserve output port across multicast group output.

Message ID 1443815146-23086-1-git-send-email-blp@nicira.com
State Accepted
Headers show

Commit Message

Ben Pfaff Oct. 2, 2015, 7:45 p.m. UTC
Otherwise actions like this would not output to the same set of ports
for each output action (the second output would only forward to the
last port from the first output action):

    outport = "_MC_FLOOD"; output; output;

Obviously it's a corner case but it still seems worth implementing
correctly.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
---
 ovn/controller/physical.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Justin Pettit Oct. 7, 2015, 6:17 p.m. UTC | #1
Good catch.

Acked-by: Justin Pettit <jpettit@nicira.com>

--Justin


> On Oct 2, 2015, at 12:45 PM, Ben Pfaff <blp@nicira.com> wrote:
> 
> Otherwise actions like this would not output to the same set of ports
> for each output action (the second output would only forward to the
> last port from the first output action):
> 
>    outport = "_MC_FLOOD"; output; output;
> 
> Obviously it's a corner case but it still seems worth implementing
> correctly.
> 
> Found by inspection.
> 
> Signed-off-by: Ben Pfaff <blp@nicira.com>
> ---
> ovn/controller/physical.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
> index efa34a2..0c239df 100644
> --- a/ovn/controller/physical.c
> +++ b/ovn/controller/physical.c
> @@ -527,6 +527,10 @@ physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
>          * any. */
>         bool local_ports = ofpacts.size > 0;
>         if (local_ports) {
> +            /* Following delivery to local logical ports, restore the multicast
> +             * group as the logical output port. */
> +            put_load(mc->tunnel_key, MFF_LOG_OUTPORT, 0, 32, &ofpacts);
> +
>             ofctrl_add_flow(flow_table, OFTABLE_LOCAL_OUTPUT, 100,
>                             &match, &ofpacts);
>         }
> -- 
> 2.1.3
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
Ben Pfaff Oct. 7, 2015, 8:16 p.m. UTC | #2
Thanks, applied.

On Wed, Oct 07, 2015 at 11:17:59AM -0700, Justin Pettit wrote:
> Good catch.
> 
> Acked-by: Justin Pettit <jpettit@nicira.com>
> 
> --Justin
> 
> 
> > On Oct 2, 2015, at 12:45 PM, Ben Pfaff <blp@nicira.com> wrote:
> > 
> > Otherwise actions like this would not output to the same set of ports
> > for each output action (the second output would only forward to the
> > last port from the first output action):
> > 
> >    outport = "_MC_FLOOD"; output; output;
> > 
> > Obviously it's a corner case but it still seems worth implementing
> > correctly.
> > 
> > Found by inspection.
> > 
> > Signed-off-by: Ben Pfaff <blp@nicira.com>
> > ---
> > ovn/controller/physical.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> > 
> > diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
> > index efa34a2..0c239df 100644
> > --- a/ovn/controller/physical.c
> > +++ b/ovn/controller/physical.c
> > @@ -527,6 +527,10 @@ physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
> >          * any. */
> >         bool local_ports = ofpacts.size > 0;
> >         if (local_ports) {
> > +            /* Following delivery to local logical ports, restore the multicast
> > +             * group as the logical output port. */
> > +            put_load(mc->tunnel_key, MFF_LOG_OUTPORT, 0, 32, &ofpacts);
> > +
> >             ofctrl_add_flow(flow_table, OFTABLE_LOCAL_OUTPUT, 100,
> >                             &match, &ofpacts);
> >         }
> > -- 
> > 2.1.3
> > 
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
diff mbox

Patch

diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index efa34a2..0c239df 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -527,6 +527,10 @@  physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
          * any. */
         bool local_ports = ofpacts.size > 0;
         if (local_ports) {
+            /* Following delivery to local logical ports, restore the multicast
+             * group as the logical output port. */
+            put_load(mc->tunnel_key, MFF_LOG_OUTPORT, 0, 32, &ofpacts);
+
             ofctrl_add_flow(flow_table, OFTABLE_LOCAL_OUTPUT, 100,
                             &match, &ofpacts);
         }