All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Preferred userspace IPC mechanism for new drivers?
Date: Thu, 7 May 2015 09:10:06 +0200	[thread overview]
Message-ID: <20150507071006.GA19106@kroah.com> (raw)
In-Reply-To: <FE9FE211D496424DB4CC75CBF5B226D311837D2E@SATLEXDAG01.amd.com>

On Wed, May 06, 2015 at 09:07:46PM +0000, Larrew, Jesse wrote:
> Hello,
>  
> I?m writing a driver that needs to communicate with userspace
> applications.

What type of driver?

> Userspace needs to be able to send commands and associated data to the
> driver, so the ioctl interface seems pretty straightforward. However,
> LDD3 states that new ioctls in the kernel are a no-no. If that?s the
> case, then what is the preferred interface to userspace for new
> drivers?
>  
> ProcFS seems to be discouraged. Sysfs seems to be more for exporting
> device model information rather than passing binary blobs back and
> forth. DebugFS seems to be intended only for debug. Generic Netlink
> seems like the most viable candidate that I?ve investigated so far. Is
> that what most people are using these days?

No, ioctls still work for some specific types of data that needs to be
sent (large chunks in an atomic way), but it all really depends on
exactly what type of driver you are working on, that will dictate what
api you use.

greg k-h

      reply	other threads:[~2015-05-07  7:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 21:07 Preferred userspace IPC mechanism for new drivers? Larrew, Jesse
2015-05-07  7:10 ` Greg KH [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=20150507071006.GA19106@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.