You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
Before this commit to the behavioral-model repository in March 2018, p4c-bmv2 and behavioral-model had the same assumptions about how push operations in the JSON file worked: p4lang/behavioral-model@9131ed9
After that commit, the default builds of behavioral-model changed, but p4c-bmv2 did not change to update with it.
If you encounter this, options you have:
Use latest p4c and behavioral-model together, which have common assumptions on how the BMv2 JSON push operation works (which is: the new pushed headers are invalid, and when compiling P4_14 programs, the p4_14 compiler when creating the BMv2 JSON file should insert add_header primitive operations after push operations, to make the newly inserted headers valid)
Use p4c-bmv2, and also use the option mentioned in the commit message linked above when building behavioral-model, i.e. "The legacy implementation can be toggled by passing the --disable-WP4-16-stacks flag to configure."
Convince someone, or yourself, to update p4c-bmv2 to follow the new behavior implemented by behavioral-model.
The text was updated successfully, but these errors were encountered:
continue using p4c-bmv2 as it is now, but every time in your P4_14 program that you invoke a push(my_header_stack, n) operation, immediately follow it with add_header(my_header_stack[0]); add_header(my_header_stack[1]); ... add_header(my_header_stack[n-1]); , which is effectively what p4c is doing for you under the covers after every P4_14 push operation.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Before this commit to the behavioral-model repository in March 2018, p4c-bmv2 and behavioral-model had the same assumptions about how push operations in the JSON file worked: p4lang/behavioral-model@9131ed9
After that commit, the default builds of behavioral-model changed, but p4c-bmv2 did not change to update with it.
If you encounter this, options you have:
Use latest p4c and behavioral-model together, which have common assumptions on how the BMv2 JSON push operation works (which is: the new pushed headers are invalid, and when compiling P4_14 programs, the p4_14 compiler when creating the BMv2 JSON file should insert add_header primitive operations after push operations, to make the newly inserted headers valid)
Use p4c-bmv2, and also use the option mentioned in the commit message linked above when building behavioral-model, i.e. "The legacy implementation can be toggled by passing the
--disable-WP4-16-stacks
flag to configure."Convince someone, or yourself, to update p4c-bmv2 to follow the new behavior implemented by behavioral-model.
The text was updated successfully, but these errors were encountered: