* [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31
@ 2018-07-31 20:29 Saeed Mahameed
2018-07-31 20:29 ` [net 1/4] net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager Saeed Mahameed
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-31 20:29 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Saeed Mahameed
Hi Dave,
The following series includes four mlx5 fixes.
Please pull and let me know if there's any problem.
For -stable v4.14
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
For -stable v4.16
net/mlx5e: Set port trust mode to PCP as default
For -stable v4.17
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
Thanks,
Saeed.
The following changes since commit 6751e7c66cb8689491b89fe02c71d1d44394412b:
net: dsa: mv88e6xxx: Fix SERDES support on 88E6141/6341 (2018-07-31 10:36:59 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2018-07-31
for you to fetch changes up to 8e1d162d8e81838119de18b4ca1e302ce906f2a6:
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow (2018-07-31 12:58:45 -0700)
----------------------------------------------------------------
mlx5-fixes-2018-07-31
----------------------------------------------------------------
Adi Nissim (1):
net/mlx5e: Fix null pointer access when setting MTU of vport representor
Eli Cohen (1):
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
Feras Daoud (1):
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
Or Gerlitz (1):
net/mlx5e: Set port trust mode to PCP as default
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 ++
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 ++++
4 files changed, 10 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [net 1/4] net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
2018-07-31 20:29 [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 Saeed Mahameed
@ 2018-07-31 20:29 ` Saeed Mahameed
2018-07-31 20:29 ` [net 2/4] net/mlx5e: Set port trust mode to PCP as default Saeed Mahameed
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-31 20:29 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Eli Cohen, Saeed Mahameed
From: Eli Cohen <eli@mellanox.com>
Execute mlx5_eswitch_init() only if we have MLX5_ESWITCH_MANAGER
capabilities.
Do the same for mlx5_eswitch_cleanup().
Fixes: a9f7705ffd66 ("net/mlx5: Unify vport manager capability check")
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index dd01ad4c0b54..40dba9e8af92 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1696,7 +1696,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
int vport_num;
int err;
- if (!MLX5_VPORT_MANAGER(dev))
+ if (!MLX5_ESWITCH_MANAGER(dev))
return 0;
esw_info(dev,
@@ -1765,7 +1765,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
{
- if (!esw || !MLX5_VPORT_MANAGER(esw->dev))
+ if (!esw || !MLX5_ESWITCH_MANAGER(esw->dev))
return;
esw_info(esw->dev, "cleanup\n");
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net 2/4] net/mlx5e: Set port trust mode to PCP as default
2018-07-31 20:29 [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 Saeed Mahameed
2018-07-31 20:29 ` [net 1/4] net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager Saeed Mahameed
@ 2018-07-31 20:29 ` Saeed Mahameed
2018-07-31 20:29 ` [net 3/4] net/mlx5e: Fix null pointer access when setting MTU of vport representor Saeed Mahameed
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-31 20:29 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Or Gerlitz, Saeed Mahameed
From: Or Gerlitz <ogerlitz@mellanox.com>
The hairpin offload code has dependency on the trust mode being PCP.
Hence we should set PCP as the default for handling cases where we are
disallowed to read the trust mode from the FW, or failed to initialize it.
Fixes: 106be53b6b0a ('net/mlx5e: Set per priority hairpin pairs')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 86bc9ac99586..e33afa8d2417 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -1172,6 +1172,8 @@ static int mlx5e_trust_initialize(struct mlx5e_priv *priv)
struct mlx5_core_dev *mdev = priv->mdev;
int err;
+ priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_PCP;
+
if (!MLX5_DSCP_SUPPORTED(mdev))
return 0;
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net 3/4] net/mlx5e: Fix null pointer access when setting MTU of vport representor
2018-07-31 20:29 [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 Saeed Mahameed
2018-07-31 20:29 ` [net 1/4] net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager Saeed Mahameed
2018-07-31 20:29 ` [net 2/4] net/mlx5e: Set port trust mode to PCP as default Saeed Mahameed
@ 2018-07-31 20:29 ` Saeed Mahameed
2018-07-31 20:29 ` [net 4/4] net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow Saeed Mahameed
2018-07-31 21:36 ` [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-31 20:29 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Adi Nissim, Saeed Mahameed
From: Adi Nissim <adin@mellanox.com>
MTU helper function is used by both conventional mlx5e
instances (PF/VF) and the eswitch representors. The representor
shouldn't change the nic vport context MTU, the VF is responsible for
that. Therefore set_mtu_cb has a null value when changing the
representor MTU.
Fixes: 250a42b6a764 ("net/mlx5e: Support configurable MTU for vport representors")
Signed-off-by: Adi Nissim <adin@mellanox.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++-
1 file changed, 2 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 dae4156a710d..c592678ab5f1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3712,7 +3712,8 @@ int mlx5e_change_mtu(struct net_device *netdev, int new_mtu,
if (!reset) {
params->sw_mtu = new_mtu;
- set_mtu_cb(priv);
+ if (set_mtu_cb)
+ set_mtu_cb(priv);
netdev->mtu = params->sw_mtu;
goto out;
}
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net 4/4] net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
2018-07-31 20:29 [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 Saeed Mahameed
` (2 preceding siblings ...)
2018-07-31 20:29 ` [net 3/4] net/mlx5e: Fix null pointer access when setting MTU of vport representor Saeed Mahameed
@ 2018-07-31 20:29 ` Saeed Mahameed
2018-07-31 21:36 ` [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-31 20:29 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Feras Daoud, Saeed Mahameed
From: Feras Daoud <ferasda@mellanox.com>
After introduction of the cited commit, mlx5e_build_nic_params
receives the netdevice mtu in order to set the sw_mtu of mlx5e_params.
For enhanced IPoIB, the netdevice mtu is not set in this stage,
therefore, the initial sw_mtu equals zero. As a result, the hw_mtu
of the receive queue will be calculated incorrectly causing traffic
issues.
To fix this issue, query for port mtu before building the nic params.
Fixes: 472a1e44b349 ("net/mlx5e: Save MTU in channels params")
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index af3bb2f7a504..b7c21eb21a21 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -76,6 +76,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
void *ppriv)
{
struct mlx5e_priv *priv = mlx5i_epriv(netdev);
+ u16 max_mtu;
/* priv init */
priv->mdev = mdev;
@@ -84,6 +85,9 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
priv->ppriv = ppriv;
mutex_init(&priv->state_lock);
+ mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
+ netdev->mtu = max_mtu;
+
mlx5e_build_nic_params(mdev, &priv->channels.params,
profile->max_nch(mdev), netdev->mtu);
mlx5i_build_nic_params(mdev, &priv->channels.params);
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31
2018-07-31 20:29 [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 Saeed Mahameed
` (3 preceding siblings ...)
2018-07-31 20:29 ` [net 4/4] net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow Saeed Mahameed
@ 2018-07-31 21:36 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-07-31 21:36 UTC (permalink / raw)
To: saeedm; +Cc: netdev
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Tue, 31 Jul 2018 13:29:55 -0700
> The following series includes four mlx5 fixes.
>
> Please pull and let me know if there's any problem.
>
> For -stable v4.14
> net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
>
> For -stable v4.16
> net/mlx5e: Set port trust mode to PCP as default
>
> For -stable v4.17
> net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
Pulled and queued up for -stable.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-31 23:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-31 20:29 [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 Saeed Mahameed
2018-07-31 20:29 ` [net 1/4] net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager Saeed Mahameed
2018-07-31 20:29 ` [net 2/4] net/mlx5e: Set port trust mode to PCP as default Saeed Mahameed
2018-07-31 20:29 ` [net 3/4] net/mlx5e: Fix null pointer access when setting MTU of vport representor Saeed Mahameed
2018-07-31 20:29 ` [net 4/4] net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow Saeed Mahameed
2018-07-31 21:36 ` [pull request][net 0/4] Mellanox, mlx5 fixes 2018-07-31 David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).