[P4-discuss] how to debug the p4 <v1model.p4>
antonin at barefootnetworks.com
Fri Oct 13 11:08:14 EDT 2017
verify() is implemented in bmv2, but as per the P4_16 spec, verify
statements are only available in the parser
the bmv2 logs will give you a lot of information about which parse states
were visited, which tables were applied...
you can also look into the bmv2 debugger, which lets you set breakpoints &
watchpoints, and lets you inspect the value of any P4 field.
- here is how to use it:
- here is the full documentation:
On Thu, Oct 12, 2017 at 10:22 AM, Nate Foster <jnfoster at cs.cornell.edu>
> A standard trick is to introduce a table "debug" whose keys are the
> headers/metatdata you want to track. The Bmv2 logs will show those values
> at the program point where the table was applied.
> On Thu, Oct 12, 2017 at 1:19 PM, Phanindra Palagummi <
> phanindra.palagummi at gmail.com> wrote:
>> I am research student in IIT Madras, interested doing some research work
>> in P4. With current P4 capabilities I want to know how to debug the P4
>> program for V1model switch.
>> I suppose "error class" and verify() is not present for v1model, if so,
>> are there any ways to debug the P4 program for v1model. (i.e, how to know
>> my packet is parsed successfully, what header values it is picking etc?).
>> Please help me on this.
>> Thank you,
>> P4-discuss mailing list
>> P4-discuss at lists.p4.org
> P4-discuss mailing list
> P4-discuss at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-discuss