[ovs-dev] [xlate v1 01/18] ofproto-dpif: Handle dest mirrors in compose_output_action().

Ben Pfaff blp at nicira.com
Wed Jun 26 19:49:29 UTC 2013

On Wed, Jun 26, 2013 at 12:42:48PM -0700, Ben Pfaff wrote:
> On Mon, Jun 24, 2013 at 06:59:15PM -0700, Ethan Jackson wrote:
> > Before this patch, the mirroring code would retroactively insert
> > actions for destination mirrors after actions were translated.
> > This relied on converting datapath output actions into ofports
> > which doesn't work for tunnels and patch ports.  This patch
> > refactors the code to handle destination mirrors at output.
> > 
> > Signed-off-by: Ethan Jackson <ethan at nicira.com>
> The approach here seems odd, so I wonder if I'm missing something.
> What I expected to see was that each compose_output_action() would add
> the mirrors for that output to a set of mirrors to ultimately use, and
> that somewhere else (just one place) we would add the mirrors for the
> input to this same set, and that at the end we would use the set of
> mirrors to do the mirroring.
> What I see here is that each compose_output_action() computes the set
> of input mirrors, adds in the provided set of output mirrors,
> subtracts the mirrors already output to, and then outputs to any
> remaining ones.
> Am I missing something?

Oh, one more thing.  The formatting here implies that 'orig_flow' is
related to "Flow at the last commit."  I don't think it really is:

    /* Flow at the last commit. */
    struct flow base_flow;
    struct flow orig_flow; /* Junk unless 'hit_resubmit_limit' or mirroring. */

More information about the dev mailing list