[dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' has been queued to LTS release 17.11.10
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Dec 19 15:33:01 CET 2019
Hi,
FYI, your patch has been queued to LTS release 17.11.10
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
>From 4f1d3abf7e61ffec7374266c1801c15d02dcd91e Mon Sep 17 00:00:00 2001
From: Thibaut Collet <thibaut.collet at 6wind.com>
Date: Wed, 11 Sep 2019 18:04:09 +0200
Subject: [PATCH] net/virtio: get all pending Rx packets in vectorized paths
[ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ]
The loop to read packets does not take all packets as the number of
available packets (nb_used) is decremented in the loop.
Take all available packets provides a performance improvement of 3%.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Signed-off-by: Thibaut Collet <thibaut.collet at 6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +++--
drivers/net/virtio/virtio_rxtx_simple_sse.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
index b8b93551f0..a9d5cb6955 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
@@ -72,7 +72,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
struct virtnet_rx *rxvq = rx_queue;
struct virtqueue *vq = rxvq->vq;
struct virtio_hw *hw = vq->hw;
- uint16_t nb_used;
+ uint16_t nb_used, nb_total;
uint16_t desc_idx;
struct vring_used_elem *rused;
struct rte_mbuf **sw_ring;
@@ -135,8 +135,9 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
virtqueue_notify(vq);
}
+ nb_total = nb_used;
for (nb_pkts_received = 0;
- nb_pkts_received < nb_used;) {
+ nb_pkts_received < nb_total;) {
uint64x2_t desc[RTE_VIRTIO_DESC_PER_LOOP / 2];
uint64x2_t mbp[RTE_VIRTIO_DESC_PER_LOOP / 2];
uint64x2_t pkt_mb[RTE_VIRTIO_DESC_PER_LOOP];
diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
index 94f65143bb..74ca28d79d 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
@@ -74,7 +74,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
struct virtnet_rx *rxvq = rx_queue;
struct virtqueue *vq = rxvq->vq;
struct virtio_hw *hw = vq->hw;
- uint16_t nb_used;
+ uint16_t nb_used, nb_total;
uint16_t desc_idx;
struct vring_used_elem *rused;
struct rte_mbuf **sw_ring;
@@ -138,8 +138,9 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
virtqueue_notify(vq);
}
+ nb_total = nb_used;
for (nb_pkts_received = 0;
- nb_pkts_received < nb_used;) {
+ nb_pkts_received < nb_total;) {
__m128i desc[RTE_VIRTIO_DESC_PER_LOOP / 2];
__m128i mbp[RTE_VIRTIO_DESC_PER_LOOP / 2];
__m128i pkt_mb[RTE_VIRTIO_DESC_PER_LOOP];
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-12-19 14:32:27.698475902 +0000
+++ 0034-net-virtio-get-all-pending-Rx-packets-in-vectorized-.patch 2019-12-19 14:32:25.809291956 +0000
@@ -1,14 +1,15 @@
-From 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d Mon Sep 17 00:00:00 2001
+From 4f1d3abf7e61ffec7374266c1801c15d02dcd91e Mon Sep 17 00:00:00 2001
From: Thibaut Collet <thibaut.collet at 6wind.com>
Date: Wed, 11 Sep 2019 18:04:09 +0200
Subject: [PATCH] net/virtio: get all pending Rx packets in vectorized paths
+[ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ]
+
The loop to read packets does not take all packets as the number of
available packets (nb_used) is decremented in the loop.
Take all available packets provides a performance improvement of 3%.
Fixes: fc3d66212fed ("virtio: add vector Rx")
-Cc: stable at dpdk.org
Signed-off-by: Thibaut Collet <thibaut.collet at 6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -18,10 +19,10 @@
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
-index 70e89fc428..992e71f010 100644
+index b8b93551f0..a9d5cb6955 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
-@@ -42,7 +42,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -72,7 +72,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
struct virtnet_rx *rxvq = rx_queue;
struct virtqueue *vq = rxvq->vq;
struct virtio_hw *hw = vq->hw;
@@ -30,12 +31,11 @@
uint16_t desc_idx;
struct vring_used_elem *rused;
struct rte_mbuf **sw_ring;
-@@ -106,9 +106,10 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -135,8 +135,9 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
virtqueue_notify(vq);
}
+ nb_total = nb_used;
- ref_rx_pkts = rx_pkts;
for (nb_pkts_received = 0;
- nb_pkts_received < nb_used;) {
+ nb_pkts_received < nb_total;) {
@@ -43,10 +43,10 @@
uint64x2_t mbp[RTE_VIRTIO_DESC_PER_LOOP / 2];
uint64x2_t pkt_mb[RTE_VIRTIO_DESC_PER_LOOP];
diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
-index cb1610e715..f9ec4ae699 100644
+index 94f65143bb..74ca28d79d 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
-@@ -43,7 +43,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -74,7 +74,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
struct virtnet_rx *rxvq = rx_queue;
struct virtqueue *vq = rxvq->vq;
struct virtio_hw *hw = vq->hw;
@@ -55,12 +55,11 @@
uint16_t desc_idx;
struct vring_used_elem *rused;
struct rte_mbuf **sw_ring;
-@@ -108,9 +108,10 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -138,8 +138,9 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
virtqueue_notify(vq);
}
+ nb_total = nb_used;
- ref_rx_pkts = rx_pkts;
for (nb_pkts_received = 0;
- nb_pkts_received < nb_used;) {
+ nb_pkts_received < nb_total;) {
More information about the stable
mailing list