qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] vdpa: send CVQ state load commands in parallel


From: Hawkins Jiawei
Subject: Re: [PATCH 2/2] vdpa: send CVQ state load commands in parallel
Date: Thu, 20 Apr 2023 23:22:42 +0800

On Thu, 20 Apr 2023 at 19:38, Hawkins Jiawei <yin31149@gmail.com> wrote:
>
> On Thu, 20 Apr 2023 at 01:43, Eugenio Perez Martin <eperezma@redhat.com> 
> wrote:
> >
> > On Wed, Apr 19, 2023 at 1:50 PM Hawkins Jiawei <yin31149@gmail.com> wrote:
> > >
> > > +         ++status) {
> > > +        if (*status != VIRTIO_NET_OK) {
> > > +            ++r;
> > > +        }
> > > +    }
> > > +
> > > +    return r;
> >
> > Although the caller is fine with >=0, I think we should keep the 0 ==
> > success. The number of commands delivered does not make a lot of sense
> > for the callers, just if the call succeeded or not.
>
> Thanks for the explanation, I will refactor the patch as you suggested.

I still have some questions about the check on device used buffers.

My initial thought was to return the number of commands whose
`in buffer` value is not VIRTIO_NET_OK.

If we are not supposed to return value > 0, what should we return
if some commands' `in buffer` value  is not VIRTIO_NET_OK.

Should we return an error code, such as EINVAL(Invalid argument),
indicating that QEMU can not successfully send all SVQ commands
in the current state. Or should we just do not check the device used buffers,
and return 0 when QEMU finishes polling?

Thanks!

>
> >
> > Thanks!
> >
> > >  }
> > >
> > >  static NetClientInfo net_vhost_vdpa_cvq_info = {
> > > --
> > > 2.25.1
> > >
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]