linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Manu Abraham <abraham.manu@gmail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH RFCv10 00/15] DVB QoS statistics API
Date: Tue, 15 Jan 2013 13:23:35 -0200	[thread overview]
Message-ID: <20130115132335.1383cdad@redhat.com> (raw)
In-Reply-To: <CAHFNz9JQPVoPXhs7d4Ou_vbYWV5uUKimTnuD+FCVOmwvCDDRkA@mail.gmail.com>

Em Tue, 15 Jan 2013 16:08:14 +0530
Manu Abraham <abraham.manu@gmail.com> escreveu:

> On Tue, Jan 15, 2013 at 8:00 AM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
> > Add DVBv5 methods to retrieve QoS statistics.
> >
> > Those methods allow per-layer and global statistics.
> >
> > Implemented 2 QoS statistics on mb86a20s, one global only
> > (signal strengh), and one per layer (BER).
> >
> > Tested with a modified version of dvbv5-zap, that allows monitoring
> > those stats. Test data follows
> >
> > Tested with 1-segment at layer A, and 12-segment at layer B:
> >
> > [ 3735.973058] i2c i2c-4: mb86a20s_layer_bitrate: layer A bitrate: 440 kbps; counter = 196608 (0x030000)
> > [ 3735.976803] i2c i2c-4: mb86a20s_layer_bitrate: layer B bitrate: 16851 kbps; counter = 8257536 (0x7e0000)
> >
> > a) Global stats:
> >
> > Signal strength:
> >         QOS_SIGNAL_STRENGTH[0] = 4096
> >
> > BER (sum of BE count and bit counts for both layers):
> >         QOS_BIT_ERROR_COUNT[0] = 1087865
> >         QOS_TOTAL_BITS_COUNT[0] = 67043313
> >
> > b) Per-layer stats:
> >
> > Layer A BER:
> >         QOS_BIT_ERROR_COUNT[1] = 236
> >         QOS_TOTAL_BITS_COUNT[1] = 917490
> >
> > Layer B BER:
> >         QOS_BIT_ERROR_COUNT[2] = 1087629
> >         QOS_TOTAL_BITS_COUNT[2] = 66125823
> >
> > TODO:
> >         - add more statistics at mb86a20s;
> >         - implement support for DTV_QOS_ENUM;
> >         - some cleanups at get_frontend logic at dvb core, to avoid
> >           it to be called outside the DVB thread loop.
> >
> > All the above changes can be done a little later during this development
> > cycle, so my plan is to merge it upstream at the beginning of the
> > next week, to allow others to test.
> >
> 
> 
> An API should be simple. This is far from simple. This API looks horribly
> complex and broken, for anyone to use it in a sane way.

It is not complex. See my answer to Antti with a few code snippets.

> Polling from within dvb-core is not a good idea, as it can cause acquisition
> failures. Continuous polling is known to cause issues.

Polling from Kernel or from userspace has the same results. If a hardware is
known to be broken with polling, the driver needs to handle it. With a
Kernel polling, drivers can have more control, as it should not be hard to
change the dvb-frontend polling time for it to be set by the driver.

It could even be possible to have an interrupt-driven process to update the
statistics, if the hardware supports it.

> Adding counters to be controlled externally by a user is the most silliest
> thing altogether.

Huh? There's nothing that userspace can control. All userspace does with the
API is to read values. Nothing more, nothing less.

> All these things put together, makes it the most inconvenient thing to be used.
> Eventually, it results in more broken applications than existing.
> 
> Not to forget that too much work has to be put into drivers, which aren't going
> to make things better, but rather even more worser.

Not necessarily drivers need to be patched, as the existing callbacks could
be used. Still, I think it makes sense to gradually change the drivers we
care to the new way, in order to provide a better API. Of course, the old 
calls should still work. So, it is not getting anything worser.

Regards,
Mauro

      reply	other threads:[~2013-01-15 15:24 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  2:30 [PATCH RFCv10 00/15] DVB QoS statistics API Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 01/15] mb86a20s: improve error handling at get_frontend Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 02/15] dvb: Add DVBv5 stats properties for Quality of Service Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 03/15] dvb: the core logic to handle the DVBv5 QoS properties Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 04/15] mb86a20s: Update QoS statistics at FE read_status Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 05/15] mb86a20s: functions reorder Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 06/15] mb86a20s: Fix i2c gate on error Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 07/15] mb86a20s: improve debug for RF level Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 08/15] mb86a20s: fix interleaving and FEC retrival Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 09/15] mb86a20s: convert it to use dev_info/dev_err/dev_dbg Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 10/15] mb86a20s: -EBUSY is expected when getting QoS measures Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 11/15] mb86a20s: make AGC work better Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 12/15] mb86a20s: Some improvements for BER measurement Mauro Carvalho Chehab
2013-01-15  2:30 ` [PATCH RFCv10 13/15] mb86a20s: improve bit error count for BER Mauro Carvalho Chehab
2013-01-15  2:31 ` [PATCH RFCv10 14/15] dvb: increase API version Mauro Carvalho Chehab
2013-01-15  8:20 ` [PATCH RFCv10 00/15] DVB QoS statistics API Johannes Stezenbach
2013-01-15  8:55   ` Antti Palosaari
2013-01-15 12:23     ` Mauro Carvalho Chehab
2013-01-15  9:34 ` Antti Palosaari
2013-01-15 13:10   ` Mauro Carvalho Chehab
2013-01-15 14:49     ` Antti Palosaari
2013-01-15 15:21       ` Mauro Carvalho Chehab
2013-01-15 15:47         ` Devin Heitmueller
2013-01-15 17:02           ` Mauro Carvalho Chehab
2013-01-15 15:26       ` Antti Palosaari
2013-01-15 17:12         ` Mauro Carvalho Chehab
2013-01-15 20:37           ` Antti Palosaari
2013-01-16  4:26             ` Manu Abraham
2013-01-16 11:41               ` Luca Olivetti
2013-01-16 13:56               ` Mauro Carvalho Chehab
2013-01-16 15:19                 ` Manu Abraham
2013-01-16 17:21                   ` Mauro Carvalho Chehab
2013-01-16 18:26                     ` Manu Abraham
2013-01-16 19:22                       ` Mauro Carvalho Chehab
2013-01-16 21:40                         ` Manu Abraham
2013-01-16 19:29                       ` Simon Farnsworth
2013-01-16 21:37                         ` Manu Abraham
2013-01-16 22:11                           ` Mauro Carvalho Chehab
2013-01-17  3:26                             ` Manu Abraham
2013-01-16 22:01                         ` Mauro Carvalho Chehab
2013-01-17  3:40                           ` Manu Abraham
2013-01-17  9:33                             ` Antti Palosaari
2013-01-17 16:50                               ` Mauro Carvalho Chehab
2013-01-17 17:15                                 ` Antti Palosaari
2013-01-17 18:11                                   ` Mauro Carvalho Chehab
2013-01-17 18:27                                     ` Antti Palosaari
2013-01-17 18:37                                       ` Manu Abraham
2013-01-17 18:50                                         ` Mauro Carvalho Chehab
2013-01-17 19:11                                           ` Antti Palosaari
2013-01-17 19:35                                             ` Mauro Carvalho Chehab
2013-01-17 21:29                                             ` Manu Abraham
2013-01-17 22:22                                               ` Antti Palosaari
2013-01-17 22:46                                                 ` Mauro Carvalho Chehab
2013-01-22 12:16                                             ` Mauro Carvalho Chehab
2013-01-23 15:08                                               ` Antti Palosaari
2013-01-23 15:12                                                 ` Antti Palosaari
2013-01-23 18:18                                                 ` Mauro Carvalho Chehab
2013-01-23 18:57                                                   ` Mauro Carvalho Chehab
2013-01-23 19:55                                                     ` Antti Palosaari
2013-01-23 21:00                                                       ` Mauro Carvalho Chehab
2013-01-23 22:02                                                         ` Mauro Carvalho Chehab
2013-01-17 17:16                               ` Manu Abraham
2013-01-17 17:22                                 ` Antti Palosaari
2013-01-17 17:37                                   ` [linux-media] " Klaus Schmidinger
2013-01-17 17:39                                     ` [linux-media] " Klaus Schmidinger
2013-01-17 18:36                                   ` Mauro Carvalho Chehab
2013-01-19 12:04                           ` Mauro Carvalho Chehab
2013-01-16 13:24             ` Mauro Carvalho Chehab
2013-01-15 10:38 ` Manu Abraham
2013-01-15 15:23   ` Mauro Carvalho Chehab [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=20130115132335.1383cdad@redhat.com \
    --to=mchehab@redhat.com \
    --cc=abraham.manu@gmail.com \
    --cc=linux-media@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;
as well as URLs for NNTP newsgroup(s).