commit | 1ae54d298c7f77040a798f46d68c7278e9ac2dd6 | [log] [tgz] |
---|---|---|
author | Sumanth Bhat <sumanth.bhat@linux.intel.com> | Wed Mar 01 23:03:03 2023 +0530 |
committer | Sumanth Bhat <sumanth.bhat@linux.intel.com> | Sat Mar 04 08:40:10 2023 +0530 |
tree | 4e70edb217f66bed716db8b18a2928b804a7bca2 | |
parent | 258161b358322dcd607a418c8477c63455ea6a3c [diff] |
peci_cmds: Add request-to-response latency measurement To help in validation of the peci interface, this patch adds capability in peci_cmds utility to measure request to response delays. A new swith -t option provides this capability and it is designed to work with other switches like verbose mode and command loop mode. The desired behaviour of the -t switch is as follows: 1) -t switch used in isolation will measure the latency of only the single command under execution. 2) -t switch with -l (loop) mode will measure the total latency and provides average per command execution time. 3) -t switch with -l (loop) and -v (verbose) mode will capture total latency, overall average as well as per command execution times. Tested: Case 1) root# peci_cmds ping -t Succeeded Total time taken = 0.000212 seconds Case 2) root# peci_cmds ping -t -l 10 Succeeded Total time taken = 0.001365 seconds Average time taken per command = 0.000137 seconds Case 3) root# peci_cmds ping -t -l 6 -v Time taken in iteration 1 = 0.000121 s Succeeded Time taken in iteration 2 = 0.000122 s Succeeded Time taken in iteration 3 = 0.000141 s Succeeded Time taken in iteration 4 = 0.000138 s Succeeded Time taken in iteration 5 = 0.000143 s Succeeded Time taken in iteration 6 = 0.000112 s Succeeded Total time taken = 0.000777 seconds Average time taken per command = 0.000129 seconds Change-Id: Idde67a6aed05367d91a7bdc807ae1fbfe2a81104 Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
libpeci is a library that provides various APIs to interface with the IOCTLs provided by the PECI driver in the OpenBMC kernel. Currently available here:
https://github.com/openbmc/linux/blob/dev-5.4/include/uapi/linux/peci-ioctl.h
This repo also includes a peci_cmds command-line utility with functions that map to the libpeci APIs. It can be used to test PECI functionality across the library, driver, and hardware.
This repo also includes dbus_raw_peci which provides a raw-peci daemon that exposes a raw PECI interface that is accessible over D-Bus. It can be used when an application needs to send a raw PECI command without loading the full PECI library.