netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: 8139cp dma-debug warning.
Date: Thu, 13 Aug 2009 15:28:40 -0400	[thread overview]
Message-ID: <20090813192840.GA12838@redhat.com> (raw)
In-Reply-To: <20090813192326.GA32435@electric-eye.fr.zoreil.com>

On Thu, Aug 13, 2009 at 09:23:26PM +0200, Francois Romieu wrote:
 
 > > Below this, we're still doing an skb_reserve(NET_IP_ALIGN) on new_skb.
 > > Although the mapping is now constantly sized, aren't we still wastefully
 > > bumping the data/tail of the skb twice ?
 > 
 > $ grep -n NET_IP_ALIGN drivers/net/8139cp.c
 > 552:		new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN);
 > 558:		skb_reserve(new_skb, NET_IP_ALIGN);
 > 1059:		skb = netdev_alloc_skb(dev, cp->rx_buf_sz + NET_IP_ALIGN);
 > 1063:		skb_reserve(skb, NET_IP_ALIGN);
 > 
 > I do not get it : netdev_alloc_skb allocates but it does not "bump" as
 > skb_reserve does (and skb_reserve does not allocate). Where would the
 > double bump come from ?
 > 
 > The mapping is constantly sized but we want the ethernet header following
 > IP data to be evenly aligned and thus the mapping to be oddly aligned.

Ah, now I get it. Thanks for the explanation :)

	Dave


      reply	other threads:[~2009-08-13 19:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 21:57 8139cp dma-debug warning Dave Jones
2009-08-12 17:13 ` Dave Jones
2009-08-13  5:20   ` David Miller
2009-08-13 13:45     ` Dave Jones
2009-08-13 19:23       ` Francois Romieu
2009-08-13 19:28         ` Dave Jones [this message]

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=20090813192840.GA12838@redhat.com \
    --to=davej@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).