public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: stcarlso@linux.microsoft.com
To: u-boot@lists.denx.de
Subject: [PATCH 0/3] Add command to set MPS of all PCI Express devices
Date: Tue,  7 Mar 2023 16:32:31 -0800	[thread overview]
Message-ID: <20230308003234.465014-1-stcarlso@linux.microsoft.com> (raw)

From: Stephen Carlson <stcarlso@linux.microsoft.com>

This patch set adds support for configuring the Maximum Payload Size
(MPS) for attached PCI Express devices. Modifying the MPS can increase
PCI Express performance or ensure compatibility with hot-plugged
devices.

New config CONFIG_CMD_PCI_MPS. If enabled, a new "pci_mps" command will
be added that accepts an argument describing a strategy to configure the
PCI Express payload size for devices that are currently attached. Two
strategies are currently supported:

"safe" emulates the Linux kernel's pci=pcie_bus_safe and sets all devices
to the minimum MPS supported by all devices.

"peer2peer" sets all devices to an MPS of 128 bytes, the only size which
must be supported by all compliant PCI Express devices, to ensure that
all devices can directly communicate with each other and with devices that
are hotplugged later.

A test for the sandbox environment is also added by advertising a
larger supported Maximum Payload Size in the swapcase device and
verifying that the pci_mps command can read and configure the MPS.

Stephen Carlson (3):
  cmd: pci: Add command to set MPS of all PCIe devices
  drivers: pci: sandbox: Add stub sandbox PCI MPS support
  test: Add test for new command pci_mps

 MAINTAINERS                   |   6 ++
 cmd/Kconfig                   |  10 ++
 cmd/Makefile                  |   1 +
 cmd/pci_mps.c                 | 167 ++++++++++++++++++++++++++++++++++
 configs/sandbox_defconfig     |   1 +
 drivers/misc/swap_case.c      |   3 +
 include/pci.h                 |   7 ++
 test/py/tests/test_pci_mps.py |  13 +++
 8 files changed, 208 insertions(+)
 create mode 100644 cmd/pci_mps.c
 create mode 100644 test/py/tests/test_pci_mps.py

-- 
2.25.1


             reply	other threads:[~2023-03-08  0:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  0:32 stcarlso [this message]
2023-03-08  0:32 ` [PATCH 1/3] cmd: pci: Add command to set MPS of all PCIe devices stcarlso
2023-03-08  0:32 ` [PATCH 2/3] drivers: pci: sandbox: Add stub sandbox PCI MPS support stcarlso
2023-03-08  0:32 ` [PATCH 3/3] test: Add test for new command pci_mps stcarlso
2023-03-08 17:16   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230308003234.465014-1-stcarlso@linux.microsoft.com \
    --to=stcarlso@linux.microsoft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox