Skip to content

Commit

Permalink
net/mlx5: fix tunnel rules validation on VF representor
Browse files Browse the repository at this point in the history
[ upstream commit 187f942 ]

MLX5 PMD implicitly adds vxlan_decap flow action to tunnel offload
match type rules. However, VXLAN decap action on VF representors is
not supported on MLX5 PMD hardware.

The patch rejects attempt to create tunnel offload flow rules on VF
representor.

Refer commit 9c4971e ("net/mlx5: update VLAN and encap actions validation")

Fixes: 4ec6360 ("net/mlx5: implement tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
getelson-at-mellanox authored and bluca committed Feb 2, 2021
1 parent 3e33fc7 commit 09a68cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/mlx5/mlx5_flow_dv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5282,6 +5282,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
} else {
tunnel = NULL;
}
if (tunnel && priv->representor)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
"decap not supported "
"for VF representor");
grp_info.std_tbl_fix = tunnel_use_standard_attr_group_translate
(dev, tunnel, attr, items, actions);
ret = flow_dv_validate_attributes(dev, tunnel, attr, &grp_info, error);
Expand Down

0 comments on commit 09a68cd

Please sign in to comment.