[P4-dev] A different type of calculator?

Rakesh Kumar kumar19 at illinois.edu
Fri Oct 20 14:48:20 EDT 2017


Thanks. I was able to use registers to do this.

Are there any limits on the behavioral-model target about how much memory
that one can allocate for registers?


-
rakesh

On Wed, Oct 18, 2017 at 4:45 PM, Nate Foster <jnfoster at cs.cornell.edu>
wrote:

> If you want to persist state across packets (in P4_14, or with current
> P4_16 architectures like v1model.p4) you'll need to use a register.
>
> -N
>
> On Wed, Oct 18, 2017 at 5:41 PM, Rakesh Kumar <kumar19 at illinois.edu>
> wrote:
>
>> Hey All,
>>
>> I know, it would sound inefficient, but that is not the point. The point
>> is to be able to perform computation on data that exists beyond the packet
>> headers of the single packet. Is that possible:
>>
>> Three packets are sent to a switch, one after the other, two of them
>> contain an operand each and the third one contains the operator in the
>> header. Can a P4 program be written which *holds on* to the previous two
>> packets in some memory and computes the result based on the operator packet
>> and return it back to the sender with a result field populated.
>>
>>
>>
>> -
>> rakesh
>>
>> _______________________________________________
>> P4-dev mailing list
>> P4-dev at lists.p4.org
>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.p4.org_mailman_listinfo_p4-2Ddev-5Flists.p4.org&d=DwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=eMiDtKiPfF6lr4uCH4zfohxM2vkva_dlfPThY-JRpuA&m=5ttD3wbeI3rMi6iIxzHHuk05goNNOhFaJ62juZ5ofXc&s=UKtrJ4xwqhC6Sg33BD4lLWTWw8He1BZdfavDAhyT9YQ&e=>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20171020/3c2bcf80/attachment-0002.html>


More information about the P4-dev mailing list