[P4-dev] Resubmit Primitive and Instance_type in bmv2
yukinari.eed03 at g2.nctu.edu.tw
Sat Aug 18 12:27:02 EDT 2018
I just complete a program with resubmit() as I’d like to deal with a loop-like behavior. I make standatd_metadata.instance_type as a field to check if a packet is resubmitted. However, I find that the condition which aims to check if the packet is resubmitted is never satisfied, so I’m not sure if the resubmit() is executed.
Below is the pseudo-code of my program:
// do something, Part A
If standard_metadata.instance_type == 6
If indicator < limit
// do something and resubmit again, Part B
Else if standard_metadata.instance_type != 6
I expect that when a packet comes, the switch should do something and resubmit it. The switch will then do Part A again and execute Part B as well for resubmitted packets until the termination condition comes true, but I find that the condition “standard_metadata.instance_type == 6” is never satisfied and the instance_type is always 0.
Are there any mistakes I made?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev