Skip to content
Snippets Groups Projects
Commit d6e621a2 authored by Djojomoenawie, N.E. (Nathan, Student M-CS)'s avatar Djojomoenawie, N.E. (Nathan, Student M-CS) :speech_balloon:
Browse files

Fix bad indentation in numbered list

parent afe19c6d
Branches main
No related tags found
No related merge requests found
......@@ -50,14 +50,14 @@ based on the tunnel ID.
2. In the `basic.p4` file, add a new constant to your code called `MAX_TUNNEL_ID`, and it's value must be `1 << 16`.
3. On ingress, add two counters (`ingressTunnelCounter`, `egressTunnelCounter`). They must receive two parameters, first the previously created constant, second `CounterType.packets_and_bytes`). Refer to the cheat sheet for more information on the syntax.
4. On ingress, implement an action called `myTunnel_ingress`, the action must receive a 16 bit parameter called `dst_id`. The action must do the following:
1. Set the valid bit on the `myTunnel` packet header.
2. Set the `dst_id`, `proto_id` and `etherType` of the tunnel header.
3. Increment the `ingressTunnelCounter` of the `dst_id` tunnel header index. Cast the index type to `bit<32>`.
1. Set the valid bit on the `myTunnel` packet header.
2. Set the `dst_id`, `proto_id` and `etherType` of the tunnel header.
3. Increment the `ingressTunnelCounter` of the `dst_id` tunnel header index. Cast the index type to `bit<32>`.
5. On ingress, implement an action called `myTunnel_egress`, the action must receive two parameters in the following order: first a parameter called `dst_Addr` with our mac address type defined on the code, second a parameter called `port` with our egress type also defined on the code. The action must do the following:
1. Set the value of `egress_spec` attribute of the `standard_metadata` to `port`.
2. Set the `dstAddr` and `etherType` of the ethernet header to `dstAddr` and the tunnel's `proto_id`, respectively.
3. Set the invalid bit on the `myTunnel` packet header.
4. Increment the `egressTunnelCounter` of the `dst_id` tunnel header index. Cast the index type to `bit<32>`.
1. Set the value of `egress_spec` attribute of the `standard_metadata` to `port`.
2. Set the `dstAddr` and `etherType` of the ethernet header to `dstAddr` and the tunnel's `proto_id`, respectively.
3. Set the invalid bit on the `myTunnel` packet header.
4. Increment the `egressTunnelCounter` of the `dst_id` tunnel header index. Cast the index type to `bit<32>`.
6. Add the implemented actions on `4` and `5` to the `ipv4_lpm` and `myTunnel_exact` tables.
## Step 3: Run your solution
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment