[dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:26:21 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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/10/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/840622c7e1f4fda5dc737468082df085e29ace33

Thanks.

Kevin.

---
>From 840622c7e1f4fda5dc737468082df085e29ace33 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 9200db7ff..6bcacb047 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
@@ -43,5 +43,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	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;
@@ -107,7 +107,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
+	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	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];
diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
index d6194a33f..7a25ac7e4 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
@@ -44,5 +44,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	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;
@@ -109,7 +109,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
+	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	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];
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.514958341 +0000
+++ 0012-net-virtio-get-all-pending-Rx-packets-in-vectorized-.patch	2019-12-03 17:29:51.707750848 +0000
@@ -1 +1 @@
-From 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d Mon Sep 17 00:00:00 2001
+From 840622c7e1f4fda5dc737468082df085e29ace33 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 70e89fc42..992e71f01 100644
+index 9200db7ff..6bcacb047 100644
@@ -42 +43 @@
-index cb1610e71..f9ec4ae69 100644
+index d6194a33f..7a25ac7e4 100644



More information about the stable mailing list