Commit ab56d17f authored by cedgar's avatar cedgar
Browse files

small change

parent a5d03da0
......@@ -76,7 +76,7 @@ action is one of the key parts of the ECMP algorithm. You have to do several thi
the metadata struct in `headers.p4`. Use the `hash` extern function to compute the hash of packets 5-tuple (src ip, dst ip, src port, dst port, protocol). The signature of a hash function is:
`hash(output_field, (crc16 or crc32), (bit<1>)0, {fields to hash}, (bit<16>)modulo)`.
2. Define another metadata field. Call it for example: `ecmp_group_id` (14 bits).
3. Finally copy the value of the second action parameter ecmp group in the metadata field you just defined (`ecmp_group_id`) this will be used
3. Finally copy the value of the first action parameter in the metadata field you just defined (`meta.ecmp_group_id`) this will be used
to match in the second table.
**Note**: Why is the `ecmp_group_id` needed ?. In few words, it allows you to map from one ip address to a set of ports, which does not have to be
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment