Hi Oliver and Wolfgang,

Sorry for late reply. 

>The normal loopback is done in software by setting IFF_ECHO and handling
>echo skb's appropriately. can_put_echo_skb() should be called in the
>xmit function and can_get_echo_skb() when the TX is done (normally when
>the TX done interrupt occurs). This seems not be implemented in your
>driver.

If I enable, can_get_echo_skb and can_pet_echo_skb, irrespective of the 
CAN_RAW_RECV_OWN_MSG, sent frames are looped back.
Is this because I set the IFF_ECHO in my driver?

Can you please make me understand this issue?

CAN_RAW_RECV_OWN_MSGS may not be frequently used. but it has to be 
supported by the CAN driver as per the can documentation section 4.1.3. 
right?

Has any body tested CAN_RAW_RECV_OWN_MSGS on linux kernel 2.6.31?or is it 
the problem with my driver. 

Thanks in advance.

Thanks & Regards,
Navaneethan P 

----- Forwarded by Navaneethan P/LNTEMSYS on 05/31/2010 09:51 AM -----

On 26.05.2010 20:13, Wolfgang Grandegger wrote:
> On 05/26/2010 07:29 PM, navanee than wrote:
>> Hi All, 
>>
>> I am using linux-2.6.31 kernel and a slightly modified version of 
mcp251x driver. 
>> If I set the socket options using CAN_RAW_RECV_OWN_MSGS, to receive the 
sent frames, it is not receiving back. 
> 
> This means that you want to receive the message sent on the *same*
> socket as well? For clarification, please read section 4.1.3 and 4.1.3:
> 
> http://lxr.linux.no/linux+*/Documentation/networking/can.txt#L448
> 
>> I enabled local echo (IFF_ECHO), in my code. 

Indeed - the relevant sections are 4.1.3,  3.2 and 6.2 ...

The IFF_ECHO is a flag for the device driver that only indicates, that the
driver is capable to perform the loopback on driver level.

Please don't mix that up with CAN_RAW_RECV_OWN_MSGS, which is a per-socket
option (you usually do not want to set :-)
> 
> Local loopback is supported by default. 

ACK.

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

Reply via email to