Lines Matching refs:frags
292 int frags = nfrags; in fill_packet() local
295 if (frags > MAX_SKB_FRAGS) in fill_packet()
296 frags = MAX_SKB_FRAGS; in fill_packet()
297 if (datalen > frags*PAGE_SIZE) { in fill_packet()
298 skb_put(skb, datalen-frags*PAGE_SIZE); in fill_packet()
299 datalen = frags*PAGE_SIZE; in fill_packet()
305 skb_shinfo(skb)->frags[i].page = page; in fill_packet()
306 skb_shinfo(skb)->frags[i].page_offset = 0; in fill_packet()
307 skb_shinfo(skb)->frags[i].size = (datalen < PAGE_SIZE ? datalen : PAGE_SIZE); in fill_packet()
308 datalen -= skb_shinfo(skb)->frags[i].size; in fill_packet()
309 skb->len += skb_shinfo(skb)->frags[i].size; in fill_packet()
310 skb->data_len += skb_shinfo(skb)->frags[i].size; in fill_packet()
315 while (i < frags) { in fill_packet()
321 rem = skb_shinfo(skb)->frags[i-1].size/2; in fill_packet()
325 skb_shinfo(skb)->frags[i-1].size -= rem; in fill_packet()
327 skb_shinfo(skb)->frags[i] = skb_shinfo(skb)->frags[i-1]; in fill_packet()
328 get_page(skb_shinfo(skb)->frags[i].page); in fill_packet()
329 skb_shinfo(skb)->frags[i].page = skb_shinfo(skb)->frags[i-1].page; in fill_packet()
330 skb_shinfo(skb)->frags[i].page_offset += skb_shinfo(skb)->frags[i-1].size; in fill_packet()
331 skb_shinfo(skb)->frags[i].size = rem; in fill_packet()