Skip to content

Commit

Permalink
net/mlx5: update GENEVE TLV option matching
Browse files Browse the repository at this point in the history
The GENEVE TLV option matching is done using a flex parser.

Recent update in firmware, requires that in order to match on the
GENEVE TLV option the "geneve_tlv_option_0_exist" bit should be set.

Add the new "geneve_tlv_option_0_exist" setting when translating the
GENEVE TLV option item.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
Shiri Kuzin authored and raslandarawsheh committed Aug 22, 2021
1 parent ed0ae35 commit 3b48087
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/common/mlx5/mlx5_prm.h
Expand Up @@ -853,7 +853,8 @@ struct mlx5_ifc_fte_match_set_misc_bits {
u8 vxlan_vni[0x18];
u8 reserved_at_b8[0x8];
u8 geneve_vni[0x18];
u8 reserved_at_e4[0x7];
u8 reserved_at_e4[0x6];
u8 geneve_tlv_option_0_exist[0x1];
u8 geneve_oam[0x1];
u8 reserved_at_e0[0xc];
u8 outer_ipv6_flow_label[0x14];
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/mlx5/mlx5_flow_dv.c
Expand Up @@ -9267,6 +9267,8 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *matcher,
MLX5_SET(fte_match_set_misc, misc_v, geneve_opt_len,
geneve_opt_v->option_len + 1);
}
MLX5_SET(fte_match_set_misc, misc_m, geneve_tlv_option_0_exist, 1);
MLX5_SET(fte_match_set_misc, misc_v, geneve_tlv_option_0_exist, 1);
/* Set the data. */
if (geneve_opt_v->data) {
memcpy(&opt_data_key, geneve_opt_v->data,
Expand Down

0 comments on commit 3b48087

Please sign in to comment.