[ovs-dev] [PATCHv4 1/2] dpif: Support fetching flow mask via dpif_flow_get().

Joe Stringer joestringer at nicira.com
Tue Jul 15 03:40:19 UTC 2014


On 15 July 2014 15:26, Ben Pfaff <blp at nicira.com> wrote:

> > I notice that dpif_netdev_flow_dump_next() also does this optimization
> for
> > actions, but there's no mention of RCU in the dpif_flow_dump_next() API.
> Do
> > you think we should add a comment like this to dpif_flow_get() and
> > dpif_flow_dump_next()?
> >
> > "Implementations may opt to point flow->mask and/or flow->actions at
> > RCU-protected data rather than making a copy of them. Therefore, callers
> > that wish to hold these over quiesce periods must make a copy of these
> > fields before quiescing."
>
> I agree.  I've meant to do this for a while, it's only laziness
> preventing me.
>
> If you add this comment then you can remove the comment
>     /* XXX the caller must use 'actions' without quiescing */
> on dpif_netdev_flow_dump_next().
>

OK. I'll send a separate patch to add these comments.



More information about the dev mailing list