[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aeac02b92108ee6b64d43a674fe087ac7c074987.camel@mellanox.com>
Date: Thu, 23 May 2019 18:30:22 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "dsahern@...il.com" <dsahern@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "sthemmin@...rosoft.com" <sthemmin@...rosoft.com>,
"davem@...emloft.net" <davem@...emloft.net>,
mlxsw <mlxsw@...lanox.com>,
"jakub.kicinski@...ronome.com" <jakub.kicinski@...ronome.com>,
"leon@...nel.org" <leon@...nel.org>
Subject: Re: [patch net-next 3/7] mlxfw: Propagate error messages through
extack
On Thu, 2019-05-23 at 09:19 -0600, David Ahern 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?
These messages are vendor driver generated, how can we make them user
friendly, yet expose vendor specific information that only the vendor
can understand .. ? I think it is legit to have vendor specific terms
in extack which is generated by drivers..
>
> > 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'.
>
>
> ...
>
> > @@ -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?
>
Powered by blists - more mailing lists