[ovsp4rt] PrepareVlanPushTableEntry truncates vlan_id to 8 bits
Opened this issue · 0 comments
ffoulkes commented
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:
- Acknowledge the truncation,
- State that it is intentional, and
- 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.