[dpdk-stable] patch 'net/virtio: fix descriptor addressed in Tx' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:39 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 87a984b6db89dce652464e660e0fe643654619ae Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko at solarflare.com>
Date: Tue, 15 Oct 2019 09:11:27 +0100
Subject: [PATCH] net/virtio: fix descriptor addressed in Tx

[ upstream commit be048a1aaa7276cc99a5a6a30e7825cfcb523112 ]

Previous fix removes usage of rte_pktmbuf_prepend() to get pointer
to virtio net header which changes mbuf data_off and data_len.
Size of virtio net header is added to segment length when Tx descriptor
is composed, but segment address (calculated using data_off) is not
adjusted to take size of virtio net header into account.

Fixes: 1ae55ad38e5e ("net/virtio: fix mbuf data and packet length mismatch")

Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
---
 drivers/net/virtio/virtio_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 40255eee4e..c608575722 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -388,6 +388,7 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
 		start_dp[idx].addr  = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq);
 		start_dp[idx].len   = cookie->data_len;
 		if (prepend_header) {
+			start_dp[idx].addr -= head_size;
 			start_dp[idx].len += head_size;
 			prepend_header = false;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:29.184711742 +0000
+++ 0072-net-virtio-fix-descriptor-addressed-in-Tx.patch	2019-12-19 14:32:26.165299015 +0000
@@ -1,8 +1,10 @@
-From be048a1aaa7276cc99a5a6a30e7825cfcb523112 Mon Sep 17 00:00:00 2001
+From 87a984b6db89dce652464e660e0fe643654619ae Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko at solarflare.com>
 Date: Tue, 15 Oct 2019 09:11:27 +0100
 Subject: [PATCH] net/virtio: fix descriptor addressed in Tx
 
+[ upstream commit be048a1aaa7276cc99a5a6a30e7825cfcb523112 ]
+
 Previous fix removes usage of rte_pktmbuf_prepend() to get pointer
 to virtio net header which changes mbuf data_off and data_len.
 Size of virtio net header is added to segment length when Tx descriptor
@@ -10,46 +12,18 @@
 adjusted to take size of virtio net header into account.
 
 Fixes: 1ae55ad38e5e ("net/virtio: fix mbuf data and packet length mismatch")
-Cc: stable at dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
 Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
 ---
- drivers/net/virtio/virtio_rxtx.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
+ drivers/net/virtio/virtio_rxtx.c | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
-index 701c1cf47b..b5fc4ecbe1 100644
+index 40255eee4e..c608575722 100644
 --- a/drivers/net/virtio/virtio_rxtx.c
 +++ b/drivers/net/virtio/virtio_rxtx.c
-@@ -657,7 +657,8 @@ virtqueue_enqueue_xmit_inorder(struct virtnet_tx *txvq,
- 		else
- 			virtqueue_xmit_offload(hdr, cookies[i], true);
- 
--		start_dp[idx].addr  = VIRTIO_MBUF_DATA_DMA_ADDR(cookies[i], vq);
-+		start_dp[idx].addr  =
-+			VIRTIO_MBUF_DATA_DMA_ADDR(cookies[i], vq) - head_size;
- 		start_dp[idx].len   = cookies[i]->data_len + head_size;
- 		start_dp[idx].flags = 0;
- 
-@@ -704,7 +705,7 @@ virtqueue_enqueue_xmit_packed_fast(struct virtnet_tx *txvq,
- 	else
- 		virtqueue_xmit_offload(hdr, cookie, true);
- 
--	dp->addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq);
-+	dp->addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq) - head_size;
- 	dp->len  = cookie->data_len + head_size;
- 	dp->id   = id;
- 
-@@ -786,6 +787,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
- 		start_dp[idx].addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq);
- 		start_dp[idx].len  = cookie->data_len;
- 		if (prepend_header) {
-+			start_dp[idx].addr -= head_size;
- 			start_dp[idx].len += head_size;
- 			prepend_header = false;
- 		}
-@@ -889,6 +891,7 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
+@@ -388,6 +388,7 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
  		start_dp[idx].addr  = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq);
  		start_dp[idx].len   = cookie->data_len;
  		if (prepend_header) {


More information about the stable mailing list