Conversation
|
@jafingerhut @fruffy I have added the steps to run p4 programs inside ns-3 |
doc/P4sim/README.md
Outdated
|
|
||
| --- | ||
| ## 5. Run an Example | ||
| Before running the example you need to **copy and paste** that particular example inside `ns3's scratch` folder then you can run a built-in example using: |
There was a problem hiding this comment.
Can you add the commands to copy exampleA? In other words, I would provide the exact set of commands that you need to follow at each step.
There was a problem hiding this comment.
I added more details can you review it and tell if anything else is required
Dscano
left a comment
There was a problem hiding this comment.
Can you provide a clear explanation of why those changes are needed and what is the purpose of this PR?
doc/P4sim/README.md
Outdated
| ``` | ||
|
|
||
| --- | ||
| ## 4. Running an example |
There was a problem hiding this comment.
Why section 4 and 5 have the same name? Which should be the difference?
There was a problem hiding this comment.
I meant to write Prepare an example but forgot to replace that
doc/P4sim/README.md
Outdated
|
|
||
| --- | ||
| ## 5. Run an Example | ||
| Before running the example you need to **copy and paste** that particular example inside `ns3's scratch` folder then you can run a example using: |
There was a problem hiding this comment.
Can you add also the commands for copy paste the execise?
There was a problem hiding this comment.
they are just ctrl+c and ctrl+v. Should I add them??
There was a problem hiding this comment.
I’m suggesting you add a bash commands to do that, so people can easily copy and paste the example.
doc/P4sim/README.md
Outdated
| std::string p4JsonPath = "/home/p4/workdir/ns3.39/contrib/p4sim/examples/p4src/p4_basic/p4_basic.json"; | ||
| std::string flowTableDirPath ="/home/p4/workdir/ns3.39/contrib/p4sim/examples/p4src/p4_basic/";// path to flow table folder where all flow tables are located. | ||
| std::string topoInput ="/home/p4/workdir/ns3.39/contrib/p4sim/examples/p4src/p4_basic/topo.txt";//path to topo file that the example uses | ||
| // This is for p4-basic-controller.cc file |
There was a problem hiding this comment.
Why previusly you remove this line and now you added them again?
ok the previous PR was for installing ns-3 and p4sim and this PR is for adding more detailed instructions on how to run a program inside ns-3 |
doc/P4sim/README.md
Outdated
| ``` | ||
|
|
||
| --- | ||
| ## 4. Running an example |
Signed-off-by: Vineet1101 <Vineetgoel692@gmail.com>
Signed-off-by: Vineet1101 <Vineetgoel692@gmail.com>
Signed-off-by: Vineet1101 <Vineetgoel692@gmail.com>
|
@Dscano I have added bash script for copy and paste commands and also added more and clear details for running an example. Please review it and tell if anything else is needed |
Signed-off-by: Vineet1101 <Vineetgoel692@gmail.com>
Signed-off-by: Vineet1101 <Vineetgoel692@gmail.com>
done |
| ``` | ||
|
|
||
| ### 7. Run a Simulation Example | ||
| ### 7. Run a Simulation Example |
There was a problem hiding this comment.
You have repeated twice section 7
There was a problem hiding this comment.
yes because the original P4Sim documentation repeats this section so I kept it that way. Should I remove one and make a reference to the other??
|
@jafingerhut can you merge this PR, I'm not authorized to push it. |
I am authorized to do so, but I would really appreciate if the submitter would consider simplifying the steps to run an example, based upon a comment I have made twice so far: Without copying any files at all after installing ns3, I was able to run the command below, and it gave lots of output that seem like it did something: If that works for you, too, without copying any files, I would recommend giving the command above as an example, and OMIT all of the instructions for copying files, running sed, etc. They seem unnecessarily complicated to me, if the single command above works. |
@jafingerhut There is a difference between the two approaches: When an example is placed in the scratch folder, ns-3 automatically handles building the file and linking dependencies, so it can be run directly. This approach is convenient for quick testing and prototyping. When an example is placed inside a module directory such as contrib/p4sim/examples, it must be declared in the corresponding CMakeLists.txt file. This allows ns-3 to build and integrate it properly. The reason p4-basic-controller.cc can be run directly is that it is already declared in the CMakeLists.txt file. This is the intended approach when contributing examples to the repository. |
No description provided.