From: Parav Pandit Date: Wed, 5 Jun 2019 06:29:05 +0000 (-0500) Subject: net/mlx5e: Correct phys_port_name for PF port X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=087067368a8a4910e169694a3552f210fd1a446e;p=openwrt%2Fstaging%2Fblogic.git net/mlx5e: Correct phys_port_name for PF port Currently PF phys_port_name is named as pfNvf-1 as vport number for PF vport is 65535. Correct PF's phys_port name as agreed upon name as pfN. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 3999da3e6314..dee2fbbf3c12 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -1145,6 +1145,8 @@ static int mlx5e_rep_get_phys_port_name(struct net_device *dev, if (rep->vport == MLX5_VPORT_UPLINK) ret = snprintf(buf, len, "p%d", fn); + else if (rep->vport == MLX5_VPORT_PF) + ret = snprintf(buf, len, "pf%d", fn); else ret = snprintf(buf, len, "pf%dvf%d", fn, rep->vport - 1);