public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: chaitanyak@nvidia.com, kbusch@kernel.org, sagi@grimberg.me,
	joao.m.martins@oracle.com, linux-nvme@lists.infradead.org,
	kvm@vger.kernel.org, kwankhede@nvidia.com,
	alex.williamson@redhat.com, mlevitsk@redhat.com
Subject: Re: [PATCH RFC 10/11] nvmet: Add addr fam and trtype for mdev pci driver
Date: Thu, 13 Mar 2025 12:56:04 -0500	[thread overview]
Message-ID: <f8c0fed5-01c9-4e2f-8be7-6b36712be1a3@oracle.com> (raw)
In-Reply-To: <20250313064236.GE9967@lst.de>

On 3/13/25 1:42 AM, Christoph Hellwig wrote:
> On Thu, Mar 13, 2025 at 12:18:11AM -0500, Mike Christie wrote:
>> This allocates 253 for mdev pci since it might not fit into any
>> existing value (not sure how to co-exist with pci-epf).
>>
>> One of the reasons this patchset is a RFC is because I was not sure
>> if allocating a new number for this was the best. Another approach
>> is that I could break up pci-epf into a:
>>
>> 1. PCI component - Common PCI and NVMe PCI code.
>> 2. Interface/bus component - Callouts so pci-epf can use the
>> pci_epf_driver/pci_epf_ops and mdev-pci can use mdev and vfio
>> callouts.
>> 3. Memory management component - Callouts for using DMA for pci-epf
>> vs vfio related memory for mdev-pci.
>>
>> On one hand, by creating a core nvmet pci driver then have subdrivers
>> we could share NVMF_ADDR_FAMILY_PCI and NVMF_TRTYPE_PCI. However,
>> it will get messy. There is some PCI code we could share for 1
>> but 2 and 3 will make sharing difficult becuse of how different the
>> drivers work (mdev-vfio vs pci-epf layers).
> 
> I think we'll need to discuss this more based on concrete code proposals
> once we go along, but here's my handwavy 2cents for now:
> 
>   - in addition to the pure software endpoint and mdev I also expect
>     hardardware offloaded PCIe endpoints to show up really soon, so
>     we'll have more than just the two
>   - having common code for different PCIe tagets where applicable is
>     thus a good idea, but I'd expect it to be a set of library
>     functions or conditionals in the core code, not a new layer
>     with indirect calls

A lib based approach will be easier. I'll take a stab at it on the next
posting.

>   - I had quite a lot of discussions with Damien about the trtype and
>     related bits.  I suspect by the time we get to having multiple
>     PCIe endpoints we just need to split the configfs interface naming
>     from the on-wire fabrics trtrype enum to not need trtype assignments.




  reply	other threads:[~2025-03-13 18:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  5:18 [PATCH RFC 00/11] nvmet: Add NVMe target mdev/vfio driver Mike Christie
2025-03-13  5:18 ` [PATCH RFC 01/11] nvmet: Remove duplicate uuid_copy Mike Christie
2025-03-13  6:36   ` Christoph Hellwig
2025-03-13  8:59   ` Damien Le Moal
2025-03-13 17:20   ` Keith Busch
2025-03-13  5:18 ` [PATCH RFC 02/11] nvmet: Export nvmet_add_async_event and add definitions Mike Christie
2025-03-13  6:36   ` Christoph Hellwig
2025-03-13 17:50     ` Mike Christie
2025-03-13  5:18 ` [PATCH RFC 03/11] nvmet: Add nvmet_fabrics_ops flag to indicate SGLs not supported Mike Christie
2025-03-13  6:37   ` Christoph Hellwig
2025-03-13  9:02   ` Damien Le Moal
2025-03-13  9:13     ` Christoph Hellwig
2025-03-13  9:16       ` Damien Le Moal
2025-03-13 17:19         ` Mike Christie
2025-03-13  5:18 ` [PATCH RFC 04/11] nvmet: Add function to get nvmet_fabrics_ops from trtype Mike Christie
2025-03-13  9:03   ` Damien Le Moal
2025-03-13  5:18 ` [PATCH RFC 05/11] nvmet: Add function to print trtype Mike Christie
2025-03-13  5:18 ` [PATCH RFC 06/11] nvmet: Allow nvmet_alloc_ctrl users to specify the cntlid Mike Christie
2025-03-13  5:18 ` [PATCH RFC 07/11] nvmet: Add static controller support to configfs Mike Christie
2025-03-13  5:18 ` [PATCH RFC 08/11] nvmet: Add shadow doorbell support Mike Christie
2025-03-13  5:18 ` [PATCH RFC 09/11] nvmet: Add helpers to find and get static controllers Mike Christie
2025-03-13  5:18 ` [PATCH RFC 10/11] nvmet: Add addr fam and trtype for mdev pci driver Mike Christie
2025-03-13  6:42   ` Christoph Hellwig
2025-03-13 17:56     ` Mike Christie [this message]
2025-03-13  5:18 ` [PATCH RFC 11/11] nvmet: Add nvmet-mdev-pci driver Mike Christie
2025-03-13  5:32 ` [PATCH RFC 00/11] nvmet: Add NVMe target mdev/vfio driver Damien Le Moal
2025-03-13  6:47 ` Christoph Hellwig
2025-03-13 17:17   ` Mike Christie
2025-03-14  8:31     ` Hannes Reinecke

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=f8c0fed5-01c9-4e2f-8be7-6b36712be1a3@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=alex.williamson@redhat.com \
    --cc=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=joao.m.martins@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mlevitsk@redhat.com \
    --cc=sagi@grimberg.me \
    /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