net/mlx5e: Correct phys_port_name for PF port
authorParav Pandit <parav@mellanox.com>
Wed, 5 Jun 2019 06:29:05 +0000 (01:29 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 28 Jun 2019 23:03:59 +0000 (16:03 -0700)
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 <parav@mellanox.com>
Reviewed-by: Vu Pham <vuhuong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

index 3999da3e6314a889006ceacfa79f7aae13c8b3b3..dee2fbbf3c12e31a2328e9ae911b7aa566b6322c 100644 (file)
@@ -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);