[P4-dev] Usage of exceptions (p4-14)

Antonin Bas antonin at barefootnetworks.com
Wed Apr 19 13:02:41 EDT 2017


bmv2 supports P4_16 parser exceptions, but not P4_14 parser exceptions
I don't know if there is a good chance that p4lang/p4c-bm is going to be
updated to support them. I also don't know about whether support will be
added to p4lang/p4c for P4_14 exceptions.

On Wed, Apr 19, 2017 at 9:57 AM, Diogo Pinto <diogo.f1.p2 at gmail.com> wrote:

> Hello,
>
> I'm trying to drop packets at the parser. With that intent, I have
> something like:
>
> parser_exception myException {
>
> parser_drop;
>
> }
>
> parser parse_X {
>
> return select(current(0,1)) {
>
> "case_1_value" : parse_error myException;
>
> "case_2_value" : parse_Y;
>
> default : ingress;
>
> }
>
> }
>
> I made sure that *parse_X* is entering *case_1*. However, the packet is
> not being dropped. The packet is reaching control ingress.
>
> Are *parser_exceptions* implemented at all ?
> Or does the* parser_drop* exception signal some metadata field that I can
> use at ingress control ?
>
> Thanks,
> Diogo.
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170419/f1b43bb7/attachment-0002.html>


More information about the P4-dev mailing list