Re: tun: Use netif_receive_skb instead of netif_rx

Eric Dumazet
2010-05-20T05:36:26Z

Le jeudi 20 mai 2010 à 15:20 +1000, Herbert Xu a écrit :
> On Thu, May 20, 2010 at 07:15:07AM +0200, Eric Dumazet wrote:
> >
> > I find this very biased, sorry.
> >
> > In fact, fd passing is just fine today, if we consider that we classify
> > packets using the identity of the process *using* the fd, not the one
> > that *created* it.
> >
> > Now your patch changes this, to the reverse, and you justify the caching
> > effect on socket. Sorry, this must be too convoluted for me.
>
> I'm sorry you find this convoluted, but using the sending process's
> classid is inherently broken.
>
> Here is why: consider a TCP socket shared by two processes with
> different classids both writing data to it. Now suppose further
> that each writes just one byte, which is then coalesced into a
> single skb.
>
> Whose classid should we use on the resulting skb?

I am ok with any kind of clarification, if its really documented as
such, not as indirect effects of changes.

Right now, I am not sure classification is performed by the current
process/cpu. Our queue handling can process packets queued by other cpus
while we own the queue (__QDISC_STATE_RUNNING,) anyway.