]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Move to use common phys port names for vport representors
authorOr Gerlitz <ogerlitz@mellanox.com>
Wed, 25 Apr 2018 14:32:04 +0000 (17:32 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 25 Jan 2019 20:00:29 +0000 (12:00 -0800)
commit4c13ab8247d91b7f61da44fc568d9dd928511b1a
treee6b7b7c7d393b640325f56c72f068a909545157e
parent9921248128f1618d35a1029223412f5fdb571c19
net/mlx5e: Move to use common phys port names for vport representors

With VF LAG commit d03b75ad23d2 "net/mlx5e: In case of LAG, one switch
parent id is used for all representors", both uplinks and all the VFs
(on both of them) get the same switchdev id.

This cause the provisioning system method to identify the rep of a given
VF from the parent PF PCI device using switchev id and physical port
name to break, since VFm of PF0 will have the (id, name) as VFm of PF1.

To fix that, we align to use the framework agreed upstream and set by
nfp commit 29c186c3bfd7 "nfp: wire get_phys_port_name on representors":

$ cat /sys/class/net/eth4_*/phys_port_name
p0
pf0vf0
pf0vf1

Now, the names will be different, e.g. pf0vf0 vs. pf1vf0.

Fixes: d03b75ad23d2 ("net/mlx5e: In case of LAG, one switch parent id is used for all representors")
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Waleed Musa <waleedm@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/lag.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h