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)
commit3f47f867814cdb08cd43d4b82f95bfde4a9ae579
tree0ae9a28c0252e48ee0df1ae7ed9f30462253bd41
parent304f51584f4591789539c0d37fc359bc129a4ff0
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: 54a732018d8e ("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