On 06/01/2010 06:00 PM, Navaneethan P wrote:
>> Does it work if you *unset* IFF_ECHO and do *not* use 
> can_get/put_echo_skb?
> Case 1
> ------
> I commented IFF_ECHO and also commented the can_get/put_echo_skb, now, 
> without enabling the loopback itself, the data is looped back.

OK, enabling the hardware loopback does not make sense anyway. See below.

> 
> Case 2
> ----------
> If I enable IFF_ECHO, and commented can_get/put_echo_skb, now, data is 
> looped back when the loopback is on (#ip link set can0 type can loopback 
> on) but CAN_RAW_RECV_OWN_MSGS is not working.

If you set IFF_ECHO, your driver *must* support local loopback by using
can_get/put_echo_skb. It will not work otherwise. And again, forget the
hardware loopback.

> case 3
> ----------
> If I enable  IFF_ECHO and also enabled can_get/put_echo_skb, result is 
> same as case 1. without enabling the loopback data is looped back.

Good, that's what you want, right?

The hardware loopback enabled via "ip link set can0 type can loopback"
is only useful for testing and debugging. *No* message will go out to
the wire. It is not even available on for other CAN controllers.
Therefore, you should not mix it with the software loopbacks, which
serve a different purpose.

How do you test if CAN_RAW_RECV_OWN_MSGS is working?

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

Reply via email to