linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: laurent vaudoit <laurent.vaudoit@gmail.com>, linux-can@vger.kernel.org
Subject: N_Cs timing - was Re: linux-can ISOTP module
Date: Sat, 21 Jun 2014 13:18:02 +0200	[thread overview]
Message-ID: <53A569EA.9030701@hartkopp.net> (raw)
In-Reply-To: <CAA7hF3w-W1E0E5M4Gkc=0aYB0NQPrOMJfLp-iSG8K8HJU-sdoA@mail.gmail.com>

Hi Laurent,

as the extended address specification for the rx path is discussed/answered
in another thread I changed the subject for the timing discussion ...

On 05.06.2014 09:16, laurent vaudoit wrote:

> 
> Ok, with isotp.h api, i understand that we can parameter block size, stmin,
> wftmax, transmission time (n_ax), padding.
> But how can i specify the timing n_CS (time between flow control reception
> and first consecutive frame)

N_Cs is defined by the received STmin.

Then the tx_gap time is calculated by tx_gap = N_As + N_Cs

https://gitorious.org/linux-can/can-modules/source/027899c01aa2482423376e1e9f2a5875c316303a:net/can/isotp.c#L324

Finally the timer for the tx job is started relatively with this value
which leads to the required gap between the FC reception and the first CF. 


> and the timing n_BS (time between first frame
> reception and flow control emission)? 

N_Bs = N_Br + N_Ar

N_Ar is defined by the frame transmission time (on the real CAN bus)
N_Br has no setting but only a performance requirement:

N_Br + N_Ar < 0.9 * N_Bs timeout

N_Bs timeout = 1000ms => N_Br + N_Ar < 900ms

So AFAICS there's no way to specify N_Br. It can be as small as possible.
Therefore N_Bs is at least N_Ar + some various time for the protocol machine. 

> In the same way, is it possible to
> specify according timeout (n_BR for flow control timeout reception, and n_CR
> for consecutive frame timeout reception)?

Due to the spec all these timeouts are defined to be 1000ms.
Or did I miss something here?

Regards,
Oliver


  parent reply	other threads:[~2014-06-21 11:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 12:55 linux-can ISOTP module laurent vaudoit
2014-06-04 18:40 ` Oliver Hartkopp
2014-06-05  7:16   ` laurent vaudoit
2014-06-05 10:18     ` Maxime Jayat
2014-06-05 18:22       ` Oliver Hartkopp
2014-06-06  6:42         ` laurent vaudoit
2014-06-20 19:08           ` Oliver Hartkopp
2014-06-23 18:01             ` laurent vaudoit
2014-11-13 17:47               ` Oliver Hartkopp
     [not found]                 ` <CAA7hF3ypuVbfxbskM+2bn_58a-k0EtCePxQ_1i6j24G5H=zFSQ@mail.gmail.com>
2015-01-16 17:31                   ` Oliver Hartkopp
2014-06-21 11:18     ` Oliver Hartkopp [this message]
2014-06-23 18:13       ` N_Cs timing - was " laurent vaudoit

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=53A569EA.9030701@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=laurent.vaudoit@gmail.com \
    --cc=linux-can@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).