linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, marcio.macedo@openbossa.org,
	aloisio.almeida@openbossa.org, Waldemar.Rymarkiewicz@tieto.com
Subject: Re: [PATCH 2/6] NFC: add nfc generic netlink interface
Date: Mon, 6 Jun 2011 18:20:47 +0200	[thread overview]
Message-ID: <20110606162047.GA2880@sortiz-mobl> (raw)
In-Reply-To: <BANLkTikS+cssYccjg_SfOhR15N=M9erw6Q@mail.gmail.com>

Hi Lauro,

On Fri, Jun 03, 2011 at 05:18:26PM -0300, Lauro Ramos Venancio wrote:
> > IMHO, the better way to structure this would be to create an event that
> > contains no information, and then allow a dump of the targets (with a
> > generation counter). That way, there are no such artificial limits due
> > to message sizes.
> 
> I agree that this is a better solution. But I think we don't need a
> generation counter because only a new polling operation (start_poll
> call) can change the targets list (i.e. there is no passive polling).
I think we agree on the fact that going through a target list dump would be a
better solution. Then if we do so we need to provide some sort of consistency
check, even though NFC doesn't define any sort of passive polling. One example
would be an NFC daemon running and getting the target list while a command
line tool could initiate a target poll.

 
> >> +static int nfc_genl_dump_devices(struct sk_buff *skb,
> >> +                               struct netlink_callback *cb)
> >
> > You should have a generation counter here so that applications getting a
> > dump can know whether their dump was a complete and consistent snapshot.
> > Otherwise, if devices are added or removed during the dump applications
> > will not be able to know that their dump wasn't right.
> >
> 
> We don't need a generation counter here because we have the events
> NFC_EVENT_DEVICE_ADDED and NFC_EVENT_DEVICE_REMOVED. So, it is
> possible to keep the device list consistency listening for these
> events.
I agree with you here we can keep it consistent by listening to these
events. But if we provide the dump hook, we need to add an additional
consistency check even though this kind of race is much less likely to happen
than in the target case (devices don't just show up on your NFC enabled phone).

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2011-06-06 16:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 21:46 [PATCH 0/6] NFC subsystem Lauro Ramos Venancio
2011-06-02 21:46 ` [PATCH 1/6] NFC: add nfc subsystem core Lauro Ramos Venancio
2011-06-03 13:35   ` Johannes Berg
2011-06-03 13:45     ` Aloisio Almeida
2011-06-03 13:48       ` Johannes Berg
2011-06-02 21:46 ` [PATCH 2/6] NFC: add nfc generic netlink interface Lauro Ramos Venancio
2011-06-03 13:44   ` Johannes Berg
2011-06-03 20:18     ` Lauro Ramos Venancio
2011-06-03 20:38       ` Johannes Berg
2011-06-03 21:35         ` Aloisio Almeida
2011-06-03 21:39           ` Johannes Berg
2011-06-06  8:01       ` Kalle Valo
2011-06-06 16:20       ` Samuel Ortiz [this message]
2011-06-02 21:46 ` [PATCH 3/6] NFC: add NFC socket family Lauro Ramos Venancio
2011-06-02 21:46 ` [PATCH 4/6] NFC: add the NFC socket raw protocol Lauro Ramos Venancio
2011-06-02 21:46 ` [PATCH 5/6] NFC: pn533: add NXP pn533 nfc device driver Lauro Ramos Venancio
2011-06-02 21:46 ` [PATCH 6/6] NFC: add Documentation/networking/nfc.txt Lauro Ramos Venancio
2011-06-17 16:45 ` [PATCH 0/6] NFC subsystem John W. Linville
2011-06-17 17:07   ` Samuel Ortiz
2011-06-18  8:03   ` Johannes Berg

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=20110606162047.GA2880@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=Waldemar.Rymarkiewicz@tieto.com \
    --cc=aloisio.almeida@openbossa.org \
    --cc=johannes@sipsolutions.net \
    --cc=lauro.venancio@openbossa.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marcio.macedo@openbossa.org \
    /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;
as well as URLs for NNTP newsgroup(s).