Fix links in markdown files

This commit is contained in:
Antonin Bas 2017-06-01 11:29:02 -07:00
parent 6b546481a5
commit 30ecf6fc07
10 changed files with 68 additions and 70 deletions

View File

@ -2,8 +2,8 @@
P4 language tutorials
**Make sure that you edit [env.sh](env.sh) to point to your local copy of
[bmv2] (https://github.com/p4lang/behavioral-model) and [p4c-bm]
(https://github.com/p4lang/p4c-bm). You may want to follow the instructions
[here]
(https://github.com/p4lang/tutorials/tree/master/SIGCOMM_2015#obtaining-required-software)
[bmv2](https://github.com/p4lang/behavioral-model) and
[p4c-bm](https://github.com/p4lang/p4c-bm). You may want to follow the
instructions
[here](https://github.com/p4lang/tutorials/tree/master/SIGCOMM_2015#obtaining-required-software)
to make sure that your environment is setup correctly.**

View File

@ -30,8 +30,8 @@ This repository include 2 exercises we presented at SIGCOMM: *Source Routing*
and *Flowlet Switching*. Both exercises assume that you possess basic networking
knowledge and some familiarity with the P4 language. Please take a look at the
[P4 language spec](http://p4.org/spec/) and at the example `simple_router`
target [on p4lang]
(https://github.com/p4lang/p4factory/tree/master/targets/simple_router/p4src).
target [on
p4lang](https://github.com/p4lang/p4factory/tree/master/targets/simple_router/p4src).
*Source Routing* asks you to write a P4 program from scratch to implement a
custom source routing protocol. *Flowlet Switching* is more difficult: you will
start from a simple P4 routing program (with ECMP) and implement a version of
@ -95,9 +95,8 @@ P4. We will call this protocol EasyRoute. You will be designing the P4 program
from scratch, although you are of course welcome to reuse code from other
targets in p4lang. To test your implementation, you will create a Mininet
network and send messages between hosts. We provide a skeleton program:
[source_routing/p4src/source_routing.p4]
(source_routing/p4src/source_routing.p4), you need to implement the parser and
the ingress control flow.
[source_routing/p4src/source_routing.p4](source_routing/p4src/source_routing.p4),
you need to implement the parser and the ingress control flow.
### Description of the EasyRoute protocol
@ -187,8 +186,7 @@ is used to add an entry to a table
You can look at example commands in the `flowlet_switching` directory:
[flowlet_switching/commands.txt](flowlet_switching/commands.txt) and match them
with the corresponding P4 tables
[flowlet_switching/p4src/simple_router.p4]
(flowlet_switching/p4src/simple_router.p4).
[flowlet_switching/p4src/simple_router.p4](flowlet_switching/p4src/simple_router.p4).
### Testing your code
@ -304,11 +302,11 @@ destination of our test packet.
### What you need to do
1. Update the provided [P4 program] (flowlet_switching/p4src/simple_router.p4)
to perform TCP flowlet switching. In our case, it requires adding 2 tables to
the ingress pipeline. Remember that you can omit the 'reads' attribute for a
table. In this case, providing you configure the default action of the table
correctly, the default action will always be performed.
1. Update the provided [P4 program](flowlet_switching/p4src/simple_router.p4) to
perform TCP flowlet switching. In our case, it requires adding 2 tables to the
ingress pipeline. Remember that you can omit the 'reads' attribute for a table.
In this case, providing you configure the default action of the table correctly,
the default action will always be performed.
2. Update [commands.txt](flowlet_switching/commands.txt) to configure your new
tables.

View File

@ -70,12 +70,12 @@ entries.
We provide a small demo to let you test the program. It consists of the
following scripts:
- [run_demo.sh](run_demo.sh): compiles the P4 program, starts the switch,
configures the data plane by running the CLI [commands]
(commands.txt), and starts the mininet console.
- [receive.py] (receive.py): listens for Axon formatted packets. This
command is intended to be run by a mininet host.
- [send.py] (send.py): sends Axon formatted packets from one host to
another. This command is intended to be run by a mininet host.
configures the data plane by running the CLI [commands](commands.txt), and
starts the mininet console.
- [receive.py](receive.py): listens for Axon formatted packets. This command is
intended to be run by a mininet host.
- [send.py](send.py): sends Axon formatted packets from one host to another.
This command is intended to be run by a mininet host.
To run the demo:
./run_demo.sh will compile your code and create the Mininet network described

View File

@ -3,8 +3,8 @@
## Description
This program illustrates as simply as possible how to use meters in P4 with
bmv2. bmv2 uses two-rate three-color meters as described [here]
(https://tools.ietf.org/html/rfc2698).
bmv2. bmv2 uses two-rate three-color meters as described
[here](https://tools.ietf.org/html/rfc2698).
For each incoming packet the `m_table` table is applied and the appropriate
meter (based on the packet's source MAC address) is executed. Based on the
@ -22,11 +22,10 @@ this example, you will see that we configure the table to drop all the packets
for which the color is not *GREEN* (i.e. all packets for which `meta.meter_tag`
is not `0`).
The [commands.txt] (commands.txt) file also gives you the meter
configuration. In this case, the first rate is 0.5 packets per second, with a
burst size of 1, and the second rate is 10 packets per second, with a burst size
of 1 also. Feel free to play with the numbers, but these play nicely with the
demonstration below.
The [commands.txt](commands.txt) file also gives you the meter configuration. In
this case, the first rate is 0.5 packets per second, with a burst size of 1, and
the second rate is 10 packets per second, with a burst size of 1 also. Feel free
to play with the numbers, but these play nicely with the demonstration below.
Note that we use an `indirect` meter array, because `direct` ones are not
supported yet by bmv2.

View File

@ -3,8 +3,8 @@
## Description
This program implements a very basic full-cone NAT for TCP traffic (over
IPv4). According to [Wikipedia]
(https://en.wikipedia.org/wiki/Network_address_translation#Methods_of_translation),
IPv4). According to
[Wikipedia](https://en.wikipedia.org/wiki/Network_address_translation#Methods_of_translation),
a full-cone NAT is defined as follows:
Once an internal address (iAddr:iPort) is mapped to an external address

View File

@ -33,9 +33,9 @@ packets.
veth pairs required for the demo.*
To compile and run the starter code, simply use `./run_demo.sh`. The
[run_demo.sh] (run_demo.sh) script will run the P4 compiler (for bmv2), start
the switch and populate the tables using the CLI commands from [commands.txt]
(commands.txt).
[run_demo.sh](run_demo.sh) script will run the P4 compiler (for bmv2), start the
switch and populate the tables using the CLI commands from
[commands.txt](commands.txt).
When the switch is running, you can send test packets with `sudo
./run_test.py`. Note that this script will take a few seconds to complete. The
@ -46,16 +46,17 @@ working yet.
## What you need to do
1. In this exercise, you need to update the provided [P4 program]
(p4src/simple_router.p4) to perform ECMP. When you are done, each incoming TCP
test packet should be forwarded to either port 1 or port 2, based on the result
of a crc16 hash computation performed on the TCP 5-tuple (`ipv4.srcAddr`,
`ipv4.dstAddr`, `ipv4.protocol`, `tcp.srcPort`, `tcp.dstPort`). You will need to
refer to the [P4 spec] (http://p4.org/wp-content/uploads/2015/04/p4-latest.pdf)
to familiarize yourself with the P4 constructs you will need.
1. In this exercise, you need to update the provided [P4
program](p4src/simple_router.p4) to perform ECMP. When you are done, each
incoming TCP test packet should be forwarded to either port 1 or port 2, based
on the result of a crc16 hash computation performed on the TCP 5-tuple
(`ipv4.srcAddr`, `ipv4.dstAddr`, `ipv4.protocol`, `tcp.srcPort`,
`tcp.dstPort`). You will need to refer to the [P4
spec](http://p4.org/wp-content/uploads/2015/04/p4-latest.pdf) to familiarize
yourself with the P4 constructs you will need.
2. Once you are done with the P4 code, you will need to update [commands.txt]
(commands.txt) to configure your new tables.
2. Once you are done with the P4 code, you will need to update
[commands.txt](commands.txt) to configure your new tables.
3. After that you can run the above test again. Once again, you will observe
that all packets go to the same egress port. Don't panic :)! This is because all
@ -74,8 +75,8 @@ simple_router.p4>`.
first one requires 2 tables and the use of the
`modify_field_with_hash_based_offset` primitive. The second one uses a single
table with an action profile. You can read about
`modify_field_with_hash_based_offset` and action profiles in the [P4 spec]
(http://p4.org/wp-content/uploads/2015/04/p4-latest.pdf).
`modify_field_with_hash_based_offset` and action profiles in the [P4
spec](http://p4.org/wp-content/uploads/2015/04/p4-latest.pdf).
3. If you choose to use the first way (with 2 tables), your first table will
match on the destination IP address and be in charge of computing an index