The FiveTuple example shows how to implement the standard 5-tuple network application in P4 language. A 5-tuple system is commonly used to identify key requirements for creating a secure and bidirectional TCP/IP or UDP/IP network connection between two or more machines. This application uses the source IP address and TCP/UDP port number, destination IP address and TCP/UDP port number and IP protocol to perform an exact-match based classification.
In the FiveTuple test, eight packets (contained in traffic_in.user) are input to the Vitis Networking P4 Parser. The FiveTuple.p4 file describes one BCAM table with a key width of 104 bits.
The FiveTuple example also instantiates two counter externs - PacketCounter and ByteCounter. The corresponding cli_commands.txt file contains some examples of these counter externs being read (with clear-on-read being enabled by default).