[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251124212753.GA2714985@bhelgaas>
Date: Mon, 24 Nov 2025 15:27:53 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Zhiping Zhang <zhipingz@...a.com>
Cc: Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-rdma@...r.kernel.org,
linux-pci@...r.kernel.org, netdev@...r.kernel.org,
Keith Busch <kbusch@...nel.org>, Yochai Cohen <yochai@...dia.com>,
Yishai Hadas <yishaih@...dia.com>
Subject: Re: [RFC 1/2] Set steering-tag directly for PCIe P2P memory access
On Thu, Nov 13, 2025 at 01:37:11PM -0800, Zhiping Zhang wrote:
> PCIe: Add a memory type for P2P memory access
This should be in the Subject: line.
It should also start with "PCI/TPH: ..." (not "PCIe") to match
previous history.
> The current tph memory type definition applies for CPU use cases. For device
> memory accessed in the peer-to-peer (P2P) manner, we need another memory
> type.
s/tph/TPH/
Make this say what the patch does (not just that we *need* another
memory type, that we actually *add* one).
The subject line should also say what the patch does. I don't think
this patch actually changes the *setting* of the steering tag (I could
be wrong, I haven't looked carefully).
> Signed-off-by: Zhiping Zhang <zhipingz@...a.com>
> ---
> drivers/pci/tph.c | 4 ++++
> include/linux/pci-tph.h | 4 +++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c
> index cc64f93709a4..d983c9778c72 100644
> --- a/drivers/pci/tph.c
> +++ b/drivers/pci/tph.c
> @@ -67,6 +67,8 @@ static u16 tph_extract_tag(enum tph_mem_type mem_type, u8 req_type,
> if (info->pm_st_valid)
> return info->pm_st;
> break;
> + default:
> + return 0;
> }
> break;
> case PCI_TPH_REQ_EXT_TPH: /* 16-bit tag */
> @@ -79,6 +81,8 @@ static u16 tph_extract_tag(enum tph_mem_type mem_type, u8 req_type,
> if (info->pm_xst_valid)
> return info->pm_xst;
> break;
> + default:
> + return 0;
> }
> break;
> default:
> diff --git a/include/linux/pci-tph.h b/include/linux/pci-tph.h
> index 9e4e331b1603..b989302b6755 100644
> --- a/include/linux/pci-tph.h
> +++ b/include/linux/pci-tph.h
> @@ -14,10 +14,12 @@
> * depending on the memory type: Volatile Memory or Persistent Memory. When a
> * caller query about a target's Steering Tag, it must provide the target's
> * tph_mem_type. ECN link: https://members.pcisig.com/wg/PCI-SIG/document/15470.
> + * Add a new tph type for PCI peer-to-peer access use case.
> */
> enum tph_mem_type {
> TPH_MEM_TYPE_VM, /* volatile memory */
> - TPH_MEM_TYPE_PM /* persistent memory */
> + TPH_MEM_TYPE_PM, /* persistent memory */
> + TPH_MEM_TYPE_P2P /* peer-to-peer accessable memory */
> };
>
> #ifdef CONFIG_PCIE_TPH
> --
> 2.47.3
>
Powered by blists - more mailing lists