mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Steven  Mickovski" <knet31@rediffmail.com>
To: linux-kernel@vger.kernel.org
Subject: Questions on tcp_send
Date: 13 Aug 2003 18:12:51 -0000	[thread overview]
Message-ID: <20030813181251.10860.qmail@webmail25.rediffmail.com> (raw)

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



                 reply	other threads:[~2003-08-13 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030813181251.10860.qmail@webmail25.rediffmail.com \
    --to=knet31@rediffmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®