Linux CAN drivers development
 help / color / mirror / Atom feed
* Count dropped frames on CAN socket
@ 2016-11-15 23:32 Austin Hendrix
  2016-11-16  0:08 ` Brian Silverman
  0 siblings, 1 reply; 4+ messages in thread
From: Austin Hendrix @ 2016-11-15 23:32 UTC (permalink / raw)
  To: linux-can

Hi linux-can,

I'm writing a program which receives CAN frames over SocketCAN. I've 
found on a couple of occasions that my program has had bugs that cause 
it not to empty the CAN socket receive buffer, and the kernel has 
dropped incoming CAN frames.

I had a look through the kernel source code, and found that the kernel's 
socket framework keeps track of dropped frames in the sk_drops field of 
the sock struct. Is there a way to retrieve that dropped frame counter 
from my program, so that it's easier for me to detect problems like this 
in the future? (I've looked in the docs and in /proc and haven't been 
able to find a way to retrieve the sk_drops counter, but it's quite 
possible that I missed something)


Thanks,

-Austin


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

end of thread, other threads:[~2016-11-16 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 23:32 Count dropped frames on CAN socket Austin Hendrix
2016-11-16  0:08 ` Brian Silverman
2016-11-16  9:57   ` Oliver Hartkopp
2016-11-16 17:13     ` Austin Hendrix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox