lkml.org 
[lkml]   [2002]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How many copies to get from NIC RX to user read()?

> So, to make sure I have this right:
>
> When the data is processed from the NIC
> tcp_rcv_established() is called in processing it
> if a user process is waiting on the socket
> iovec copy data to the user
> else
> copy it to receive_queue or backlog_queue

well, we append the skb to the tail of the queue.
this is not a copy operation. (just a few instructions).

> When the user tries read (in any way) a socket
> iovec copy from receive_queue or backlog_queue
>
>
> E.g., if the user is ready for the data, dump it straight from
> SKBs. Else,
> don't waste SKBs on a lazy (or busy) user and copy the data to a
> queue.

yep.

> If this is right, I'm happy :) If it's wrong, please correct.
>
> Thx,
> --Gus

I should add that my reading of the code is hardly
authoritative :). caveat emptor...

thanks,
Nivedita



-
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/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.047 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site