From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <aahringo@redhat.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan - ML <linux-wpan@vger.kernel.org>,
David Girault <david.girault@qorvo.com>,
Romuald Despres <romuald.despres@qorvo.com>,
Frederic Blain <frederic.blain@qorvo.com>,
Nicolas Schodet <nico@ni.fr.eu.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH wpan-tools 0/7] iwpan: Support scanning/beaconing
Date: Wed, 31 Aug 2022 17:17:23 +0200 [thread overview]
Message-ID: <20220831171723.3ed4a8c8@xps-13> (raw)
In-Reply-To: <CAK-6q+jxtxvkcmmfRnQad7NhsWJ1OSAsdhw1PsfgT2SDhwGNrw@mail.gmail.com>
Hi Alexander,
aahringo@redhat.com wrote on Tue, 30 Aug 2022 23:17:35 -0400:
> Hi,
>
> On Mon, Aug 29, 2022 at 8:57 AM Alexander Aring <aahringo@redhat.com> wrote:
> >
> > Hi,
> >
> > On Mon, Aug 29, 2022 at 4:37 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > >
> > > Hi Alexander,
> > >
> > > aahringo@redhat.com wrote on Sun, 28 Aug 2022 09:55:24 -0400:
> > >
> > > > Hi,
> > > >
> > > > On Fri, Aug 26, 2022 at 6:50 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > > > ...
> > > > >
> > > > > I've updated the tools so that we have:
> > > > >
> > > > > * "scan trigger" which does not block
> > > > > * "scan monitor" which displays with a pretty output the new
> > > > > coordinators and stops blocking when the scan is over (either because
> > > > > it reached the last channel to scan, or it got aborted)
> > > > > * "scan abort" which stops an ongoing scan
> > > > > * "scan" which is the same as "scan trigger; scan monitor", and will
> > > >
> > > > no, there is a race in the design of "scan trigger; scan monitor".
> > >
> > > Right, I've used pthread to first start the monitoring, before actually
> > > triggering the scan. That should be enough.
> > >
> >
> > I think we should look at this, because it requires that all
> > applications link to pthreads if we offer such an API. Any thoughts
> > about alternative ways, can it not be done over libnl, that libnl
> > internally used e.g. select()? The above example is only regarding the
> > process context.
> >
>
> I think pthreads are not necessary here. If we don't close and open
> the nl socket everything should be queued.
> Forget that with select(), just send() and recv() (whatever that is
> underneath of libnl) should be enough.
That's way more clever. I've changed that, no more pthread and no more
race, thanks!
Thanks,
Miquèl
prev parent reply other threads:[~2022-08-31 15:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 14:34 [PATCH wpan-tools 0/7] iwpan: Support scanning/beaconing Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 1/7] iwpan: Fix the channels printing Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 2/7] iwpan: Export iwpan_debug Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 3/7] iwpan: Fix a comment Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 4/7] iwpan: Remove duplicated SECTION Miquel Raynal
2022-08-01 23:30 ` Alexander Aring
2022-07-01 14:34 ` [PATCH wpan-tools 5/7] iwpan: Synchronize nl802154 header with the Linux kernel Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 6/7] iwpan: Add full scan support Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 7/7] iwpan: Add events support Miquel Raynal
2022-07-04 1:18 ` [PATCH wpan-tools 0/7] iwpan: Support scanning/beaconing Alexander Aring
2022-08-02 0:05 ` Alexander Aring
2022-08-19 17:06 ` Miquel Raynal
2022-08-24 1:36 ` Alexander Aring
2022-08-25 12:55 ` Miquel Raynal
2022-08-26 1:22 ` Alexander Aring
2022-08-26 10:50 ` Miquel Raynal
2022-08-28 13:55 ` Alexander Aring
2022-08-29 8:37 ` Miquel Raynal
2022-08-29 12:57 ` Alexander Aring
2022-08-31 3:17 ` Alexander Aring
2022-08-31 15:17 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220831171723.3ed4a8c8@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=aahringo@redhat.com \
--cc=alex.aring@gmail.com \
--cc=david.girault@qorvo.com \
--cc=frederic.blain@qorvo.com \
--cc=linux-wpan@vger.kernel.org \
--cc=nico@ni.fr.eu.org \
--cc=romuald.despres@qorvo.com \
--cc=stefan@datenfreihafen.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox