[dpdk-stable] patch 'net/virtio: fix in-order Rx with segmented packet' has been queued to LTS release 18.11.3

Kevin Traynor ktraynor at redhat.com
Mon Jun 24 17:24:38 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/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/52bc0e022a1fd76374d970f1e5d2b4a5237b450b

Thanks.

Kevin Traynor

---
>From 52bc0e022a1fd76374d970f1e5d2b4a5237b450b Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Wed, 5 Jun 2019 12:00:36 +0200
Subject: [PATCH] net/virtio: fix in-order Rx with segmented packet

[ upstream commit 61d0bec3ba28c11dbc2c53390ef9ed9d5807a788 ]

After having dequeued a burst of descriptors, there may be a
need to dequeue a few more if the last packet was segmented
and not complete. When it happens, the extra segments were
not properly attached to the mbuf chain, and so were lost.

Also, head segment data_len field is wrongly summed with
the length of all the segments of the chain.

This patch fixes both the mbuf chaining and head segment's
data_len field.

Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx")

Reported-by: Yaroslav Brustinov <ybrustin at cisco.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 98282dcff..f8311b6e2 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -985,5 +985,5 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
 	struct virtio_hw *hw = vq->hw;
 	struct rte_mbuf *rxm;
-	struct rte_mbuf *prev;
+	struct rte_mbuf *prev = NULL;
 	uint16_t nb_used, num, nb_rx;
 	uint32_t len[VIRTIO_MBUF_BURST_SZ];
@@ -1073,5 +1073,4 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
 
 			rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]);
-			rx_pkts[nb_rx]->data_len += (uint16_t)(len[i]);
 
 			if (prev)
@@ -1093,5 +1092,4 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
 					VIRTIO_MBUF_BURST_SZ);
 
-		prev = rcv_pkts[nb_rx];
 		if (likely(VIRTQUEUE_NUSED(vq) >= rcv_cnt)) {
 			virtio_rmb();
@@ -1110,5 +1108,4 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
 				prev = rxm;
 				rx_pkts[nb_rx]->pkt_len += len[extra_idx];
-				rx_pkts[nb_rx]->data_len += len[extra_idx];
 				extra_idx += 1;
 			};
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-06-24 16:18:55.822490456 +0100
+++ 0014-net-virtio-fix-in-order-Rx-with-segmented-packet.patch	2019-06-24 16:18:54.986432286 +0100
@@ -1 +1 @@
-From 61d0bec3ba28c11dbc2c53390ef9ed9d5807a788 Mon Sep 17 00:00:00 2001
+From 52bc0e022a1fd76374d970f1e5d2b4a5237b450b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 61d0bec3ba28c11dbc2c53390ef9ed9d5807a788 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 4333c10a9..62d5a4174 100644
+index 98282dcff..f8311b6e2 100644
@@ -32 +33 @@
-@@ -1420,5 +1420,5 @@ virtio_recv_pkts_inorder(void *rx_queue,
+@@ -985,5 +985,5 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
@@ -39 +40 @@
-@@ -1512,5 +1512,4 @@ virtio_recv_pkts_inorder(void *rx_queue,
+@@ -1073,5 +1073,4 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
@@ -45 +46 @@
-@@ -1532,5 +1531,4 @@ virtio_recv_pkts_inorder(void *rx_queue,
+@@ -1093,5 +1092,4 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,
@@ -50,2 +51,2 @@
- 			virtio_rmb(hw->weak_barriers);
-@@ -1549,5 +1547,4 @@ virtio_recv_pkts_inorder(void *rx_queue,
+ 			virtio_rmb();
+@@ -1110,5 +1108,4 @@ virtio_recv_mergeable_pkts_inorder(void *rx_queue,


More information about the stable mailing list