mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Questions on tcp_send
@ 2003-08-13 18:12 Steven  Mickovski
  0 siblings, 0 replies; only message in thread
From: Steven  Mickovski @ 2003-08-13 18:12 UTC (permalink / raw)
  To: linux-kernel

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-13 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-13 18:12 Questions on tcp_send Steven  Mickovski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®