* [PATCH] net/mlx5e: fix semicolon.cocci warnings [not found] <201812222032.13tR4nHr%fengguang.wu@intel.com> @ 2018-12-22 12:02 ` kbuild test robot 2018-12-23 7:06 ` Leon Romanovsky 2018-12-24 22:20 ` David Miller 0 siblings, 2 replies; 5+ messages in thread From: kbuild test robot @ 2018-12-22 12:02 UTC (permalink / raw) To: Gavi Teitz Cc: kbuild-all, Saeed Mahameed, Or Gerlitz, Leon Romanovsky, netdev, linux-rdma, linux-kernel From: kbuild test robot <fengguang.wu@intel.com> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1339:57-58: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 4c8fb2986d44 ("net/mlx5e: Increase VF representors' SQ size to 128") CC: Gavi Teitz <gavi@mellanox.com> Signed-off-by: kbuild test robot <fengguang.wu@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 340ae71f9dd421227a58c14a909b63033745dca4 commit: 4c8fb2986d44c5a75949a88ac61deec0ed50a542 [11213/11734] net/mlx5e: Increase VF representors' SQ size to 128 en_rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -1336,7 +1336,7 @@ static void mlx5e_build_rep_params(struc if (rep->vport == FDB_UPLINK_VPORT) params->log_sq_size = MLX5E_PARAMS_DEFAULT_LOG_SQ_SIZE; else - params->log_sq_size = MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE;; + params->log_sq_size = MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE; /* RQ */ mlx5e_build_rq_params(mdev, params); ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net/mlx5e: fix semicolon.cocci warnings 2018-12-22 12:02 ` [PATCH] net/mlx5e: fix semicolon.cocci warnings kbuild test robot @ 2018-12-23 7:06 ` Leon Romanovsky 2018-12-24 18:01 ` David Miller 2018-12-24 22:20 ` David Miller 1 sibling, 1 reply; 5+ messages in thread From: Leon Romanovsky @ 2018-12-23 7:06 UTC (permalink / raw) To: David S. Miller, kbuild test robot Cc: Gavi Teitz, kbuild-all, Saeed Mahameed, Or Gerlitz, netdev, linux-rdma, linux-kernel [-- Attachment #1: Type: text/plain, Size: 582 bytes --] On Sat, Dec 22, 2018 at 08:02:16PM +0800, kbuild test robot wrote: > From: kbuild test robot <fengguang.wu@intel.com> > > drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1339:57-58: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: 4c8fb2986d44 ("net/mlx5e: Increase VF representors' SQ size to 128") > CC: Gavi Teitz <gavi@mellanox.com> > Signed-off-by: kbuild test robot <fengguang.wu@intel.com> > --- Dave, Can you please apply this small fix? Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net/mlx5e: fix semicolon.cocci warnings 2018-12-23 7:06 ` Leon Romanovsky @ 2018-12-24 18:01 ` David Miller 0 siblings, 0 replies; 5+ messages in thread From: David Miller @ 2018-12-24 18:01 UTC (permalink / raw) To: leon Cc: fengguang.wu, gavi, kbuild-all, saeedm, ogerlitz, netdev, linux-rdma, linux-kernel From: Leon Romanovsky <leon@kernel.org> Date: Sun, 23 Dec 2018 09:06:13 +0200 > Can you please apply this small fix? Sure, I (eventually) will. I'm just trying to figure out a few procedural issues with handling the early net-next pull request before I start tossing more changes on top. Thanks! ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net/mlx5e: fix semicolon.cocci warnings 2018-12-22 12:02 ` [PATCH] net/mlx5e: fix semicolon.cocci warnings kbuild test robot 2018-12-23 7:06 ` Leon Romanovsky @ 2018-12-24 22:20 ` David Miller 1 sibling, 0 replies; 5+ messages in thread From: David Miller @ 2018-12-24 22:20 UTC (permalink / raw) To: fengguang.wu Cc: gavi, kbuild-all, saeedm, ogerlitz, leon, netdev, linux-rdma, linux-kernel From: kbuild test robot <fengguang.wu@intel.com> Date: Sat, 22 Dec 2018 20:02:16 +0800 > From: kbuild test robot <fengguang.wu@intel.com> > > drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1339:57-58: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: 4c8fb2986d44 ("net/mlx5e: Increase VF representors' SQ size to 128") > CC: Gavi Teitz <gavi@mellanox.com> > Signed-off-by: kbuild test robot <fengguang.wu@intel.com> Applied. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next V1 18/18] net/mlx5e: Add support for SR-IOV ndos
2015-11-29 15:37 ` Or Gerlitz
@ 2015-11-29 16:35 kbuild test robot
2015-11-29 15:37 ` Or Gerlitz
0 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2015-11-29 16:35 UTC (permalink / raw)
To: Or Gerlitz
Cc: kbuild-all, David S. Miller, netdev, Don Dutile, Doug Ledford,
Saeed Mahameed, Tal Alon, Hadar Har-Zion, Rony Efraim, Or Gerlitz
Hi Saeed,
[auto build test WARNING on: net-next/master]
[also build test WARNING on: v4.4-rc2 next-20151127]
url: https://github.com/0day-ci/linux/commits/Or-Gerlitz/Introducing-ConnectX-4-Ethernet-SRIOV/20151129-234342
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/mellanox/mlx5/core/en_main.c:1970:2-3: Unneeded semicolon
drivers/net/ethernet/mellanox/mlx5/core/en_main.c:1959:2-3: Unneeded semicolon
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH net-next V1 18/18] net/mlx5e: Add support for SR-IOV ndos @ 2015-11-29 15:37 ` Or Gerlitz 2015-11-29 16:35 ` [PATCH] net/mlx5e: fix semicolon.cocci warnings kbuild test robot 0 siblings, 1 reply; 5+ messages in thread From: Or Gerlitz @ 2015-11-29 15:37 UTC (permalink / raw) To: David S. Miller Cc: netdev, Don Dutile, Doug Ledford, Saeed Mahameed, Tal Alon, Hadar Har-Zion, Rony Efraim, Or Gerlitz From: Saeed Mahameed <saeedm@mellanox.com> Implement and enable SR-IOV ndos to manage SR-IOV configuration via netdev netlink API. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 84 ++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 007e464..49c0d75 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -32,6 +32,7 @@ #include <linux/mlx5/flow_table.h> #include "en.h" +#include "eswitch.h" struct mlx5e_rq_param { u32 rqc[MLX5_ST_SZ_DW(rqc)]; @@ -1931,6 +1932,79 @@ static int mlx5e_change_mtu(struct net_device *netdev, int new_mtu) return err; } +static int mlx5e_set_vf_mac(struct net_device *dev, int vf, u8 *mac) +{ + struct mlx5e_priv *priv = netdev_priv(dev); + struct mlx5_core_dev *mdev = priv->mdev; + + return mlx5_eswitch_set_vport_mac(mdev->priv.eswitch, vf + 1, mac); +} + +static int mlx5e_set_vf_vlan(struct net_device *dev, int vf, u16 vlan, u8 qos) +{ + struct mlx5e_priv *priv = netdev_priv(dev); + struct mlx5_core_dev *mdev = priv->mdev; + + return mlx5_eswitch_set_vport_vlan(mdev->priv.eswitch, vf + 1, + vlan, qos); +} + +static int mlx5_vport_link2ifla(u8 esw_link) +{ + switch (esw_link) { + case MLX5_ESW_VPORT_ADMIN_STATE_DOWN: + return IFLA_VF_LINK_STATE_DISABLE; + case MLX5_ESW_VPORT_ADMIN_STATE_UP: + return IFLA_VF_LINK_STATE_ENABLE; + }; + return IFLA_VF_LINK_STATE_AUTO; +} + +static int mlx5_ifla_link2vport(u8 ifla_link) +{ + switch (ifla_link) { + case IFLA_VF_LINK_STATE_DISABLE: + return MLX5_ESW_VPORT_ADMIN_STATE_DOWN; + case IFLA_VF_LINK_STATE_ENABLE: + return MLX5_ESW_VPORT_ADMIN_STATE_UP; + }; + return MLX5_ESW_VPORT_ADMIN_STATE_AUTO; +} + +static int mlx5e_set_vf_link_state(struct net_device *dev, int vf, + int link_state) +{ + struct mlx5e_priv *priv = netdev_priv(dev); + struct mlx5_core_dev *mdev = priv->mdev; + + return mlx5_eswitch_set_vport_state(mdev->priv.eswitch, vf + 1, + mlx5_ifla_link2vport(link_state)); +} + +static int mlx5e_get_vf_config(struct net_device *dev, + int vf, struct ifla_vf_info *ivi) +{ + struct mlx5e_priv *priv = netdev_priv(dev); + struct mlx5_core_dev *mdev = priv->mdev; + int err; + + err = mlx5_eswitch_get_vport_config(mdev->priv.eswitch, vf + 1, ivi); + if (err) + return err; + ivi->linkstate = mlx5_vport_link2ifla(ivi->linkstate); + return 0; +} + +static int mlx5e_get_vf_stats(struct net_device *dev, + int vf, struct ifla_vf_stats *vf_stats) +{ + struct mlx5e_priv *priv = netdev_priv(dev); + struct mlx5_core_dev *mdev = priv->mdev; + + return mlx5_eswitch_get_vport_stats(mdev->priv.eswitch, vf + 1, + vf_stats); +} + static struct net_device_ops mlx5e_netdev_ops = { .ndo_open = mlx5e_open, .ndo_stop = mlx5e_close, @@ -1941,7 +2015,7 @@ static struct net_device_ops mlx5e_netdev_ops = { .ndo_vlan_rx_add_vid = mlx5e_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = mlx5e_vlan_rx_kill_vid, .ndo_set_features = mlx5e_set_features, - .ndo_change_mtu = mlx5e_change_mtu, + .ndo_change_mtu = mlx5e_change_mtu }; static int mlx5e_check_required_hca_cap(struct mlx5_core_dev *mdev) @@ -2041,6 +2115,14 @@ static void mlx5e_build_netdev(struct net_device *netdev) if (priv->params.num_tc > 1) mlx5e_netdev_ops.ndo_select_queue = mlx5e_select_queue; + if (MLX5_CAP_GEN(mdev, vport_group_manager)) { + mlx5e_netdev_ops.ndo_set_vf_mac = mlx5e_set_vf_mac; + mlx5e_netdev_ops.ndo_set_vf_vlan = mlx5e_set_vf_vlan; + mlx5e_netdev_ops.ndo_get_vf_config = mlx5e_get_vf_config; + mlx5e_netdev_ops.ndo_set_vf_link_state = mlx5e_set_vf_link_state; + mlx5e_netdev_ops.ndo_get_vf_stats = mlx5e_get_vf_stats; + } + netdev->netdev_ops = &mlx5e_netdev_ops; netdev->watchdog_timeo = 15 * HZ; -- 2.3.7 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] net/mlx5e: fix semicolon.cocci warnings 2015-11-29 15:37 ` Or Gerlitz @ 2015-11-29 16:35 ` kbuild test robot 0 siblings, 0 replies; 5+ messages in thread From: kbuild test robot @ 2015-11-29 16:35 UTC (permalink / raw) To: Or Gerlitz Cc: kbuild-all, David S. Miller, netdev, Don Dutile, Doug Ledford, Saeed Mahameed, Tal Alon, Hadar Har-Zion, Rony Efraim, Or Gerlitz drivers/net/ethernet/mellanox/mlx5/core/en_main.c:1970:2-3: Unneeded semicolon drivers/net/ethernet/mellanox/mlx5/core/en_main.c:1959:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- en_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -1956,7 +1956,7 @@ static int mlx5_vport_link2ifla(u8 esw_l return IFLA_VF_LINK_STATE_DISABLE; case MLX5_ESW_VPORT_ADMIN_STATE_UP: return IFLA_VF_LINK_STATE_ENABLE; - }; + } return IFLA_VF_LINK_STATE_AUTO; } @@ -1967,7 +1967,7 @@ static int mlx5_ifla_link2vport(u8 ifla_ return MLX5_ESW_VPORT_ADMIN_STATE_DOWN; case IFLA_VF_LINK_STATE_ENABLE: return MLX5_ESW_VPORT_ADMIN_STATE_UP; - }; + } return MLX5_ESW_VPORT_ADMIN_STATE_AUTO; } ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-24 22:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201812222032.13tR4nHr%fengguang.wu@intel.com>
2018-12-22 12:02 ` [PATCH] net/mlx5e: fix semicolon.cocci warnings kbuild test robot
2018-12-23 7:06 ` Leon Romanovsky
2018-12-24 18:01 ` David Miller
2018-12-24 22:20 ` David Miller
2015-11-29 16:35 [PATCH net-next V1 18/18] net/mlx5e: Add support for SR-IOV ndos kbuild test robot
2015-11-29 15:37 ` Or Gerlitz
2015-11-29 16:35 ` [PATCH] net/mlx5e: fix semicolon.cocci warnings kbuild test robot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox