netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14
@ 2017-06-15 20:55 Saeed Mahameed
  2017-06-15 20:55 ` [net 1/6] net/mlx5: Wait for FW readiness before initializing command interface Saeed Mahameed
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed

Hi Dave,

This series contains some fixes for the mlx5 core and netdev driver.

Please pull and let me know if there's any problem.

For -stable:
("net/mlx5: Wait for FW readiness before initializing command interface") kernels >= 4.4
("net/mlx5e: Fix timestamping capabilities reporting") kernels >= 4.5
("net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it") kernels >= 4.9
("net/mlx5e: Fix min inline value for VF rep SQs") kernels >= 4.11

The "net/mlx5e: Fix min inline .." (a oneliner patch) doesn't cleanly apply
to 4.11, it hits a contextual conflict and can be easily resolved by:
+       mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode);
to the end of mlx5e_build_rep_netdev_priv. Note the 2nd parameter of
mlx5_query_min_inline is slightly different from the original one.

Thanks,
Saeed.

---

The following changes since commit 3b1bbafbfd14474fee61487552c9916ec1b25c58:

  Doc: net: dsa: b53: update location of referenced dsa.txt (2017-06-15 15:02:40 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2017-06-14

for you to fetch changes up to 31ac93386d135a6c96de9c8bab406f5ccabf5a4d:

  net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it (2017-06-15 23:27:46 +0300)

----------------------------------------------------------------
mlx5-fixes-2017-06-14

----------------------------------------------------------------
Chris Mi (1):
      net/mlx5e: Fix min inline value for VF rep SQs

Eli Cohen (1):
      net/mlx5: Wait for FW readiness before initializing command interface

Maor Dickman (1):
      net/mlx5e: Fix timestamping capabilities reporting

Or Gerlitz (3):
      net/mlx5: Properly check applicability of devlink eswitch commands
      net/mlx5e: Remove TC header re-write offloading of ip tos
      net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it

 .../net/ethernet/mellanox/mlx5/core/en_ethtool.c   |  8 +--
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |  3 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c   |  2 +
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c    |  1 -
 .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 77 +++++++++++-----------
 drivers/net/ethernet/mellanox/mlx5/core/main.c     | 14 +++-
 6 files changed, 60 insertions(+), 45 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [net 1/6] net/mlx5: Wait for FW readiness before initializing command interface
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
@ 2017-06-15 20:55 ` Saeed Mahameed
  2017-06-15 20:55 ` [net 2/6] net/mlx5e: Fix timestamping capabilities reporting Saeed Mahameed
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eli Cohen, Saeed Mahameed

From: Eli Cohen <eli@mellanox.com>

Before attempting to initialize the command interface we must wait till
the fw_initializing bit is clear.

If we fail to meet this condition the hardware will drop our
configuration, specifically the descriptors page address.  This scenario
can happen when the firmware is still executing an FLR flow and did not
finish yet so the driver needs to wait for that to finish.

Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup')
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 4f577a5abf88..13be264587f1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -175,8 +175,9 @@ static struct mlx5_profile profile[] = {
 	},
 };
 
-#define FW_INIT_TIMEOUT_MILI	2000
-#define FW_INIT_WAIT_MS		2
+#define FW_INIT_TIMEOUT_MILI		2000
+#define FW_INIT_WAIT_MS			2
+#define FW_PRE_INIT_TIMEOUT_MILI	10000
 
 static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili)
 {
@@ -1013,6 +1014,15 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
 	 */
 	dev->state = MLX5_DEVICE_STATE_UP;
 
+	/* wait for firmware to accept initialization segments configurations
+	 */
+	err = wait_fw_init(dev, FW_PRE_INIT_TIMEOUT_MILI);
+	if (err) {
+		dev_err(&dev->pdev->dev, "Firmware over %d MS in pre-initializing state, aborting\n",
+			FW_PRE_INIT_TIMEOUT_MILI);
+		goto out;
+	}
+
 	err = mlx5_cmd_init(dev);
 	if (err) {
 		dev_err(&pdev->dev, "Failed initializing command interface, aborting\n");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net 2/6] net/mlx5e: Fix timestamping capabilities reporting
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
  2017-06-15 20:55 ` [net 1/6] net/mlx5: Wait for FW readiness before initializing command interface Saeed Mahameed
@ 2017-06-15 20:55 ` Saeed Mahameed
  2017-06-15 20:55 ` [net 3/6] net/mlx5e: Fix min inline value for VF rep SQs Saeed Mahameed
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Maor Dickman, Saeed Mahameed

From: Maor Dickman <maord@mellanox.com>

Misuse of (BIT) macro caused to report wrong flags for
"Hardware Transmit Timestamp Modes" and "Hardware Receive
Filter Modes"

Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support')
Signed-off-by: Maor Dickman <maord@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 8209affa75c3..16486dff1493 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -1242,11 +1242,11 @@ static int mlx5e_get_ts_info(struct net_device *dev,
 				 SOF_TIMESTAMPING_RX_HARDWARE |
 				 SOF_TIMESTAMPING_RAW_HARDWARE;
 
-	info->tx_types = (BIT(1) << HWTSTAMP_TX_OFF) |
-			 (BIT(1) << HWTSTAMP_TX_ON);
+	info->tx_types = BIT(HWTSTAMP_TX_OFF) |
+			 BIT(HWTSTAMP_TX_ON);
 
-	info->rx_filters = (BIT(1) << HWTSTAMP_FILTER_NONE) |
-			   (BIT(1) << HWTSTAMP_FILTER_ALL);
+	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
+			   BIT(HWTSTAMP_FILTER_ALL);
 
 	return 0;
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net 3/6] net/mlx5e: Fix min inline value for VF rep SQs
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
  2017-06-15 20:55 ` [net 1/6] net/mlx5: Wait for FW readiness before initializing command interface Saeed Mahameed
  2017-06-15 20:55 ` [net 2/6] net/mlx5e: Fix timestamping capabilities reporting Saeed Mahameed
@ 2017-06-15 20:55 ` Saeed Mahameed
  2017-06-15 20:55 ` [net 4/6] net/mlx5: Properly check applicability of devlink eswitch commands Saeed Mahameed
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Chris Mi, Saeed Mahameed

From: Chris Mi <chrism@mellanox.com>

The offending commit only changed the code path for PF/VF, but it
didn't take care of VF representors. As a result, since
params->tx_min_inline_mode for VF representors is kzalloced to 0
(MLX5_INLINE_MODE_NONE), all VF reps SQs were set to that mode.

This actually works on CX5 by default but broke CX4. Fix that by
adding a call to query the min inline mode from the VF rep build up code.

Fixes: a6f402e49901 ("net/mlx5e: Tx, no inline copy on ConnectX-5")
Signed-off-by: Chris Mi <chrism@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 79462c0368a0..46984a52a94b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -791,6 +791,8 @@ static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev,
 	params->tx_max_inline         = mlx5e_get_max_inline_cap(mdev);
 	params->num_tc                = 1;
 	params->lro_wqe_sz            = MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ;
+
+	mlx5_query_min_inline(mdev, &params->tx_min_inline_mode);
 }
 
 static void mlx5e_build_rep_netdev(struct net_device *netdev)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net 4/6] net/mlx5: Properly check applicability of devlink eswitch commands
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
                   ` (2 preceding siblings ...)
  2017-06-15 20:55 ` [net 3/6] net/mlx5e: Fix min inline value for VF rep SQs Saeed Mahameed
@ 2017-06-15 20:55 ` Saeed Mahameed
  2017-06-15 20:55 ` [net 5/6] net/mlx5e: Remove TC header re-write offloading of ip tos Saeed Mahameed
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Or Gerlitz, Saeed Mahameed

From: Or Gerlitz <ogerlitz@mellanox.com>

Currently we don't check that the link type is Eth and hence crash
on IB ports when attempting to deref esw->xxx, fix that.

To avoid repeating this check over and over, put the existing
checks and the one on link type in a single helper.

Fixes: 7768d1971de6 ('net/mlx5: E-Switch, Add control for encapsulation')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Mohamad Badarnah <mohamadb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 77 +++++++++++-----------
 1 file changed, 40 insertions(+), 37 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index f991f669047e..a53e982a6863 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -906,21 +906,34 @@ static int esw_inline_mode_to_devlink(u8 mlx5_mode, u8 *mode)
 	return 0;
 }
 
-int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode)
+static int mlx5_devlink_eswitch_check(struct devlink *devlink)
 {
-	struct mlx5_core_dev *dev;
-	u16 cur_mlx5_mode, mlx5_mode = 0;
+	struct mlx5_core_dev *dev = devlink_priv(devlink);
 
-	dev = devlink_priv(devlink);
+	if (MLX5_CAP_GEN(dev, port_type) != MLX5_CAP_PORT_TYPE_ETH)
+		return -EOPNOTSUPP;
 
 	if (!MLX5_CAP_GEN(dev, vport_group_manager))
 		return -EOPNOTSUPP;
 
-	cur_mlx5_mode = dev->priv.eswitch->mode;
-
-	if (cur_mlx5_mode == SRIOV_NONE)
+	if (dev->priv.eswitch->mode == SRIOV_NONE)
 		return -EOPNOTSUPP;
 
+	return 0;
+}
+
+int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode)
+{
+	struct mlx5_core_dev *dev = devlink_priv(devlink);
+	u16 cur_mlx5_mode, mlx5_mode = 0;
+	int err;
+
+	err = mlx5_devlink_eswitch_check(devlink);
+	if (err)
+		return err;
+
+	cur_mlx5_mode = dev->priv.eswitch->mode;
+
 	if (esw_mode_from_devlink(mode, &mlx5_mode))
 		return -EINVAL;
 
@@ -937,15 +950,12 @@ int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode)
 
 int mlx5_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode)
 {
-	struct mlx5_core_dev *dev;
-
-	dev = devlink_priv(devlink);
-
-	if (!MLX5_CAP_GEN(dev, vport_group_manager))
-		return -EOPNOTSUPP;
+	struct mlx5_core_dev *dev = devlink_priv(devlink);
+	int err;
 
-	if (dev->priv.eswitch->mode == SRIOV_NONE)
-		return -EOPNOTSUPP;
+	err = mlx5_devlink_eswitch_check(devlink);
+	if (err)
+		return err;
 
 	return esw_mode_to_devlink(dev->priv.eswitch->mode, mode);
 }
@@ -954,15 +964,12 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode)
 {
 	struct mlx5_core_dev *dev = devlink_priv(devlink);
 	struct mlx5_eswitch *esw = dev->priv.eswitch;
-	int num_vports = esw->enabled_vports;
 	int err, vport;
 	u8 mlx5_mode;
 
-	if (!MLX5_CAP_GEN(dev, vport_group_manager))
-		return -EOPNOTSUPP;
-
-	if (esw->mode == SRIOV_NONE)
-		return -EOPNOTSUPP;
+	err = mlx5_devlink_eswitch_check(devlink);
+	if (err)
+		return err;
 
 	switch (MLX5_CAP_ETH(dev, wqe_inline_mode)) {
 	case MLX5_CAP_INLINE_MODE_NOT_REQUIRED:
@@ -985,7 +992,7 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode)
 	if (err)
 		goto out;
 
-	for (vport = 1; vport < num_vports; vport++) {
+	for (vport = 1; vport < esw->enabled_vports; vport++) {
 		err = mlx5_modify_nic_vport_min_inline(dev, vport, mlx5_mode);
 		if (err) {
 			esw_warn(dev, "Failed to set min inline on vport %d\n",
@@ -1010,12 +1017,11 @@ int mlx5_devlink_eswitch_inline_mode_get(struct devlink *devlink, u8 *mode)
 {
 	struct mlx5_core_dev *dev = devlink_priv(devlink);
 	struct mlx5_eswitch *esw = dev->priv.eswitch;
+	int err;
 
-	if (!MLX5_CAP_GEN(dev, vport_group_manager))
-		return -EOPNOTSUPP;
-
-	if (esw->mode == SRIOV_NONE)
-		return -EOPNOTSUPP;
+	err = mlx5_devlink_eswitch_check(devlink);
+	if (err)
+		return err;
 
 	return esw_inline_mode_to_devlink(esw->offloads.inline_mode, mode);
 }
@@ -1062,11 +1068,9 @@ int mlx5_devlink_eswitch_encap_mode_set(struct devlink *devlink, u8 encap)
 	struct mlx5_eswitch *esw = dev->priv.eswitch;
 	int err;
 
-	if (!MLX5_CAP_GEN(dev, vport_group_manager))
-		return -EOPNOTSUPP;
-
-	if (esw->mode == SRIOV_NONE)
-		return -EOPNOTSUPP;
+	err = mlx5_devlink_eswitch_check(devlink);
+	if (err)
+		return err;
 
 	if (encap != DEVLINK_ESWITCH_ENCAP_MODE_NONE &&
 	    (!MLX5_CAP_ESW_FLOWTABLE_FDB(dev, encap) ||
@@ -1105,12 +1109,11 @@ int mlx5_devlink_eswitch_encap_mode_get(struct devlink *devlink, u8 *encap)
 {
 	struct mlx5_core_dev *dev = devlink_priv(devlink);
 	struct mlx5_eswitch *esw = dev->priv.eswitch;
+	int err;
 
-	if (!MLX5_CAP_GEN(dev, vport_group_manager))
-		return -EOPNOTSUPP;
-
-	if (esw->mode == SRIOV_NONE)
-		return -EOPNOTSUPP;
+	err = mlx5_devlink_eswitch_check(devlink);
+	if (err)
+		return err;
 
 	*encap = esw->offloads.encap;
 	return 0;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net 5/6] net/mlx5e: Remove TC header re-write offloading of ip tos
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
                   ` (3 preceding siblings ...)
  2017-06-15 20:55 ` [net 4/6] net/mlx5: Properly check applicability of devlink eswitch commands Saeed Mahameed
@ 2017-06-15 20:55 ` Saeed Mahameed
  2017-06-15 20:55 ` [net 6/6] net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it Saeed Mahameed
  2017-06-16  2:23 ` [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 David Miller
  6 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Or Gerlitz, Saeed Mahameed

From: Or Gerlitz <ogerlitz@mellanox.com>

Currently the firmware API is partial and allows to offload only
the dscp part of the tos, also, ipv6 support isn't there yet.

As such, remove the offloading option of ipv4 dscp till the FW
APIs are more comprehensive.

Fixes: d79b6df6b10a ('net/mlx5e: Add parsing of TC pedit actions to HW format')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index ec63158ab643..9df9fc0d26f5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -895,7 +895,6 @@ static struct mlx5_fields fields[] = {
 	{MLX5_ACTION_IN_FIELD_OUT_SMAC_15_0,  2, offsetof(struct pedit_headers, eth.h_source[4])},
 	{MLX5_ACTION_IN_FIELD_OUT_ETHERTYPE,  2, offsetof(struct pedit_headers, eth.h_proto)},
 
-	{MLX5_ACTION_IN_FIELD_OUT_IP_DSCP, 1, offsetof(struct pedit_headers, ip4.tos)},
 	{MLX5_ACTION_IN_FIELD_OUT_IP_TTL,  1, offsetof(struct pedit_headers, ip4.ttl)},
 	{MLX5_ACTION_IN_FIELD_OUT_SIPV4,   4, offsetof(struct pedit_headers, ip4.saddr)},
 	{MLX5_ACTION_IN_FIELD_OUT_DIPV4,   4, offsetof(struct pedit_headers, ip4.daddr)},
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [net 6/6] net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
                   ` (4 preceding siblings ...)
  2017-06-15 20:55 ` [net 5/6] net/mlx5e: Remove TC header re-write offloading of ip tos Saeed Mahameed
@ 2017-06-15 20:55 ` Saeed Mahameed
  2017-06-16  2:23 ` [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 David Miller
  6 siblings, 0 replies; 8+ messages in thread
From: Saeed Mahameed @ 2017-06-15 20:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Or Gerlitz, Saeed Mahameed

From: Or Gerlitz <ogerlitz@mellanox.com>

The error flow of mlx5e_create_netdev calls the cleanup call
of the given profile without checking if it exists, fix that.

Currently the VF reps don't register that callback and we crash
if getting into error -- can be reproduced by the user doing ctrl^C
while attempting to change the sriov mode from legacy to switchdev.

Fixes: 26e59d8077a3 '(net/mlx5e: Implement mlx5e interface attach/detach callbacks')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Sabrina Dubroca <sdubroca@redhat.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 41cd22a223dc..277f4de30375 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4241,7 +4241,8 @@ struct net_device *mlx5e_create_netdev(struct mlx5_core_dev *mdev,
 	return netdev;
 
 err_cleanup_nic:
-	profile->cleanup(priv);
+	if (profile->cleanup)
+		profile->cleanup(priv);
 	free_netdev(netdev);
 
 	return NULL;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14
  2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
                   ` (5 preceding siblings ...)
  2017-06-15 20:55 ` [net 6/6] net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it Saeed Mahameed
@ 2017-06-16  2:23 ` David Miller
  6 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2017-06-16  2:23 UTC (permalink / raw)
  To: saeedm; +Cc: netdev

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Thu, 15 Jun 2017 23:55:24 +0300

> This series contains some fixes for the mlx5 core and netdev driver.
> 
> Please pull and let me know if there's any problem.

Pulled.

> For -stable:
> ("net/mlx5: Wait for FW readiness before initializing command interface") kernels >= 4.4
> ("net/mlx5e: Fix timestamping capabilities reporting") kernels >= 4.5
> ("net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it") kernels >= 4.9
> ("net/mlx5e: Fix min inline value for VF rep SQs") kernels >= 4.11
> 
> The "net/mlx5e: Fix min inline .." (a oneliner patch) doesn't cleanly apply
> to 4.11, it hits a contextual conflict and can be easily resolved by:
> +       mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode);
> to the end of mlx5e_build_rep_netdev_priv. Note the 2nd parameter of
> mlx5_query_min_inline is slightly different from the original one.

Queued up, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-16  2:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 20:55 [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 Saeed Mahameed
2017-06-15 20:55 ` [net 1/6] net/mlx5: Wait for FW readiness before initializing command interface Saeed Mahameed
2017-06-15 20:55 ` [net 2/6] net/mlx5e: Fix timestamping capabilities reporting Saeed Mahameed
2017-06-15 20:55 ` [net 3/6] net/mlx5e: Fix min inline value for VF rep SQs Saeed Mahameed
2017-06-15 20:55 ` [net 4/6] net/mlx5: Properly check applicability of devlink eswitch commands Saeed Mahameed
2017-06-15 20:55 ` [net 5/6] net/mlx5e: Remove TC header re-write offloading of ip tos Saeed Mahameed
2017-06-15 20:55 ` [net 6/6] net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it Saeed Mahameed
2017-06-16  2:23 ` [pull request][net 0/6] Mellanox mlx5 fixes 2017-06-14 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).