On Sun, Aug 06, 2006 at 11:23:39PM -0700, David Miller ([EMAIL PROTECTED]) 
wrote:
> > +   if ((1UL << order) > size + sizeof(void *) + sizeof(struct 
> > skb_shared_info)) {
> 
> get_order() returns a PAGE_SIZE order not a byte one.  So this test
> here at the end is incorrect.  It should probably be something
> like "if ((PAGE_SIZE << order) > ..."
> 
> I don't know if I want to eat an entire extra allocation for every SKB
> just to handle broken e1000 cards that can't be bothered to support
> non-power-of-2 receive buffer sizes and a proper MTU setting.
> 
> I guess we might have to, but this is extremely unfortunate. :-/

I have even better idea - create alloc_skb_aligned() for those who
knows in advance, that it's size is always aligned to power of 2, so
additional skb_shared_info will 100% require higher order allocation.
Then e1000 can use that instead of usual alloc_skb().

-- 
        Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to