netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next v3 11/11] ice: add a devlink region for dumping NVM contents
Date: Thu, 26 Mar 2020 14:38:16 -0700	[thread overview]
Message-ID: <deb40048-bd2a-efcb-d381-29eb4a880707@intel.com> (raw)
In-Reply-To: <20200326211908.GG11304@nanopsycho.orion>



On 3/26/2020 2:19 PM, Jiri Pirko wrote:
> Thu, Mar 26, 2020 at 07:37:18PM CET, jacob.e.keller@intel.com wrote:
>> Add a devlink region for exposing the device's Non Volatime Memory flash
>> contents.
>>
>> Support the recently added .snapshot operation, enabling userspace to
>> request a snapshot of the NVM contents via DEVLINK_CMD_REGION_NEW.
>>
>> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
>> ---
>> Changes since RFC:
>> * Capture the entire NVM instead of just Shadow RAM
>> * Use vmalloc instead of kmalloc, since the memory does not need to be
>>  physically contiguous.
>> * Remove the direct reading function, as this will be sent in a separate
>>  series
>>
>> Changes since v1:
>> * use dev_err instead of dev_warn when a region fails to be created
>>
>> Changes since v2:
>> * Removed redundant "out of memory" extack message
>> * Fixed up function declaration alignment to avoid checkpatch.pl warnings
>>
>> Documentation/networking/devlink/ice.rst     | 26 ++++++
>> drivers/net/ethernet/intel/ice/ice.h         |  2 +
>> drivers/net/ethernet/intel/ice/ice_devlink.c | 96 ++++++++++++++++++++
>> drivers/net/ethernet/intel/ice/ice_devlink.h |  3 +
>> drivers/net/ethernet/intel/ice/ice_main.c    |  4 +
>> 5 files changed, 131 insertions(+)
>>
>> diff --git a/Documentation/networking/devlink/ice.rst b/Documentation/networking/devlink/ice.rst
>> index 37fbbd40a5e5..f3d6a3b50342 100644
>> --- a/Documentation/networking/devlink/ice.rst
>> +++ b/Documentation/networking/devlink/ice.rst
>> @@ -69,3 +69,29 @@ The ``ice`` driver reports the following versions
>>       - The version of the DDP package that is active in the device. Note
>>         that both the name (as reported by ``fw.app.name``) and version are
>>         required to uniquely identify the package.
>> +
>> +Regions
>> +=======
>> +
>> +The ``ice`` driver enables access to the contents of the Non Volatile Memory
>> +flash chip via the ``nvm-flash`` region.
>> +
>> +Users can request an immediate capture of a snapshot via the
>> +``DEVLINK_CMD_REGION_NEW``
>> +
>> +.. code:: shell
>> +
>> +    $ devlink region new pci/0000:01:00.0/nvm-flash snapshot 1
>> +    $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
>> +
>> +    $ devlink region dump pci/0000:01:00.0/nvm-flash snapshot 1
>> +    0000000000000000 0014 95dc 0014 9514 0035 1670 0034 db30
>> +    0000000000000010 0000 0000 ffff ff04 0029 8c00 0028 8cc8
>> +    0000000000000020 0016 0bb8 0016 1720 0000 0000 c00f 3ffc
>> +    0000000000000030 bada cce5 bada cce5 bada cce5 bada cce5
>> +
>> +    $ devlink region read pci/0000:01:00.0/nvm-flash snapshot 1 address 0
>> +        length 16
> 
> I still think this should be one line. Anyway,
> 
> Reviewed-by: Jiri Pirko <jiri@mellanox.com>
> 

Ugh, I knew I was forgetting something.

  reply	other threads:[~2020-03-26 21:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 18:37 [PATCH net-next v3 00/11] implement DEVLINK_CMD_REGION_NEW Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 01/11] devlink: prepare to support region operations Jacob Keller
2020-03-27  8:16   ` tanhuazhong
2020-03-27 19:59     ` Jacob Keller
2020-03-27 20:58     ` Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 02/11] devlink: convert snapshot destructor callback to region op Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 03/11] devlink: trivial: fix tab in function documentation Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 04/11] devlink: add function to take snapshot while locked Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 05/11] devlink: use -ENOSPC to indicate no more room for snapshots Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 06/11] devlink: extract snapshot id allocation to helper function Jacob Keller
2020-03-26 21:15   ` Jiri Pirko
2020-03-26 21:37     ` Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 07/11] devlink: report error once U32_MAX snapshot ids have been used Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 08/11] devlink: track snapshot id usage count using an xarray Jacob Keller
2020-03-26 21:16   ` Jiri Pirko
2020-03-26 18:37 ` [PATCH net-next v3 09/11] devlink: implement DEVLINK_CMD_REGION_NEW Jacob Keller
2020-03-26 18:37 ` [PATCH net-next v3 10/11] netdevsim: support taking immediate snapshot via devlink Jacob Keller
2020-03-26 21:18   ` Jiri Pirko
2020-03-26 18:37 ` [PATCH net-next v3 11/11] ice: add a devlink region for dumping NVM contents Jacob Keller
2020-03-26 21:19   ` Jiri Pirko
2020-03-26 21:38     ` Jacob Keller [this message]
2020-03-26 22:35     ` Jacob Keller
2020-03-27  2:37       ` David Miller
2020-03-27 19:56         ` Jacob Keller
2020-03-27  2:39 ` [PATCH net-next v3 00/11] implement DEVLINK_CMD_REGION_NEW David Miller
2020-04-28  0:26 ` Jakub Kicinski
2020-04-28  2:03   ` Keller, Jacob E

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=deb40048-bd2a-efcb-d381-29eb4a880707@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --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 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).