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] PrepareFdbTxVlanTableEntry truncates port_vlan to 8 bits #620

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

[ovsp4rt] PrepareFdbTxVlanTableEntry truncates port_vlan to 8 bits #620

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

Comments

@ffoulkes
Copy link
Contributor

ffoulkes commented Aug 10, 2024

The PrepareFdbTxVlanTableEntry function encodes the port_vlan input as a single byte.

  • The input value (port_vlan in the port_vlan_entry struct) is an int.
  • The parameter value (vlan_ptr in the remove_vlan_and_fwd action) is bit<24>.
  • VLAN identifiers are bit<12>.
  • The value that OvS assigns to port_vlan is the int vlan field in the xbundle struct. The comment states that the value of this field is -1=trunk port, else a 12-bit VLAN ID.

This appears to be an error.

  • If it's not a bug, the code should contain a comment acknowledging the truncation and explaining why this is not an error.
  • If it is a bug, it should be fixed. The unit test will also have to be updated.

Note

  • Need to address both ES2K and DPDK variations.
  • The unit test should expect, and test with, a 12-bit input value.
@ffoulkes ffoulkes added the bug Something isn't working label Aug 10, 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