public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bob Smith <bsmith@linuxtoys.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface
Date: Sat, 03 Aug 2013 11:12:02 -0700	[thread overview]
Message-ID: <51FD47F2.702@linuxtoys.org> (raw)
In-Reply-To: <20130803023512.GA22635@kroah.com>

Greg
    Thanks for your reply.  I'll reply to your comments in reverse order.


Greg Kroah-Hartman wrote:
> And how does this have anything to do with /sys?  I can't see any sysfs
> interaction in the code, or am I missing it?

Yes, you are right.  I'll change the subject and brief descriptions to
something like:
"Proxy, a simple bidirectional character device that almost transparently
proxies opens, reads, writes, and closes from one side of the device to
the other side."

I'll take "/sys" from all descriptions of the device, but I might leave it
in the Documentation/proxy.txt file since a major use case of proxy is to
give user space drivers and daemons the same kind of interface the kernel
enjoys with /sys and /proc.  The similarity is very deliberate on my part
for commands like
	echo 1 > /proc/sys/net/ipv4/ip_forward		# procfs
	echo 75 > /dev/motors/left/speed		# proxy dev




Greg Kroah-Hartman wrote:
 > Why not just use the cuse interface instead?  How does this differ from
 > that /dev node interaction?

I am a big fan of FUSE and CUSE but they do not support what I need.  CUSE
is OK if _ALL_ interaction is through its interface.  What is lacking is
an ability to open, say, a USB serial port and add its file descriptor to
CUSE's FD_SET.  This is a pretty deep problem since a CUSE takes away main()
from the application developer.  A CUSE application looks kind of like this:
	main(argc, argv)
	{
		(check and process command line)
		cuse_lowlevel_main(argc, argv, ...)
	}

Another difference is that no language bindings are needed.  There is no
equivalent of libfuse.so.  Since proxy is just a character device and there
are no language bindings, someone could, in the unlikely case it ever made
sense, write a user space device driver in node.js.


thanks
Bob Smith






  reply	other threads:[~2013-08-03 18:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51FC5478.40500@linuxtoys.org>
2013-08-03  1:19 ` [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface Bob Smith
2013-08-03  1:56   ` Joe Perches
2013-08-03  2:35   ` Greg Kroah-Hartman
2013-08-03 18:12     ` Bob Smith [this message]
2013-08-03 22:38   ` Greg Kroah-Hartman
2013-08-04 21:54     ` Bob Smith
2013-08-04 23:19       ` Greg Kroah-Hartman
2013-08-05 23:46         ` Bob Smith
2013-08-06  9:46           ` Greg Kroah-Hartman
2013-08-07 19:02             ` Bob Smith
2013-08-07 19:27               ` Greg Kroah-Hartman
2013-08-07 19:39                 ` Bob Smith
2013-08-07 19:51                   ` Greg Kroah-Hartman
2013-08-07 19:54                   ` Greg Kroah-Hartman
2013-08-07 21:04                     ` Bob Smith
2013-08-07 21:33                       ` Greg Kroah-Hartman
2013-08-08 21:23                         ` Bob Smith
2013-08-09 21:52                           ` Greg Kroah-Hartman
2013-08-09 22:20                             ` Bob Smith
2013-08-09 22:14                         ` Bob Smith
2013-08-09 23:01                           ` Greg Kroah-Hartman
2013-08-09 23:35                             ` Bob Smith
2013-08-09 23:46                               ` Greg Kroah-Hartman
2013-08-10 20:08                             ` Bob Smith
2013-08-10 20:29                               ` richard -rw- weinberger
2013-08-10 20:49                                 ` Bob Smith
2013-08-10 21:43                               ` Arnd Bergmann
2013-08-10 22:07                                 ` Bob Smith
2013-08-13 20:15                                   ` Arnd Bergmann
2013-08-07 21:28                     ` Bob Smith
2013-08-07 21:40                       ` Greg Kroah-Hartman
2013-08-07 21:53                         ` Bob Smith
2013-08-09 21:54                           ` Greg Kroah-Hartman
2013-08-09 22:51                             ` Bob Smith
2013-08-09 23:04                               ` Greg Kroah-Hartman
2013-08-07 21:38             ` Bob Smith

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=51FD47F2.702@linuxtoys.org \
    --to=bsmith@linuxtoys.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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