]> 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)
commitb3c874fbd09266f705b156a058d0bd923b124581
tree0ae9a28c0252e48ee0df1ae7ed9f30462253bd41
parentc303e6f931cf08379e0c42bb16fbbbe1c80ebd26
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: a25771d8f0d8 ("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