mlxsw: spectrum_router: Access nh->rif->dev through a helper

In order to abstract away deduction of netdevice from the corresponding
next hop, introduce a helper, mlxsw_sp_nexthop_dev(), and use it
throughout. This will make it possible to change the deduction path easily
later on.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Petr Machata 2023-06-12 17:31:04 +02:00 • committed by Paolo Abeni
commit 69f4ba177d