diff options
author | Paul Blakey <paulb@mellanox.com> | 2019-06-24 15:04:58 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-06-28 16:04:00 -0700 |
commit | f6dc1264f1c01976a84239d1038359604ee42001 (patch) | |
tree | efe453cb89b4c1cc7dfbf865f1b713ff57be87d6 /drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | |
parent | 7ff40a46dd188b83311203e72cedf42eb264fdf1 (diff) | |
download | linux-stable-f6dc1264f1c01976a84239d1038359604ee42001.tar.gz linux-stable-f6dc1264f1c01976a84239d1038359604ee42001.tar.bz2 linux-stable-f6dc1264f1c01976a84239d1038359604ee42001.zip |
net/mlx5e: Disallow tc redirect offload cases we don't support
After changing the parent_id to be the same for both NICs of same
the hardware device, netdev_port_same_parent_id now returns true for
more cases (all the lower devices in the hierarchy are on the same
hardware device).
If merged eswitch isn't enabled, these cases aren't supported, so disallow
them.
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c index f5ad531e1749..3739646b653f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c @@ -5,6 +5,7 @@ #include <net/gre.h> #include <net/geneve.h> #include "en/tc_tun.h" +#include "en_tc.h" struct mlx5e_tc_tunnel *mlx5e_get_tc_tun(struct net_device *tunnel_dev) { @@ -47,7 +48,8 @@ static int get_route_and_out_devs(struct mlx5e_priv *priv, *route_dev = dev; if (is_vlan_dev(*route_dev)) *out_dev = uplink_dev; - else if (mlx5e_eswitch_rep(dev)) + else if (mlx5e_eswitch_rep(dev) && + mlx5e_is_valid_eswitch_fwd_dev(priv, dev)) *out_dev = *route_dev; else return -EOPNOTSUPP; |