A Method for Comparing OpenFlow and P4

OpenFlow has had a significant impact on computer networking and ushered in the age of Software Defined Networking (SDN). Now the P4 programming language promises to drive this innovation even further by allowing the unparalleled customisability of network devices. Even though they have different capabilities and goals, there is still an overlap in functionality between OpenFlow and P4. This overlap, predominately in the way packets are processed, has not been compared and therefore remains a question that could impact operators considering these two implementations. The primary reason for the lack of comparison data lies in the physical deployment model of these technologies. The inability to isolate pipeline processing and perform a comparison based on identical functionality, without the external influence from auxiliary functions, has made this type of measurement difficult. In this paper, we present such a comparison using the Zodiac FX a hybrid hardware/software Ethernet switch with a dedicated open-source firmware capable of running both implementations equally. By developing a P4 compiler backend capable of generating an equivalent packet processing pipeline for the Zodiac FX, we have been able to perform a direct like-for-like comparison of the performance and efficiency of these two approaches. This comparison highlights the similarity in performance of the two approaches when implementing the equivalent functionality on the same hardware.