Skip to content

Commit ccc5693

Browse files
authored
readme: Update logs path (p4lang#448)
* readme: remove trailing whitespaces Signed-off-by: Radostin Stoyanov <[email protected]> * readme: update path to log files Fixes: p4lang#447 Signed-off-by: Radostin Stoyanov <[email protected]>
1 parent 1fc826a commit ccc5693

File tree

9 files changed

+42
-42
lines changed

9 files changed

+42
-42
lines changed

exercises/basic/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ With IPv4 forwarding, the switch must perform the following actions
1010
for every packet: (i) update the source and destination MAC addresses,
1111
(ii) decrement the time-to-live (TTL) in the IP header, and (iii)
1212
forward the packet out the appropriate port.
13-
13+
1414
Your switch will have a single table, which the control plane will
1515
populate with static rules. Each rule will map an IP address to the
1616
MAC address and output port for the next hop. We have already defined
@@ -105,14 +105,14 @@ A complete `basic.p4` will contain the following components:
105105
2. **TODO:** Parsers for Ethernet and IPv4 that populate `ethernet_t` and `ipv4_t` fields.
106106
3. An action to drop a packet, using `mark_to_drop()`.
107107
4. **TODO:** An action (called `ipv4_forward`) that:
108-
1. Sets the egress port for the next hop.
109-
2. Updates the ethernet destination address with the address of the next hop.
110-
3. Updates the ethernet source address with the address of the switch.
108+
1. Sets the egress port for the next hop.
109+
2. Updates the ethernet destination address with the address of the next hop.
110+
3. Updates the ethernet source address with the address of the switch.
111111
4. Decrements the TTL.
112112
5. **TODO:** A control that:
113113
1. Defines a table that will read an IPv4 destination address, and
114114
invoke either `drop` or `ipv4_forward`.
115-
2. An `apply` block that applies the table.
115+
2. An `apply` block that applies the table.
116116
6. **TODO:** A deparser that selects the order
117117
in which fields inserted into the outgoing packet.
118118
7. A `package` instantiation supplied with the parser, control, and deparser.
@@ -123,7 +123,7 @@ A complete `basic.p4` will contain the following components:
123123
## Step 3: Run your solution
124124

125125
Follow the instructions from Step 1. This time, you should be able to
126-
sucessfully ping between any two hosts in the topology.
126+
sucessfully ping between any two hosts in the topology.
127127

128128
### Food for thought
129129

exercises/basic_tunnel/README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -89,47 +89,47 @@ to hosts. For this step you will need to add your forwarding rules to the
8989
1. In your shell, run:
9090
```bash
9191
make run
92-
```
92+
```
9393
This will:
9494
* compile `basic_tunnel.p4`, and
9595
* start a Mininet instance with three switches (`s1`, `s2`, `s3`) configured
9696
in a triangle, each connected to one host (`h1`, `h2`, and `h3`).
9797
* The hosts are assigned IPs of `10.0.1.1`, `10.0.2.2`, and `10.0.3.3`.
9898

9999
2. You should now see a Mininet command prompt. Open two terminals for `h1` and
100-
`h2`, respectively:
100+
`h2`, respectively:
101101
```bash
102102
mininet> xterm h1 h2
103103
```
104104
3. Each host includes a small Python-based messaging client and server. In
105-
`h2`'s xterm, start the server:
106-
```bash
105+
`h2`'s xterm, start the server:
106+
```bash
107107
./receive.py
108108
```
109109
4. First we will test without tunneling. In `h1`'s xterm, send a message to
110-
`h2`:
110+
`h2`:
111111
```bash
112112
./send.py 10.0.2.2 "P4 is cool"
113113
```
114-
The packet should be received at `h2`. If you examine the received packet
114+
The packet should be received at `h2`. If you examine the received packet
115115
you should see that is consists of an Ethernet header, an IP header, a TCP
116116
header, and the message. If you change the destination IP address (e.g. try
117117
to send to `10.0.3.3`) then the message should not be received by `h2`, and
118118
will instead be received by `h3`.
119-
5. Now we test with tunneling. In `h1`'s xterm, send a message to `h2`:
119+
5. Now we test with tunneling. In `h1`'s xterm, send a message to `h2`:
120120
```bash
121121
./send.py 10.0.2.2 "P4 is cool" --dst_id 2
122122
```
123123
The packet should be received at `h2`. If you examine the received packet you
124124
should see that is consists of an Ethernet header, a tunnel header, an IP header,
125-
a TCP header, and the message.
126-
6. In `h1`'s xterm, send a message:
125+
a TCP header, and the message.
126+
6. In `h1`'s xterm, send a message:
127127
```bash
128128
./send.py 10.0.3.3 "P4 is cool" --dst_id 2
129129
```
130130
The packet should be received at `h2`, even though that IP address is the address
131131
of `h3`. This is because the switch is no longer using the IP header for routing
132-
when the `MyTunnel` header is in the packet.
132+
when the `MyTunnel` header is in the packet.
133133
7. Type `exit` or `Ctrl-D` to leave each xterm and the Mininet command line.
134134

135135

@@ -169,7 +169,7 @@ implementation or forwarding rules.
169169

170170
3. `basic_tunnel.p4` might compile, and the control plane rules might be
171171
installed, but the switch might not process packets in the desired way. The
172-
`/tmp/p4s.<switch-name>.log` files contain detailed logs that describing how
172+
`logs/sX.log` files contain detailed logs that describing how
173173
each switch processes each packet. The output is detailed and can help pinpoint
174174
logic errors in your implementation.
175175

exercises/ecn/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ A complete `ecn.p4` will contain the following components:
103103
1. Set the egress port for the next hop.
104104
2. Update the ethernet destination address with the address of
105105
the next hop.
106-
3. Update the ethernet source address with the address of the switch.
106+
3. Update the ethernet source address with the address of the switch.
107107
4. Decrement the TTL.
108108
5. An egress control block that checks the ECN and
109109
`standard_metadata.enq_qdepth` and sets the ipv4.ecn.
@@ -165,12 +165,12 @@ There are several ways that problems might manifest:
165165
error emitted from the compiler and stop.
166166
2. `ecn.p4` compiles but does not support the control plane rules in
167167
the `sX-runtime.json` files that `make` tries to install using
168-
a Python controller. In this case, `make` will log the controller output
168+
a Python controller. In this case, `make` will log the controller output
169169
in the `logs` directory. Use these error messages to fix your `ecn.p4`
170170
implementation.
171171
3. `ecn.p4` compiles, and the control plane rules are installed, but
172172
the switch does not process packets in the desired way. The
173-
`/tmp/p4s.<switch-name>.log` files contain trace messages
173+
`logs/sX.log` files contain trace messages
174174
describing how each switch processes each packet. The output is
175175
detailed and can help pinpoint logic errors in your implementation.
176176
The `build/<switch-name>-<interface-name>.pcap` also contains the

exercises/link_monitor/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ packet such that it is able to pick up the egress link utilization
1111
at each hop and deliver it to a host for monitoring purposes.
1212

1313
Our probe packet will contain the following three header types:
14-
```
14+
```
1515
// Top-level probe header, indicates how many hops this probe
1616
// packet has traversed so far.
1717
header probe_t {
@@ -46,7 +46,7 @@ two register arrays:
4646
* `byte_cnt_reg` - counts the number of bytes transmitted out of
4747
each port since the last probe packet was transmitted out of
4848
the port.
49-
* `last_time_reg` - stores the last time that a probe packet was
49+
* `last_time_reg` - stores the last time that a probe packet was
5050
transmitted out of each port.
5151

5252
Our P4 program will be written for the V1Model architecture implemented
@@ -69,7 +69,7 @@ extend this skeleton program to fill out the fields in the probe
6969
packet.
7070

7171
Before that, let's compile and test the incomplete `link_monitor.p4`
72-
program:
72+
program:
7373

7474
1. In your shell, run:
7575
```bash
@@ -95,7 +95,7 @@ path indicated in link-monitor-topo.png.
9595
```
9696
4. In the other terminal run the `receive.py` script to start
9797
receiving and parsing the probe packets. This allows us to monitor
98-
the link utilization within the network.
98+
the link utilization within the network.
9999
```bash
100100
./receive.py
101101
```

exercises/load_balance/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Load Balancing
1+
# Load Balancing
22

33
In this exercise, you will implement a form of load balancing based on
44
a simple version of Equal-Cost Multipath Forwarding. The switch you
@@ -25,20 +25,20 @@ up a switch in Mininet to test its behavior.
2525
1. In your shell, run:
2626
```bash
2727
make
28-
```
28+
```
2929
This will:
3030
* compile `load_balance.p4`, and
3131
* start a Mininet instance with three switches (`s1`, `s2`, `s3`) configured
3232
in a triangle, each connected to one host (`h1`, `h2`, `h3`).
33-
* The hosts are assigned IPs of `10.0.1.1`, `10.0.2.2`, etc.
33+
* The hosts are assigned IPs of `10.0.1.1`, `10.0.2.2`, etc.
3434
* We use the IP address 10.0.0.1 to indicate traffic that should be
3535
load balanced between `h2` and `h3`.
3636

3737
2. You should now see a Mininet command prompt. Open three terminals
3838
for `h1`, `h2` and `h3`, respectively:
3939
```bash
4040
mininet> xterm h1 h2 h3
41-
```
41+
```
4242
3. Each host includes a small Python-based messaging client and
4343
server. In `h2` and `h3`'s XTerms, start the servers:
4444
```bash
@@ -113,7 +113,7 @@ fix your `load_balance.p4` implementation.
113113

114114
3. `load_balance.p4` compiles, and the control plane rules are
115115
installed, but the switch does not process packets in the desired way.
116-
The `/tmp/p4s.<switch-name>.log` files contain trace messages
116+
The `logs/sX.log` files contain trace messages
117117
describing how each switch processes each packet. The output is
118118
detailed and can help pinpoint logic errors in your implementation.
119119

exercises/mri/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ switch in Mininet to test its behavior.
3737
* compile `mri.p4`, and
3838
* start a Mininet instance with three switches (`s1`, `s2`, `s3`) configured
3939
in a triangle. There are 5 hosts. `h1` and `h11` are connected to `s1`.
40-
`h2` and `h22` are connected to `s2` and `h3` is connected to `s3`.
40+
`h2` and `h22` are connected to `s2` and `h3` is connected to `s3`.
4141
* The hosts are assigned IPs of `10.0.1.1`, `10.0.2.2`, etc
4242
(`10.0.<Switchid>.<hostID>`).
4343
* The control plane programs the P4 tables in each switch based on
@@ -128,16 +128,16 @@ store the switch ID and queue depth, and actions that increment the
128128
A complete `mri.p4` will contain the following components:
129129

130130
1. Header type definitions for Ethernet (`ethernet_t`), IPv4 (`ipv4_t`),
131-
IP Options (`ipv4_option_t`), MRI (`mri_t`), and Switch (`switch_t`).
131+
IP Options (`ipv4_option_t`), MRI (`mri_t`), and Switch (`switch_t`).
132132
2. Parsers for Ethernet, IPv4, IP Options, MRI, and Switch that will
133133
populate `ethernet_t`, `ipv4_t`, `ipv4_option_t`, `mri_t`, and
134134
`switch_t`.
135135
3. An action to drop a packet, using `mark_to_drop()`.
136136
4. An action (called `ipv4_forward`), which will:
137137
1. Set the egress port for the next hop.
138138
2. Update the ethernet destination address with the address of
139-
the next hop.
140-
3. Update the ethernet source address with the address of the switch.
139+
the next hop.
140+
3. Update the ethernet source address with the address of the switch.
141141
4. Decrement the TTL.
142142
5. An ingress control that:
143143
1. Defines a table that will read an IPv4 destination address, and
@@ -220,7 +220,7 @@ There are several ways that problems might manifest:
220220

221221
3. `mri.p4` compiles, and the control plane rules are installed, but
222222
the switch does not process packets in the desired way. The
223-
`/tmp/p4s.<switch-name>.log` files contain trace messages
223+
`logs/sX.log` files contain trace messages
224224
describing how each switch processes each packet. The output is
225225
detailed and can help pinpoint logic errors in your implementation.
226226
The `build/<switch-name>-<interface-name>.pcap` also contains the

exercises/multicast/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ connects four hosts as follow:
2323
h1 h2
2424
\ /
2525
\ /
26-
s1
26+
s1
2727
/ \
2828
/ \
2929
h3 h4

exercises/qos/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ missing piece.
7878
First we have to change the ipv4_t header by splitting the TOS field
7979
into DiffServ and ECN fields. Remember to update the checksum block
8080
accordingly. Then, in the egress control block we must compare the
81-
protocol in IP header with IP protocols. Based on the traffic classes
81+
protocol in IP header with IP protocols. Based on the traffic classes
8282
and priority, the `diffserv` flag will be set.
8383

8484
A complete `qos.p4` will contain the following components:
@@ -102,7 +102,7 @@ A complete `qos.p4` will contain the following components:
102102

103103
Follow the instructions from Step 1. This time, when your message from
104104
`h1` is delivered to `h2`, you should see `tos` values change from 0x1
105-
to 0xb9 for UDP and 0xb1 for TCP. It depends upon the action you choose
105+
to 0xb9 for UDP and 0xb1 for TCP. It depends upon the action you choose
106106
in Ingress processing.
107107

108108
To easily track the `tos` values you may want to redirect the output
@@ -148,7 +148,7 @@ There are several ways that problems might manifest:
148148
implementation.
149149
3. `qos.p4` compiles, and the control plane rules are installed, but
150150
the switch does not process packets in the desired way. The
151-
`/tmp/p4s.<switch-name>.log` files contain trace messages
151+
`logs/sX.log` files contain trace messages
152152
describing how each switch processes each packet. The output is
153153
detailed and can help pinpoint logic errors in your implementation.
154154
The `build/<switch-name>-<interface-name>.pcap` also contains the

exercises/source_routing/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ bring up a network in Mininet to test its behavior.
6060
5. Type a list of port numbers. say `2 3 2 2 1`. This should send the
6161
packet through `h1`, `s1`, `s2`, `s3`, `s1`, `s2`, and
6262
`h2`. However, `h2` will not receive the message.
63-
63+
6464
6. Type `q` to exit send.py and type `exit` to leave each xterm and
6565
the Mininet command line.
6666

6767
The message was not received because each switch is programmed with
6868
`source_routing.p4`, which drops all packets on arrival. You can
69-
verify this by looking at `/tmp/p4s.s1.log`. Your job is to extend
69+
verify this by looking at `logs/s1.log`. Your job is to extend
7070
the P4 code so packets are delivered to their destination.
7171

7272
## Step 2: Implement source routing
@@ -84,7 +84,7 @@ A complete `source_routing.p4` will contain the following components:
8484
`ethernet` and `srcRoutes` fields.
8585
3. An action to drop a packet, using `mark_to_drop()`.
8686
4. **TODO:** An action (called `srcRoute_nhop`), which will:
87-
1. Set the egress port for the next hop.
87+
1. Set the egress port for the next hop.
8888
2. remove the first entry of srcRoutes
8989
5. A control with an `apply` block that:
9090
1. checks the existence of source routes.
@@ -123,7 +123,7 @@ There are several ways that problems might manifest:
123123
Do you have another instance of mininet running? Did the previous
124124
run of mininet crash? if yes, check "Cleaning up Mininet" bellow.
125125
3. `source_routing.p4` compiles but the switch does not process
126-
packets in the desired way. The `/tmp/p4s.<switch-name>.log`
126+
packets in the desired way. The `logs/sX.log`
127127
files contain trace messages describing how each switch processes
128128
each packet. The output is detailed and can help pinpoint logic
129129
errors in your implementation. The

0 commit comments

Comments
 (0)