This example demonstrates the most basic pipeline in the DOCA target architecture. It consists of:
-
Match on L2 source MAC address
-
Action to either forward to a P4 port ID, drop, or no action
Sample Code
The following #includes are required for every DPL program. They define the DOCA target architecture. In particular, they contain things like the default DOCA parser, default headers struct, etc. Note that the symbol names are prefixed with "nv_" and are reserved for NVIDIA DOCA TA usage.
|
|
The DOCA TA features a single control, which requires a headers struct and standard metadata. User metadata and packet out metadata, defined by the user, are optional.
|
|
Finally, the main package must be instantiated:
|
|
See the full DPL example hello_packet.p4
Last updated: