vhost: fix batch enqueue only handle few packets
PATCH 1/1 vhost: fix batch enqueue only handle few packets
After enqueue function finished, packet index has been increased. Batch enqueue function should retrieve mbuf structure pointed by that index.
--- lib/librte_vhost/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_vhost/virtio_net.c +2 -1
@@ -1155,7 +1155,8 @@ virtio_dev_rx_packed(struct virtio_net *dev,rte_prefetch0 (&vq->desc_packed[vq->last_avail_idx]);if (remained >=PACKED_BATCH_SIZE ) { -if (!virtio_dev_rx_batch_packed (dev, vq, pkts)) { +if (!virtio_dev_rx_batch_packed (dev, vq, + &pkts[pkt_idx])) { pkt_idx +=PACKED_BATCH_SIZE ; remained -=PACKED_BATCH_SIZE ;continue ;
Signature · 1 line
2.17.1
Quoted 10 lines · Marvin Liu
After enqueue function finished, packet index has been increased. Batch enqueue function should retrieve mbuf structure pointed by that index.
Fixes 0294211bb6dc ("vhost: optimize packed ring enqueue")Signed-off-by Marvin Liu <[email protected]>--- lib/librte_vhost/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
We definitely need Vhost-user and Virtio-user functional testing in the CI.
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 9 lines · Marvin Liu
After enqueue function finished, packet index has been increased. Batch enqueue function should retrieve mbuf structure pointed by that index.
Fixes 0294211bb6dc ("vhost: optimize packed ring enqueue")Signed-off-by Marvin Liu <[email protected]>--- lib/librte_vhost/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to dpdk-next-virtio/master
Can you please run again the performance benchmarks, and see what is the loss, if any?
Thanks,
Maxime
Quoted 23 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Thursday, November 07, 2019 4:20 PM
To: Liu, Yong <[email protected]>; Bie, Tiwei <[email protected]>; Wang, Zhihong <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] vhost: fix batch enqueue only handle few packetsQuoted 9 lines · Marvin Liu
After enqueue function finished, packet index has been increased. Batch enqueue function should retrieve mbuf structure pointed by that index.
Fixes 0294211bb6dc ("vhost: optimize packed ring enqueue")Signed-off-by Marvin Liu <[email protected]>--- lib/librte_vhost/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 5 lines
Applied to dpdk-next-virtio/master
Can you please run again the performance benchmarks, and see what is the loss, if any?
Sure, I will rerun the performance benchmarks.
Thanks,
Marvin
Quoted 2 lines
Thanks,
Maxime
Quoted 35 lines
-----Original Message-----
From: Liu, Yong
Sent: Thursday, November 07, 2019 4:29 PM
To: Maxime Coquelin <[email protected]>; Bie, Tiwei <[email protected]>; Wang, Zhihong <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] vhost: fix batch enqueue only handle few packetsQuoted 4 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Thursday, November 07, 2019 4:20 PM
To: Liu, Yong <[email protected]>; Bie, Tiwei <[email protected]>;Wang,
Quoted 8 lines
Zhihong <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] vhost: fix batch enqueue only handle few packetsQuoted 1 line · Marvin Liu
After enqueue function finished, packet index has been increased.
Batch
Quoted 9 lines
Quoted 8 lines
enqueue function should retrieve mbuf structure pointed by that index.
Fixes 0294211bb6dc ("vhost: optimize packed ring enqueue")Signed-off-by Marvin Liu <[email protected]>--- lib/librte_vhost/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 7 lines
Quoted 5 lines
Applied to dpdk-next-virtio/master
Can you please run again the performance benchmarks, and see what is the loss, if any?
Sure, I will rerun the performance benchmarks.
latest result with gcc9.0.1.
+---------------------------------------------------+ | | 19.08 | + opt | |-----------------------------------|-------|-------| | 1518B PvP | 2.63M | 3.07M | |-----------------------------------|-------|-------| | 64B loopback | 7.81M | 12.3M | |-----------------------------------|-------|-------| | 1518B loopback | 3.59M | 4.54M | |-----------------------------------|-------|-------| | 16K chained loopback | 297K | 322K | |-----------------------------------|-------|-------| | 50% 256B + 50% 16K | 688K | 959K | |-----------------------------------|-------|-------| | pktgen_sample03_burst_single_flow | 5.78M | 5.80M | +---------------------------------------------------+
Quoted 5 lines
Thanks,
MarvinQuoted 2 lines
Thanks,
Maxime