> -----Original Message-----
> From: Wolfgang Grandegger [mailto:[email protected]]
> Sent: Tuesday, November 29, 2011 3:33 PM
> To: Heinz-Jürgen Oertel
> Cc: [email protected]; [email protected]
> Subject: Re: getting the fill level of rx and tx fifos
> 
> On 11/29/2011 12:25 PM, Heinz-Jürgen Oertel wrote:
> > Hello,
> > reading can.txt and list emails I could not  manage to get this
> information.
> > Can please someone explain if and how it is possible to get this
> information.
> > I need to know how many frames are still in the net layer and not yet
> handled by the application.
> > And as well importand, how many not yet sent CAN Frames are in the socket
> layer or the driver.
> 
> CAN messages are queued as skb's in the socket's receive and send
> buffer. What counts is the *total* size of the skb, which requires more
> space than a CAN frame, of course. For CAN I do not know of any
> interface allowing to retreive the fill level. But other protocols seem
> to have something like that, e.g. AF_PACKET provides ioctl request:
> 
> #define SIOCINQ  FIONREAD
> #define SIOCOUTQ TIOCOUTQ /* output queue size (not sent + not acked) */
> 
> > Mit freundlichen Grüßen / With best regards
> >
> > Heinz
> >
> > PS:
> > I saw in candump.c getsockopt(fd, SO_SOCKET, SO_RCVBUF,
> &rcvbuf_size,....)
> > Is used.
> > But what does the result mean?
> > I get large numbers here : 124928
> 
> It means that there is space for "124928 / sizeof(skb)" skb's ==
> messages. I will try to find out the overhead later today.
> 
> Wolfgang.

Thanks so far.
   Heinz
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to