[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <465DD755.4070702@trash.net>
Date: Wed, 30 May 2007 21:58:13 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Oliver Hartkopp <oliver@...tkopp.net>
CC: Urs Thuermann <urs@...ogud.escape.de>,
David Miller <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
Oliver Hartkopp <oliver.hartkopp@...kswagen.de>,
Urs Thuermann <urs.thuermann@...kswagen.de>,
netdev@...r.kernel.org
Subject: Re: [patch 5/7] CAN: Add virtual CAN netdevice driver
Oliver Hartkopp wrote:
> Patrick McHardy wrote:
>
>>skb->sk should work here as well since you detect these frames
>>before queueing to the receiving socket.
>>
>
>
> Hm - this would indeed be much nicer than using skb->cb.
>
> I think we just had some concerns to use skb->sk for our own
> functionality, as it might be used and dereferenced by other layers
> between the socket and the network driver ... so setting skb->sk to NULL
> (to indicate 'no loopback') smells bad if you don't really know who ever
> dereferences skb->sk.
Indeed, that will break things.
> Btw. it's really worth to look at it again. I just had the idea to
> access the loopback flag via skb->sk->opt->loopback (argpfl!) on the TX
> path and skb->sk on the RX path. This would avoid skb->sk to be set to
> NULL but need to have this loopback flag to be implemented in each CAN
> socket opt.
Yes, thats what I wanted to suggest. You should even be able
to use skb->sk->opt->loopback on the receive path before you
queue the packet to the socket.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists