Subject: Re: [PATCH 5/7] CAN: Add virtual CAN netdevice driver

From: Oliver Hartkopp <[email-masked]>
Date: Wed, 19 Sep 2007 08:26:48 +0200

Urs Thuermann wrote:
> Now I think we should consider removing the loopback code from
> can_send() and demand from each CAN driver that it *has to* implement
> this itself.
>   

I also thought about this solution, which would remove the 'loopback'
parameter in vcan.c and some loopback code in can_send().

My only concern was, that this would break with standard netdev
behaviour just to send and receive data to/from the medium.
To break with the standard behaviour might be ok here as the PF_CAN only
deals with CAN netdevs (ARPHRD_CAN) which can be seen as some closed
eco-system. But i don't know what should happen, if someone in the
future gets the idea to route CAN-frames over ethernet devices for any
reason? In this case we would have to touch every driver we'd like to
support.

IMO it makes more sense to let the 9 lines of loopback fallback code in
can_send() than to remove it.

Oliver