Skip to content

Commit ad259b5

Browse files
authored
Added more details about packet_in and packet_out headers in the flowcache README. (#704)
Signed-off-by: Dscano <d.scano89@gmail.com>
1 parent 85fe156 commit ad259b5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

exercises/flowcache/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ necessary to forward traffic between hosts.
2323

2424
The starter code for this assignment is in files called `flowcache.p4` and `mycontroller.py`. Your job will be to finalize the P4 program to properly implement the `PacketIn` and `PacketOut` idle timeout mechanismes.
2525

26-
Let's first compile the new P4 program, start the network, and use `mycontroller.py` to install the flowcache pipeline in the data plane.
26+
First, you need to define the fields in the `packet_in` and `packet_out` headers; otherwise, you’ll get compilation errors. The `packet_in` header should contain three fields: `input_port`, `punt_reason`, and `opcode`. The `packet_out` header should include: `opcode`, `reserved1`, and `operand0` (which represents the egress port in this case). You can see how these header fields are configured and used in the P4 code. More details about `packet_in` and `packet_out` are available in Section 6.4.6 of the [P4Runtime Spec](https://p4.org/specifications/).
27+
28+
After defining the `packet_in` and `packet_out` headers, compile the new P4 program, start the network, and use `mycontroller.py` to install the flowcache pipeline in the data plane.
2729

2830
1. In your shell, run:
2931
```bash

0 commit comments

Comments
 (0)