Messages in this thread | | | Date | 13 Aug 2003 18:12:51 -0000 | From | "Steven Mickovski" <> | Subject | Questions on tcp_send |
| |
hello, i have some problems understanding the tcp_send routine in net/ipv4/tcp.c:
1) if (skb_tailroom(skb) > 0) { /* We have some space in skb head. Superb! */ ... ... } else { int merge = 0; int i = skb_shinfo(skb)->nr_frags; struct page *page = TCP_PAGE(sk); int off = TCP_OFF(sk); if (can_coalesce(skb, i, page, off) && off != PAGE_SIZE) {merge=1;}
My understanding of the skb_tailroom condition is that it's for the case when the previous sk_buff can accomodate the new buffer to be sent, and it checks if this can be done in the space allocated to it, or if it should stuff it into the page where the space is allocated.
Is this correct?
2) If so, then why does "can_coalesce" check if: (page == frag->page && off == frag->page_offset+frag->size) to decide if the data can be merged with that in the previous sk_buff?
Thanks in advance! Help appreciated...
Steve ___________________________________________________ Meet your old school or college friends from 1 Million + database... Click here to reunite www.batchmates.com/rediff.asp
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |