]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mlxsw: spectrum_router: Add mlxsw_sp_rif_fid()
authorPetr Machata <petrm@mellanox.com>
Mon, 25 Jun 2018 07:48:16 +0000 (10:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jun 2018 09:05:22 +0000 (18:05 +0900)
In order to allow querying of the VID for which a RIF was created, add
a new function that returns a FID for a given RIF.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h

index 880092c6c94c8183aafea08b45fe8585dc456d5f..88bd27ace8d9a11e76d8c37cb9ea3e5c5babf7f5 100644 (file)
@@ -6122,6 +6122,11 @@ const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif)
        return rif->dev;
 }
 
+struct mlxsw_sp_fid *mlxsw_sp_rif_fid(const struct mlxsw_sp_rif *rif)
+{
+       return rif->fid;
+}
+
 static struct mlxsw_sp_rif *
 mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
                    const struct mlxsw_sp_rif_params *params,
index 5a258b1db03c8503cd4dff2488cbd42f4bfa5ba7..52e25695625c6eb815b2dd4c23ae5e85417180cf 100644 (file)
@@ -77,6 +77,7 @@ u32 mlxsw_sp_ipip_dev_ul_tb_id(const struct net_device *ol_dev);
 int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif);
 u8 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp);
 const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif);
+struct mlxsw_sp_fid *mlxsw_sp_rif_fid(const struct mlxsw_sp_rif *rif);
 int mlxsw_sp_rif_counter_value_get(struct mlxsw_sp *mlxsw_sp,
                                   struct mlxsw_sp_rif *rif,
                                   enum mlxsw_sp_rif_counter_dir dir,