Re: How many copies to get from NIC RX to user read()?

From: Nivedita Singhvi (niv@us.ibm.com)
Date: Wed Jul 10 2002 - 16:27:01 EST


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



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:18 EST