netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
@ 2019-07-02 23:55 Saeed Mahameed
  2019-07-02 23:55 ` [PATCH net-next 1/2] net/mlx5: Added fw version query command Saeed Mahameed
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Saeed Mahameed @ 2019-07-02 23:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed

Hi Dave,

This humble 2 patch series from Shay adds the support for devlink fw
versions query to mlx5 driver.

In the first patch we implement the needed fw commands to support this
feature.
In the 2nd patch we implement the devlink callbacks themselves.

I am not sending this as a pull request since i am not sure when my next
pull request is going to be ready, and these two patches are straight
forward net-next patches.

Thanks,
Saeed.

---

Shay Agroskin (2):
  net/mlx5: Added fw version query command
  net/mlx5: Added devlink info callback

 .../device_drivers/mellanox/mlx5.rst          |  19 ++
 .../net/ethernet/mellanox/mlx5/core/devlink.c |  60 +++++
 drivers/net/ethernet/mellanox/mlx5/core/fw.c  | 219 ++++++++++++++++--
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   2 +
 4 files changed, 280 insertions(+), 20 deletions(-)

-- 
2.21.0


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

* [PATCH net-next 1/2] net/mlx5: Added fw version query command
  2019-07-02 23:55 [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Saeed Mahameed
@ 2019-07-02 23:55 ` Saeed Mahameed
  2019-07-02 23:55 ` [PATCH net-next 2/2] net/mlx5: Added devlink info callback Saeed Mahameed
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2019-07-02 23:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Shay Agroskin, Saeed Mahameed

From: Shay Agroskin <shayag@mellanox.com>

Using the MCQI and MCQS registers, we query the running and pending
fw version of the HCA.
The MCQS is queried with sequentially increasing component index, until
a component of type BOOT_IMG is found. Querying this component's version
using the MCQI register yields the running and pending fw version of the
HCA.

Querying MCQI for the pending fw version should be done only after
validating that such fw version exists. This is done my checking
'component update state' field in MCQS output.

Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/fw.c  | 219 ++++++++++++++++--
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   2 +
 2 files changed, 201 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
index e8fedb307b2c..6f11941fd6cc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
@@ -37,6 +37,37 @@
 #include "mlx5_core.h"
 #include "../../mlxfw/mlxfw.h"
 
+enum {
+	MCQS_IDENTIFIER_BOOT_IMG	= 0x1,
+	MCQS_IDENTIFIER_OEM_NVCONFIG	= 0x4,
+	MCQS_IDENTIFIER_MLNX_NVCONFIG	= 0x5,
+	MCQS_IDENTIFIER_CS_TOKEN	= 0x6,
+	MCQS_IDENTIFIER_DBG_TOKEN	= 0x7,
+	MCQS_IDENTIFIER_GEARBOX		= 0xA,
+};
+
+enum {
+	MCQS_UPDATE_STATE_IDLE,
+	MCQS_UPDATE_STATE_IN_PROGRESS,
+	MCQS_UPDATE_STATE_APPLIED,
+	MCQS_UPDATE_STATE_ACTIVE,
+	MCQS_UPDATE_STATE_ACTIVE_PENDING_RESET,
+	MCQS_UPDATE_STATE_FAILED,
+	MCQS_UPDATE_STATE_CANCELED,
+	MCQS_UPDATE_STATE_BUSY,
+};
+
+enum {
+	MCQI_INFO_TYPE_CAPABILITIES	  = 0x0,
+	MCQI_INFO_TYPE_VERSION		  = 0x1,
+	MCQI_INFO_TYPE_ACTIVATION_METHOD  = 0x5,
+};
+
+enum {
+	MCQI_FW_RUNNING_VERSION = 0,
+	MCQI_FW_STORED_VERSION  = 1,
+};
+
 static int mlx5_cmd_query_adapter(struct mlx5_core_dev *dev, u32 *out,
 				  int outlen)
 {
@@ -392,33 +423,49 @@ static int mlx5_reg_mcda_set(struct mlx5_core_dev *dev,
 }
 
 static int mlx5_reg_mcqi_query(struct mlx5_core_dev *dev,
-			       u16 component_index,
-			       u32 *max_component_size,
-			       u8 *log_mcda_word_size,
-			       u16 *mcda_max_write_size)
+			       u16 component_index, bool read_pending,
+			       u8 info_type, u16 data_size, void *mcqi_data)
 {
-	u32 out[MLX5_ST_SZ_DW(mcqi_reg) + MLX5_ST_SZ_DW(mcqi_cap)];
-	int offset = MLX5_ST_SZ_DW(mcqi_reg);
-	u32 in[MLX5_ST_SZ_DW(mcqi_reg)];
+	u32 out[MLX5_ST_SZ_DW(mcqi_reg) + MLX5_UN_SZ_DW(mcqi_reg_data)] = {};
+	u32 in[MLX5_ST_SZ_DW(mcqi_reg)] = {};
+	void *data;
 	int err;
 
-	memset(in, 0, sizeof(in));
-	memset(out, 0, sizeof(out));
-
 	MLX5_SET(mcqi_reg, in, component_index, component_index);
-	MLX5_SET(mcqi_reg, in, data_size, MLX5_ST_SZ_BYTES(mcqi_cap));
+	MLX5_SET(mcqi_reg, in, read_pending_component, read_pending);
+	MLX5_SET(mcqi_reg, in, info_type, info_type);
+	MLX5_SET(mcqi_reg, in, data_size, data_size);
 
 	err = mlx5_core_access_reg(dev, in, sizeof(in), out,
-				   sizeof(out), MLX5_REG_MCQI, 0, 0);
+				   MLX5_ST_SZ_BYTES(mcqi_reg) + data_size,
+				   MLX5_REG_MCQI, 0, 0);
 	if (err)
-		goto out;
+		return err;
 
-	*max_component_size = MLX5_GET(mcqi_cap, out + offset, max_component_size);
-	*log_mcda_word_size = MLX5_GET(mcqi_cap, out + offset, log_mcda_word_size);
-	*mcda_max_write_size = MLX5_GET(mcqi_cap, out + offset, mcda_max_write_size);
+	data = MLX5_ADDR_OF(mcqi_reg, out, data);
+	memcpy(mcqi_data, data, data_size);
 
-out:
-	return err;
+	return 0;
+}
+
+static int mlx5_reg_mcqi_caps_query(struct mlx5_core_dev *dev, u16 component_index,
+				    u32 *max_component_size, u8 *log_mcda_word_size,
+				    u16 *mcda_max_write_size)
+{
+	u32 mcqi_reg[MLX5_ST_SZ_DW(mcqi_cap)] = {};
+	int err;
+
+	err = mlx5_reg_mcqi_query(dev, component_index, 0,
+				  MCQI_INFO_TYPE_CAPABILITIES,
+				  MLX5_ST_SZ_BYTES(mcqi_cap), mcqi_reg);
+	if (err)
+		return err;
+
+	*max_component_size = MLX5_GET(mcqi_cap, mcqi_reg, max_component_size);
+	*log_mcda_word_size = MLX5_GET(mcqi_cap, mcqi_reg, log_mcda_word_size);
+	*mcda_max_write_size = MLX5_GET(mcqi_cap, mcqi_reg, mcda_max_write_size);
+
+	return 0;
 }
 
 struct mlx5_mlxfw_dev {
@@ -434,8 +481,13 @@ static int mlx5_component_query(struct mlxfw_dev *mlxfw_dev,
 		container_of(mlxfw_dev, struct mlx5_mlxfw_dev, mlxfw_dev);
 	struct mlx5_core_dev *dev = mlx5_mlxfw_dev->mlx5_core_dev;
 
-	return mlx5_reg_mcqi_query(dev, component_index, p_max_size,
-				   p_align_bits, p_max_write_size);
+	if (!MLX5_CAP_GEN(dev, mcam_reg) || !MLX5_CAP_MCAM_REG(dev, mcqi)) {
+		mlx5_core_warn(dev, "caps query isn't supported by running FW\n");
+		return -EOPNOTSUPP;
+	}
+
+	return mlx5_reg_mcqi_caps_query(dev, component_index, p_max_size,
+					p_align_bits, p_max_write_size);
 }
 
 static int mlx5_fsm_lock(struct mlxfw_dev *mlxfw_dev, u32 *fwhandle)
@@ -575,3 +627,130 @@ int mlx5_firmware_flash(struct mlx5_core_dev *dev,
 	return mlxfw_firmware_flash(&mlx5_mlxfw_dev.mlxfw_dev,
 				    firmware, extack);
 }
+
+static int mlx5_reg_mcqi_version_query(struct mlx5_core_dev *dev,
+				       u16 component_index, bool read_pending,
+				       u32 *mcqi_version_out)
+{
+	return mlx5_reg_mcqi_query(dev, component_index, read_pending,
+				   MCQI_INFO_TYPE_VERSION,
+				   MLX5_ST_SZ_BYTES(mcqi_version),
+				   mcqi_version_out);
+}
+
+static int mlx5_reg_mcqs_query(struct mlx5_core_dev *dev, u32 *out,
+			       u16 component_index)
+{
+	u8 out_sz = MLX5_ST_SZ_BYTES(mcqs_reg);
+	u32 in[MLX5_ST_SZ_DW(mcqs_reg)] = {};
+	int err;
+
+	memset(out, 0, out_sz);
+
+	MLX5_SET(mcqs_reg, in, component_index, component_index);
+
+	err = mlx5_core_access_reg(dev, in, sizeof(in), out,
+				   out_sz, MLX5_REG_MCQS, 0, 0);
+	return err;
+}
+
+/* scans component index sequentially, to find the boot img index */
+static int mlx5_get_boot_img_component_index(struct mlx5_core_dev *dev)
+{
+	u32 out[MLX5_ST_SZ_DW(mcqs_reg)] = {};
+	u16 identifier, component_idx = 0;
+	bool quit;
+	int err;
+
+	do {
+		err = mlx5_reg_mcqs_query(dev, out, component_idx);
+		if (err)
+			return err;
+
+		identifier = MLX5_GET(mcqs_reg, out, identifier);
+		quit = !!MLX5_GET(mcqs_reg, out, last_index_flag);
+		quit |= identifier == MCQS_IDENTIFIER_BOOT_IMG;
+	} while (!quit && ++component_idx);
+
+	if (identifier != MCQS_IDENTIFIER_BOOT_IMG) {
+		mlx5_core_warn(dev, "mcqs: can't find boot_img component ix, last scanned idx %d\n",
+			       component_idx);
+		return -EOPNOTSUPP;
+	}
+
+	return component_idx;
+}
+
+static int
+mlx5_fw_image_pending(struct mlx5_core_dev *dev,
+		      int component_index,
+		      bool *pending_version_exists)
+{
+	u32 out[MLX5_ST_SZ_DW(mcqs_reg)];
+	u8 component_update_state;
+	int err;
+
+	err = mlx5_reg_mcqs_query(dev, out, component_index);
+	if (err)
+		return err;
+
+	component_update_state = MLX5_GET(mcqs_reg, out, component_update_state);
+
+	if (component_update_state == MCQS_UPDATE_STATE_IDLE) {
+		*pending_version_exists = false;
+	} else if (component_update_state == MCQS_UPDATE_STATE_ACTIVE_PENDING_RESET) {
+		*pending_version_exists = true;
+	} else {
+		mlx5_core_warn(dev,
+			       "mcqs: can't read pending fw version while fw state is %d\n",
+			       component_update_state);
+		return -ENODATA;
+	}
+	return 0;
+}
+
+int mlx5_fw_version_query(struct mlx5_core_dev *dev,
+			  u32 *running_ver, u32 *pending_ver)
+{
+	u32 reg_mcqi_version[MLX5_ST_SZ_DW(mcqi_version)] = {};
+	bool pending_version_exists;
+	int component_index;
+	int err;
+
+	if (!MLX5_CAP_GEN(dev, mcam_reg) || !MLX5_CAP_MCAM_REG(dev, mcqi) ||
+	    !MLX5_CAP_MCAM_REG(dev, mcqs)) {
+		mlx5_core_warn(dev, "fw query isn't supported by the FW\n");
+		return -EOPNOTSUPP;
+	}
+
+	component_index = mlx5_get_boot_img_component_index(dev);
+	if (component_index < 0)
+		return component_index;
+
+	err = mlx5_reg_mcqi_version_query(dev, component_index,
+					  MCQI_FW_RUNNING_VERSION,
+					  reg_mcqi_version);
+	if (err)
+		return err;
+
+	*running_ver = MLX5_GET(mcqi_version, reg_mcqi_version, version);
+
+	err = mlx5_fw_image_pending(dev, component_index, &pending_version_exists);
+	if (err)
+		return err;
+
+	if (!pending_version_exists) {
+		*pending_ver = 0;
+		return 0;
+	}
+
+	err = mlx5_reg_mcqi_version_query(dev, component_index,
+					  MCQI_FW_STORED_VERSION,
+					  reg_mcqi_version);
+	if (err)
+		return err;
+
+	*pending_ver = MLX5_GET(mcqi_version, reg_mcqi_version, version);
+
+	return 0;
+}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index 958769702823..471bbc48bc1f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -205,6 +205,8 @@ int mlx5_set_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 arm, u8 mode);
 
 int mlx5_firmware_flash(struct mlx5_core_dev *dev, const struct firmware *fw,
 			struct netlink_ext_ack *extack);
+int mlx5_fw_version_query(struct mlx5_core_dev *dev,
+			  u32 *running_ver, u32 *stored_ver);
 
 void mlx5e_init(void);
 void mlx5e_cleanup(void);
-- 
2.21.0


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

* [PATCH net-next 2/2] net/mlx5: Added devlink info callback
  2019-07-02 23:55 [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Saeed Mahameed
  2019-07-02 23:55 ` [PATCH net-next 1/2] net/mlx5: Added fw version query command Saeed Mahameed
@ 2019-07-02 23:55 ` Saeed Mahameed
  2019-07-03  0:51 ` [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Jakub Kicinski
  2019-07-03 20:47 ` David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2019-07-02 23:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Shay Agroskin, Saeed Mahameed

From: Shay Agroskin <shayag@mellanox.com>

The callback is invoked using 'devlink dev info <pci>' command and returns
the running and pending firmware version of the HCA and the name of the
kernel driver.

If there is a pending firmware version (a new version is burned but the
HCA still runs with the previous) it is returned as the stored
firmware version. Otherwise, the running version is returned for this
field.

Output example:
$ devlink dev info pci/0000:00:06.0
pci/0000:00:06.0:
  driver mlx5_core
  versions:
      fixed:
        fw.psid MT_0000000009
      running:
        fw.version 16.26.0100
      stored:
        fw.version 16.26.0100

Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 .../device_drivers/mellanox/mlx5.rst          | 19 ++++++
 .../net/ethernet/mellanox/mlx5/core/devlink.c | 60 +++++++++++++++++++
 2 files changed, 79 insertions(+)

diff --git a/Documentation/networking/device_drivers/mellanox/mlx5.rst b/Documentation/networking/device_drivers/mellanox/mlx5.rst
index 4eeef2df912f..214325897732 100644
--- a/Documentation/networking/device_drivers/mellanox/mlx5.rst
+++ b/Documentation/networking/device_drivers/mellanox/mlx5.rst
@@ -10,6 +10,7 @@ Contents
 ========
 
 - `Enabling the driver and kconfig options`_
+- `Devlink info`_
 - `Devlink health reporters`_
 
 Enabling the driver and kconfig options
@@ -101,6 +102,24 @@ Enabling the driver and kconfig options
 - CONFIG_VXLAN: When chosen, mlx5 vxaln support will be enabled.
 - CONFIG_MLXFW: When chosen, mlx5 firmware flashing support will be enabled (via devlink and ethtool).
 
+Devlink info
+============
+
+The devlink info reports the running and stored firmware versions on device.
+It also prints the device PSID which represents the HCA board type ID.
+
+User command example::
+
+   $ devlink dev info pci/0000:00:06.0
+      pci/0000:00:06.0:
+      driver mlx5_core
+      versions:
+         fixed:
+            fw.psid MT_0000000009
+         running:
+            fw.version 16.26.0100
+         stored:
+            fw.version 16.26.0100
 
 Devlink health reporters
 ========================
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
index 1533c657220b..a400f4430c28 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
@@ -25,6 +25,65 @@ static int mlx5_devlink_flash_update(struct devlink *devlink,
 	return mlx5_firmware_flash(dev, fw, extack);
 }
 
+static u8 mlx5_fw_ver_major(u32 version)
+{
+	return (version >> 24) & 0xff;
+}
+
+static u8 mlx5_fw_ver_minor(u32 version)
+{
+	return (version >> 16) & 0xff;
+}
+
+static u16 mlx5_fw_ver_subminor(u32 version)
+{
+	return version & 0xffff;
+}
+
+#define DEVLINK_FW_STRING_LEN 32
+
+static int
+mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,
+		      struct netlink_ext_ack *extack)
+{
+	struct mlx5_core_dev *dev = devlink_priv(devlink);
+	char version_str[DEVLINK_FW_STRING_LEN];
+	u32 running_fw, stored_fw;
+	int err;
+
+	err = devlink_info_driver_name_put(req, DRIVER_NAME);
+	if (err)
+		return err;
+
+	err = devlink_info_version_fixed_put(req, "fw.psid", dev->board_id);
+	if (err)
+		return err;
+
+	err = mlx5_fw_version_query(dev, &running_fw, &stored_fw);
+	if (err)
+		return err;
+
+	snprintf(version_str, sizeof(version_str), "%d.%d.%04d",
+		 mlx5_fw_ver_major(running_fw), mlx5_fw_ver_minor(running_fw),
+		 mlx5_fw_ver_subminor(running_fw));
+	err = devlink_info_version_running_put(req, "fw.version", version_str);
+	if (err)
+		return err;
+
+	/* no pending version, return running (stored) version */
+	if (stored_fw == 0)
+		stored_fw = running_fw;
+
+	snprintf(version_str, sizeof(version_str), "%d.%d.%04d",
+		 mlx5_fw_ver_major(stored_fw), mlx5_fw_ver_minor(stored_fw),
+		 mlx5_fw_ver_subminor(stored_fw));
+	err = devlink_info_version_stored_put(req, "fw.version", version_str);
+	if (err)
+		return err;
+
+	return 0;
+}
+
 static const struct devlink_ops mlx5_devlink_ops = {
 #ifdef CONFIG_MLX5_ESWITCH
 	.eswitch_mode_set = mlx5_devlink_eswitch_mode_set,
@@ -35,6 +94,7 @@ static const struct devlink_ops mlx5_devlink_ops = {
 	.eswitch_encap_mode_get = mlx5_devlink_eswitch_encap_mode_get,
 #endif
 	.flash_update = mlx5_devlink_flash_update,
+	.info_get = mlx5_devlink_info_get,
 };
 
 struct devlink *mlx5_devlink_alloc(void)
-- 
2.21.0


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

* Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
  2019-07-02 23:55 [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Saeed Mahameed
  2019-07-02 23:55 ` [PATCH net-next 1/2] net/mlx5: Added fw version query command Saeed Mahameed
  2019-07-02 23:55 ` [PATCH net-next 2/2] net/mlx5: Added devlink info callback Saeed Mahameed
@ 2019-07-03  0:51 ` Jakub Kicinski
  2019-07-03 20:47 ` David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2019-07-03  0:51 UTC (permalink / raw)
  To: Saeed Mahameed; +Cc: David S. Miller, netdev

On Tue, 2 Jul 2019 23:55:07 +0000, Saeed Mahameed wrote:
> Hi Dave,
> 
> This humble 2 patch series from Shay adds the support for devlink fw
> versions query to mlx5 driver.
> 
> In the first patch we implement the needed fw commands to support this
> feature.
> In the 2nd patch we implement the devlink callbacks themselves.
> 
> I am not sending this as a pull request since i am not sure when my next
> pull request is going to be ready, and these two patches are straight
> forward net-next patches.

Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>

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

* Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
  2019-07-02 23:55 [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Saeed Mahameed
                   ` (2 preceding siblings ...)
  2019-07-03  0:51 ` [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Jakub Kicinski
@ 2019-07-03 20:47 ` David Miller
  2019-07-03 20:49   ` David Miller
  3 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2019-07-03 20:47 UTC (permalink / raw)
  To: saeedm; +Cc: netdev

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Tue, 2 Jul 2019 23:55:07 +0000

> This humble 2 patch series from Shay adds the support for devlink fw
> versions query to mlx5 driver.
> 
> In the first patch we implement the needed fw commands to support this
> feature.
> In the 2nd patch we implement the devlink callbacks themselves.
> 
> I am not sending this as a pull request since i am not sure when my next
> pull request is going to be ready, and these two patches are straight
> forward net-next patches.

Series applied to net-next, thanks.

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

* Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
  2019-07-03 20:47 ` David Miller
@ 2019-07-03 20:49   ` David Miller
  2019-07-03 23:07     ` Saeed Mahameed
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2019-07-03 20:49 UTC (permalink / raw)
  To: saeedm; +Cc: netdev

From: David Miller <davem@davemloft.net>
Date: Wed, 03 Jul 2019 13:47:00 -0700 (PDT)

> From: Saeed Mahameed <saeedm@mellanox.com>
> Date: Tue, 2 Jul 2019 23:55:07 +0000
> 
>> This humble 2 patch series from Shay adds the support for devlink fw
>> versions query to mlx5 driver.
>> 
>> In the first patch we implement the needed fw commands to support this
>> feature.
>> In the 2nd patch we implement the devlink callbacks themselves.
>> 
>> I am not sending this as a pull request since i am not sure when my next
>> pull request is going to be ready, and these two patches are straight
>> forward net-next patches.
> 
> Series applied to net-next, thanks.

This doesn't build, there is some dependency...

[davem@localhost net-next]$ make -s -j14
In file included from ./include/linux/mlx5/driver.h:51,
                 from drivers/net/ethernet/mellanox/mlx5/core/fw.c:33:
drivers/net/ethernet/mellanox/mlx5/core/fw.c: In function ‘mlx5_reg_mcqi_query’:
./include/linux/mlx5/device.h:68:36: error: invalid application of ‘sizeof’ to incomplete type ‘union mlx5_ifc_mcqi_reg_data_bits’
 #define MLX5_UN_SZ_DW(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 32)
                                    ^~~~~

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

* Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
  2019-07-03 20:49   ` David Miller
@ 2019-07-03 23:07     ` Saeed Mahameed
  2019-07-04 20:50       ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Saeed Mahameed @ 2019-07-03 23:07 UTC (permalink / raw)
  To: David Miller; +Cc: Saeed Mahameed, Linux Netdev List

On Wed, Jul 3, 2019 at 1:49 PM David Miller <davem@davemloft.net> wrote:
>
> From: David Miller <davem@davemloft.net>
> Date: Wed, 03 Jul 2019 13:47:00 -0700 (PDT)
>
> > From: Saeed Mahameed <saeedm@mellanox.com>
> > Date: Tue, 2 Jul 2019 23:55:07 +0000
> >
> >> This humble 2 patch series from Shay adds the support for devlink fw
> >> versions query to mlx5 driver.
> >>
> >> In the first patch we implement the needed fw commands to support this
> >> feature.
> >> In the 2nd patch we implement the devlink callbacks themselves.
> >>
> >> I am not sending this as a pull request since i am not sure when my next
> >> pull request is going to be ready, and these two patches are straight
> >> forward net-next patches.
> >
> > Series applied to net-next, thanks.
>
> This doesn't build, there is some dependency...
>
> [davem@localhost net-next]$ make -s -j14
> In file included from ./include/linux/mlx5/driver.h:51,
>                  from drivers/net/ethernet/mellanox/mlx5/core/fw.c:33:
> drivers/net/ethernet/mellanox/mlx5/core/fw.c: In function ‘mlx5_reg_mcqi_query’:
> ./include/linux/mlx5/device.h:68:36: error: invalid application of ‘sizeof’ to incomplete type ‘union mlx5_ifc_mcqi_reg_data_bits’
>  #define MLX5_UN_SZ_DW(typ) (sizeof(union mlx5_ifc_##typ##_bits) / 32)
>                                     ^~~~~


Yep, My bad :(, I thought [1] was part of my last pull, but it wasn't
One way to solve this is if you pull latest mlx5-next branch form:
git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git
All patches there already passed review on net-next and rdma-next mailing lists.

Or just  wait for my next pull request.

sorry for this!


[1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/commit/?h=mlx5-next&id=a82e0b5bdac29d9719d3ca2df01494a7947351aa

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

* Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
  2019-07-03 23:07     ` Saeed Mahameed
@ 2019-07-04 20:50       ` David Miller
  2019-07-04 20:54         ` Saeed Mahameed
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2019-07-04 20:50 UTC (permalink / raw)
  To: saeedm; +Cc: saeedm, netdev

From: Saeed Mahameed <saeedm@dev.mellanox.co.il>
Date: Wed, 3 Jul 2019 16:07:11 -0700

> Or just  wait for my next pull request.

Please resubmit this series once I pull your pull request in.

Thanks.

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

* Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query
  2019-07-04 20:50       ` David Miller
@ 2019-07-04 20:54         ` Saeed Mahameed
  0 siblings, 0 replies; 9+ messages in thread
From: Saeed Mahameed @ 2019-07-04 20:54 UTC (permalink / raw)
  To: David Miller; +Cc: Saeed Mahameed, Linux Netdev List

On Thu, Jul 4, 2019 at 4:50 PM David Miller <davem@davemloft.net> wrote:
>
> From: Saeed Mahameed <saeedm@dev.mellanox.co.il>
> Date: Wed, 3 Jul 2019 16:07:11 -0700
>
> > Or just  wait for my next pull request.
>
> Please resubmit this series once I pull your pull request in.
>

Done just submitted:
"[pull request][net-next V2 0/2] Mellanox, mlx5 updates 2019-07-04"
it includes both of the dependencies and the 2 mlx5 devlink fw version patches.

> Thanks.

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

end of thread, other threads:[~2019-07-04 20:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 23:55 [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Saeed Mahameed
2019-07-02 23:55 ` [PATCH net-next 1/2] net/mlx5: Added fw version query command Saeed Mahameed
2019-07-02 23:55 ` [PATCH net-next 2/2] net/mlx5: Added devlink info callback Saeed Mahameed
2019-07-03  0:51 ` [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query Jakub Kicinski
2019-07-03 20:47 ` David Miller
2019-07-03 20:49   ` David Miller
2019-07-03 23:07     ` Saeed Mahameed
2019-07-04 20:50       ` David Miller
2019-07-04 20:54         ` Saeed Mahameed

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).