DPDK Backend: Emit name information for externs in context json #3433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The names of extern objects in spec file and bfrt json/p4info differ in cases when the extern declarations are not in the global scope. Compiler adds some prefix and suffix to the extern object's name based on the scope of the the object. New array of externs needs to be added into context json to handle this mismatch issue and to allow control plane software to access the name of the extern as in the spec file corresponding to the control plane name.
The schema changes are as follows:
context_all.json.txt
psa-example-dpdk-externs.p4.txt