Skip to content

Commit 6c20de9

Browse files
authored
Update Flowchache README (#676)
Signed-off-by: Dscano <[email protected]>
1 parent 3599b65 commit 6c20de9

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

exercises/flowcache/README.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[comment]: # (SPDX-License-Identifier: Apache-2.0)
33

4-
# Implementing a Control Plane using P4Runtime
4+
# WORK IN PROGRESS
55

66
## Introduction
77

@@ -101,6 +101,31 @@ to convert the names into the IDs that are required for P4Runtime. Any changes
101101
in the P4 program that add or rename tables, keys, or actions will need to be
102102
reflected in your table entries.
103103

104+
### Notes on the CPU port, PacketIn and PacketOut messages, and controller metadata
105+
106+
You _MUST NOT_ associate the CPU port number with an interface,
107+
i.e. it would cause problems if you added a command line option
108+
`-i 510@veth16` to the example command line above. The CPU port is
109+
special in that effectively one end is connected to the BMv2 switch
110+
on the CPU port, and the other end is always connected to the
111+
P4Runtime API server code that runs within the `simple_switch_grpc`
112+
process.
113+
114+
All packets sent by your P4 code to the CPU port go to this P4Runtime
115+
API server, are sent via a `PacketIn` message from the server to your
116+
controller (which is a P4Runtime API client) over the P4Runtime API
117+
gRPC connection, and become `PacketIn` messages to your controller
118+
program. The controller metadata header, if you have one, must be the
119+
_first_ header when the packet is sent to the CPU port by your P4
120+
program.
121+
122+
All `PacketOut` messages from your controller program go over the
123+
P4Runtime API grPC connection to the P4Runtime API server code running
124+
inside of the `simple_switch_grpc` process, and are then sent into the
125+
CPU port for your P4 program to process. The controller metadata
126+
header, if any, will always be the _first_ header of the packet as
127+
seen by your P4 parser.
128+
104129
## Step 2: Implement Tunnel Forwarding
105130

106131
The `mycontroller.py` file is a basic controller plane that does the following:

0 commit comments

Comments
 (0)