[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <deb40048-bd2a-efcb-d381-29eb4a880707@intel.com>
Date: Thu, 26 Mar 2020 14:38:16 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next v3 11/11] ice: add a devlink region for dumping
NVM contents
On 3/26/2020 2:19 PM, Jiri Pirko wrote:
> Thu, Mar 26, 2020 at 07:37:18PM CET, jacob.e.keller@...el.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@...el.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@...lanox.com>
>
Ugh, I knew I was forgetting something.
Powered by blists - more mailing lists