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

From: Patrick McHardy <[email-masked]>
Date: Mon, 04 Jun 2007 13:53:59 +0200

Oliver Hartkopp wrote:
> 1. The needed skb->sk is preserved for the rx path (the way 'up').

I was thinking about this, don't CAN frames include the identity
of the sender? That would be the easiest way to determine whether
the frame needs to be delivered.

> 2. The loopback indication is done by using the unused skb->protocol in
> the tx path.

Actually its not unused, it needs to be set on TX frames once the
packet leaves the protocol specific code. Its used for example by
packet sockets (sk_run_filter), qdisc classification, neighbour
resolution, gso segmentation, ...

I don't get why you can't directly check the socket option on the
TX path.