[P4-dev] Parser Exception Handling

David Hancock dhancock at cs.utah.edu
Tue Feb 16 13:05:33 EST 2016


Hello,

Please confirm but per my investigation, bmv2 does not yet support 
parser exception handling.  If it does, please explain how to use parser 
exception handlers.

When I include this in my .p4:

   parser_exception p4_pe_out_of_packet {
     parser_drop;
   }

p4c-bmv2 throws a Semantic warning: "parser_exception 
'p4_pe_out_of_packet' is not reachable and will be removed".

The behavior evidently is to drop the packet anyway.  But really, I want 
to implement more advanced behavior that starts with setting metadata 
and returning to a control function and I can't get that going because 
p4c-bmv2 removes the parser_exception block.

Is there any estimate when support for parser exception handling might 
be implemented?

Thanks,
David




More information about the P4-dev mailing list