p4lang / tutorials

P4 language tutorials
Apache License 2.0
1.31k stars 875 forks source link

Consider adding better documentation for why certain host initialization commands are present in JSON files of some exercises #587

Closed jafingerhut closed 3 months ago

jafingerhut commented 3 months ago

See this question: https://forum.p4.org/t/question-about-extra-commands-in-topology-json-in-the-tutorials/1166

jafingerhut commented 3 months ago

@Abhinavcode13 If you are interested, consider looking into this and see if you can learn the answer.

Abhinavcode13 commented 3 months ago

Should the details be included in a separate readme file or as comments? @jafingerhut

jafingerhut commented 3 months ago

One idea: Go through the exercises in the order they are recommended to be performed. One of them will be the first one that has a config JSON file with such host configuration commands in it. I do not know off the top of my head which exercise that is, but it shouldn't take more than a few minutes to determine which exercise that is.

In that exercise, do some testing with those host configuration commands removed, to verify whether those commands are necessary in order for the exercise to function as desired.

If so, add some notes in some new section of that exercise's README.md file explaining what the host configuration commands do, and ideally also explains what goes wrong if they are not present.

If there are other later exercises that have similar host configuration commands, then refer back to the first exercise's README.md that has this new section in it. I think cross-references between README.md's like that would be better than copying and pasting the new text everywhere.

Abhinavcode13 commented 3 months ago

I'll test it out for myself again, as Nagisa in P4 forum has already seen what happens when we remove those commands. Ref : here