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

2006-10-11 Thread Jarek Poplawski
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

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

2006-10-10 Thread David Miller
From: Ronghua Zhang [EMAIL PROTECTED] Date: Tue, 10 Oct 2006 15:37:04 -0700 From the code of tcp_sendmsg, it seems to me that each frag is at most one page. Is it a guaranteed property or the driver should not assume it? Thanks This assumption basically already exists everywhere since all

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

2006-10-10 Thread Ronghua Zhang
From the code of tcp_sendmsg, it seems to me that each frag is at most one page. Is it a guaranteed property or the driver should not assume it? Thanks Ronghua - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at

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

2006-10-10 Thread Ronghua Zhang
Thank you for your explanation, David. But pci_map_page should work fine if we have multiple contiguous pages in one frag that are allocated using alloc_pages, ie: frag-page = alloc_pages(GFP_KERNEL, 2); // get 4 pages frag-page_offset = 0; frag-size = 4 * PAGE_SIZE; dma_addr =

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

2006-10-10 Thread David Miller
From: Ronghua Zhang [EMAIL PROTECTED] Date: Tue, 10 Oct 2006 16:26:58 -0700 Thank you for your explanation, David. But pci_map_page should work fine if we have multiple contiguous pages in one frag that are allocated using alloc_pages, ie: frag-page = alloc_pages(GFP_KERNEL, 2); // get