Skip to content

Commit

Permalink
net/mlx5/hws: fix VLAN inner type
Browse files Browse the repository at this point in the history
[ upstream commit d1d350d868439357e750297d5719670f706facc2 ]

Set the correct VLAN inner_type value, till today the
once the VLAN inner_type field was set, an incorrect
value was taken instead of the inner_type field.

Fixes: c55c2bf ("net/mlx5/hws: add definer layer")

Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
  • Loading branch information
hamdanigbaria authored and bluca committed Mar 13, 2024
1 parent afe4744 commit 38b2735
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/mlx5/hws/mlx5dr_definer.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ struct mlx5dr_definer_conv_data {
X(SET_BE32, gre_opt_seq, v->sequence.sequence, rte_flow_item_gre_opt) \
X(SET_BE16, gre_opt_checksum, v->checksum_rsvd.checksum, rte_flow_item_gre_opt) \
X(SET, meter_color, rte_col_2_mlx5_col(v->color), rte_flow_item_meter_color) \
X(SET, cvlan, STE_CVLAN, rte_flow_item_vlan)
X(SET, cvlan, STE_CVLAN, rte_flow_item_vlan) \
X(SET_BE16, inner_type, v->inner_type, rte_flow_item_vlan)

/* Item set function format */
#define X(set_type, func_name, value, item_type) \
Expand Down Expand Up @@ -513,7 +514,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
if (m->inner_type) {
fc = &cd->fc[DR_CALC_FNAME(ETH_TYPE, inner)];
fc->item_idx = item_idx;
fc->tag_set = &mlx5dr_definer_eth_type_set;
fc->tag_set = &mlx5dr_definer_inner_type_set;
DR_CALC_SET(fc, eth_l2, l3_ethertype, inner);
}

Expand Down

0 comments on commit 38b2735

Please sign in to comment.