From: Ido Schimmel <idosch@mellanox.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jiri@mellanox.com, petrm@mellanox.com,
mlxsw@mellanox.com, Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 4/6] mlxsw: spectrum_router: Add mlxsw_sp_rif_fid()
Date: Mon, 25 Jun 2018 10:48:16 +0300 [thread overview]
Message-ID: <20180625074818.17073-5-idosch@mellanox.com> (raw)
In-Reply-To: <20180625074818.17073-1-idosch@mellanox.com>
From: Petr Machata <petrm@mellanox.com>
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>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 5 +++++
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 880092c6c94c..88bd27ace8d9 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -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,
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
index 5a258b1db03c..52e25695625c 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h
@@ -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,
--
2.14.4
next prev parent reply other threads:[~2018-06-25 7:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 7:48 [PATCH net-next 0/6] mlxsw: Support bridge router interfaces with non-default VLAN Ido Schimmel
2018-06-25 7:48 ` [PATCH net-next 1/6] mlxsw: spectrum_router: Propagate extack to .fid_get() Ido Schimmel
2018-06-25 7:48 ` [PATCH net-next 2/6] mlxsw: spectrum_router: Allocate FID according to PVID Ido Schimmel
2018-06-25 7:48 ` [PATCH net-next 3/6] mlxsw: spectrum_router: Publish mlxsw_sp_rif_find_by_dev() Ido Schimmel
2018-06-25 7:48 ` Ido Schimmel [this message]
2018-06-25 7:48 ` [PATCH net-next 5/6] mlxsw: spectrum_switchdev: Ban PVID change if bridge has a RIF Ido Schimmel
2018-06-25 7:48 ` [PATCH net-next 6/6] selftests: forwarding: Test routed bridge interface Ido Schimmel
2018-06-26 9:06 ` [PATCH net-next 0/6] mlxsw: Support bridge router interfaces with non-default VLAN David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180625074818.17073-5-idosch@mellanox.com \
--to=idosch@mellanox.com \
--cc=davem@davemloft.net \
--cc=jiri@mellanox.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox