On a typical linux machine, how many times would packets be copied from the application layer to all the way in its journey to the network card. I am assuming the protocol being used here is TCP/IP with the standard implementation of linux kernel network stack and no custom modifications.

I am aware that TCP maintains a buffer (or a window) for congestion and flow control and the size of this window determines how many packets you can send at once before waiting for ACKs. So, at least one copy has to be performed from application's memory into the operating system's transport layer handler memory. From there on, more processing would be done as in putting on IP header and header at Ethernet layer.

I am expecting a detailed description.

  • Unfortunately, questions about hosts/servers are off-topic here. You could try to ask this question on Unix & Linux. – Ron Maupin Apr 30 at 19:36
  • This is why god invented pointers. – Ron Trunk Apr 30 at 20:07
  • "zero" (scatter-gather, COW, etc. i.e. every trick in the book to reduce copies) Linux has used a zero-copy method for many years now. – Ricky Beam May 1 at 7:12

Browse other questions tagged or ask your own question.