Skip to content

Commit 7d1a3d0

Browse files
w1ldptrSaeed Mahameed
authored andcommitted
net/mlx5e: Reject mirroring on source port change encap rules
Rules with MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE dest flag are translated to destination FT in eswitch. Currently it is not possible to mirror such rules because firmware doesn't support mixing FT and Vport destinations in single rule when one of them adds encapsulation. Since the only use case for MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE destination is support for tunnel endpoints on VF and trying to offload such rule with mirror action causes either crash in fs_core or firmware error with syndrome 0xff6a1d, reject all such rules in mlx5 TC layer. Fixes: 10742ef ("net/mlx5e: VF tunnel TX traffic offloading") Signed-off-by: Vlad Buslov <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 97817fc commit 7d1a3d0

File tree

1 file changed

+6
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+6
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,12 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
13991399
esw_attr->dests[out_index].mdev = out_priv->mdev;
14001400
}
14011401

1402+
if (vf_tun && esw_attr->out_count > 1) {
1403+
NL_SET_ERR_MSG_MOD(extack, "VF tunnel encap with mirroring is not supported");
1404+
err = -EOPNOTSUPP;
1405+
goto err_out;
1406+
}
1407+
14021408
err = mlx5_eswitch_add_vlan_action(esw, attr);
14031409
if (err)
14041410
goto err_out;

0 commit comments

Comments
 (0)