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

Fix mask calculation for concat operator in bmv2/dpdk expression lowering #3911

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

usha1830
Copy link
Contributor

@usha1830 usha1830 commented Mar 3, 2023

bit<16> word0 = hdr.ipv4.version_ihl ++ hdr.ipv4.diffserv;

is translated to

word0_0 = (bit<16>)hdr.ipv4.version_ihl << 8 | (bit<16>)hdr.ipv4.diffserv & 16w0x1ff;

The mask value should be 0xff instead of 0x1ff

@usha1830 usha1830 merged commit 6799da6 into p4lang:main Mar 6, 2023
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