Skip to content

Commit 91e4d59

Browse files
yotamgidavem330
authored andcommitted
mlxsw: spectrum_router: Export RIF dev access function
The mlxsw_sp_rif struct, defined as private struct in spectrum_router.c will be used in the multicast router source file. Due to the fact that the dev field will be needed by the multicast router logic, add an access function to it. Signed-off-by: Yotam Gigi <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4af5964 commit 91e4d59

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5049,6 +5049,11 @@ int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif)
50495049
return rif->dev->ifindex;
50505050
}
50515051

5052+
const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif)
5053+
{
5054+
return rif->dev;
5055+
}
5056+
50525057
static struct mlxsw_sp_rif *
50535058
mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
50545059
const struct mlxsw_sp_rif_params *params)

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ u16 mlxsw_sp_rif_index(const struct mlxsw_sp_rif *rif);
6969
u16 mlxsw_sp_ipip_lb_rif_index(const struct mlxsw_sp_rif_ipip_lb *rif);
7070
u16 mlxsw_sp_ipip_lb_ul_vr_id(const struct mlxsw_sp_rif_ipip_lb *rif);
7171
int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif);
72+
const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif);
7273
int mlxsw_sp_rif_counter_value_get(struct mlxsw_sp *mlxsw_sp,
7374
struct mlxsw_sp_rif *rif,
7475
enum mlxsw_sp_rif_counter_dir dir,

0 commit comments

Comments
 (0)