[ovs-dev] [PATCH] odp-execute: Add helpful comment to odp_execute_actions().

Ben Pfaff blp at ovn.org
Thu Nov 30 19:03:43 UTC 2017


Thanks for the review.  I applied this to master.

On Thu, Nov 30, 2017 at 10:30:02AM -0800, Yifeng Sun wrote:
> Thanks for the comments that clarify the usage of this function.
> 
> 
> Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>
> 
> On Wed, Nov 29, 2017 at 2:14 PM, Ben Pfaff <blp at ovn.org> wrote:
> 
> > It wasn't obvious how ownership transferred to odp_execute_actions() or
> > to its callback.
> >
> > CC: Yifeng Sun <pkusunyifeng at gmail.com>
> > Signed-off-by: Ben Pfaff <blp at ovn.org>
> > ---
> >  lib/odp-execute.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/lib/odp-execute.c b/lib/odp-execute.c
> > index 2d20cd57fd1d..5ff180f9cbca 100644
> > --- a/lib/odp-execute.c
> > +++ b/lib/odp-execute.c
> > @@ -665,6 +665,15 @@ requires_datapath_assistance(const struct nlattr *a)
> >      return false;
> >  }
> >
> > +/* Executes all of the 'actions_len' bytes of datapath actions in
> > 'actions' on
> > + * the packets in 'batch'.  If 'steal' is true, possibly modifies and
> > + * definitely free the packets in 'batch', otherwise leaves 'batch'
> > unchanged.
> > + *
> > + * Some actions (e.g. output actions) can only be executed by a
> > datapath.  This
> > + * function implements those actions by passing the action and the
> > packets to
> > + * 'dp_execute_action' (along with 'dp').  If 'dp_execute_action' is
> > passed a
> > + * true 'may_steal' parameter then it may possibly modify and must
> > definitely
> > + * free the packets passed into it, otherwise it must leave them
> > unchanged. */
> >  void
> >  odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
> >                      const struct nlattr *actions, size_t actions_len,
> > --
> > 2.10.2
> >
> >


More information about the dev mailing list