[ovs-dev] [RFC v2 1/5] dpif-netdev: Convert exit latch to flag.
David Marchand
david.marchand at redhat.com
Thu May 23 08:02:05 UTC 2019
On Wed, May 22, 2019 at 3:10 PM Kevin Traynor <ktraynor at redhat.com> wrote:
> On 14/05/2019 17:33, David Marchand wrote:
> > No need for a latch here since we don't have to wait.
> > A simple boolean flag is enough.
> >
> > The memory order on the reload flag is changed to rel-acq ordering to
> > serve as a synchronisation point between the pmd threads and the control
> > thread that asks for termination.
> >
> > Fixes: e4cfed38b159 ("dpif-netdev: Add poll-mode-device thread.")
> > Signed-off-by: David Marchand <david.marchand at redhat.com>
> > ---
> > lib/dpif-netdev.c | 13 ++++++-------
> > 1 file changed, 6 insertions(+), 7 deletions(-)
> >
> > ---
> > Changelog since v1:
> > - added memory ordering on 'reload' atomic to serve as a synchronisation
> > point between control thread and pmd threads
> >
> > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> > index 5a6f2ab..37366e2 100644
> > --- a/lib/dpif-netdev.c
> > +++ b/lib/dpif-netdev.c
> > @@ -681,10 +681,10 @@ struct dp_netdev_pmd_thread {
> > /* Current context of the PMD thread. */
> > struct dp_netdev_pmd_thread_ctx ctx;
> >
> > - struct latch exit_latch; /* For terminating the pmd thread.
> */
>
> I don't think "latch.h" is needed anymore in the file so it's include
> could be removed too
>
Indeed, thanks.
--
David Marchand
More information about the dev
mailing list