Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b18b781 authored by Tonghao Zhang's avatar Tonghao Zhang Committed by Saeed Mahameed
Browse files

net/mlx5e: Make the log friendly when decapsulation offload not supported



If we try to offload decapsulation actions to VFs hw, we get the log [1].
It's not friendly, because the kind of net device is null, and we don't
know what '0' means.

[1] "mlx5_core 0000:05:01.2 vf_0: decapsulation offload is not supported for  net device (0)"

Signed-off-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent eda99e11
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ static const char *mlx5e_netdev_kind(struct net_device *dev)
	if (dev->rtnl_link_ops)
		return dev->rtnl_link_ops->kind;
	else
		return "";
		return "unknown";
}

static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
@@ -636,8 +636,10 @@ int mlx5e_tc_tun_parse(struct net_device *filter_dev,
						headers_c, headers_v);
	} else {
		netdev_warn(priv->netdev,
			    "decapsulation offload is not supported for %s net device (%d)\n",
			    mlx5e_netdev_kind(filter_dev), tunnel_type);
			    "decapsulation offload is not supported for %s (kind: \"%s\")\n",
			    netdev_name(filter_dev),
			    mlx5e_netdev_kind(filter_dev));

		return -EOPNOTSUPP;
	}
	return err;