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

[ovsp4rt] PrepareVlanPushTableEntry truncates vlan_id to 8 bits #632

Open
ffoulkes opened this issue Aug 11, 2024 · 0 comments
Open

[ovsp4rt] PrepareVlanPushTableEntry truncates vlan_id to 8 bits #632

ffoulkes opened this issue Aug 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ffoulkes
Copy link
Contributor

ffoulkes commented Aug 11, 2024

The PrepareVlanPushTableEntry() function encodes the vlan_id parameter as as single byte in both the mod_blob_ptr match key and the vlan_id action parameter.

VLAN identifiers are bit<12>.

If this is intentional, the code should contain comments that:

  1. Acknowledge the truncation,
  2. State that it is intentional, and
  3. Explain why this is the correct thing to do.

If this is unintentional, it is a bug and should be fixed.
The unit test should also be updated.

Note

  • Address both DPDK and ES2K variants.
  • The unit tests should expect, and test with, a 12-bit input value.
@ffoulkes ffoulkes added the bug Something isn't working label Aug 11, 2024
@ffoulkes ffoulkes changed the title [ovsp4rt] PrepareVlanPushTableEntry truncates vlan_id to bit<8> [ovsp4rt] PrepareVlanPushTableEntry truncates vlan_id to 8 bits Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant