[P4-dev] Few questions on the working of P4
haoyu.song at huawei.com
Wed Jun 24 14:13:03 EDT 2015
For the second question, my guess is that the possible actions will help to hint the compiler to provision some necessary resources on specific targets. If this is the case, then this requirement should be made optional because in some other platforms, this is not necessary at all and could even hurt the potential flexibility. Correct me if I’m wrong.
From: P4-dev [mailto:p4-dev-bounces at p4.org] On Behalf Of Anubhav Nidhi
Sent: Tuesday, June 23, 2015 6:49 PM
To: p4-dev at p4.org
Subject: [P4-dev] Few questions on the working of P4
I am new to P4. After reading the P4 specification paper and trying out the example given here<https://github.com/p4lang/p4factory/tree/master/targets/simple_router>, I have following questions regarding P4
1. Do you have any code/repository which generates the JSON version of the P4 compiler output?
2. Also just want to make sure I understand how the table entries work. Right now the example given in simple router here<https://github.com/p4lang/p4factory/tree/master/targets/simple_router> says that to enter a rule like drop packet with ip.dest = A1, I need to manually enter a entry in a table e.g. add_entry table1 10.0.0.10 32 _drop. Is the manually entering the table entry true? If that is the case and I need to enter the action-name (name given in action specification) manually in the table, then what is the purpose of mentioning the possible actions used?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev