netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Query on usage of Netlink
@ 2010-10-08  8:51 Kumar SANGHVI
  2010-10-08 10:14 ` Rémi Denis-Courmont
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar SANGHVI @ 2010-10-08  8:51 UTC (permalink / raw)
  To: netdev
  Cc: srinidhi.kasagar, linus.walleij, kumar.sanghvi, sudeep.divakaran,
	gulshan.karmani

Hi All,

We have a requirement where-in we want to communicate the status of
modem (whether modem is online or offline) from linux driver to
user-space components. So that user-space components stop sending data
to linux driver for communicating with modem, in case modem goes
offline.

We have decided to use the netlink mechanism to achieve this. We intend
to send an integer value, defined in enum, to user-space indicating the
current modem status.

For this, we want to know what Netlink message type should we use?
Should we use some existing Netlink type? Will there be any risk of
getting other messages (the ones not sent by our driver) if using
existing Netlink message type? For e.g. if we use the existing type
NETLINK_ROUTE then, user-space may un-necessary receive netlink notification
for route changes.

Or should we define a custom Netlink type in include/linux/netlink.h?

Thank you for suggestions.

Best regards,
Kumar.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query on usage of Netlink
  2010-10-08  8:51 Query on usage of Netlink Kumar SANGHVI
@ 2010-10-08 10:14 ` Rémi Denis-Courmont
  2010-10-08 10:31   ` Kumar SANGHVI
  0 siblings, 1 reply; 3+ messages in thread
From: Rémi Denis-Courmont @ 2010-10-08 10:14 UTC (permalink / raw)
  To: Kumar SANGHVI
  Cc: netdev, srinidhi.kasagar, linus.walleij, sudeep.divakaran,
	gulshan.karmani


On Fri, 8 Oct 2010 14:21:28 +0530, Kumar SANGHVI
<kumar.sanghvi@stericsson.com> wrote:
> We have a requirement where-in we want to communicate the status of
> modem (whether modem is online or offline) from linux driver to
> user-space components. So that user-space components stop sending data
> to linux driver for communicating with modem, in case modem goes
> offline.

Is the modem control state machine in kernel space, as for say, 802.11
devices?

> We have decided to use the netlink mechanism to achieve this. We intend
> to send an integer value, defined in enum, to user-space indicating the
> current modem status.
(...)
> Or should we define a custom Netlink type in include/linux/netlink.h?

Did you consider using kobject and uevents (which are internally running on
top of Netlink)?

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query on usage of Netlink
  2010-10-08 10:14 ` Rémi Denis-Courmont
@ 2010-10-08 10:31   ` Kumar SANGHVI
  0 siblings, 0 replies; 3+ messages in thread
From: Kumar SANGHVI @ 2010-10-08 10:31 UTC (permalink / raw)
  To: Rémi Denis-Courmont
  Cc: netdev@vger.kernel.org, Srinidhi KASAGAR, Linus WALLEIJ,
	Sudeep DIVAKARAN, Gulshan KARMANI

Hi Rémi Denis-Courmontt,

On Fri, Oct 08, 2010 at 12:14:44 +0200, Rémi Denis-Courmont wrote:
> 
> On Fri, 8 Oct 2010 14:21:28 +0530, Kumar SANGHVI
> <kumar.sanghvi@stericsson.com> wrote:
> > We have a requirement where-in we want to communicate the status of
> > modem (whether modem is online or offline) from linux driver to
> > user-space components. So that user-space components stop sending data
> > to linux driver for communicating with modem, in case modem goes
> > offline.
> 
> Is the modem control state machine in kernel space, as for say, 802.11
> devices?
State machine to keep track of current modem state is in kernel driver.
Kernel driver can know when modem goes offline or when modem is back
online.

> > We have decided to use the netlink mechanism to achieve this. We intend
> > to send an integer value, defined in enum, to user-space indicating the
> > current modem status.
> (...)
> > Or should we define a custom Netlink type in include/linux/netlink.h?
> 
> Did you consider using kobject and uevents (which are internally running on
> top of Netlink)?
Yes. However, I believe kobject and uevents require some user-space
daamon like udev which can dispatch the specific uevents to user-space
apps. This user-space daemon then becomes something application
framework specific.
Another option is that user-space app itself open up a netlink socket of type
KOBJECT_UEVENT. But then, user-space will have to filter out
un-necessary uevents out of it. 

Best regards,
Kumar.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-08 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08  8:51 Query on usage of Netlink Kumar SANGHVI
2010-10-08 10:14 ` Rémi Denis-Courmont
2010-10-08 10:31   ` Kumar SANGHVI

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).