Copyediting. (#93)

This commit is contained in:
Jed Liu 2017-11-13 18:19:29 -05:00 committed by Robert Soule
parent 12fc3ab9ac
commit 7a3fd6bc12
8 changed files with 18 additions and 18 deletions

View File

@ -56,7 +56,7 @@ struct headers {
*********************** P A R S E R ***********************************
*************************************************************************/
// TODO: Update the parser to parse the myTunel header as well
// TODO: Update the parser to parse the myTunnel header as well
parser MyParser(packet_in packet,
out headers hdr,
inout metadata meta,

View File

@ -45,7 +45,7 @@
*/
/*
* Standard ethernet header
* Standard Ethernet header
*/
header ethernet_t {
bit<48> dstAddr;
@ -55,7 +55,7 @@ header ethernet_t {
/*
* This is a custom protocol header for the calculator. We'll use
* ethertype 0x1234 for is (see parser)
* etherType 0x1234 for it (see parser)
*/
const bit<16> P4CALC_ETYPE = 0x1234;
const bit<8> P4CALC_P = 0x50; // 'P'
@ -76,7 +76,7 @@ header p4calc_t {
}
/*
* All headers, used in the program needs to be assembed into a single struct.
* All headers, used in the program needs to be assembled into a single struct.
* We only need to declare the type, but there is no need to instantiate it,
* because it is done "by the architecture", i.e. outside of P4 functions
*/
@ -86,7 +86,7 @@ struct headers {
}
/*
* All metadata, globally used in the program, also needs to be assembed
* All metadata, globally used in the program, also needs to be assembled
* into a single struct. As in the case of the headers, we only need to
* declare the type, but there is no need to instantiate it,
* because it is done "by the architecture", i.e. outside of P4 functions

View File

@ -3,7 +3,7 @@
## Introduction
The objective of this tutorial is to extend basic L3 forwarding with
an implementation of Explict Congestion Notification (ECN).
an implementation of Explicit Congestion Notification (ECN).
ECN allows end-to-end notification of network congestion without
dropping packets. If an end-host supports ECN, it puts the value of 1
@ -110,7 +110,7 @@ A complete `ecn.p4` will contain the following components:
6. A deparser that selects the order in which fields inserted into the outgoing
packet.
7. A `package` instantiation supplied with the parser, control,
checksum verfiication and recomputation and deparser.
checksum verification and recomputation and deparser.
## Step 3: Run your solution
@ -124,7 +124,7 @@ of `h2` to a file by running the following for `h2`
```bash
./receive.py > h2.log
```
and just print the `tos` values `grep tos build/h2.log` in a separate window
and just print the `tos` values `grep tos h2.log` in a separate window
```
tos = 0x1
tos = 0x1
@ -166,7 +166,7 @@ There are several ways that problems might manifest:
2. `ecn.p4` compiles but does not support the control plane rules in
the `sX-commands.txt` files that `make` tries to install using
the BMv2 CLI. In this case, `make` will log the CLI tool output
in th `logs` directory. Use these error messages to fix your `ecn.p4`
in the `logs` directory. Use these error messages to fix your `ecn.p4`
implementation.
3. `ecn.p4` compiles, and the control plane rules are installed, but
the switch does not process packets in the desired way. The

View File

@ -1,7 +1,7 @@
# Load Balancing
In this exercise, you will implement a form of load balancing based on
a single version of Equal-Cost Multipath Forwarding. The switch you
a simple version of Equal-Cost Multipath Forwarding. The switch you
will implement will use two tables to forward packets to one of two
destination hosts at random. The first table will use a hash function
(applied to a 5-tuple consisting of the source and destination

View File

@ -74,7 +74,7 @@ switch in Mininet to test its behavior.
The message "P4 is cool" should be received in `h2`'s xterm,
6. In `h11`'s xterm, start iperf client sending for 15 seconds
```bash
h11 iperf -c 10.0.2.22 -t 15 -u
iperf -c 10.0.2.22 -t 15 -u
```
7. At `h2`, the MRI header has no hop info (`count=0`)
8. type `exit` to close each xterm window
@ -155,7 +155,7 @@ populate `ethernet_t`, `ipv4_t`, `ipv4_option_t`, `mri_t`, and
## Step 3: Run your solution
Follow the instructions from Step 1. This time, when your message
from `h1` is delivered to `h2`, you should see the seqeunce of
from `h1` is delivered to `h2`, you should see the sequence of
switches through which the packet traveled plus the corresponding
queue depths. The expected output will look like the following,
which shows the MRI header, with a `count` of 2, and switch ids

View File

@ -125,7 +125,7 @@ parser MyParser(packet_in packet,
* - Set meta.parser_metadata.remaining to hdr.mri.count
* - Select on the value of meta.parser_metadata.remaining
* - If the value is equal to 0, accept.
* - Otherwise, transition to parse_swid.
* - Otherwise, transition to parse_swtrace.
*/
transition accept;
}
@ -203,11 +203,11 @@ control MyEgress(inout headers hdr,
* TODO: add logic to:
- Increment hdr.mri.count by 1
- Add a new swtrace header by calling push_front(1) on hdr.swtraces.
- Set hdr.swtraces[0].swid to the id paremeter
- Set hdr.swtraces[0].swid to the id parameter
- Set hdr.swtraces[0].qdepth to (qdepth_t)standard_metadata.deq_qdepth
- Incremement hdr.ipv4.ihl by 2
- Increment hdr.ipv4.ihl by 2
- Increment hdr.ipv4.totalLen by 8
- Incrememtn hdr.ipv4_option.optionLength by 8
- Increment hdr.ipv4_option.optionLength by 8
*/
}

View File

@ -119,7 +119,7 @@ the `p4runtime_lib` directory. Here is a summary of each of the files in the dir
- `helper.py`
- Contains the `P4InfoHelper` class which is used to parse the `p4info` files.
- Provides translation methods from entity name to and from ID number.
- Builds P4 program-dependendent sections of P4 Runtime table entries.
- Builds P4 program-dependent sections of P4 Runtime table entries.
- `switch.py`
- Contains the `SwitchConnection` class which grabs the gRPC client stub, and
establishes connections to the switches.

View File

@ -87,7 +87,7 @@ A complete `source_routing.p4` will contain the following components:
1. Set the egress port for the next hop.
2. remove the first entry of srcRoutes
5. A control with an `apply` block that:
1. checks the existance of source routes.
1. checks the existence of source routes.
2. **TODO:** if statement to change etherent.etherType if it is the last hop
3. **TODO:** call srcRoute_nhop action
6. A deparser that selects the order in which fields inserted into the outgoing