All of lore.kernel.org
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Max Gurtovoy <mgurtovoy@nvidia.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"mst@redhat.com" <mst@redhat.com>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	Shahaf Shuler <shahafs@nvidia.com>, Oren Duer <oren@nvidia.com>,
	"stefanha@redhat.com" <stefanha@redhat.com>
Subject: RE: [PATCH v2 4/4] Add support for MSI-X vectors configuration for PCI VFs
Date: Fri, 28 Jan 2022 03:45:37 +0000	[thread overview]
Message-ID: <DM8PR12MB5480FBF987765563452DA094DC229@DM8PR12MB5480.namprd12.prod.outlook.com> (raw)
In-Reply-To: <6979b063-d707-710d-fd13-454158ca7541@redhat.com>


> From: Jason Wang <jasowang@redhat.com>
> Sent: Friday, January 28, 2022 9:06 AM
> 
> 在 2022/1/28 上午11:30, Parav Pandit 写道:
> >> From: Jason Wang <jasowang@redhat.com>
> >> Sent: Friday, January 28, 2022 8:54 AM vxlan part actually.
> > Right.
> >>> Similarly, we prefer the ability and flexibility to set more fields
> >>> in one
> >> command.
> >>
> >> I understood this motivation. But what I want to say is:
> >>
> >> struct virtio_cmd {
> >>      u64 attr_mask;
> >>      field_X;
> >>      field_Y;
> >>      field_Z;
> >> }
> >>
> >> What's the default value if one of the X,Y, Z is not specified?
> > If minimum default values are not provided, HV cannot proceed to do
> configuration and ENOSUPPORT error code is returned by kernel to user.
> 
> 
> Do we need to document the minimum default value?
>
I guess, not because attr_mask is expected to grow and there may be unrelated attributes to it.
 
> 
> >
> >> How to get those default values?
> >>
> > By doing identify or _get respective command.
> 
> 
> This can only work if there's no attr_mask in get command. If the device can
> selectively provides us partial information we can't do compatibility check
> since we don't know its value.
> 
Device will follow some sane implementation.
If device which wants to support msix config for a VF, it will report right values in generic identify and get cmd of device.
A simple error check of bit mask will be enough in driver.

> 
> >
> >> And suppose we add a new field
> >>
> >> struct virtio_cmd {
> >>      u64 attr_mask;
> >>      field_X;
> >>      field_Y;
> >>      field_Z;
> >>      field_M;
> >> }
> >>
> >> How can the driver know it can use field_M?
> > If attribute mask is present for field_M, driver can use it.
> 
> 
> So the driver need first use get then try to use set?
>
No. the flow is:
1. AQ feature bit is negotiated
2. Create AQ
3. Do identify cmd and cache the device capabilities
A bit says that VF msix modification supported.
4. user queried all VFs current vector distribution (optimize this bit later, but consider this for now)
If attr.mask.bitX not set, fail the user request.
4. user requests to modify VF-A vectors from (8 to 4) uses attr.mask.bitX.
 
> 
> >
> >> And if field_M is supported in src
> >> but not dst, how can we keep the migration compatibility?
> > This is HV level command to query and provision a VF.
> > Migration compatibility is high level check where it will identify on which HV
> to migrate where I can provision X vectors for a VF.
> 
> 
> By probing capability of attr_mask in each possible commands?
>
No. not in each possible commands.
Identify command gives the capabilities supported in step #3 above to see if PFs on source and destination HV support it or not.
 
> 
> >
> >> Would it be simple to just mandate all the fields in this case?
> >>
> > May be, attribute mask is basically to let expand structure without inventing
> new fields.
> 
> 
> It could be done via new command.
Sure, it can be.
We want to avoid too many commands, if they can be clubbed in single command when starting a VF.

      reply	other threads:[~2022-01-28  3:45 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  9:39 [PATCH v2 0/4] VIRTIO: Provision maximum MSI-X vectors for a VF Max Gurtovoy
2022-01-24  9:39 ` [PATCH v2 1/4] Add virtio Admin Virtqueue Max Gurtovoy
2022-01-26 14:40   ` Michael S. Tsirkin
2022-01-26 14:54     ` [virtio-comment] " Max Gurtovoy
2022-01-26 15:03       ` Michael S. Tsirkin
2022-01-26 15:16         ` [virtio-comment] " Max Gurtovoy
2022-01-27  3:56         ` Parav Pandit
2022-01-27  3:55     ` Parav Pandit
2022-01-27  3:56       ` Jason Wang
2022-01-27  3:14   ` [virtio-comment] " Jason Wang
2022-01-27 10:25     ` Max Gurtovoy
2022-01-27 13:03       ` Jason Wang
2022-01-27 14:46         ` Max Gurtovoy
2022-01-28  3:18           ` Jason Wang
2022-01-30 10:31             ` Max Gurtovoy
2022-02-09  2:45               ` Jason Wang
2022-02-09 11:43                 ` Max Gurtovoy
2022-01-28 12:14   ` [virtio-comment] " Cornelia Huck
2022-01-28 12:47     ` Michael S. Tsirkin
2022-01-28 15:49       ` [virtio-comment] " Cornelia Huck
2022-01-28 15:52         ` Michael S. Tsirkin
2022-01-28 16:14           ` [virtio-dev] " Cornelia Huck
2022-01-28 16:16             ` Michael S. Tsirkin
2022-01-28 16:23               ` [virtio-dev] " Cornelia Huck
2022-01-29  3:53           ` Jason Wang
2022-01-30  9:13             ` Max Gurtovoy
2022-01-30  9:40               ` Michael S. Tsirkin
2022-01-30  9:56                 ` Max Gurtovoy
2022-01-30 14:41                   ` Michael S. Tsirkin
2022-01-30 15:12                     ` Max Gurtovoy
2022-01-30 15:30                       ` Michael S. Tsirkin
2022-01-30 18:23                         ` [virtio-comment] " Max Gurtovoy
2022-01-30 21:15                           ` Michael S. Tsirkin
2022-01-31  9:16                         ` [virtio-dev] " Cornelia Huck
2022-01-31 13:40                           ` Michael S. Tsirkin
2022-01-31 14:26                             ` [virtio-comment] " Cornelia Huck
2022-01-31 14:52                               ` Michael S. Tsirkin
2022-01-31 15:48                                 ` [virtio-dev] " Cornelia Huck
2022-01-31 16:00                                   ` Michael S. Tsirkin
2022-01-31 16:12                                 ` Halil Pasic
2022-01-31 17:10                                   ` [virtio-dev] " Cornelia Huck
2022-01-31 17:22                                     ` Michael S. Tsirkin
2022-02-01 11:53                                     ` [virtio-dev] " Halil Pasic
2022-02-01 17:01                                       ` Cornelia Huck
2022-02-01 18:34                                         ` Michael S. Tsirkin
2022-01-31 15:47                           ` Halil Pasic
2022-01-31 16:01                             ` Michael S. Tsirkin
2022-01-31 16:12                             ` Cornelia Huck
2022-02-09  2:27                         ` Jason Wang
2022-02-09  7:46                           ` Michael S. Tsirkin
2022-01-30  9:39             ` Michael S. Tsirkin
2022-01-30 11:21     ` [virtio-comment] " Max Gurtovoy
2022-01-30 14:37       ` Michael S. Tsirkin
2022-01-24  9:39 ` [virtio-comment] [PATCH v2 2/4] virtio-blk: add support for VIRTIO_F_ADMIN_VQ Max Gurtovoy
2022-01-24  9:39 ` [PATCH v2 3/4] virtio-net: " Max Gurtovoy
2022-01-24  9:39 ` [PATCH v2 4/4] Add support for MSI-X vectors configuration for PCI VFs Max Gurtovoy
2022-01-25 11:53   ` Michael S. Tsirkin
2022-01-26 13:03     ` Parav Pandit
2022-01-26 14:08       ` [virtio-comment] " Michael S. Tsirkin
2022-01-27  3:40         ` Parav Pandit
2022-01-27 12:39           ` Michael S. Tsirkin
2022-01-27 14:16             ` Parav Pandit
2022-01-27 17:28               ` Michael S. Tsirkin
2022-01-27  3:36   ` Jason Wang
2022-01-27  5:22     ` Parav Pandit
2022-01-28  3:23       ` [virtio-comment] " Jason Wang
2022-01-28  3:30         ` Parav Pandit
2022-01-28  3:35           ` Jason Wang
2022-01-28  3:45             ` Parav Pandit [this message]

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=DM8PR12MB5480FBF987765563452DA094DC229@DM8PR12MB5480.namprd12.prod.outlook.com \
    --to=parav@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mgurtovoy@nvidia.com \
    --cc=mst@redhat.com \
    --cc=oren@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 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.