Wolfgang Grandegger wrote: > Wolfgang Grandegger wrote: >> Markus Plessing wrote: >> can_get_echo_skb() (and also netdev->stats.tx_packets++, etc.) is >> currently called in ems_usb_write_bulk_callback(). This function is >> called when the *USB* transfer has completed, I believe. But >> can_get_echo_skb() should be called when the *CAN* TX done event is >> signaled (by the SJA1000). This is important to ensure proper timing of >> locally looped back (echoed) messages. Is the problem clear now? > > The question is, if it makes sense for USB devices to support IFF_ECHO > (http://lxr.linux.no/#linux+v2.6.32/Documentation/networking/can.txt#L569) > at all. Oliver, what do you think?
The nearer we come to the potential transmission on the bus - the better. Imagine having a ISO-TP (15765-2) PDU transmission where more than 500 CAN frames can be enqueued to the CAN netdevice queue at one time. With IFF_ECHO unset, you'll see something in candump, that is far from the situation on the bus. Echo'ing the CAN frame when the frame is put into the controller (or successfully pushed onto the USB wire) is always better than using the fallback in af_can.c by not setting IFF_ECHO. Of course if we can get the "TX done" information to perform the CAN frame echo, we did the best job ever :-) Regards, Oliver _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
