[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090227.011615.104197338.davem@davemloft.net>
Date: Fri, 27 Feb 2009 01:16:15 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: jarkao2@...il.com
Cc: herbert@...dor.apana.org.au, ash@...sky.net, netdev@...r.kernel.org
Subject: Re: Kernel problem
From: Jarek Poplawski <jarkao2@...il.com>
Date: Fri, 27 Feb 2009 09:12:16 +0000
> On Fri, Feb 27, 2009 at 12:59:07AM -0800, David Miller wrote:
> > From: Jarek Poplawski <jarkao2@...il.com>
> > Date: Fri, 27 Feb 2009 08:41:10 +0000
> >
> > > Probably I miss something, but I'm not sure it's really necessary in
> > > all (non-VLAN) entry points. Of course it's an optimization to drop
> > > these things early, but there is a lot off mess with replicating
> > > various parts of netif_receive_skb() in so many places.
> > >
> > > As a matter of fact, I wonder why it can't be done in one place, e.g.
> > > netif_nit_deliver(), which was created partly for similar problems.
> >
> > I think we do need to hit all possible entry points.
> >
> > How would you be able to handle it in netif_nit_deliver()?
> > Functions like netif_receive_skb() open-code the delivery to
> > network taps, they don't actually call netif_receive_skb().
>
> netif_nit_deliver() is a place called by vlan with orig skb->dev, so
> it could be reused to check for netpoll btw. Of course, return value
> should be added etc. and maybe name changed too. It could be
> something like this:
Note there is already a function that could do this and which needs to
hit all the same RX entrypoints just like this check would.
And that is skb_bond_should_drop().
We could rename that to skb_rx_should_drop() and put the netpoll
checks there.
There is some weird conditinalization of skb_bond_should_drop()'s call
in netif_receive_skb() but that should be easy to change to suit our
needs. Perhaps by putting the calculation of the netdevice bonding
pointers into that function.
--
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