[ovs-dev] [PATCH 2/2] ofproto-dpif: Simplify send_packet().

Ben Pfaff blp at nicira.com
Thu May 9 17:19:07 UTC 2013


On Wed, May 08, 2013 at 03:36:56PM -0700, Ethan Jackson wrote:
> Before this patch, send_packet() manually constructed the required
> datapath output actions.  This worked fine when these actions were
> simple, however as outputting to tunnels and patch ports became
> more complex, this required quite a bit of complex duplicated code.
> This patch solves the problem by running through the standard
> xlate_actions() code path instead.
> 
> Signed-off-by: Ethan Jackson <ethan at nicira.com>

I am not sure that may_learn should be set to false.  If the packet is
output to a patch port, which then goes through to a flow table that
does MAC learning, then I am not sure why we would not want that to
take place.

One could write &output.ofpact here instead of using a cast:
> +    xlate_actions(&ctx, (struct ofpact *) &output, sizeof output,
> +                  &odp_actions);

Otherwise, looks good.

Thanks,

Ben.



More information about the dev mailing list