p4lang / tutorials

P4 language tutorials
Apache License 2.0
1.35k stars 886 forks source link

Step 2 of QoS exercise #614

Closed Mohxen closed 3 months ago

Mohxen commented 4 months ago

Hi all,

In Step 2 of the QoS exercise, you mentioned "Then, in the egress control block we must compare the protocol in IP header with IP protocols. Based on the traffic classes and priority, the diffserv flag will be set." However, in the solution for the QoS exercise, the egress part is empty. Please let me know if the solution for the egress part is complete.

jafingerhut commented 4 months ago

The README.md says to do this in egress in one place, and then later in the step numbered 5 it says this should be done in ingress.

Because the exercise is to set the diffserv field based upon the value of the IPv4 protocol field, and this field is not being changed anywhere in the code, it seems to me that it makes no functional difference whether the diffserv field is changed in ingress or in egress.

Would you be willing to create a pull request that changes "egress" to "ingress", to make the README.md consistent both with itself, and with the example solution?

jafingerhut commented 3 months ago

Corrected the qos/README.md with this PR https://github.com/p4lang/tutorials/pull/624 so closing this issue.