]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Compare local ports instead of pointers
authorIdo Schimmel <idosch@mellanox.com>
Wed, 27 Jan 2016 14:20:25 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jan 2016 23:55:32 +0000 (15:55 -0800)
commit2dc1872ac12bff9ed1de3906ab263f4577d20fd6
tree0ae9a28c0252e48ee0df1ae7ed9f30462253bd41
parent98b8fd8c45aec23e8227d858c1e99e04cddd31b4
mlxsw: spectrum: Compare local ports instead of pointers

When dumping the FDB we can't compare the actual pointers of the ports
structs, as it's possible the struct represents a vPort instead of the
underlying physical port.

Solve this by comparing the local port number instead, as it's shared
between the physical ports and all the vPorts on top of him.

Fixes: 168a88530a51 ("mlxsw: spectrum: Adjust switchdev ops for VLAN devices")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c