Netdev List
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Shannon Nelson <snelson@pensando.io>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	moshe@mellanox.com
Subject: Re: [PATCH net-next 2/2] ionic: add devlink firmware update
Date: Thu, 3 Sep 2020 19:30:29 +0200	[thread overview]
Message-ID: <20200903173029.GD2997@nanopsycho.orion> (raw)
In-Reply-To: <9937d5f2-21a1-53cc-e7fb-075b3014a344@pensando.io>

Thu, Sep 03, 2020 at 05:58:42PM CEST, snelson@pensando.io wrote:
>On 9/2/20 11:01 PM, Jiri Pirko wrote:
>> Wed, Sep 02, 2020 at 09:57:17PM CEST, snelson@pensando.io wrote:
>> > Add support for firmware update through the devlink interface.
>> > This update copies the firmware object into the device, asks
>> > the current firmware to install it, then asks the firmware to
>> > set the device to use the new firmware on the next boot-up.
>> > 
>> > The install and activate steps are launched as asynchronous
>> > requests, which are then followed up with status requests
>> > commands.  These status request commands will be answered with
>> > an EAGAIN return value and will try again until the request
>> > has completed or reached the timeout specified.
>> > 
>> > Signed-off-by: Shannon Nelson <snelson@pensando.io>
>[...]
>> > +
>> > +	netdev_info(netdev, "Installing firmware %s\n", fw_name);
>> You don't need this dmesg messagel.
>> 
>> 
>> > +
>> > +	dl = priv_to_devlink(ionic);
>> > +	devlink_flash_update_begin_notify(dl);
>> > +	devlink_flash_update_status_notify(dl, "Preparing to flash", NULL, 0, 0);
>> > +
>[...]
>> > +		if (err) {
>> > +			netdev_err(netdev,
>> > +				   "download failed offset 0x%x addr 0x%lx len 0x%x\n",
>> > +				   offset, offsetof(union ionic_dev_cmd_regs, data),
>> > +				   copy_sz);
>> And this one.
>> 
>> 
>> > +			NL_SET_ERR_MSG_MOD(extack, "Segment download failed");
>> > +			goto err_out;
>> > +		}
>[...]
>> > +	devlink_flash_update_status_notify(dl, "Activating", NULL, 2, 2);
>> > +
>> > +	netdev_info(netdev, "Firmware update completed\n");
>> And this one.
>> 
>> 
>> > +
>> > +err_out:
>> > +	if (err)
>> > +		devlink_flash_update_status_notify(dl, "Flash failed", NULL, 0, 0);
>> > +	release_firmware(fw);
>> > +	devlink_flash_update_end_notify(dl);
>> > +	return err;
>> > +}
>> > 
>
>True, they aren't "needed" for operational purposes, but they are rather
>useful when inspecting a system after getting a report of bad behavior, and

I don't think it is nice to pollute dmesg with any arbitrary driver-specific
messages.


>since this should be seldom performed there should be no risk of filling the
>log.  As far as I can tell, the devlink messages are only seen at the time
>the flash is performed as output from the flash command, or from a devlink
>monitor if someone started it before the flash operation.  Is there any other
>place that can be inspected later that will indicate someone was fussing with
>the firmware?

Not really, no. But perhaps we can have a counter for that. Similar to
what Jakub suggested for reload.


  reply	other threads:[~2020-09-03 17:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 19:57 [PATCH net-next 0/2] ionic: add devlink dev flash support Shannon Nelson
2020-09-02 19:57 ` [PATCH net-next 1/2] ionic: update the fw update api Shannon Nelson
2020-09-02 19:57 ` [PATCH net-next 2/2] ionic: add devlink firmware update Shannon Nelson
2020-09-03  6:01   ` Jiri Pirko
2020-09-03 15:58     ` Shannon Nelson
2020-09-03 17:30       ` Jiri Pirko [this message]
2020-09-03 21:35         ` Shannon Nelson
2020-09-03 19:53   ` Jakub Kicinski
2020-09-03 21:37     ` Shannon Nelson
2020-09-03 21:45       ` Jakub Kicinski
2020-09-03 21:47         ` Shannon Nelson

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=20200903173029.GD2997@nanopsycho.orion \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=snelson@pensando.io \
    /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