* [PATCH net-next v3 5/5] ice: add documentation for FW logging
[not found] <20230815165750.2789609-1-anthony.l.nguyen@intel.com>
@ 2023-08-15 16:57 ` Tony Nguyen
2023-08-16 22:43 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Tony Nguyen @ 2023-08-15 16:57 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Paul M Stillwell Jr, anthony.l.nguyen, jacob.e.keller, horms,
corbet, linux-doc
From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Add documentation for FW logging in
Documentation/networking/device-drivers/ethernet/intel/ice.rst
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
.../device_drivers/ethernet/intel/ice.rst | 117 ++++++++++++++++++
1 file changed, 117 insertions(+)
diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
index e4d065c55ea8..3ddef911faaa 100644
--- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst
+++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
@@ -895,6 +895,123 @@ driver writes raw bytes by the GNSS object to the receiver through i2c. Please
refer to the hardware GNSS module documentation for configuration details.
+Firmware (FW) logging
+---------------------
+The driver supports FW logging via the debugfs interface on PF 0 only. In order
+for FW logging to work, the NVM must support it. The 'fwlog' file will only get
+created in the ice debugfs directory if the NVM supports FW logging.
+
+Module configuration
+~~~~~~~~~~~~~~~~~~~~
+To see the status of FW logging then read the 'fwlog/modules' file like this::
+
+ # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
+
+To configure FW logging then write to the 'fwlog/modules' file like this::
+
+ # echo <fwlog_event> <fwlog_level> > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
+
+where
+
+* fwlog_level is a name as described below. Each level includes the
+ messages from the previous/lower level
+
+ * NONE
+ * ERROR
+ * WARNING
+ * NORMAL
+ * VERBOSE
+
+* fwlog_event is a name that represents the module to receive events for. The
+ module names are
+
+ * GENERAL
+ * CTRL
+ * LINK
+ * LINK_TOPO
+ * DNL
+ * I2C
+ * SDP
+ * MDIO
+ * ADMINQ
+ * HDMA
+ * LLDP
+ * DCBX
+ * DCB
+ * XLR
+ * NVM
+ * AUTH
+ * VPD
+ * IOSF
+ * PARSER
+ * SW
+ * SCHEDULER
+ * TXQ
+ * RSVD
+ * POST
+ * WATCHDOG
+ * TASK_DISPATCH
+ * MNG
+ * SYNCE
+ * HEALTH
+ * TSDRV
+ * PFREG
+ * MDLVER
+ * ALL
+
+The name ALL is special and specifies setting all of the modules to the
+specified fwlog_level.
+
+Example usage to configure the modules::
+
+ # echo LINK VERBOSE > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
+
+Enabling FW log
+~~~~~~~~~~~~~~~
+Once the desired modules are configured the user will enable the logging. To do
+this the user can write a 1 (enable) or 0 (disable) to 'fwlog/enable'. An
+example is::
+
+ # echo 1 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/enable
+
+Retrieving FW log data
+~~~~~~~~~~~~~~~~~~~~~~
+The FW log data can be retrieved by reading from 'fwlog/data'. The user can
+write to 'fwlog/data' to clear the data. The data can only be cleared when FW
+logging is disabled. The FW log data is a binary file that is sent to Intel and
+used to help debug user issues.
+
+An example to read the data is::
+
+ # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data > fwlog.bin
+
+An example to clear the data is::
+
+ # echo 0 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data
+
+Changing how often the log events are sent to the driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The driver receives FW log data from the Admin Receive Queue (ARQ). The
+frequency that the FW sends the ARQ events can be configured by writing to
+'fwlog/resolution'. The range is 1-128 (1 means push every log message, 128
+means push only when the max AQ command buffer is full). The suggested value is
+10. The user can see what the value is configured to by reading
+'fwlog/resolution'. An example to set the value is::
+
+ # echo 50 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/resolution
+
+Configuring the number of buffers used to store FW log data
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The driver stores FW log data in a ring within the driver. The default size of
+the ring is 256 4K buffers. Some use cases may require more or less data so
+the user can change the number of buffers that are allocated for FW log data.
+To change the number of buffers write to 'fwlog/nr_buffs'. The value must be a
+power of two and between the values 64-512. FW logging must be disabled to
+change the value. An example of changing the value is::
+
+ # echo 128 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/nr_buffs
+
+
Performance Optimization
========================
Driver defaults are meant to fit a wide variety of workloads, but if further
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3 5/5] ice: add documentation for FW logging
2023-08-15 16:57 ` [PATCH net-next v3 5/5] ice: add documentation for FW logging Tony Nguyen
@ 2023-08-16 22:43 ` Randy Dunlap
2023-08-23 22:25 ` Paul M Stillwell Jr
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2023-08-16 22:43 UTC (permalink / raw)
To: Tony Nguyen, davem, kuba, pabeni, edumazet, netdev
Cc: Paul M Stillwell Jr, jacob.e.keller, horms, corbet, linux-doc
On 8/15/23 09:57, Tony Nguyen wrote:
> From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
>
> Add documentation for FW logging in
> Documentation/networking/device-drivers/ethernet/intel/ice.rst
>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> .../device_drivers/ethernet/intel/ice.rst | 117 ++++++++++++++++++
> 1 file changed, 117 insertions(+)
>
> diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
> index e4d065c55ea8..3ddef911faaa 100644
> --- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst
> +++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
> @@ -895,6 +895,123 @@ driver writes raw bytes by the GNSS object to the receiver through i2c. Please
> refer to the hardware GNSS module documentation for configuration details.
>
>
> +Firmware (FW) logging
> +---------------------
> +The driver supports FW logging via the debugfs interface on PF 0 only. In order
> +for FW logging to work, the NVM must support it. The 'fwlog' file will only get
> +created in the ice debugfs directory if the NVM supports FW logging.
> +
> +Module configuration
> +~~~~~~~~~~~~~~~~~~~~
> +To see the status of FW logging then read the 'fwlog/modules' file like this::
of FW logging, read
> +
> + # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
> +
> +To configure FW logging then write to the 'fwlog/modules' file like this::
FW logging, write to
> +
> + # echo <fwlog_event> <fwlog_level> > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
> +
> +where
> +
> +* fwlog_level is a name as described below. Each level includes the
> + messages from the previous/lower level
> +
> + * NONE
Should NONE be aligned with the entries below?
Ah, they are aligned in the source file, but NONE uses a space after the '*'
while the others use a TAB after the '*'.
> + * ERROR
> + * WARNING
> + * NORMAL
> + * VERBOSE
> +
> +* fwlog_event is a name that represents the module to receive events for. The
> + module names are
> +
> + * GENERAL
> + * CTRL
> + * LINK
> + * LINK_TOPO
> + * DNL
> + * I2C
> + * SDP
> + * MDIO
> + * ADMINQ
> + * HDMA
> + * LLDP
> + * DCBX
> + * DCB
> + * XLR
> + * NVM
> + * AUTH
> + * VPD
> + * IOSF
> + * PARSER
> + * SW
> + * SCHEDULER
> + * TXQ
> + * RSVD
> + * POST
> + * WATCHDOG
> + * TASK_DISPATCH
> + * MNG
> + * SYNCE
> + * HEALTH
> + * TSDRV
> + * PFREG
> + * MDLVER
> + * ALL
> +
> +The name ALL is special and specifies setting all of the modules to the
> +specified fwlog_level.
> +
> +Example usage to configure the modules::
> +
> + # echo LINK VERBOSE > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
> +
> +Enabling FW log
> +~~~~~~~~~~~~~~~
> +Once the desired modules are configured the user will enable the logging. To do
the user enables logging. To do
> +this the user can write a 1 (enable) or 0 (disable) to 'fwlog/enable'. An
> +example is::
> +
> + # echo 1 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/enable
> +
> +Retrieving FW log data
> +~~~~~~~~~~~~~~~~~~~~~~
> +The FW log data can be retrieved by reading from 'fwlog/data'. The user can
> +write to 'fwlog/data' to clear the data. The data can only be cleared when FW
> +logging is disabled. The FW log data is a binary file that is sent to Intel and
> +used to help debug user issues.
> +
> +An example to read the data is::
> +
> + # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data > fwlog.bin
> +
> +An example to clear the data is::
> +
> + # echo 0 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data
> +
> +Changing how often the log events are sent to the driver
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +The driver receives FW log data from the Admin Receive Queue (ARQ). The
> +frequency that the FW sends the ARQ events can be configured by writing to
> +'fwlog/resolution'. The range is 1-128 (1 means push every log message, 128
> +means push only when the max AQ command buffer is full). The suggested value is
> +10. The user can see what the value is configured to by reading
> +'fwlog/resolution'. An example to set the value is::
> +
> + # echo 50 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/resolution
> +
> +Configuring the number of buffers used to store FW log data
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +The driver stores FW log data in a ring within the driver. The default size of
> +the ring is 256 4K buffers. Some use cases may require more or less data so
> +the user can change the number of buffers that are allocated for FW log data.
> +To change the number of buffers write to 'fwlog/nr_buffs'. The value must be a
> +power of two and between the values 64-512. FW logging must be disabled to
or
The value must be one of: 64, 128, 256, or 512.
> +change the value. An example of changing the value is::
> +
> + # echo 128 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/nr_buffs
> +
> +
> Performance Optimization
> ========================
> Driver defaults are meant to fit a wide variety of workloads, but if further
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3 5/5] ice: add documentation for FW logging
2023-08-16 22:43 ` Randy Dunlap
@ 2023-08-23 22:25 ` Paul M Stillwell Jr
0 siblings, 0 replies; 3+ messages in thread
From: Paul M Stillwell Jr @ 2023-08-23 22:25 UTC (permalink / raw)
To: Randy Dunlap, Tony Nguyen, davem, kuba, pabeni, edumazet, netdev
Cc: jacob.e.keller, horms, corbet, linux-doc
On 8/16/2023 3:43 PM, Randy Dunlap wrote:
>
>
> On 8/15/23 09:57, Tony Nguyen wrote:
>> From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
>>
>> Add documentation for FW logging in
>> Documentation/networking/device-drivers/ethernet/intel/ice.rst
>>
>> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
>> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
>> ---
>> .../device_drivers/ethernet/intel/ice.rst | 117 ++++++++++++++++++
>> 1 file changed, 117 insertions(+)
>>
>> diff --git a/Documentation/networking/device_drivers/ethernet/intel/ice.rst b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
>> index e4d065c55ea8..3ddef911faaa 100644
>> --- a/Documentation/networking/device_drivers/ethernet/intel/ice.rst
>> +++ b/Documentation/networking/device_drivers/ethernet/intel/ice.rst
>> @@ -895,6 +895,123 @@ driver writes raw bytes by the GNSS object to the receiver through i2c. Please
>> refer to the hardware GNSS module documentation for configuration details.
>>
>>
>> +Firmware (FW) logging
>> +---------------------
>> +The driver supports FW logging via the debugfs interface on PF 0 only. In order
>> +for FW logging to work, the NVM must support it. The 'fwlog' file will only get
>> +created in the ice debugfs directory if the NVM supports FW logging.
>> +
>> +Module configuration
>> +~~~~~~~~~~~~~~~~~~~~
>> +To see the status of FW logging then read the 'fwlog/modules' file like this::
>
> of FW logging, read
>
Fixed
>> +
>> + # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
>> +
>> +To configure FW logging then write to the 'fwlog/modules' file like this::
>
> FW logging, write to
>
Fixed
>> +
>> + # echo <fwlog_event> <fwlog_level> > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
>> +
>> +where
>> +
>> +* fwlog_level is a name as described below. Each level includes the
>> + messages from the previous/lower level
>> +
>> + * NONE
>
> Should NONE be aligned with the entries below?
> Ah, they are aligned in the source file, but NONE uses a space after the '*'
> while the others use a TAB after the '*'.
>
Good catch, fixed
>> + * ERROR
>> + * WARNING
>> + * NORMAL
>> + * VERBOSE
>> +
>> +* fwlog_event is a name that represents the module to receive events for. The
>> + module names are
>> +
>> + * GENERAL
>> + * CTRL
>> + * LINK
>> + * LINK_TOPO
>> + * DNL
>> + * I2C
>> + * SDP
>> + * MDIO
>> + * ADMINQ
>> + * HDMA
>> + * LLDP
>> + * DCBX
>> + * DCB
>> + * XLR
>> + * NVM
>> + * AUTH
>> + * VPD
>> + * IOSF
>> + * PARSER
>> + * SW
>> + * SCHEDULER
>> + * TXQ
>> + * RSVD
>> + * POST
>> + * WATCHDOG
>> + * TASK_DISPATCH
>> + * MNG
>> + * SYNCE
>> + * HEALTH
>> + * TSDRV
>> + * PFREG
>> + * MDLVER
>> + * ALL
>> +
>> +The name ALL is special and specifies setting all of the modules to the
>> +specified fwlog_level.
>> +
>> +Example usage to configure the modules::
>> +
>> + # echo LINK VERBOSE > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules
>> +
>> +Enabling FW log
>> +~~~~~~~~~~~~~~~
>> +Once the desired modules are configured the user will enable the logging. To do
>
> the user enables logging. To do
>
Fixed
>> +this the user can write a 1 (enable) or 0 (disable) to 'fwlog/enable'. An
>> +example is::
>> +
>> + # echo 1 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/enable
>> +
>> +Retrieving FW log data
>> +~~~~~~~~~~~~~~~~~~~~~~
>> +The FW log data can be retrieved by reading from 'fwlog/data'. The user can
>> +write to 'fwlog/data' to clear the data. The data can only be cleared when FW
>> +logging is disabled. The FW log data is a binary file that is sent to Intel and
>> +used to help debug user issues.
>> +
>> +An example to read the data is::
>> +
>> + # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data > fwlog.bin
>> +
>> +An example to clear the data is::
>> +
>> + # echo 0 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data
>> +
>> +Changing how often the log events are sent to the driver
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +The driver receives FW log data from the Admin Receive Queue (ARQ). The
>> +frequency that the FW sends the ARQ events can be configured by writing to
>> +'fwlog/resolution'. The range is 1-128 (1 means push every log message, 128
>> +means push only when the max AQ command buffer is full). The suggested value is
>> +10. The user can see what the value is configured to by reading
>> +'fwlog/resolution'. An example to set the value is::
>> +
>> + # echo 50 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/resolution
>> +
>> +Configuring the number of buffers used to store FW log data
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +The driver stores FW log data in a ring within the driver. The default size of
>> +the ring is 256 4K buffers. Some use cases may require more or less data so
>> +the user can change the number of buffers that are allocated for FW log data.
>> +To change the number of buffers write to 'fwlog/nr_buffs'. The value must be a
>> +power of two and between the values 64-512. FW logging must be disabled to
>
> or
> The value must be one of: 64, 128, 256, or 512.
>
Changed
>> +change the value. An example of changing the value is::
>> +
>> + # echo 128 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/nr_buffs
>> +
>> +
>> Performance Optimization
>> ========================
>> Driver defaults are meant to fit a wide variety of workloads, but if further
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-23 22:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230815165750.2789609-1-anthony.l.nguyen@intel.com>
2023-08-15 16:57 ` [PATCH net-next v3 5/5] ice: add documentation for FW logging Tony Nguyen
2023-08-16 22:43 ` Randy Dunlap
2023-08-23 22:25 ` Paul M Stillwell Jr
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).