Message ID | 1550715283-23579-5-git-send-email-xiangxia.m.yue@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | [net-next,1/5] net/mlx5e: Return -EOPNOTSUPP when modify header action zero | expand |
On Thu, Feb 21, 2019 at 3:42 PM <xiangxia.m.yue@gmail.com> wrote: > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > This patch allow users to enable/disable VFs link state > on switchdev mode. NAK We do it with the reps, if you change the administrative link state of a VF rep it will effect the operational link state of the VF, see upstream commit 20a1ea674783 net/mlx5e: Support VF vport link state control for SRIOV switchdev mode
On Fri, Feb 22, 2019 at 1:03 AM Or Gerlitz <gerlitz.or@gmail.com> wrote: > > On Thu, Feb 21, 2019 at 3:42 PM <xiangxia.m.yue@gmail.com> wrote: > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > > This patch allow users to enable/disable VFs link state > > on switchdev mode. > > NAK > > We do it with the reps, if you change the administrative link state of a VF rep > it will effect the operational link state of the VF, see upstream commit > > 20a1ea674783 net/mlx5e: Support VF vport link state control for SRIOV > switchdev mode Thanks,it is useful for us.
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, };