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] PrepareFdbTableEntryforV4VxlanTunnel truncates tunnel_id #677

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

[ovsp4rt] PrepareFdbTableEntryforV4VxlanTunnel truncates tunnel_id #677

ffoulkes opened this issue Aug 31, 2024 · 0 comments

Comments

@ffoulkes
Copy link
Contributor

ffoulkes commented Aug 31, 2024

The DPDK variant of PrepareFdbTableEntryforV4VxlanTunnel encodes the tunnel_id action parameter as a single byte.

  • The source field (tnl_info.vni) is uint32_t.
  • The tunnel_id param is 24 bits wide.
param->set_param_id(GetParamId(p4info, L2_FWD_TX_TABLE_ACTION_SET_TUNNEL,
                               ACTION_SET_TUNNEL_PARAM_TUNNEL_ID));
// TODO(derek): 8-bit value for 24-bit action parameter.
param->set_value(EncodeByteValue(1, learn_info.tnl_info.vni));

Note that ES2K tunnel IDs are 20 bits, and DPDK tunnel IDs are 24 bits. Consider using compile-time conditionals (#ifdef xxxx_TARGET) to define target-specific bodies for the EncodeTunnelId() function and using the latter instead of EncodeByteValue().

@ffoulkes ffoulkes added bug Something isn't working and removed bug Something isn't working labels Aug 31, 2024
@ffoulkes ffoulkes changed the title [ovsp4rt] PrepareFdbTableEntryforV4VxlanTunnel truncates tunnel_id to 8 bits [ovsp4rt] PrepareFdbTableEntryforV4VxlanTunnel truncates tunnel_id Sep 1, 2024
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

No branches or pull requests

1 participant