[P4-dev] storing metadata while parsing header stacks
salvatore.signorello at uni.lu
Fri Jul 17 03:56:14 EDT 2015
any advice for the following:
Suppose to have an MPLS stack parsed as follows:
#define MPLS_DEPTH 5
header mpls_t mpls[MPLS_DEPTH];
0 : parse_mpls;
1 : parse_mpls_bos;
and that you would like to know (and to store somewhere, like into a
metadata block) how many MPLS headers (a number that is likely lower
than MPLS_DEPTH) have been parsed at the end of the parsing process.
What to do?
Could metadata be used like a kind of counter?
Could register be indexed somehow during the parsing and set through the
Thank you in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev