From: David Miller <davem@davemloft.net>
To: simon.kagstrom@netinsight.net
Cc: davej@redhat.com, netdev@vger.kernel.org
Subject: Re: via-velocity dma-debug warnings again. (2.6.35.2)
Date: Wed, 01 Sep 2010 13:03:33 -0700 (PDT) [thread overview]
Message-ID: <20100901.130333.148556201.davem@davemloft.net> (raw)
In-Reply-To: <20100901122059.5761802f@marrow.netinsight.se>
From: Simon Kagstrom <simon.kagstrom@netinsight.net>
Date: Wed, 1 Sep 2010 12:20:59 +0200
> I'm not really an expert on the subject, but with skb_headlen(), the size
> should be the same for pci_map_single and pci_unmap_single as far as I
> can tell.
That's not the case.
You'll have to use exactly the same formula for computing the length
as the pci_map_single() call uses, which is:
pktlen = skb_shinfo(skb)->nr_frags == 0 ?
max_t(unsigned int, skb->len, ETH_ZLEN) :
skb_headlen(skb);
Otherwise packets smaller than ETH_ZLEN will be unmapped properly
and trigger the same kind of debugging checks Dave is seeing.
next prev parent reply other threads:[~2010-09-01 20:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 1:13 via-velocity dma-debug warnings again. (2.6.35.2) Dave Jones
2010-08-31 1:19 ` Dave Jones
2010-08-31 9:10 ` Simon Kagstrom
2010-08-31 17:21 ` Dave Jones
2010-09-01 10:20 ` Simon Kagstrom
2010-09-01 20:03 ` David Miller [this message]
2010-09-01 20:05 ` Dave Jones
2010-09-01 20:34 ` David Miller
2010-09-01 20:35 ` David Miller
2010-09-01 20:37 ` David Miller
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=20100901.130333.148556201.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davej@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=simon.kagstrom@netinsight.net \
/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).