Netdev List
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com,
	jakub.kicinski@netronome.com, sthemmin@microsoft.com,
	saeedm@mellanox.com, leon@kernel.org
Subject: Re: [patch net-next 3/7] mlxfw: Propagate error messages through extack
Date: Fri, 24 May 2019 10:11:10 +0200	[thread overview]
Message-ID: <20190524081110.GB2904@nanopsycho> (raw)
In-Reply-To: <7f3362de-baaf-99ee-1b53-55675aaf00fe@gmail.com>

Thu, May 23, 2019 at 05:19:46PM CEST, dsahern@gmail.com wrote:
>On 5/23/19 3:45 AM, Jiri Pirko wrote:
>> @@ -57,11 +58,13 @@ static int mlxfw_fsm_state_wait(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
>>  	if (fsm_state_err != MLXFW_FSM_STATE_ERR_OK) {
>>  		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;
>>  	}
>>  	if (curr_fsm_state != fsm_state) {
>>  		if (--times == 0) {
>>  			pr_err("Timeout reached on FSM state change");
>> +			NL_SET_ERR_MSG_MOD(extack, "Timeout reached on FSM state change");
>
>FSM? Is the meaning obvious to users?

It is specific to mlx drivers. But I think it is valuable to have
driver-specific terms in driver speficic extack messages.


>
>>  			return -ETIMEDOUT;
>>  		}
>>  		msleep(MLXFW_FSM_STATE_WAIT_CYCLE_MS);
>> @@ -76,7 +79,8 @@ static int mlxfw_fsm_state_wait(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
>>  
>>  static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
>>  				 u32 fwhandle,
>> -				 struct mlxfw_mfa2_component *comp)
>> +				 struct mlxfw_mfa2_component *comp,
>> +				 struct netlink_ext_ack *extack)
>>  {
>>  	u16 comp_max_write_size;
>>  	u8 comp_align_bits;
>> @@ -96,6 +100,7 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
>>  	if (comp->data_size > comp_max_size) {
>>  		pr_err("Component %d is of size %d which is bigger than limit %d\n",
>>  		       comp->index, comp->data_size, comp_max_size);
>> +		NL_SET_ERR_MSG_MOD(extack, "Component is which is bigger than limit");
>
>Need to drop 'is which'.

Will do.

>
>
>...
>
>> @@ -156,6 +163,7 @@ static int mlxfw_flash_components(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
>>  					      &component_count);
>>  	if (err) {
>>  		pr_err("Could not find device PSID in MFA2 file\n");
>> +		NL_SET_ERR_MSG_MOD(extack, "Could not find device PSID in MFA2 file");
>
>same here, is PSID understood by user?

PSID is actually exposed in "devlink dev info" for mlxsw.

>

  parent reply	other threads:[~2019-05-24  8:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  9:45 [patch net-next 0/7] expose flash update status to user Jiri Pirko
2019-05-23  9:45 ` [patch net-next 1/7] mlxsw: Move firmware flash implementation to devlink Jiri Pirko
2019-05-23  9:45 ` [patch net-next 2/7] mlx5: " Jiri Pirko
2019-05-23  9:45 ` [patch net-next 3/7] mlxfw: Propagate error messages through extack Jiri Pirko
2019-05-23 15:19   ` David Ahern
2019-05-23 18:30     ` Saeed Mahameed
2019-05-24  8:11     ` Jiri Pirko [this message]
2019-05-24 15:54       ` Jakub Kicinski
2019-05-24 22:26         ` Jiri Pirko
2019-05-25  0:08           ` Jakub Kicinski
2019-05-27 13:33             ` Jiri Pirko
2019-05-23  9:45 ` [patch net-next 4/7] devlink: allow driver to update progress of flash update Jiri Pirko
2019-05-23 17:39   ` Jakub Kicinski
2019-05-23  9:45 ` [patch net-next 5/7] mlxfw: Introduce status_notify op and call it to notify about the status Jiri Pirko
2019-05-23  9:45 ` [patch net-next 6/7] mlxsw: Implement flash update status notifications Jiri Pirko
2019-05-23  9:45 ` [patch net-next 7/7] netdevsim: implement fake flash updating with notifications Jiri Pirko
2019-05-23 17:47   ` Jakub Kicinski
2019-05-24  8:17     ` Jiri Pirko
2019-05-23  9:47 ` [patch iproute2 1/3] header update Jiri Pirko
2019-05-23  9:47 ` [patch iproute2 2/3] devlink: implement flash update status monitoring Jiri Pirko
2019-05-23  9:47 ` [patch iproute2 3/3] devlink: implement flash " Jiri Pirko
2019-05-23 17:57   ` Jakub Kicinski
2019-05-24  8:14     ` Jiri Pirko
2019-05-23 18:37 ` [patch net-next 0/7] expose flash update status to user Saeed Mahameed
2019-05-24  8:15   ` Jiri Pirko
2019-05-24 15:04     ` David Ahern
2019-05-28 11:29   ` Jiri Pirko
2019-05-27 18:14 ` Florian Fainelli
2019-05-28  8:55   ` Jiri Pirko

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=20190524081110.GB2904@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=leon@kernel.org \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=sthemmin@microsoft.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox