netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: Ronghua Zhang <ronghuazhang@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: is each frag of a skb always less than 1 page?
Date: Wed, 11 Oct 2006 09:30:04 +0200	[thread overview]
Message-ID: <20061011073004.GA1671@ff.dom.local> (raw)
In-Reply-To: <ba020e9f0610101626rf20ce7bg1c214f91f05fb975@mail.gmail.com>

On 11-10-2006 01:26, Ronghua Zhang wrote:
...
> The reason I asked this is that I saw the following code in forthdeth 
> drvier:
> 
> #define NV_TX2_TSO_MAX_SHIFT) 14
> /* add fragments to entries count */
> for (i = 0; i < fragments; i++) {
>    entries += (skb_shinfo(skb)->frags[i].size >> NV_TX2_TSO_MAX_SHIFT) +
>                    ((skb_shinfo(skb)->frags[i].size &
> (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
> }
> 
> This looks unnecessary if each frag is guaranteed not to span pages.

Even if PAGE_SIZE > NV_TX2_TSO_MAX_SIZE?

Jarek P.

      parent reply	other threads:[~2006-10-11  7:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10 22:37 is each frag of a skb always less than 1 page? Ronghua Zhang
2006-10-10 22:47 ` David Miller
2006-10-10 23:26   ` Ronghua Zhang
2006-10-11  2:10     ` David Miller
2006-10-11  7:30     ` Jarek Poplawski [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=20061011073004.GA1671@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ronghuazhang@gmail.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).