Hi,

On Mon, Oct 11, 2010 at 11:01:56AM +0200, [email protected] wrote:
> 
> Hello all,
> I would like to bring up the self-reception theme again.
> 
> In the discussion few weeks ago following ideas has been worked 
> out:
> 
> 1) Add per-message self reception flag to can_frame 
> 2) Use SO_MARK
> 3) sk_buff->sk may be used to see the message origin, but it is
>    not available in user space ...
> 
Didn't Oliver make a patch to export (3) to userspace (via candump)?
> 
> I personally like the first option a bit better, because the 
> self-reception flag is available "automatically" in the can_frame 
> itself without making any additional operations (like in case 
> of SO_MARK). Would the "can_get_echo_skb" be the right place to 
> set that flag?
I think not.

The idea behind socketCAN is that the CAN bus is virtually
extended through the linux system. (1) would deny this nature,
since _not_ all CAN chips/socketCAN apps are treated equal.
IMO, to support a 'self-reception' flag, you need a combination
of (1) & (3):
* a flag to userspace to indicate a received message was
  'self-reception'
* set the above flag (in raw.c or elsewhere) to indicate the sk_buff->sk
  matches the receiving socket.

To userspace, this differs not compared to (1), but I think
it respects the nature of socketCAN at kernel level.

Not sure if I expressed my idea clear :-)

How this would cooperate with the SO_RECV_OWN_MSGS option is unclear to me.
> 
> Regards,
> Vladislav
> 
Regards,
Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to