1- # Implementing a Control Plane using P4 Runtime
1+ # Implementing a Control Plane using P4Runtime
22
33## Introduction
44
5- In this exercise, we will be using P4 Runtime to send flow entries to the
5+ In this exercise, we will be using P4Runtime to send flow entries to the
66switch instead of using the switch's CLI. We will be building on the same P4
77program that you used in the [ basic_tunnel] ( ../basic_tunnel ) exercise. The
88P4 program has been renamed to ` advanced_tunnel.py ` and has been augmented
@@ -94,14 +94,14 @@ table entries like we have in the previous exercises.
9494switch pipeline and control plane. This interface is defined in the
9595` advanced_tunnel.p4info ` file. The table entries that you build in ` mycontroller.py `
9696refer to specific tables, keys, and actions by name, and we use a P4Info helper
97- to convert the names into the IDs that are required for P4 Runtime . Any changes
97+ to convert the names into the IDs that are required for P4Runtime . Any changes
9898in the P4 program that add or rename tables, keys, or actions will need to be
9999reflected in your table entries.
100100
101101## Step 2: Implement Tunnel Forwarding
102102
103103The ` mycontroller.py ` file is a basic controller plane that does the following:
104- 1 . Establishes a gRPC connection to the switches for the P4 Runtime service.
104+ 1 . Establishes a gRPC connection to the switches for the P4Runtime service.
1051052 . Pushes the P4 program to each switch.
1061063 . Writes tunnel ingress and tunnel egress rules for two tunnels between h1 and h2.
1071074 . Reads tunnel ingress and egress counters every 2 seconds.
@@ -119,12 +119,12 @@ the `p4runtime_lib` directory. Here is a summary of each of the files in the dir
119119- ` helper.py `
120120 - Contains the ` P4InfoHelper ` class which is used to parse the ` p4info ` files.
121121 - Provides translation methods from entity name to and from ID number.
122- - Builds P4 program-dependent sections of P4 Runtime table entries.
122+ - Builds P4 program-dependent sections of P4Runtime table entries.
123123- ` switch.py `
124124 - Contains the ` SwitchConnection ` class which grabs the gRPC client stub, and
125125 establishes connections to the switches.
126- - Provides helper methods that construct the P4 Runtime protocol buffer messages
127- and makes the P4 Runtime gRPC service calls.
126+ - Provides helper methods that construct the P4Runtime protocol buffer messages
127+ and makes the P4Runtime gRPC service calls.
128128- ` bmv2.py `
129129 - Contains ` Bmv2SwitchConnection ` which extends ` SwitchConnections ` and provides
130130 the BMv2-specific device payload to load the P4 program.
@@ -161,8 +161,8 @@ need to change it for a more realistic network?
161161Hint: The default TTL is 64 for packets sent by the hosts.
162162
163163If you are interested, you can find the protocol buffer and gRPC definitions here:
164- - [ P4 Runtime ] ( https://github.com/p4lang/PI/blob/master/proto/p4/p4runtime.proto )
165- - [ P4 Info ] ( https://github.com/p4lang/PI/blob/master/proto/p4/config/p4info.proto )
164+ - [ P4Runtime ] ( https://github.com/p4lang/PI/blob/master/proto/p4/p4runtime.proto )
165+ - [ P4Info ] ( https://github.com/p4lang/PI/blob/master/proto/p4/config/p4info.proto )
166166
167167#### Cleaning up Mininet
168168
0 commit comments