> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Paul > M Stillwell Jr > Sent: Wednesday, November 29, 2023 4:57 AM > To: [email protected] > Cc: Stillwell Jr, Paul M <[email protected]> > Subject: [Intel-wired-lan] [PATCH net-next v18 4/5] ice: add ability to read > FW log data and configure the amount of memory for log data > > Once logging is enabled the user should read the data from the 'data' > file. The data is in the form of a binary blob that can be sent to Intel > for decoding. To read the data use a command like: > > # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data > log_data.bin > > If the user wants to clear the FW log data that has been stored in the > driver then they can write any value to the 'data' file and that will clear > the data. An example is: > > # echo 34 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data > > In addition to being able to read the data the user can configure how > much memory is used to store FW log data. This allows the user to > increase/decrease the amount of memory based on the users situation. > The data is stored such that if the memory fills up then the oldest data > will get overwritten in a circular manner. To change the amount of > memory the user can write to the 'log_size' file like this: > > # echo <value> > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/log_size > > Where <value> is one of 128K, 256K, 512K, 1M, and 2M. The default value > is 1M. > > The user can see the current value of 'log_size' by reading the file: > > # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/log_size > > Signed-off-by: Paul M Stillwell Jr <[email protected]> > --- > v17->v18: > - changed the memory allocation for the ring buffers to allocate all the > space up front instead of allocating 4K buffers per ring. This makes > it easier because there aren't as many allocations and frees and its > easier to track the memory > v16->v17: > - changed 'nr_buffs' to 'log_size' to make it easier for users to set > the amount of memory they want to use when logging > - changed the 'log_size' values to be set between 128K and 2M instead of > allowing the user to write any power of 2 value between 1 and 2MB > v15->v16: none > v14->v15: changed PAGE_SIZE to ICE_AQ_MAX_BUF_LEN > v13->v14: fixed an issue where 0 was an accepted value to nr_buffs > v12->v13: > - moved 'enable' file addition to the correct patch > - added comment to header file about inclusion of 0xFF33 command > - added linux/vmalloc.h header file in ice_fwlog.c > - removed NULL check before freeing ring->data > v11->v12: > - added fwlog/data file for reading and clearing data > - added fwlog/nr_buffs to change the number of data buffers to store log > data in > --- > .../net/ethernet/intel/ice/ice_adminq_cmd.h | 2 + > drivers/net/ethernet/intel/ice/ice_debugfs.c | 249 ++++++++++++++++++ > drivers/net/ethernet/intel/ice/ice_fwlog.c | 150 ++++++++++- > drivers/net/ethernet/intel/ice/ice_fwlog.h | 22 ++ > drivers/net/ethernet/intel/ice/ice_main.c | 29 ++ > drivers/net/ethernet/intel/ice/ice_type.h | 1 + > 6 files changed, 452 insertions(+), 1 deletion(-) >
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
