From: David Jander <david@protonic.nl>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-can@vger.kernel.org
Subject: Re: RFC: Pacing support in vcan?
Date: Mon, 1 May 2017 14:05:52 +0200 [thread overview]
Message-ID: <20170501140552.68376a75@erd980> (raw)
In-Reply-To: <8f67d483-d1e9-1d22-cb95-660828cd5323@hartkopp.net>
On Mon, 1 May 2017 12:04:05 +0200
Oliver Hartkopp <socketcan@hartkopp.net> wrote:
> Hi David,
>
> On 05/01/2017 09:24 AM, David Jander wrote:
>
> > Currently the VCAN driver is infinitely fast, which is probably fine for most
> > simple applications and testing simple CAN code. Unfortunately I have had a
> > few cases where this is a problem. For example when testing software
> > implementations of transport protocols, where a producer generates can frames
> > basically as fast as possible. Two or more consumers receiving this stream are
> > just a little bit slower (in processing data) than the producer, so I would
> > start losing frames. Of course the TP takes care of this, but since that is
> > what I am trying to test/debug, this can be bothersome.
> >
> > So the question is whether a proposal to introduce optional pacing of vcan
> > would be accepted?
>
> you can already add a queueing discipline to the virtual CAN interface.
>
> See
>
> http://rtime.felk.cvut.cz/can/socketcan-qdisc-final.pdf
>
> chapter 3.3.
>
> Does this help in your setup?
Ha! Yes, this is indeed what I was looking for.... somehow I didn't expect it
to be possible with queuing disciplines. Shows that I still have far too
little experience with that corner of the Linux networking stack :-)
Thanks!
> > Maybe something like (optional) virtual bitrate simulation?
> > I understand that other "loopback" interfaces, like "lo" don't have this and
> > don't want this, but in those cases we usually deal with TCP/IP anyway.
> > AFAICS, CAN is a little bit different in this aspect, as it is usually used
> > without a transport-protocol to take care of pacing, and software often assumes
> > that it runs fast enough to receive all frames at "wire-speed", so that
> > software can't deal with an infinitely fast interface.
> >
> > I also understand that increasing RX-queue length can mitigate or solve these
> > problems most of the times, but that is of course no scalable solution.
> >
> > Best regards,
> >
Best regards,
--
David Jander
Protonic Holland.
prev parent reply other threads:[~2017-05-01 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 7:24 RFC: Pacing support in vcan? David Jander
2017-05-01 10:04 ` Oliver Hartkopp
2017-05-01 12:05 ` David Jander [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=20170501140552.68376a75@erd980 \
--to=david@protonic.nl \
--cc=linux-can@vger.kernel.org \
--cc=socketcan@hartkopp.net \
/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.