Migrating from DNA/Libzero to PF_RING ZC

Posted · Add Comment

Since the introduction of PF_RING ZC (Zero Copy), we have received many inquiries about migrating from DNA/LibZero to ZC. Said that at the moment we do not plan to discontinue DNA/LibZero, we would like to summarise the differences and ease you the migration:

  • In PF_RING 5.x (pre-ZC) there were two driver families: DNA-drivers and PF_RING-aware drivers. With the former you could operate at line-rate with DNA/LibZero, with the latter the speed was limited and you were not able to use the packets from LibZero. In ZC, there is one driver family named PF_RING-aware driver (new generation).
  • In ZC you can operate in two modes: zero-copy and one-copy mode. In zero-copy you have in essence the same model supported by DNA (packets do not pass throughout the kernel and are read by apps in zero-copy), whereas in one-copy mode the packets pass through the PF_RING kernel module, so there is one copy involved (as well as the overhead of the kernel).
  • Like in DNA, ZC PF_RING-aware drivers support zero-copy only for Intel-based interfaces. This does not mean that our technology is Intel-only, and we do not exclude to have non-Intel drivers in zero-copy in the future.
  • Contrary to DNA drivers that renamed the interfaces to dnaX, the interface name does not change (e.g. it is still eth1) so that you can do standard networking with it (ping, SSH and so on).  Supposing to use a ZC PF_RING-aware driver, at runtime you can open the interface with its name (e.g. eth1) for using it in one-copy mode, or open it as zc:eth1 for using it in zero-copy mode. Remember that if you plan to use the interface with ZC, you need to configure your huge-pages first as explained in this README.
  • With ZC you can distribute, balance, fan-out, process from VMs packets in zero-copy and thus at 10 Gbit line rate. This regardless if you have captured the packets from a ZC device, from a one-copy device, or if you have created the packet yourself.
  • If you have an old PF_RING-based application (i.e. if you did not use the libzero API at all), moving to ZC means 1) setup the huge-pages and 2) use zc:ethX instead of dnaX. That’s all.
  • If your application used the old LibZero API, either you continue using the legacy DNA drivers and the LibZero API, or you need to replace the LibZero API with the ZC API as shown in the demo applications we have created.
  • If your application is a simple receive-and-process application, you probably do not need to use the ZC API. Instead you will need it if you plan to distribute packets across applications and threads, or receive them on a host and process them on a virtual-machine.
  • As described in this README, with ZC you can decide at any time to receive packets in zero-copy and inject them on the IP stack or vice-versa.
  • Unless you are a no-profit or research institution to which we offer our commercial products free-of-charge, with ZC you need to pay us a license only if you use our zero-copy drivers. There is no license needed for the one-copy drivers, ZC API, or zero-copy to VM.