All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Zhiping Zhang <zhipingz@meta.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	<linux-rdma@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<netdev@vger.kernel.org>, Keith Busch <kbusch@kernel.org>,
	Yochai Cohen <yochai@nvidia.com>,
	Yishai Hadas <yishaih@nvidia.com>
Subject: Re: [RFC 1/2] Set steering-tag directly for PCIe P2P memory access
Date: Fri, 14 Nov 2025 13:12:32 +0000	[thread overview]
Message-ID: <20251114131232.00006e9e@huawei.com> (raw)
In-Reply-To: <20251113213712.776234-2-zhipingz@meta.com>

On Thu, 13 Nov 2025 13:37:11 -0800
Zhiping Zhang <zhipingz@meta.com> wrote:

> PCIe: Add a memory type for P2P memory access
> 
> 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.
> 
> Signed-off-by: Zhiping Zhang <zhipingz@meta.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 */

Trivial but this time definitely add the trailing comma!  Maybe there will never
be any more in here but maybe there will and we can avoid a line of
churn next time.

>  };
>  
>  #ifdef CONFIG_PCIE_TPH


  reply	other threads:[~2025-11-14 13:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 21:37 [RFC 0/2] Set steering-tag directly for PCIe P2P memory access Zhiping Zhang
2025-11-13 21:37 ` [RFC 1/2] " Zhiping Zhang
2025-11-14 13:12   ` Jonathan Cameron [this message]
2025-11-18  0:50     ` zhipingz
2025-11-24 21:27   ` Bjorn Helgaas
2025-12-01 17:43     ` Zhiping Zhang
2025-11-13 21:37 ` [RFC 2/2] " Zhiping Zhang
2025-11-17 16:00   ` Jason Gunthorpe
2025-11-20  7:24     ` Zhiping Zhang
2025-11-20 13:11       ` Jason Gunthorpe
2025-12-04  8:10         ` Zhiping Zhang
2025-12-27 19:22           ` Zhiping Zhang
2026-01-06  0:57             ` Jason Gunthorpe
2026-01-13  7:43               ` Zhiping Zhang
2026-01-13 16:49                 ` Jason Gunthorpe
2026-01-24  1:13                   ` Zhiping Zhang
2026-01-28 16:57                     ` Jason Gunthorpe
2026-02-02  6:04                       ` Zhiping Zhang
2026-01-03  5:38 ` [RFC 2/2] [fix] mlx5: modifications for use cases other than CPU Zhiping Zhang
  -- strict thread matches above, loose matches on Subject: below --
2025-11-17  8:55 [RFC 2/2] Set steering-tag directly for PCIe P2P memory access kernel test robot
2025-11-18  7:38 ` Dan Carpenter

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=20251114131232.00006e9e@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=jgg@ziepe.ca \
    --cc=kbusch@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yishaih@nvidia.com \
    --cc=yochai@nvidia.com \
    --cc=zhipingz@meta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.