All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC] avoid unnecessary alignement overhead in skb->data allocation.
Date: Mon, 7 Aug 2006 10:30:57 +0400	[thread overview]
Message-ID: <20060807063054.GA11483@2ka.mipt.ru> (raw)
In-Reply-To: <20060806.232339.30184217.davem@davemloft.net>

On Sun, Aug 06, 2006 at 11:23:39PM -0700, David Miller (davem@davemloft.net) 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

  reply	other threads:[~2006-08-07  6:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07  6:01 [RFC] avoid unnecessary alignement overhead in skb->data allocation Evgeniy Polyakov
2006-08-07  6:23 ` David Miller
2006-08-07  6:30   ` Evgeniy Polyakov [this message]
2006-08-07  7:17   ` Herbert Xu
2006-08-07  7:24     ` Evgeniy Polyakov
2006-08-07  7:28       ` Herbert Xu
2006-08-07  7:31         ` Evgeniy Polyakov
2006-08-07  7:39           ` Herbert Xu
2006-08-08  0:09             ` Jesse Brandeburg
2006-08-08  0:41               ` David Miller
2006-08-08  5:24               ` Evgeniy Polyakov
2006-08-08  5:41                 ` Herbert Xu
2006-08-08  5:55                   ` Evgeniy Polyakov
2006-08-07  6:29 ` Herbert Xu
2006-08-07  6:36   ` Evgeniy Polyakov
2006-08-07  6:42     ` Herbert Xu
2006-08-07  8:05 ` Eric Dumazet
2006-08-07  8:14   ` Evgeniy Polyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060807063054.GA11483@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.