[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0b7f9d0-1ce9-bf09-dff9-47926999b924@mellanox.com>
Date: Tue, 26 Feb 2019 13:50:37 +0000
From: Roi Dayan <roid@...lanox.com>
To: "xiangxia.m.yue@...il.com" <xiangxia.m.yue@...il.com>,
Saeed Mahameed <saeedm@...lanox.com>,
"gerlitz.or@...il.com" <gerlitz.or@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 2/5] net/mlx5e: Make the log friendly when
decapsulation offload not supported
On 25/02/2019 12:40, xiangxia.m.yue@...il.com wrote:
> From: Tonghao Zhang <xiangxia.m.yue@...il.com>
>
> 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: Tonghao Zhang <xiangxia.m.yue@...il.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 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 bdcc5e7..6cbfbfa 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
> @@ -84,7 +84,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,
> @@ -620,8 +620,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;
>
Reviewed-by: Roi Dayan <roid@...lanox.com>
Powered by blists - more mailing lists