public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: niv@us.ibm.com
To: hurwitz@lanl.gov
Cc: linux-kernel@vger.kernel.org
Subject: Re: How many copies to get from NIC RX to user read()?
Date: Wed, 10 Jul 2002 11:52:47 -0400	[thread overview]
Message-ID: <1026316367.3d2c584f45ab0@imap.linux.ibm.com> (raw)


> I could've sworn I heard the stack was single-copy 
> on both the TX and RX sides. But, it doesn't look to 
> me like it is. Rather, it looks like there is one copy 
> in tcp_rcv_estabilshed() (via tcp_copy_to_iovec()), and a
> second copy in tcp_recvmsg() (which is called when the 
> user calls read()). Both of these copies are, I believe, 
> done by skb_copy_datagram_iovec().

tcp_recvmsg() only does the copy from the receive_queue
or the backlog queue. tcp_rcv_established() does the copy
directly into the iovec or queues it onto the receive_queue 
or backlog queue for tcp_recvmsg() to complete the work. So 
there arent two copies of the same data happening, just a 
question of one or the other function doing the work depending 
on whether there is currently a process doing a read or not..

hth,

thanks,
Nivedita



             reply	other threads:[~2002-07-10 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 15:52 niv [this message]
2002-07-10 21:15 ` How many copies to get from NIC RX to user read()? Hurwitz Justin W.
2002-07-10 21:27   ` Nivedita Singhvi
  -- strict thread matches above, loose matches on Subject: below --
2002-07-09 22:29 Hurwitz Justin W.
2002-07-09 23:11 ` Alan Cox
2002-07-10  8:29 ` Matti Aarnio
2002-07-11  2:12   ` David S. Miller

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=1026316367.3d2c584f45ab0@imap.linux.ibm.com \
    --to=niv@us.ibm.com \
    --cc=hurwitz@lanl.gov \
    --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