mlxsw: core: Add support for packets received from LAG port
authorJiri Pirko <jiri@mellanox.com>
Thu, 3 Dec 2015 11:12:23 +0000 (12:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2015 16:49:28 +0000 (11:49 -0500)
commit8060646a0fd1b1685a16694f2eb2f461e5eb46cc
treefe2894271fd36b61ffc039175b740a7c38d89b99
parentc5b9b518adab8641d9e718e629c88698cc35e7fa
mlxsw: core: Add support for packets received from LAG port

Lower layer (pci) has information if the packet is received via LAG port.
If that is the case, it fills up rx_info accordingly. However upper
layer does not care about lag_id/port_index for received packets so
convert it to local_port before passing it up. For that conversion, lag
mapping array is introduced. Upper layer is responsible for setting up
the mapping according to what is set in HW.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/pci.c