[P4-design] New XFAIL test cases for P4_14 resubmit / recirculate / clone

Andy Fingerhut (jafinger) jafinger at cisco.com
Mon Feb 4 23:04:44 EST 2019

I have created a couple of PRs for the p4c compiler that have STF packet tests for them.

The first one I was thinking of is already part of a PR here that Mihai mentioned during the meeting here: https://github.com/p4lang/p4c/pull/1704

It is called p414-special-ops.p4 with STF test p414-special-ops.stf, and fails with the current latest p4c compiler, but succeeds with Mihai’s proposed changes in that PR.  Without that PR’s fixes, or something similarly effective, it is not possible to make BMv2 simple_switch successfully perform _any_ recirculate, resubmit, clone, or multicast operations at all, whether they preserve metadata or not.  They simply do not happen.  This is something that used to work during 2018 up until the 2018-Nov-26 commit, but the next commit causes these operations to no longer work, and they have been broken since then.

This PR I created after the meeting is another similar program plus STF test that fails with the latest p4c, but succeeds with Mihai’s changes in PR #1704: https://github.com/p4lang/p4c/pull/1710

This PR is another similar program plus STF test: https://github.com/p4lang/p4c/pull/1709

It fails due to the issue mentioned above, but even with Mihai’s PR #1704 fixes, it still fails because the BMv2 JSON file produced by the compiler uses the wrong names of metadata fields in the field_lists, i.e. it preserves the values of compiler-generated temporary metadata fields, but not the ones named by the user in the program, and since the test was written explicitly to have different behavior if metadata fields are not preserved correctly, it fails.

Because these tests are marked as XFAIL, they can be merged in now without breaking the automated tests.

These test programs are all written in P4_14, because at least right now it is the only language with an agreed-upon spec for how to preserve metadata for these operations, and they are pretty close to working in the implementation we have.

I could write a P4_16 + v1model arch program that exercises this functionality, but it only seems to make sense to do so once we are closer to an agreed-upon way to write a P4_16 program that preserves metadata for such operations.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-design_lists.p4.org/attachments/20190205/d8b0a9ab/attachment.html>

More information about the P4-design mailing list