[P4-dev] Simulate FOR and/or WHILE cycles (p4-14)
diogo.f1.p2 at gmail.com
Thu Apr 13 09:17:33 EDT 2017
I need to perform several multiplications and additions over a subset of
bits and packets.
1. Grab X bits of packet Y and perform several additions/multiplications
2. Repeat 1 for several other packets Z
3. Store all the results for later use
The main issue is that Z can reach hundreds, and so the problem is:
- The quantity of registers I need to store all the bits,
- All the metadata required, to copy the values from registers, in order
to be able to use it as a parameter to multiplications and additions,
- And all the metadata required to store intermediate results.
Also, I cant even have stacks of metadata headers. You can see the problem
of manually store all values and perform all operations. It will take ages
to write the code. Not to say, the complexity of it.
As far as I know P4 doesnt implement cycles. Is there any way of simulating
Also, is there any strategy to organize my metadata, so that I can use some
kind of index to access some field, instead of manually specify the field I
want to manipulate ?? That way, maybe I could write some generic actions,
to be used in several contexts.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev