linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] pciutils: Add utility for Lane Margining
@ 2023-12-08  9:17 Nikita Proshkin
  2023-12-08  9:17 ` [PATCH 01/15] pciutils-lspci: Fix unsynchronized caches in lspci struct device and pci struct pci_dev Nikita Proshkin
                   ` (15 more replies)
  0 siblings, 16 replies; 30+ messages in thread
From: Nikita Proshkin @ 2023-12-08  9:17 UTC (permalink / raw)
  To: linux-pci, Martin Mares; +Cc: linux, Sergei Miroshnichenko, Nikita Proshkin

PCIe Gen 4 spec introduced new extended capability mandatory for all
ports - Lane Margining at the Receiver. This new feature allows to get an
approximation of the Link eye margin diagram by four points. This
information shows how resistant the Link is to external influences and can
be useful for link debugging and presets tuning.
Previously, this information was only available using a hardware debugger.

Patch series consists of two parts:

* Patch for lspci to add Margining registers reading. There is not much
  information available without issuing any margining commands, but this
  info is useful anyway;
* New pcilmr utility.

Margining capability assumes the exchange of commands with the device, so
its support was implemented as a separate utility pcilmr.
The pcilmr allows you to test Links and supports all the features provided
by the Margining capability. The utility is written using a pcilib, it is
divided into a library part and a main function with arguments parsing in
the pciutils root dir.
Man page is provided as well.

Utility compilation and man page preparation are integrated into the
pciutils Makefile, so run make is enough to start testing the utility
(Gen 4/5 device is required though).
Utility was written with Linux in mind and was tested only on this OS.

Example utility results on different systems you can see in gist:
https://gist.github.com/bombanya/f2b15263712757ffba1a11eea011c419

Patch series is also posted as PR on pciutils github:
https://github.com/pciutils/pciutils/pull/162

Nikita Proshkin (15):
  pciutils-lspci: Fix unsynchronized caches in lspci struct device and
    pci struct pci_dev
  pciutils: Add constants for Lane Margining at the Receiver Extended
    Capability
  pciutils-lspci: Add Lane Margining support to the lspci
  pciutils-pcilmr: Add functions for device checking and preparations
    before main margining processes
  pciutils-pcilmr: Add margining process functions
  pciutils-pcilmr: Add logging functions for margining
  pciutils-pcilmr: Add all-in-one device margining parameters reading
    function
  pciutils-pcilmr: Add function for default margining results log
  pciutils-pcilmr: Add utility main function
  pciutils-pcilmr: Add support for unique hardware quirks
  pciutils-pcilmr: Add the ability to pass multiple links to the utility
  pciutils-pcilmr: Add --scan mode to search for all LMR-capable Links
  pciutils-pcilmr: Add option to save margining results in csv form
  pciutils-pcilmr: Add handling of situations when device reports its
    MaxOffset values equal to 0
  pciutils-pcilmr: Add pcilmr man page

 Makefile                 |  11 +-
 lib/header.h             |   7 +
 lmr_lib/Makefile         |  10 +
 lmr_lib/margin.c         | 528 ++++++++++++++++++++++++++++++++++++++
 lmr_lib/margin.h         | 206 +++++++++++++++
 lmr_lib/margin_hw.c      | 163 ++++++++++++
 lmr_lib/margin_hw.h      |  46 ++++
 lmr_lib/margin_log.c     | 141 +++++++++++
 lmr_lib/margin_log.h     |  23 ++
 lmr_lib/margin_results.c | 255 +++++++++++++++++++
 lmr_lib/margin_results.h |  15 ++
 ls-ecaps.c               |  22 +-
 lspci.c                  |   1 +
 pcilmr.c                 | 532 +++++++++++++++++++++++++++++++++++++++
 pcilmr.man               | 179 +++++++++++++
 15 files changed, 2136 insertions(+), 3 deletions(-)
 create mode 100644 lmr_lib/Makefile
 create mode 100644 lmr_lib/margin.c
 create mode 100644 lmr_lib/margin.h
 create mode 100644 lmr_lib/margin_hw.c
 create mode 100644 lmr_lib/margin_hw.h
 create mode 100644 lmr_lib/margin_log.c
 create mode 100644 lmr_lib/margin_log.h
 create mode 100644 lmr_lib/margin_results.c
 create mode 100644 lmr_lib/margin_results.h
 create mode 100644 pcilmr.c
 create mode 100644 pcilmr.man

-- 
2.34.1


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-12-13 13:01 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08  9:17 [PATCH 00/15] pciutils: Add utility for Lane Margining Nikita Proshkin
2023-12-08  9:17 ` [PATCH 01/15] pciutils-lspci: Fix unsynchronized caches in lspci struct device and pci struct pci_dev Nikita Proshkin
2023-12-08  9:17 ` [PATCH 02/15] pciutils: Add constants for Lane Margining at the Receiver Extended Capability Nikita Proshkin
2023-12-08  9:17 ` [PATCH 03/15] pciutils-lspci: Add Lane Margining support to the lspci Nikita Proshkin
2023-12-08  9:17 ` [PATCH 04/15] pciutils-pcilmr: Add functions for device checking and preparations before main margining processes Nikita Proshkin
2023-12-08 17:30   ` Martin Mareš
2023-12-13 10:10     ` Nikita Proshkin
2023-12-08  9:17 ` [PATCH 05/15] pciutils-pcilmr: Add margining process functions Nikita Proshkin
2023-12-08 17:35   ` Martin Mareš
2023-12-13 10:35     ` Nikita Proshkin
2023-12-08  9:17 ` [PATCH 06/15] pciutils-pcilmr: Add logging functions for margining Nikita Proshkin
2023-12-08 17:37   ` Martin Mareš
2023-12-08  9:17 ` [PATCH 07/15] pciutils-pcilmr: Add all-in-one device margining parameters reading function Nikita Proshkin
2023-12-08  9:17 ` [PATCH 08/15] pciutils-pcilmr: Add function for default margining results log Nikita Proshkin
2023-12-08  9:17 ` [PATCH 09/15] pciutils-pcilmr: Add utility main function Nikita Proshkin
2023-12-08  9:17 ` [PATCH 10/15] pciutils-pcilmr: Add support for unique hardware quirks Nikita Proshkin
2023-12-08 17:38   ` Martin Mareš
2023-12-13 10:40     ` Nikita Proshkin
2023-12-08  9:17 ` [PATCH 11/15] pciutils-pcilmr: Add the ability to pass multiple links to the utility Nikita Proshkin
2023-12-08  9:17 ` [PATCH 12/15] pciutils-pcilmr: Add --scan mode to search for all LMR-capable Links Nikita Proshkin
2023-12-08  9:17 ` [PATCH 13/15] pciutils-pcilmr: Add option to save margining results in csv form Nikita Proshkin
2023-12-08 17:44   ` Martin Mareš
2023-12-13 10:52     ` Nikita Proshkin
2023-12-13 11:22       ` Martin Mareš
2023-12-13 13:01         ` Nikita Proshkin
2023-12-08  9:17 ` [PATCH 14/15] pciutils-pcilmr: Add handling of situations when device reports its MaxOffset values equal to 0 Nikita Proshkin
2023-12-08  9:17 ` [PATCH 15/15] pciutils-pcilmr: Add pcilmr man page Nikita Proshkin
2023-12-08 17:24   ` Bjorn Helgaas
2023-12-13 11:01     ` Nikita Proshkin
2023-12-08 17:30 ` [PATCH 00/15] pciutils: Add utility for Lane Margining Martin Mareš

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).