qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vdpa: fix not using CVQ buffer in case of error
@ 2023-06-02 17:34 Eugenio Pérez
  2023-06-06  1:32 ` Jason Wang
  2023-06-07 10:10 ` Michael Tokarev
  0 siblings, 2 replies; 6+ messages in thread
From: Eugenio Pérez @ 2023-06-02 17:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cindy Lu, Michael S. Tsirkin, Laurent Vivier, Lei Yang,
	Jason Wang, Hawkins Jiawei

Bug introducing when refactoring.  Otherway, the guest never received
the used buffer.

Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 net/vhost-vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 16d47f7b3c..5360924ba0 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -807,7 +807,7 @@ static int vhost_vdpa_net_handle_ctrl_avail(VhostShadowVirtqueue *svq,
     }
 
     if (*s->status != VIRTIO_NET_OK) {
-        return VIRTIO_NET_ERR;
+        goto out;
     }
 
     status = VIRTIO_NET_ERR;
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] vdpa: fix not using CVQ buffer in case of error
  2023-06-02 17:34 [PATCH] vdpa: fix not using CVQ buffer in case of error Eugenio Pérez
@ 2023-06-06  1:32 ` Jason Wang
  2023-06-07  8:18   ` Lei Yang
  2023-06-07 10:10 ` Michael Tokarev
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Wang @ 2023-06-06  1:32 UTC (permalink / raw)
  To: Eugenio Pérez
  Cc: qemu-devel, Cindy Lu, Michael S. Tsirkin, Laurent Vivier,
	Lei Yang, Hawkins Jiawei

On Sat, Jun 3, 2023 at 1:35 AM Eugenio Pérez <eperezma@redhat.com> wrote:
>
> Bug introducing when refactoring.  Otherway, the guest never received
> the used buffer.
>
> Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail")
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  net/vhost-vdpa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
> index 16d47f7b3c..5360924ba0 100644
> --- a/net/vhost-vdpa.c
> +++ b/net/vhost-vdpa.c
> @@ -807,7 +807,7 @@ static int vhost_vdpa_net_handle_ctrl_avail(VhostShadowVirtqueue *svq,
>      }
>
>      if (*s->status != VIRTIO_NET_OK) {
> -        return VIRTIO_NET_ERR;
> +        goto out;
>      }
>
>      status = VIRTIO_NET_ERR;
> --
> 2.31.1
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vdpa: fix not using CVQ buffer in case of error
  2023-06-06  1:32 ` Jason Wang
@ 2023-06-07  8:18   ` Lei Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Lei Yang @ 2023-06-07  8:18 UTC (permalink / raw)
  To: Jason Wang
  Cc: Eugenio Pérez, qemu-devel, Cindy Lu, Michael S. Tsirkin,
	Laurent Vivier, Hawkins Jiawei

QE tested sanity testing for this patch on the vhost_vdpa device,
everything works fine.

Tested-by: Lei Yang <leiyang@redhat.com>


On Tue, Jun 6, 2023 at 9:32 AM Jason Wang <jasowang@redhat.com> wrote:
>
> On Sat, Jun 3, 2023 at 1:35 AM Eugenio Pérez <eperezma@redhat.com> wrote:
> >
> > Bug introducing when refactoring.  Otherway, the guest never received
> > the used buffer.
> >
> > Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail")
> > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
>
> Acked-by: Jason Wang <jasowang@redhat.com>
>
> Thanks
>
> > ---
> >  net/vhost-vdpa.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
> > index 16d47f7b3c..5360924ba0 100644
> > --- a/net/vhost-vdpa.c
> > +++ b/net/vhost-vdpa.c
> > @@ -807,7 +807,7 @@ static int vhost_vdpa_net_handle_ctrl_avail(VhostShadowVirtqueue *svq,
> >      }
> >
> >      if (*s->status != VIRTIO_NET_OK) {
> > -        return VIRTIO_NET_ERR;
> > +        goto out;
> >      }
> >
> >      status = VIRTIO_NET_ERR;
> > --
> > 2.31.1
> >
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vdpa: fix not using CVQ buffer in case of error
  2023-06-02 17:34 [PATCH] vdpa: fix not using CVQ buffer in case of error Eugenio Pérez
  2023-06-06  1:32 ` Jason Wang
@ 2023-06-07 10:10 ` Michael Tokarev
  2023-06-07 13:52   ` Eugenio Perez Martin
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2023-06-07 10:10 UTC (permalink / raw)
  To: Eugenio Pérez, qemu-devel
  Cc: Cindy Lu, Michael S. Tsirkin, Laurent Vivier, Lei Yang,
	Jason Wang, Hawkins Jiawei

02.06.2023 20:34, Eugenio Pérez wrote:
> Bug introducing when refactoring.  Otherway, the guest never received
> the used buffer.
> 
> Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail")
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
>   net/vhost-vdpa.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Again, smells like a stable material, is it not?

Please Cc: qemu-stable@nongnu.org for other changes you think should be
applied to stable qemu series.

Thanks,

/mjt



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vdpa: fix not using CVQ buffer in case of error
  2023-06-07 10:10 ` Michael Tokarev
@ 2023-06-07 13:52   ` Eugenio Perez Martin
  2023-06-07 16:04     ` Michael Tokarev
  0 siblings, 1 reply; 6+ messages in thread
From: Eugenio Perez Martin @ 2023-06-07 13:52 UTC (permalink / raw)
  To: mjt
  Cc: qemu-devel, Cindy Lu, Michael S. Tsirkin, Laurent Vivier,
	Lei Yang, Jason Wang, Hawkins Jiawei

On Wed, Jun 7, 2023 at 12:11 PM Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> 02.06.2023 20:34, Eugenio Pérez wrote:
> > Bug introducing when refactoring.  Otherway, the guest never received
> > the used buffer.
> >
> > Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail")
> > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > ---
> >   net/vhost-vdpa.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
>
> Again, smells like a stable material, is it not?
>
> Please Cc: qemu-stable@nongnu.org for other changes you think should be
> applied to stable qemu series.
>

Sorry, I totally forgot. This one should go to stable, yes.

Thanks!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vdpa: fix not using CVQ buffer in case of error
  2023-06-07 13:52   ` Eugenio Perez Martin
@ 2023-06-07 16:04     ` Michael Tokarev
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2023-06-07 16:04 UTC (permalink / raw)
  To: Eugenio Perez Martin
  Cc: qemu-devel, Cindy Lu, Michael S. Tsirkin, Laurent Vivier,
	Lei Yang, Jason Wang, Hawkins Jiawei

07.06.2023 16:52, Eugenio Perez Martin wrote:
> On Wed, Jun 7, 2023 at 12:11 PM Michael Tokarev <mjt@tls.msk.ru> wrote:
..
>> Again, smells like a stable material, is it not?
>>
>> Please Cc: qemu-stable@nongnu.org for other changes you think should be
>> applied to stable qemu series.
> 
> Sorry, I totally forgot. This one should go to stable, yes.

That's okay, nothing to be sorry about. You did a good job
already fixing the issues.

Queued up.

Thank you!

/mjt


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-07 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 17:34 [PATCH] vdpa: fix not using CVQ buffer in case of error Eugenio Pérez
2023-06-06  1:32 ` Jason Wang
2023-06-07  8:18   ` Lei Yang
2023-06-07 10:10 ` Michael Tokarev
2023-06-07 13:52   ` Eugenio Perez Martin
2023-06-07 16:04     ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).