Hi Sandro,

On 07/06/2010 04:55 PM, Sandro Anders | CarMediaLab wrote:
> Hi,
> 
> I have a question according the local loopback. At which time the
> timestamp for the sent messages is created (and the message is forwarded
> to the local clients)? Is it on calling write() inside the client code
> or when the driver calls netif_wake_queue() after successful
> transmission? 

Most drivers send the loop back message upstream when the TX done
interrupt is handled. Here is the code for the SJA1000:

http://lxr.linux.no/#linux+v2.6.34.1/drivers/net/can/sja1000/sja1000.c#L505

netif_rx() ist called in can_get_echo_skb().

Unfortunately, a few CAN controllers do not trigger TX done interrupts
and therefor the message is sent upstream earlier. Some other
controllers, like the AT91 CAN, are even able to do the local loopback
in hardware.

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

Reply via email to