linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* socketcan receive queue too many frames
@ 2013-03-27 11:38 du
  2013-03-27 11:50 ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: du @ 2013-03-27 11:38 UTC (permalink / raw)
  To: linux-can

Hello, I'm using socketcan buffer , 
but i'm getting frames for tens of seconds even after I have open the CAN wire
from the bus, In my application ,frame lost is not a problem since I'm using
cyclic process data. I just want to make sure the frame is stopped just when I
disconnect the cable. 

What should I do ? How can I make receive buffer smaller?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: socketcan receive queue too many frames
  2013-03-27 11:38 socketcan receive queue too many frames du
@ 2013-03-27 11:50 ` Marc Kleine-Budde
  2013-03-27 12:01   ` du
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-03-27 11:50 UTC (permalink / raw)
  To: du; +Cc: linux-can

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

On 03/27/2013 12:38 PM, du wrote:
> Hello, I'm using socketcan buffer , 

What is "socketcan buffer"?

> but i'm getting frames for tens of seconds even after I have open the CAN wire
> from the bus, In my application ,frame lost is not a problem since I'm using

What kind of CAN frame do you get? Maybe error messages, due to the open
bus?

> cyclic process data. I just want to make sure the frame is stopped just when I
> disconnect the cable. 
> 
> What should I do ? How can I make receive buffer smaller?

That will not solve your problem.

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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: socketcan receive queue too many frames
  2013-03-27 11:50 ` Marc Kleine-Budde
@ 2013-03-27 12:01   ` du
  2013-03-27 12:04     ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: du @ 2013-03-27 12:01 UTC (permalink / raw)
  To: linux-can

Marc Kleine-Budde <mkl <at> pengutronix.de> writes:


> What is "socketcan buffer"?
sorry ,I means socketcan only.
> 

> What kind of CAN frame do you get? Maybe error messages, due to the open
> bus?
It's not error message , just normal CAN  data frames.


I thought it may has something to do with buffer. 
If my application is not fast enough to read the frames in buffer,
 I can still get frames even the bus is open, is it right?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: socketcan receive queue too many frames
  2013-03-27 12:01   ` du
@ 2013-03-27 12:04     ` Marc Kleine-Budde
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-03-27 12:04 UTC (permalink / raw)
  To: du; +Cc: linux-can

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

On 03/27/2013 01:01 PM, du wrote:
>> What is "socketcan buffer"?
> sorry ,I means socketcan only.

:)

>> What kind of CAN frame do you get? Maybe error messages, due to the open
>> bus?
> It's not error message , just normal CAN  data frames.

Okay.

> I thought it may has something to do with buffer. 
> If my application is not fast enough to read the frames in buffer,
>  I can still get frames even the bus is open, is it right?

Yes, socketcan is designed not to drop any messages, but it will, if the
rx-queue (between kernel and your apps) gets to lange. If you receive
frames in your application 10 seconds after you disconnected the cable
you have a serious design or performance problem (or both) in you system.

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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-27 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 11:38 socketcan receive queue too many frames du
2013-03-27 11:50 ` Marc Kleine-Budde
2013-03-27 12:01   ` du
2013-03-27 12:04     ` Marc Kleine-Budde

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).