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

Convert deparser header to 'inout' and address casting for functions with control block parameters #4338

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

komaljai
Copy link
Contributor

@komaljai komaljai commented Jan 19, 2024

Functions that are receiving parameters in the control block signature are not being casted correctly.

void ipip_push(inout headers_t hdr, in metadata_t meta) { ... }

For such functions the compiler is assuming the BPF generated code are plain structs.
For these two parameters we are actually using pointers.

Copy link
Contributor

@usha1830 usha1830 left a comment

Choose a reason for hiding this comment

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

LGTM

@usha1830 usha1830 merged commit ef756ee into p4lang:main Jan 19, 2024
13 checks passed
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.

2 participants