  Programmable data planes allow users to define their own data plane
algorithms for network devices including appropriate data plane application
programming interfaces (APIs) which may be leveraged by user-defined
software-defined networking (SDN) control. This offers great flexibility for
network customization, be it for specialized, commercial appliances, e.g., in
5G or data center networks, or for rapid prototyping in industrial and academic
research. Programming protocol-independent packet processors (P4) has emerged
as the currently most widespread abstraction, programming language, and concept
for data plane programming. It is developed and standardized by an open
community, and it is supported by various software and hardware platforms. In
the first part of this paper we give a tutorial of data plane programming
models, the P4 programming language, architectures, compilers, targets, and
data plane APIs. We also consider research efforts to advance P4 technology. In
the second part, we categorize a large body of literature of P4-based applied
research into different research domains, summarize the contributions of these
papers, and extract prototypes, target platforms, and source code availability.
For each research domain, we analyze how the reviewed works benefit from P4's
core features. Finally, we discuss potential next steps based on our findings.
