Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
	Max Gurtovoy <mgurtovoy@nvidia.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	Shahaf Shuler <shahafs@nvidia.com>, Oren Duer <oren@nvidia.com>,
	"stefanha@redhat.com" <stefanha@redhat.com>
Subject: Re: [PATCH v3 1/4] Add virtio Admin virtqueue
Date: Tue, 8 Feb 2022 10:39:50 -0500	[thread overview]
Message-ID: <20220208103757-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB548145C554CBE6367318A8F9DC2D9@PH0PR12MB5481.namprd12.prod.outlook.com>

On Tue, Feb 08, 2022 at 03:06:16PM +0000, Parav Pandit wrote:
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Tuesday, February 8, 2022 7:29 PM
> > 
> > > Do we have a concrete example of a command that can be targeted for same
> > device and a target device, which requires differentiating their destination? If
> > so, lets discuss and then it make sense to add for the well-defined use case.
> > 
> > So e.g. things like controlling NIC's MAC can reasonably be part of the same
> > device.
> A mac address of NIC can be programmed via the existing control VQ for the self.

Not if it's disabled for the guest.

> Lets come up with some other example.

Go ahead.

> > > So better to first come up with a valid use case and a device that supports it,
> > which needs a group.
> > > Otherwise a target id can be a long string of PCI device = 0000:03:00.0 or a
> > BDF or a VF number or a VF of a different PCI PF or a SF number 32-bit or SF
> > UUID or a VF on a remote DPU system or PCI device on transparent bridge or
> > something else.
> > 
> > Well PASID is IIRC just 20 bit on express. 
> There are off line discussion and some on the mailing list too (I don't have a link to few months/year old email),
> That PASID is being overloaded to identify the SF and process both. And I tend to agree to it.
> 
> So I won't be surprised if a new SF function id takes different route than PASID.
> More below.
> 
> > I find it unlikely that we'll need more
> > than 64 bit. Yes, it's hard to predict the future but just doing 16 bit here seems
> > frankly like a premature optimization. UUID for a transient thing such as SF just
> > seems unnecessary. 32 or 64 bit seem both acceptable.
> > 
> > > Without knowing the grouping and a nonexistence device we shouldn't
> > complicate the commands.
> > >
> > > There are enough opcodes (64K) that can define new structure for more
> > complex devices.
> > 
> > I think you are asking for a bit much frankly, it's up to you to build the interface.
> I likely didn't understand above point.
> 
> > Just like with code, if the design does not feel robust the bar is much higher
> > even if one can not prove there's a locking problem. 
> 
> > Same here, this interface
> > design does not yet feel very robust yet - so either we build it in a way that
> > seems robust based basically on our gut feeling, or actually spend time
> > predicting and addressing future use-cases to prove they can be addressed.
> 
> > I dare say we've developed some intuition about what makes an extensible
> > interface and where things are likely to go here at the TC, so I wouldn't discard
> > all feedback as unnecessary complication even if it does not always come with
> > concrete use-case examples.
> I do not doubt your intuition. 
> I am open to feedback, but we haven't really established at least single explicit grouping example and ask is to add some arbitrary reserved bytes for it.
> 
> >From my DPU experience, over last 3 years, we have built SF and VF device on parent PF-A, and their management interface on parent PF-B.
> On top of that it is expected to be uniquely indefinable in multi-host env, that brings the notion of multiple controllers by a single management device.
> And also make it work uniformly with same interface when parent and management device are same.
> You can see an extendible interface at [1].
> 
> With this base line of [1], I do not agree that defining a u32 device_identifier (to contain 20-bit PASID) will be sufficient in future.
> 

OK, and Cornelia also said she thinks 64 is necessary.

> So if we really want to cover variety of cases like [1] and some more complex nested cases, we better define,
> Device identifier as below,
> struct device_identifier {
> 	u8 id_length;
> 	u8 id[];	/* variable length field
> };
> For implicitly grouped VFs of a PF, id can be 2 bytes.
> For more advance cases it can be a structure consist one or more combination of (a) host id or controller id (b) PF BDF, (c) sf id (d) PASID and more.
> 
> [1] https://www.kernel.org/doc/Documentation/networking/devlink/devlink-port.rst

I'm fine with this too.

-- 
MST


  reply	other threads:[~2022-02-08 15:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  7:57 [PATCH v3 0/4] VIRTIO: Provision maximum MSI-X vectors for a VF Max Gurtovoy
2022-02-03  7:57 ` [PATCH v3 1/4] Add virtio Admin virtqueue Max Gurtovoy
2022-02-03 13:09   ` [virtio-dev] " Cornelia Huck
2022-02-07 10:14     ` Max Gurtovoy
2022-02-07 10:28       ` Michael S. Tsirkin
2022-02-07 11:51         ` [virtio-dev] " Cornelia Huck
2022-02-07 14:34           ` Max Gurtovoy
2022-02-07 15:08             ` [virtio-comment] " Cornelia Huck
2022-02-07 16:19               ` Michael S. Tsirkin
2022-02-07 10:39   ` Michael S. Tsirkin
2022-02-07 14:58     ` Max Gurtovoy
2022-02-07 16:18       ` Michael S. Tsirkin
2022-02-08  0:41         ` Max Gurtovoy
2022-02-08  6:45           ` Michael S. Tsirkin
2022-02-08  8:34             ` Max Gurtovoy
2022-02-08 13:08               ` [virtio-dev] " Cornelia Huck
2022-02-08 13:20                 ` Parav Pandit
2022-02-08 14:04               ` Michael S. Tsirkin
2022-02-08  6:25     ` Parav Pandit
2022-02-08  6:42       ` Michael S. Tsirkin
2022-02-08  7:04         ` Parav Pandit
2022-02-08 13:19           ` [virtio-comment] " Cornelia Huck
2022-02-08 13:32             ` Parav Pandit
2022-02-08 13:58               ` Michael S. Tsirkin
2022-02-08 14:59                 ` [virtio-comment] " Cornelia Huck
2022-02-08 15:11                   ` [virtio-dev] " Parav Pandit
2022-02-08 15:18                     ` Cornelia Huck
2022-02-08 15:28                     ` Michael S. Tsirkin
2022-02-08 15:33                       ` Parav Pandit
2022-02-08 15:36                         ` Michael S. Tsirkin
2022-02-08 15:26                   ` Michael S. Tsirkin
2022-02-08 15:32                     ` [virtio-comment] " Cornelia Huck
2022-02-08 15:35                     ` [virtio-dev] " Parav Pandit
2022-02-08 15:37                       ` Michael S. Tsirkin
2022-02-08 15:48                         ` Parav Pandit
2022-02-08 21:02                           ` [virtio-comment] " Michael S. Tsirkin
2022-02-08 15:06                 ` Parav Pandit
2022-02-08 15:39                   ` Michael S. Tsirkin [this message]
2022-02-08 18:52                     ` Parav Pandit
2022-02-08 21:00                       ` Michael S. Tsirkin
2022-02-03  7:57 ` [PATCH v3 2/4] Add miscellaneous configuration structure for PCI Max Gurtovoy
2022-02-03  7:57 ` [PATCH v3 3/4] Add device management facility Max Gurtovoy
2022-02-03  7:57 ` [virtio-comment] [PATCH v3 4/4] Add support for MSI-X vectors configuration for PCI VFs Max Gurtovoy

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=20220208103757-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mgurtovoy@nvidia.com \
    --cc=oren@nvidia.com \
    --cc=parav@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    /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