linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sako Youssouf <youssouf.sako@renault-trucks.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	Kurt Van Dijck <kurt.van.dijck@eia.be>
Subject: Re: Informations About CAN API of the Linux Kernel
Date: Wed, 06 Mar 2013 16:42:04 +0100	[thread overview]
Message-ID: <513763CC.1070507@pengutronix.de> (raw)
In-Reply-To: <2B7D120CFC15DC438D721B998AD9D9E9097105AB@SEGOTNC5180-N2.vcn.ds.volvo.net>

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

On 03/06/2013 03:51 PM, Sako Youssouf wrote:
> I'm an engineer of a French company, Renault Trucks Defense. We are 
> Militaries cars makers. We are currently testing the CAN API of 
> Linux. I found your article "SocketCAN - The official CAN API of the 
> Linux kernel" on internet and after reading it I have some 
> questions.

Please use the linux-can mailinglist (Cc'ed), however no HTML mails are
allowed on that list.

> About CAN frame reception:
> 
> 1.       In a case of a controller with a single receive buffer . if 
> a new CAN frame arrives and the previous one has not yet been 
> treated, what happens? is the previous one is just lost? Or the 
> kernel has a way to handle that situation.

In linux-can we make use of the Linux networking driver model. This
means if a frame is received from the hardware, it read from the receive
buffer by the driver as soon as possible and pushed into the Linux
networking stack. If the driver fails to do so, the frame of course is lost.

However there is a queue between you application and the kernel, so that
several CAN frames can be on-the-fly between the driver and your
application.

> 2.       In a case of a hardware with a large RX FIFO,  when we call 
> the read function on userspace program, is it possible to know how 
> many frames are available on the RX queue?

There's no way to figure out the number of frames in the RX queue of the
hardware. It might be possible to figure out the number of frames in the
software queue between the kernel and your application. What's your
usecae? What do you want to do with that information?

> And a last question, do you have information about when the Linux
> API for SAE J1939 will be available?

Kurt (Cc'ed) can probably comment on this.

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: 263 bytes --]

       reply	other threads:[~2013-03-06 15:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2B7D120CFC15DC438D721B998AD9D9E9097105AB@SEGOTNC5180-N2.vcn.ds.volvo.net>
2013-03-06 15:42 ` Marc Kleine-Budde [this message]
2013-03-06 16:03   ` Informations About CAN API of the Linux Kernel Sako Youssouf
2013-03-06 16:18     ` Marc Kleine-Budde
2013-03-06 16:25       ` Sako Youssouf
2013-03-06 16:36         ` Marc Kleine-Budde
2013-03-06 16:41           ` Sako Youssouf
2013-03-07 12:40   ` Kurt Van Dijck
2013-03-08  8:55     ` Marc Kleine-Budde
2013-03-08 10:05       ` Kurt Van Dijck
2013-03-08 12:04         ` Oliver Hartkopp
2013-03-08 13:07           ` Kurt Van Dijck
2013-03-08 13:31             ` Kurt Van Dijck
2013-03-08 13:27           ` Yegor Yefremov
2013-03-11  9:31             ` Kurt Van Dijck
2013-03-11 10:03               ` Oliver Hartkopp
2013-03-11 10:21                 ` Yegor Yefremov
2013-03-13 14:57                   ` Kurt Van Dijck
2013-03-14  8:04                 ` Heinz-Jürgen Oertel
2013-03-14  8:28                   ` Wolfgang Grandegger
2013-03-14  8:41                     ` Heinz-Jürgen Oertel
2013-03-14 10:34                       ` Heinz-Jürgen Oertel
2013-03-14 11:00                       ` Kurt Van Dijck
2013-03-14 12:25                         ` Yegor Yefremov
2013-03-14 12:31                           ` Heinz-Jürgen Oertel
2013-03-16  9:48                           ` Heinz-Jürgen Oertel
2013-03-08 12:51         ` Robert Schwebel
2013-03-11  9:29           ` Kurt Van Dijck
2013-03-11 15:10             ` Marc Kleine-Budde
2013-03-11 15:34               ` Kurt Van Dijck
2013-03-11 16:00                 ` Marc Kleine-Budde
2013-03-11 17:20                   ` Oliver Hartkopp

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=513763CC.1070507@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kurt.van.dijck@eia.be \
    --cc=linux-can@vger.kernel.org \
    --cc=youssouf.sako@renault-trucks.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;
as well as URLs for NNTP newsgroup(s).