From 7a3fd6bc12f6a19fe15921cdb4d48b04605c9886 Mon Sep 17 00:00:00 2001 From: Jed Liu Date: Mon, 13 Nov 2017 18:19:29 -0500 Subject: [PATCH] Copyediting. (#93) --- P4D2_2017_Fall/exercises/basic_tunnel/basic_tunnel.p4 | 2 +- P4D2_2017_Fall/exercises/calc/calc.p4 | 8 ++++---- P4D2_2017_Fall/exercises/ecn/README.md | 8 ++++---- P4D2_2017_Fall/exercises/load_balance/README.md | 2 +- P4D2_2017_Fall/exercises/mri/README.md | 4 ++-- P4D2_2017_Fall/exercises/mri/mri.p4 | 8 ++++---- P4D2_2017_Fall/exercises/p4runtime/README.md | 2 +- P4D2_2017_Fall/exercises/source_routing/README.md | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/P4D2_2017_Fall/exercises/basic_tunnel/basic_tunnel.p4 b/P4D2_2017_Fall/exercises/basic_tunnel/basic_tunnel.p4 index 68cba8d..156c077 100644 --- a/P4D2_2017_Fall/exercises/basic_tunnel/basic_tunnel.p4 +++ b/P4D2_2017_Fall/exercises/basic_tunnel/basic_tunnel.p4 @@ -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, diff --git a/P4D2_2017_Fall/exercises/calc/calc.p4 b/P4D2_2017_Fall/exercises/calc/calc.p4 index b4ed4b4..557cbc5 100644 --- a/P4D2_2017_Fall/exercises/calc/calc.p4 +++ b/P4D2_2017_Fall/exercises/calc/calc.p4 @@ -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 diff --git a/P4D2_2017_Fall/exercises/ecn/README.md b/P4D2_2017_Fall/exercises/ecn/README.md index 2ce8582..eb30bb6 100644 --- a/P4D2_2017_Fall/exercises/ecn/README.md +++ b/P4D2_2017_Fall/exercises/ecn/README.md @@ -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 diff --git a/P4D2_2017_Fall/exercises/load_balance/README.md b/P4D2_2017_Fall/exercises/load_balance/README.md index f31e99e..69ff639 100644 --- a/P4D2_2017_Fall/exercises/load_balance/README.md +++ b/P4D2_2017_Fall/exercises/load_balance/README.md @@ -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 diff --git a/P4D2_2017_Fall/exercises/mri/README.md b/P4D2_2017_Fall/exercises/mri/README.md index 2f5b9d8..c389110 100644 --- a/P4D2_2017_Fall/exercises/mri/README.md +++ b/P4D2_2017_Fall/exercises/mri/README.md @@ -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 diff --git a/P4D2_2017_Fall/exercises/mri/mri.p4 b/P4D2_2017_Fall/exercises/mri/mri.p4 index 2b29c54..15f5c3b 100644 --- a/P4D2_2017_Fall/exercises/mri/mri.p4 +++ b/P4D2_2017_Fall/exercises/mri/mri.p4 @@ -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 */ } diff --git a/P4D2_2017_Fall/exercises/p4runtime/README.md b/P4D2_2017_Fall/exercises/p4runtime/README.md index 3425387..9cc60e1 100644 --- a/P4D2_2017_Fall/exercises/p4runtime/README.md +++ b/P4D2_2017_Fall/exercises/p4runtime/README.md @@ -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. diff --git a/P4D2_2017_Fall/exercises/source_routing/README.md b/P4D2_2017_Fall/exercises/source_routing/README.md index 8253d25..7b5f42a 100644 --- a/P4D2_2017_Fall/exercises/source_routing/README.md +++ b/P4D2_2017_Fall/exercises/source_routing/README.md @@ -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