2

As known the typical packet processing in the TCP/IP is not a zero-copy. This means that in addition to one copy Ethernet-card --> CPU-RAM, there are an additional operations of copy: of frames, packets, or parts thereof. Stack TCP/IP includes 5 layers: Physical, Datalink, Network, Transport, Application

enter image description here

  • The first two layers (Physical, Datalink) have at least 1 copy: Ethernet-card --> CPU-RAM (buffer in kernel-space).
  • The next two layers (Network, Transport) have at least 1 copy (kernel-space buffer --> user-space socket buffer) and 1 read (to calculate check-sum).
  • We do not consider the late (Application) layer, because there is always the developer himself controls the amount of copying

And how much in total operations of copy and of read occur in the processing of data in the stack TCP/IP for TCP and UDP?

At how many times TCP/IP slower than zero-copy RDMA (SDP/uDAPL), i.e. at how many times it makes more extra software?

Alex
  • 12,578
  • 15
  • 99
  • 195
  • 1
    Where did you the info "packet processing in the TCP/IP is not a zero-copy"?. Did you take a look at the SKB implementation?. – Sasi V Jan 25 '15 at 03:30
  • 1
    @Sasi True zero-copy uDAPL, SDP or VMA. For zero-copy over TCP/IP usually use UIO-IXGBE, DNA (PF_RING_DNA) or NetMap, when device NIC-buffer mapped to the user-space, because use sockets over TCP/IP is not zero-copy. Also **SKB is not zero-copy**. In short, see the comment author of the article: "Thanks for pointing this out, Yes you are right **inside the kernel its not zero copy** and even if the packet can be dma directly to skb, still it requires 1 copy to pkt_rx_ring, " http://yusufonlinux.blogspot.ru/2010/11/data-link-access-and-zero-copy.html – Alex Jan 25 '15 at 13:25
  • @Sasi To avoid any else questions about "why TCP/IP is not a zero copy" see: http://stackoverflow.com/questions/22150022/why-no-zero-copy-networking-in-linux-kernel – Alex Jan 25 '15 at 13:30
  • I think I misunderstood your question bcz of "linux-kernel" tag . in case of u-land sockets yes it is not zero copy but there must be certain system calls and flags to achieve zero-copy. – Sasi V Jan 26 '15 at 07:57
  • The OSI stack and diagram are completely irrelevant here. TCP/IP doesn't follow it, and neither in fact does anything else. The project failed, twenty years ago. Why they're still teaching it is a mystery to me. In this question, it is just fluff. – user207421 Jan 26 '15 at 23:40
  • @EJP I removed OSI from picture. – Alex Jan 28 '15 at 11:24

0 Answers0