This document defines types, headers, parser states, and actions for a P4 program that implements basic IPv4 and MPLS forwarding. It includes definitions for Ethernet, IPv4, MPLS, and common metadata headers. Parser states are defined to parse the headers in sequence. Actions include push/pop operations on the MPLS label stack, setting the next hop, and basic forwarding operations. Registers and counters are also defined to track state.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
68 views2 pages
p4 Cheat Sheet
This document defines types, headers, parser states, and actions for a P4 program that implements basic IPv4 and MPLS forwarding. It includes definitions for Ethernet, IPv4, MPLS, and common metadata headers. Parser states are defined to parse the headers in sequence. Actions include push/pop operations on the MPLS label stack, setting the next hop, and basic forwarding operations. Registers and counters are also defined to track state.