DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] vhost: fix missing copy length in batched copies
@ 2022-07-12 10:04 Maxime Coquelin
  2022-07-12 10:09 ` Maxime Coquelin
  2022-07-13  8:33 ` Ling, WeiX
  0 siblings, 2 replies; 5+ messages in thread
From: Maxime Coquelin @ 2022-07-12 10:04 UTC (permalink / raw)
  To: dev, chenbo.xia, yux.jiang, thomas, david.marchand; +Cc: Maxime Coquelin

This patch fixes missing the assignement of the copy length
when doing batched copies in the sync dequeue path.

Fixes: cd79d1b030bd ("vhost: fix unnecessary dirty page logging")

Suggested-by: Chenbo Xia <chenbo.xia@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 12b7fbe7f9..35fa4670fd 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1127,13 +1127,13 @@ sync_fill_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,
 			batch_copy[vq->batch_copy_nb_elems].src =
 				rte_pktmbuf_mtod_offset(m, void *, mbuf_offset);
 			batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova;
-			batch_copy[vq->batch_copy_nb_elems].len = cpy_len;
 		} else {
 			batch_copy[vq->batch_copy_nb_elems].dst =
 				rte_pktmbuf_mtod_offset(m, void *, mbuf_offset);
 			batch_copy[vq->batch_copy_nb_elems].src =
 				(void *)((uintptr_t)(buf_addr));
 		}
+		batch_copy[vq->batch_copy_nb_elems].len = cpy_len;
 		vq->batch_copy_nb_elems++;
 	}
 }
-- 
2.35.3


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

* Re: [PATCH] vhost: fix missing copy length in batched copies
  2022-07-12 10:04 [PATCH] vhost: fix missing copy length in batched copies Maxime Coquelin
@ 2022-07-12 10:09 ` Maxime Coquelin
  2022-07-12 10:15   ` Xia, Chenbo
  2022-07-13  8:33 ` Ling, WeiX
  1 sibling, 1 reply; 5+ messages in thread
From: Maxime Coquelin @ 2022-07-12 10:09 UTC (permalink / raw)
  To: dev, chenbo.xia, yux.jiang, thomas, david.marchand



On 7/12/22 12:04, Maxime Coquelin wrote:
> This patch fixes missing the assignement of the copy length
s/assignement/assignment/

If this is the only change requested, could it be fixed while applying,
or should I send a v2?

Thanks,
Maxime

> when doing batched copies in the sync dequeue path.
> 
> Fixes: cd79d1b030bd ("vhost: fix unnecessary dirty page logging")
> 
> Suggested-by: Chenbo Xia <chenbo.xia@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>   lib/vhost/virtio_net.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
> index 12b7fbe7f9..35fa4670fd 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -1127,13 +1127,13 @@ sync_fill_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,
>   			batch_copy[vq->batch_copy_nb_elems].src =
>   				rte_pktmbuf_mtod_offset(m, void *, mbuf_offset);
>   			batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova;
> -			batch_copy[vq->batch_copy_nb_elems].len = cpy_len;
>   		} else {
>   			batch_copy[vq->batch_copy_nb_elems].dst =
>   				rte_pktmbuf_mtod_offset(m, void *, mbuf_offset);
>   			batch_copy[vq->batch_copy_nb_elems].src =
>   				(void *)((uintptr_t)(buf_addr));
>   		}
> +		batch_copy[vq->batch_copy_nb_elems].len = cpy_len;
>   		vq->batch_copy_nb_elems++;
>   	}
>   }


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

* RE: [PATCH] vhost: fix missing copy length in batched copies
  2022-07-12 10:09 ` Maxime Coquelin
@ 2022-07-12 10:15   ` Xia, Chenbo
  0 siblings, 0 replies; 5+ messages in thread
From: Xia, Chenbo @ 2022-07-12 10:15 UTC (permalink / raw)
  To: Maxime Coquelin, dev, Jiang, YuX, thomas, david.marchand

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, July 12, 2022 6:10 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Jiang, YuX
> <yux.jiang@intel.com>; thomas@monjalon.net; david.marchand@redhat.com
> Subject: Re: [PATCH] vhost: fix missing copy length in batched copies
> 
> 
> 
> On 7/12/22 12:04, Maxime Coquelin wrote:
> > This patch fixes missing the assignement of the copy length
> s/assignement/assignment/
> 
> If this is the only change requested, could it be fixed while applying,
> or should I send a v2?
> 
> Thanks,
> Maxime
> 
> > when doing batched copies in the sync dequeue path.
> >
> > Fixes: cd79d1b030bd ("vhost: fix unnecessary dirty page logging")
> >
> > Suggested-by: Chenbo Xia <chenbo.xia@intel.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > ---
> >   lib/vhost/virtio_net.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)

With the typo fixed:

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

> >
> > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
> > index 12b7fbe7f9..35fa4670fd 100644
> > --- a/lib/vhost/virtio_net.c
> > +++ b/lib/vhost/virtio_net.c
> > @@ -1127,13 +1127,13 @@ sync_fill_seg(struct virtio_net *dev, struct
> vhost_virtqueue *vq,
> >   			batch_copy[vq->batch_copy_nb_elems].src =
> >   				rte_pktmbuf_mtod_offset(m, void *, mbuf_offset);
> >   			batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova;
> > -			batch_copy[vq->batch_copy_nb_elems].len = cpy_len;
> >   		} else {
> >   			batch_copy[vq->batch_copy_nb_elems].dst =
> >   				rte_pktmbuf_mtod_offset(m, void *, mbuf_offset);
> >   			batch_copy[vq->batch_copy_nb_elems].src =
> >   				(void *)((uintptr_t)(buf_addr));
> >   		}
> > +		batch_copy[vq->batch_copy_nb_elems].len = cpy_len;
> >   		vq->batch_copy_nb_elems++;
> >   	}
> >   }


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

* RE: [PATCH] vhost: fix missing copy length in batched copies
  2022-07-12 10:04 [PATCH] vhost: fix missing copy length in batched copies Maxime Coquelin
  2022-07-12 10:09 ` Maxime Coquelin
@ 2022-07-13  8:33 ` Ling, WeiX
  2022-07-14 13:32   ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Ling, WeiX @ 2022-07-13  8:33 UTC (permalink / raw)
  To: Maxime Coquelin, dev, Xia, Chenbo, Jiang, YuX, thomas, david.marchand

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, July 12, 2022 6:05 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Jiang, YuX
> <yux.jiang@intel.com>; thomas@monjalon.net;
> david.marchand@redhat.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH] vhost: fix missing copy length in batched copies
> 
> This patch fixes missing the assignement of the copy length when doing
> batched copies in the sync dequeue path.
> 
> Fixes: cd79d1b030bd ("vhost: fix unnecessary dirty page logging")
> 
> Suggested-by: Chenbo Xia <chenbo.xia@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---

Hi Maxime, 

regression test with this patch yesterday, it does not effect the other test cases.

Tested-by: Wei Ling <weix.ling@intel.com>

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

* Re: [PATCH] vhost: fix missing copy length in batched copies
  2022-07-13  8:33 ` Ling, WeiX
@ 2022-07-14 13:32   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2022-07-14 13:32 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, Xia, Chenbo, Jiang, YuX, david.marchand, Ling, WeiX

> > This patch fixes missing the assignement of the copy length when doing
> > batched copies in the sync dequeue path.
> > 
> > Fixes: cd79d1b030bd ("vhost: fix unnecessary dirty page logging")
> > 
> > Suggested-by: Chenbo Xia <chenbo.xia@intel.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > ---
> 
> Hi Maxime, 
> 
> regression test with this patch yesterday, it does not effect the other test cases.
> 
> Tested-by: Wei Ling <weix.ling@intel.com>

Applied, thanks.



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

end of thread, other threads:[~2022-07-14 13:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 10:04 [PATCH] vhost: fix missing copy length in batched copies Maxime Coquelin
2022-07-12 10:09 ` Maxime Coquelin
2022-07-12 10:15   ` Xia, Chenbo
2022-07-13  8:33 ` Ling, WeiX
2022-07-14 13:32   ` Thomas Monjalon

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).