All of lore.kernel.org
 help / color / mirror / Atom feed
From: xiangxia.m.yue@gmail.com
To: saeedm@mellanox.com, gerlitz.or@gmail.com
Cc: netdev@vger.kernel.org, Tonghao Zhang <xiangxia.m.yue@gmail.com>
Subject: [PATCH net-next 5/5] net/mlx5e: Support enable/disable VFs link state on switchdev mode
Date: Wed, 20 Feb 2019 18:14:43 -0800	[thread overview]
Message-ID: <1550715283-23579-5-git-send-email-xiangxia.m.yue@gmail.com> (raw)
In-Reply-To: <1550715283-23579-1-git-send-email-xiangxia.m.yue@gmail.com>

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

This patch allow users to enable/disable VFs link state
on switchdev mode.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h      | 1 +
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c  | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 71c65cc..9f8761f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -1063,5 +1063,6 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb,
 int mlx5e_set_vf_rate(struct net_device *dev, int vf, int min_tx_rate, int max_tx_rate);
 int mlx5e_get_vf_config(struct net_device *dev, int vf, struct ifla_vf_info *ivi);
 int mlx5e_get_vf_stats(struct net_device *dev, int vf, struct ifla_vf_stats *vf_stats);
+int mlx5e_set_vf_link_state(struct net_device *dev, int vf, int link_state);
 #endif
 #endif /* __MLX5_EN_H__ */
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 878b346..f7475ed 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3956,7 +3956,7 @@ static int mlx5_ifla_link2vport(u8 ifla_link)
 	return MLX5_VPORT_ADMIN_STATE_AUTO;
 }
 
-static int mlx5e_set_vf_link_state(struct net_device *dev, int vf,
+int mlx5e_set_vf_link_state(struct net_device *dev, int vf,
 				   int link_state)
 {
 	struct mlx5e_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 287d48e..d270552 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -1316,6 +1316,7 @@ static int mlx5e_uplink_rep_set_vf_vlan(struct net_device *dev, int vf, u16 vlan
 	.ndo_set_vf_rate         = mlx5e_set_vf_rate,
 	.ndo_get_vf_config       = mlx5e_get_vf_config,
 	.ndo_get_vf_stats        = mlx5e_get_vf_stats,
+	.ndo_set_vf_link_state   = mlx5e_set_vf_link_state,
 	.ndo_set_vf_vlan         = mlx5e_uplink_rep_set_vf_vlan,
 	.ndo_get_port_parent_id	 = mlx5e_rep_get_port_parent_id,
 };
-- 
1.8.3.1


  parent reply	other threads:[~2019-02-21 13:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21  2:14 [PATCH net-next 1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero xiangxia.m.yue
2019-02-21  2:14 ` [PATCH net-next 2/5] net/mlx5e: Make the log friendly when decapsulation offload not supported xiangxia.m.yue
2019-02-21 16:31   ` Or Gerlitz
2019-02-22  7:48     ` Tonghao Zhang
2019-02-22  9:06       ` Or Gerlitz
2019-02-23  7:58         ` Tonghao Zhang
2019-02-24  9:23           ` Or Gerlitz
2019-02-21  2:14 ` [PATCH net-next 3/5] net/mlx5e: Remove 'parse_attr' argument in parse_tc_fdb_actions() xiangxia.m.yue
2019-02-21  2:14 ` [PATCH net-next 4/5] net/mlx5e: Deletes unnecessary setting of esw_attr->parse_attr xiangxia.m.yue
2019-02-21  2:14 ` xiangxia.m.yue [this message]
2019-02-21 17:03   ` [PATCH net-next 5/5] net/mlx5e: Support enable/disable VFs link state on switchdev mode Or Gerlitz
2019-02-22  7:49     ` Tonghao Zhang
2019-02-21 16:26 ` [PATCH net-next 1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero Or Gerlitz
2019-02-22  7:39   ` Tonghao Zhang

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=1550715283-23579-5-git-send-email-xiangxia.m.yue@gmail.com \
    --to=xiangxia.m.yue@gmail.com \
    --cc=gerlitz.or@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.