]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Extend port_orig_get for bridge devices
authorNogah Frankel <nogahf@mellanox.com>
Thu, 9 Feb 2017 13:54:48 +0000 (14:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2017 16:46:41 +0000 (11:46 -0500)
commit2a6f463c3affed5027d968ef0a07c6f15c2f6ae5
treeef7ecfb3e48491ac1657dc21f913fa366b67b71f
parent736989c06caa0d244eb41789d097f6a1db63599c
mlxsw: spectrum: Extend port_orig_get for bridge devices

The function mlxsw_sp_port_orig_get returns the vport from the physical
port if needed, based on the original device.
This patch addresses the case where the original device is a bridge.
If it is vlan unaware bridge, it returns the matching vport. If it is vlan
aware bridge, there is no matching vport, and it returns the original port.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@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