All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Michal Sojka <sojkam1@fel.cvut.cz>, linux-can@vger.kernel.org
Subject: Re: [PATCH 1/2] canbusload: Add exact CAN frame length calculation (including bitstuffing)
Date: Fri, 31 Jan 2014 11:17:20 +0100	[thread overview]
Message-ID: <52EB7830.2080604@pengutronix.de> (raw)
In-Reply-To: <1391089139-31201-1-git-send-email-sojkam1@fel.cvut.cz>

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

On 01/30/2014 02:38 PM, Michal Sojka wrote:

> diff --git a/canframelen.h b/canframelen.h
> new file mode 100644
> index 0000000..225bc09
> --- /dev/null
> +++ b/canframelen.h
> @@ -0,0 +1,35 @@
> +#ifndef CANFRAMELEN_H
> +#define CANFRAMELEN_H
> +
> +#include <linux/can.h>
> +
> +/**
> + * Frame length calculation modes.
> + *
> + * CFL_WORSTCASE corresponds to Ken Tindells *worst* case calculation
> + * for stuff-bits (see "Guaranteeing Message Latencies on Controller
> + * Area Network" 1st ICC'94) the needed bits on the wire can be
> + * calculated as:
> + *
> + * (34 + 8n)/5 + 47 + 8n for SFF frames (11 bit CAN-ID) => (269 + 48n)/5
> + * (54 + 8n)/5 + 67 + 8n for EFF frames (29 bit CAN-ID) => (389 + 48n)/5
> + *
> + * while 'n' is the data length code (number of payload bytes)
> + *
> + */

Can you please post a patch against the new master and add a license
header to this file.

Tnx,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

  parent reply	other threads:[~2014-01-31 10:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <id:87ob2tkcts.fsf@steelpick.2x.cz>
2014-01-30 10:05 ` [PATCH 1/2] canbusload: Add exact CAN frame length calculation (including bitstuffing) Michal Sojka
2014-01-30 10:05   ` [PATCH 2/2] canbusload: Fix worst-case frame length estimation Michal Sojka
2014-01-30 10:50   ` [PATCH 1/2] canbusload: Add exact CAN frame length calculation (including bitstuffing) Marc Kleine-Budde
2014-01-30 13:36     ` Michal Sojka
2014-01-30 13:38       ` Michal Sojka
2014-01-30 13:38         ` [PATCH 2/2] canbusload: Fix worst-case frame length estimation Michal Sojka
2014-01-31 10:16         ` [PATCH 1/2] canbusload: Add exact CAN frame length calculation (including bitstuffing) Marc Kleine-Budde
2014-01-31 10:17         ` Marc Kleine-Budde [this message]
2014-01-31 10:39           ` [PATCH] Add license to canframelen.h Michal Sojka
2014-01-31 10:52             ` Marc Kleine-Budde

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=52EB7830.2080604@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=sojkam1@fel.cvut.cz \
    /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.