Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPDK Backend: Minor fix to emit target_action_name in context json #3213

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

usha1830
Copy link
Contributor

This PR is to add a new field to context json. This field holds the unique internal name of the actions .This name should be same as the action name in output spec file.

Context json would now contain two fields for the action name, one name is the externalName and should be same as in bfrt json file and another name "target_action_name" should be same as the name in the spec file.

NoAction is handled in special manner to always use the externalName().

Note: Context json files are not part of the repo, hence attaching the patch to show the change. Also attaching bfrt.json and spec file for reference.
pna-example-tunnel.p4.bfrt.json.txt
pna-example-tunnel.p4.spec.txt
Report.txt

"description": "Name of the action"
"description": "Name of the action as in P4 file"
},
"target_action_name": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who consumes the internal action name, just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipe manager will query the action handle in dpdk target to associate with context.json action handle. For this it needs to use the same name as the name in the spec file.

In the spec file, we use the internal names as the originalName is modified by the frontend in some cases to uniquify them and causes a mismatch between action name in action definition and the one in the table action list.

@usha1830
Copy link
Contributor Author

@mbudiu-vmw @hanw Can this be merged?

@mihaibudiu mihaibudiu merged commit 1794c3b into p4lang:main Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants