mlxsw: spectrum_router: Allocate RIF prior to its configuration
authorIdo Schimmel <idosch@mellanox.com>
Fri, 26 May 2017 06:37:33 +0000 (08:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 May 2017 19:18:47 +0000 (15:18 -0400)
commita13a594da06c437afa546888ddba64d3bd2db06d
tree9f7d97f3a3b9c6dfe5ddd14c4e963448e5d88905
parentcaa3ddf8e39022ee2cd87835bc400b9c516fcd95
mlxsw: spectrum_router: Allocate RIF prior to its configuration

In the following patches the RIF's configuration function is going to
expect a RIF struct with all the necessary information.

Therefore, allocate the RIF just before it's configured to the device.

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_router.c