public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@linuxtv.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: HoP <jpetrous@gmail.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage?
Date: Sat, 03 Dec 2011 17:13:40 +0100	[thread overview]
Message-ID: <4EDA4AB4.90303@linuxtv.org> (raw)
In-Reply-To: <20111202231909.1ca311e2@lxorguk.ukuu.org.uk>

Hello Alan,

On 03.12.2011 00:19, Alan Cox wrote:
> On Thu, 1 Dec 2011 15:58:41 +0100
> HoP <jpetrous@gmail.com> wrote:
> 
>> Hi,
>>
>> let me ask you some details of your interesting idea (how to
>> achieve the same functionality as with vtunerc driver):
>>
>> [...]
>>
>>> The driver, as proposed, is not really a driver, as it doesn't support any
>>> hardware. The kernel driver would be used to just copy data from one
>>> userspace
>>
>> Please stop learning me what can be called driver and what nope.
>> Your definition is nonsense and I don't want to follow you on it.
> 
> You can stick your fingers in your ears and shout all you like but given
> Mauro is the maintainer I'd suggest you work with him rather than making
> it painful. One of the failures we routinely exclude code from the kernel
> for is best described as "user interface of contributor"
> 
> It's a loopback that adds a performance hit. The right way to do this is
> in userspace with the userspace infrastructure. At that point you can
> handle all the corner cases properly, integrate things like service
> discovery into your model and so on - stuff you'll never get to work that
> well with kernel loopback hackery.

FWIW, the virtual DVB device we're talking about doesn't have any
networking capabilities by itself. It only allows to create virtual DVB
adapters and to relay DVB API ioctls to userspace in a
transport-agnostic way. Networking already takes place in a separate
userspace process.

>> Can you show me, how then can be reused most important part
>> of dvb-core subsystem like tuning and demuxing? Or do you want me
>> to invent wheels and to recode everything in the library? Of course
> 
> You could certainly build a library from the same code. That might well
> be a good thing for all kinds of 'soft' DV applications. At that point
> the discussion to have is the best way to make that code sharable between
> a userspace library and the kernel and buildable for both.

You could certainly build a library to reach a different goal. The goal
of vtuner is to access remote tuners with any existing program
implementing the DVB API.

One of my primary use cases is to develop DVB API software on my
notebook, while receiving the data from an embedded device, so I don't
need an antenna cable connected to my notebook (or don't need to have an
antenna at my location at all, if an internet connection is available).

Another use case is to receive data streams over the internet from
satellite, cable and terrestrial networks that are impossible to receive
in my area to verify that my DVB API software works with those streams.

Furthermore, I'd like to use standard tools implementing theDid you even
unders DVB API, e.g. to scan for channels, to measure signal quality or
to decode streams on remote locations.

With vtuner, and an accompanying open source networking daemon, all of
the above works out of the box. If I'd like to change the way data gets
relayed between hosts (e.g. add IPv6 or SSL), I'd just need to update
the userspace client and server.

With a library, I'd need to implement networking in every little DVB API
tool I want to use, multiplying the code size of every tool, restricting
each tool to some arbitrarily chosen network protocol. If I'd like to
change the way data gets relayed between hosts, I'd need to update every
application using it.

>> I can be wrong, I'm no big kernel hacker. So please show me the
>> way for it. BTW, even if you can find the way, then data copying
>> from userspace to the kernel and back is also necessery. I really
>> don't see any advantage of you solution.
> 
> In a properly built media subsystem you shouldn't need any copies beyond
> those that naturally occur as part of a processing pass and are therefore
> free.

The original version of the vtuner interface makes use of demux hardware
and also feeds the relevant streams to a/v decoders, in which case you
cannot avoid copying the MPEG data to kernel space.

That's also the way to playback local DVB recordings works today without
vtuners.

I'm fine with not merging this code, if there are technical arguments
against it. And personally I don't need it to be merged to be able to
use it.

However, Mauro invents half-baked arguments against it, because he fears
that the code may be "abused" by closed-source userspace drivers (he
already declared the latter publicly on the linux-media list).

Unfortunately, I must assume that your own arguments are based on
Mauro's emails instead of on the source code, because you clearly didn't
understand the architecture of vtuner, regarding what's supposed to
happen in kernel space and what not.

Regards,
Andreas

  parent reply	other threads:[~2011-12-03 16:13 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 21:38 [RFC] vtunerc: virtual DVB device - is it ok to NACK driver because of worrying about possible misusage? HoP
2011-11-30 21:52 ` Michael Krufky
2011-12-01  0:09 ` Andreas Oberritter
2011-12-01 11:04   ` Mauro Carvalho Chehab
2011-12-01 14:58     ` HoP
2011-12-01 17:38       ` Mauro Carvalho Chehab
2011-12-01 19:59         ` HoP
2011-12-01 20:38           ` Mauro Carvalho Chehab
2011-12-01 22:55             ` Andreas Oberritter
2011-12-02 11:14               ` Mauro Carvalho Chehab
2011-12-02 11:48                 ` Andreas Oberritter
2011-12-02 11:57                 ` HoP
2011-12-02 17:33                   ` Mauro Carvalho Chehab
2011-12-02 17:49           ` Rémi Denis-Courmont
2011-12-02 18:16             ` Andreas Oberritter
2011-12-02 18:28               ` Andreas Oberritter
2011-12-02 23:19       ` Alan Cox
2011-12-03  0:37         ` HoP
2011-12-05 10:21           ` Florian Fainelli
2011-12-05 14:28             ` HoP
2011-12-05 15:16               ` Alan Cox
2011-12-05 15:18               ` Michael Krufky
2011-12-06  0:16                 ` HoP
2011-12-05 17:39               ` Mauro Carvalho Chehab
2011-12-05 20:41                 ` Andreas Oberritter
2011-12-05 20:55                   ` Alan Cox
2011-12-05 21:20                     ` Andreas Oberritter
2011-12-05 21:54                       ` Alan Cox
2011-12-06 11:18                       ` Mark Brown
2011-12-06 12:01                         ` Andreas Oberritter
2011-12-06 13:10                           ` Mauro Carvalho Chehab
2011-12-06 13:35                             ` Andreas Oberritter
2011-12-06 14:13                               ` Mauro Carvalho Chehab
2011-12-06 14:38                                 ` Andreas Oberritter
2011-12-06 15:06                                   ` Mauro Carvalho Chehab
2011-12-06 15:36                                     ` Manu Abraham
2011-12-06 11:21                   ` Mark Brown
2011-12-06 12:01                     ` Andreas Oberritter
2011-12-06 14:19                       ` Mark Brown
2011-12-06 14:48                         ` Andreas Oberritter
2011-12-07 13:49                           ` Mark Brown
2011-12-07 14:01                             ` Andreas Oberritter
2011-12-07 16:10                               ` Mark Brown
2011-12-07 16:56                                 ` Andreas Oberritter
2011-12-07 16:58                                 ` Andreas Oberritter
2011-12-07 21:48                               ` Patrick Dickey
2011-12-07 22:53                                 ` Honza Petrouš
2011-12-07 23:24                                   ` Peter Kolta
2011-12-07 23:55                                 ` Andreas Oberritter
2011-12-11 18:45                               ` Peter martin
2011-12-12 10:31                                 ` Alan Cox
2011-12-06 17:19                         ` Manu Abraham
2011-12-06  0:07                 ` HoP
2011-12-06 13:22                   ` Mauro Carvalho Chehab
2011-12-06 13:49                     ` Andreas Oberritter
2011-12-06 14:19                       ` Rémi Denis-Courmont
2011-12-06 15:05                         ` Andreas Oberritter
2011-12-06 14:20                       ` Mauro Carvalho Chehab
2011-12-06 15:00                         ` Andreas Oberritter
2011-12-06 17:35                           ` HoP
2011-12-03 16:13         ` Andreas Oberritter [this message]
2011-12-03 16:42           ` Alan Cox
2011-12-03 17:38             ` Andreas Oberritter
2011-12-03 17:21           ` VDR User
2011-12-03 17:42             ` Alan Cox
2011-12-03 17:48               ` Devin Heitmueller
2011-12-04 23:54                 ` HoP
2011-12-03 18:13               ` Hans Petter Selasky
2011-12-05  0:05                 ` HoP
2011-12-03 18:17               ` Andreas Oberritter
2011-12-03 23:30             ` Walter Van Eetvelt
2011-12-04  0:14               ` VDR User
2011-12-04 14:44                 ` Alan Cox
2011-12-04 23:22             ` HoP
2011-12-05  1:45               ` VDR User
2011-12-05  6:20                 ` HoP
2011-12-02 18:32 ` VDR User

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=4EDA4AB4.90303@linuxtv.org \
    --to=obi@linuxtv.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jpetrous@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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