[ovs-discuss] Lost in translation! OFP to DPDK datapath OVS actions?

Ben Pfaff blp at ovn.org
Mon Jan 22 19:33:15 UTC 2018


Actions that just set fields don't emit ODP actions to do that
immediately because controllers often change fields multiple times
between outputs, so that it would be wasteful to emit the changes
multiple times.  Instead, at the time of emitting an output (or other
visible side effect), OVS emits all changes to fields in one group.

On Sat, Jan 13, 2018 at 09:11:50AM +0100, Alan Kayahan wrote:
> Indeed. My custom action works when I put nl_msg_put_flag(ctx->odp_actions,
> OVS_ACTION_ATTR_MY_ACTION); however none of the other cases follow this
> pattern. They all set flow->xxx from the struct casted ofpact instead.
> Since both setting ctx->odp_actions and flow->xxx works, I have the
> following questions
> 
> 1) Where do the actions defined in ctx->odp_actions get actuated?
> 2) Where do the actions for the struct flow get actuated, and how does the
> actuator know what OVS actions to actuate?
> 3) Can we say that do_xlate_actions() is currently being used outside the
> purpose that its name implies, because all it does is to set the fields of
> the struct flow to those set in ofpact struct?
> 
> Thanks
> 
> 2018-01-12 18:36 GMT+01:00 Ben Pfaff <blp at ovn.org>:
> 
> > On Fri, Jan 12, 2018 at 11:39:44AM +0100, Alan Kayahan wrote:
> > > Hello,
> > >
> > > Per my understanding from /ovs-discuss/2015-May/037313.html,
> > > ofproto-dpif-xlate translates OFP actions into Netlink format, which is
> > > useful for datapath actions implemented in the kernel module. Does that
> > > hold for OFP to DPDK datapath actions too?
> >
> > Yes.
> >
> > > I couldn't find a connection from ofproto-dpif-xlate to
> > > odp_execute_actions. Where does the translation of ofpact structs into
> > > OVS actions implemented in DPDK datapath take place?
> >
> > ofproto-dpif-xlate does the translation for both datapaths, in the same
> > way.
> >


More information about the discuss mailing list