All of lore.kernel.org
 help / color / mirror / Atom feed
From: Si-Wei Liu <si-wei.liu@oracle.com>
To: Eugenio Perez Martin <eperezma@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	qemu-level <qemu-devel@nongnu.org>, Cindy Lu <lulu@redhat.com>,
	Eli Cohen <eli@mellanox.com>, Cornelia Huck <cohuck@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>,
	Liuxiangdong <liuxiangdong5@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Zhu Lingshan <lingshan.zhu@intel.com>,
	Harpreet Singh Anand <hanand@xilinx.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Parav Pandit <parav@mellanox.com>,
	Gautam Dawar <gdawar@xilinx.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>
Subject: Re: [PATCH 4/5] virtio-net: Update virtio-net curr_queue_pairs in vdpa backends
Date: Thu, 25 Aug 2022 21:28:23 -0700	[thread overview]
Message-ID: <ad87db8e-d71c-4771-98c7-29effcc8d8c7@oracle.com> (raw)
In-Reply-To: <CAJaqyWfemKiDHSU5ujHhJrNjMgeD2i-7uYA0y3fUSC0fuE7bYA@mail.gmail.com>



On 8/24/2022 11:19 PM, Eugenio Perez Martin wrote:
> On Thu, Aug 25, 2022 at 2:38 AM Si-Wei Liu <si-wei.liu@oracle.com> wrote:
>>
>>
>> On 8/23/2022 9:27 PM, Jason Wang wrote:
>>> 在 2022/8/20 01:13, Eugenio Pérez 写道:
>>>> It was returned as error before. Instead of it, simply update the
>>>> corresponding field so qemu can send it in the migration data.
>>>>
>>>> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
>>>> ---
>>>
>>> Looks correct.
>>>
>>> Adding Si Wei for double check.
>> Hmmm, I understand why this change is needed for live migration, but
>> this would easily cause userspace out of sync with the kernel for other
>> use cases, such as link down or userspace fallback due to vdpa ioctl
>> error. Yes, these are edge cases.
> The link down case is not possible at this moment because that cvq
> command does not call virtio_net_handle_ctrl_iov.
Right. Though shadow cvq would need to rely on extra ASID support from 
kernel. For the case without shadow cvq we still need to look for an 
alternative mechanism.

> A similar treatment
> than mq would be needed when supported, and the call to
> virtio_net_set_status will be avoided.
So, maybe the seemingly "right" fix for the moment is to prohibit manual 
set_link at all (for vDPA only)? In longer term we'd need to come up 
with appropriate support for applying mq config regardless of asid or 
shadow cvq support.

>
> I'll double check device initialization ioctl failure with
> n->curr_queue_pairs > 1 in the destination, but I think we should be
> safe.
>
>> Not completely against it, but I
>> wonder if there's a way we can limit the change scope to live migration
>> case only?
>>
> The reason to update the device model is to send the curr_queue_pairs
> to the destination in a backend agnostic way. To send it otherwise
> would limit the live migration possibilities, but sure we can explore
> another way.
A hacky workaround that came off the top of my head was to allow sending 
curr_queue_pairs for the !vm_running case for vdpa. It doesn't look it 
would affect other backend I think. But I agree with Jason, this doesn't 
look decent so I give up on this idea. Hence for this patch,

Acked-by: Si-Wei Liu <si-wei.liu@oracle.com>

>
> Thanks!
>



  reply	other threads:[~2022-08-26  4:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 17:13 [PATCH 0/5] Vhost-vdpa Shadow Virtqueue multiqueue support Eugenio Pérez
2022-08-19 17:13 ` [PATCH 1/5] vdpa: extract vhost_vdpa_net_load_mac from vhost_vdpa_net_load Eugenio Pérez
2022-08-24  4:18   ` Jason Wang
2022-08-19 17:13 ` [PATCH 2/5] vdpa: Add vhost_vdpa_net_load_mq Eugenio Pérez
2022-08-24  4:23   ` Jason Wang
2022-08-24  7:46     ` Eugenio Perez Martin
2022-08-24  8:52       ` Jason Wang
2022-08-24  9:06         ` Eugenio Perez Martin
2022-08-24  9:07           ` Jason Wang
2022-08-24  9:18             ` Eugenio Perez Martin
2022-08-19 17:13 ` [PATCH 3/5] vdpa: validate MQ CVQ commands Eugenio Pérez
2022-08-19 17:13 ` [PATCH 4/5] virtio-net: Update virtio-net curr_queue_pairs in vdpa backends Eugenio Pérez
2022-08-24  4:27   ` Jason Wang
2022-08-25  0:38     ` Si-Wei Liu
2022-08-25  2:53       ` Jason Wang
2022-08-25  3:05         ` Jason Wang
2022-08-26  3:58           ` Si-Wei Liu
2022-08-26  3:49         ` Si-Wei Liu
2022-08-25  6:19       ` Eugenio Perez Martin
2022-08-26  4:28         ` Si-Wei Liu [this message]
2022-08-26  8:22           ` Eugenio Perez Martin
2022-08-19 17:13 ` [PATCH 5/5] vdpa: Allow MQ feture in SVQ Eugenio Pérez

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=ad87db8e-d71c-4771-98c7-29effcc8d8c7@oracle.com \
    --to=si-wei.liu@oracle.com \
    --cc=arei.gonglei@huawei.com \
    --cc=cohuck@redhat.com \
    --cc=eli@mellanox.com \
    --cc=eperezma@redhat.com \
    --cc=gdawar@xilinx.com \
    --cc=hanand@xilinx.com \
    --cc=jasowang@redhat.com \
    --cc=lingshan.zhu@intel.com \
    --cc=liuxiangdong5@huawei.com \
    --cc=lulu@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --cc=parav@mellanox.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.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.