Subject: Re: is each frag of a skb always less than 1 page?

From: Jarek Poplawski <[email-masked]>
Date: Wed, 11 Oct 2006 09:30:04 +0200

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.