Skip to content

[ovsp4rt] PrepareFdbTxVlanTableEntry truncates port_vlan to 8 bits #620

@ffoulkes

Description

@ffoulkes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions