> On Aug 30, 2016, at 8:40 AM, Ben Pfaff <b...@ovn.org> wrote:
> 
> On Mon, Aug 22, 2016 at 04:31:40PM -0700, Jarno Rajahalme wrote:
>> Refactor handle_packet_out() to prepare for bundle support for packet
>> outs in a later patch.
>> 
>> Two new callbacks are introduced in ofproto-provider class:
>> ->packet_xlate() and ->packet_execute().  ->packet_xlate() translates
>> the packet using the flow and actions provided by the caller, but
>> defers all OpenFlow-visible side-effects (stats, learn actions, actual
>> packet output, etc.) to be explicitly executed with the
>> ->packet_execute() call.
>> 
>> Signed-off-by: Jarno Rajahalme <ja...@ovn.org>
> 
> This adds a couple of comments of the form
> 
>    /* OUTPUT to a real port can not refer to versionable lookups (flow tables,
>     * groups), so we do not need to worry about the version to use here. */
> 
> but I'm not sure that I believe it.  In particular,
> compose_table_xlate(), which has this comment, outputs to OFPP_TABLE,
> which isn't a real port at all but instead does a full flow table
> traversal.
> 

Thanks for spotting this!

> This line in packet_execute() needs an extra space:
>    execute.actions =opo->odp_actions.data;
> 

OK.

> I'm surprised to see ofproto.c including ofproto-dpif-xlate.h.  That
> seems like a layer violation.

I think this was due to the plate cache only. The learn action entries in late 
cache use the struct ofproto_flow_mod, which the ofproto.c can operate on. 
Apart from bundle revert these could be handled from ofproto-dpif.c with calls 
to ofproto.c functions from there. To make the revert work I’d need to add a 
new ofproto-provider class member function and have it iterate through the late 
cache and then call back to ofproto.c to revert learned flows.

Also, making the late cache a module of it’s own would remove the inclusion of 
ofproto-dpif-xlate.h. Would this alleviate your concern with layer violation, 
or should I strive to keep the xlate cache opaque to ofproto.c?

  Jarno

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to