[P4-dev] Changing Default Action

Antonin Bas antonin at barefootnetworks.com
Mon Jul 30 18:22:28 EDT 2018


Hi Vivek,

Did you read the P4Runtime specification on p4.org?
You need to define a controller header (with your metadata) in your P4
program and annotate it with @controller_header. Your P4 program must
prepend the controller header to every packet sent to the controller in the
deparser.

Thanks,

Antonin

On Thu, Jul 26, 2018 at 8:52 AM, Vivek Gopalan <vivek.gopalan at yale.edu>
wrote:

> Dear All,
> I'm trying to implement a reactive P4 solution where the default action is
> similar to an ipv4_forward action but set metadata so that packets that
> don't match get forwarded to the controller. Is there any way to do so -
> and if so, how would be the best way to handle these packets using
> P4Runtime API / is there a packet parser object in P4Runtime (so that I can
> yield information for my reactive program to handle)?
>
> Best,
> Vivek
> --
> Vivek Gopalan
> Yale 2021
>
> _______________________________________________
> 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/20180730/9f949713/attachment.html>


More information about the P4-dev mailing list