All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jiri Pirko <jiri@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH V2 net-next 0/6] mlxfw: Improve error reporting
Date: Fri, 22 Nov 2019 22:41:45 +0000	[thread overview]
Message-ID: <20191122224126.24847-1-saeedm@mellanox.com> (raw)

Hi Dave,

This patchset improves mlxfw error reporting of mlxfw to netlink and
kernel log.

1) patch #1, Convert extack msg to a formattable buffer

2) patch #2, Make mlxfw/mlxsw fw flash devlink status notify generic,
   and enable it for mlx5.

3) rest of the patches are improving mlxfw flash error messages by
reporting detailed mlxfw FSM error messages to netlink and more detailed
kernel log.

v2:
- Avoid long switch case and replace it with one call to NL_SET_ERR_MSG_MOD
  to format the message directly from the mlxfw_fsm_state_err_str table.

merge conflict with net:
@ drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c

++<<<<<<< (net-next) (keep)
+
+       if (fsm_state_err != MLXFW_FSM_STATE_ERR_OK)
+               return mlxfw_fsm_state_err(mlxfw_dev, extack, fsm_state_err);
+
++=======  
+ 
+       if (fsm_state_err != MLXFW_FSM_STATE_ERR_OK) {
+               fsm_state_err = min_t(enum mlxfw_fsm_state_err,
+                                     fsm_state_err, MLXFW_FSM_STATE_ERR_MAX);
+               pr_err("Firmware flash failed: %s\n",
+                      mlxfw_fsm_state_err_str[fsm_state_err]);
+               NL_SET_ERR_MSG_MOD(extack, "Firmware flash failed");
+               return -EINVAL;
++>>>>>>> (net) (delete) 

To resolve just use the 1st hunk, from net-next.

Thanks,
Saeed.

---

Saeed Mahameed (6):
  netlink: Convert extack msg to a formattable buffer
  net/mlxfw: Generic mlx FW flash status notify
  net/mlxfw: Improve FSM err message reporting and return codes
  net/mlxfw: Convert pr_* to dev_* in mlxfw_fsm.c
  net/mlxfw: More error messages coverage
  net/mlxfw: Macro for error reporting

 drivers/net/ethernet/mellanox/mlx5/core/fw.c  |   1 +
 drivers/net/ethernet/mellanox/mlxfw/Kconfig   |   1 +
 drivers/net/ethernet/mellanox/mlxfw/mlxfw.h   |  36 +++--
 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c   | 149 ++++++++++++------
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  17 +-
 include/linux/netlink.h                       |  27 ++--
 lib/nlattr.c                                  |   2 +-
 7 files changed, 145 insertions(+), 88 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-11-22 22:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 22:41 Saeed Mahameed [this message]
2019-11-22 22:41 ` [PATCH V2 net-next 1/6] netlink: Convert extack msg to a formattable buffer Saeed Mahameed
2019-11-24  0:56   ` Jakub Kicinski
2019-11-24  1:10     ` David Ahern
2019-11-24  1:20       ` David Ahern
2019-11-25  9:48     ` Johannes Berg
2019-11-25 23:12       ` Saeed Mahameed
2019-11-22 22:41 ` [PATCH V2 net-next 2/6] net/mlxfw: Generic mlx FW flash status notify Saeed Mahameed
2019-11-22 22:41 ` [PATCH V2 net-next 3/6] net/mlxfw: Improve FSM err message reporting and return codes Saeed Mahameed
2019-11-24  1:00   ` Jakub Kicinski
2019-11-22 22:41 ` [PATCH V2 net-next 4/6] net/mlxfw: Convert pr_* to dev_* in mlxfw_fsm.c Saeed Mahameed
2019-11-22 22:41 ` [PATCH V2 net-next 5/6] net/mlxfw: More error messages coverage Saeed Mahameed
2019-11-22 22:41 ` [PATCH V2 net-next 6/6] net/mlxfw: Macro for error reporting Saeed Mahameed
2019-11-24  0:48 ` [PATCH V2 net-next 0/6] mlxfw: Improve " Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122224126.24847-1-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.