patch 'net/virtio: fix slots number when indirect feature on' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:35:33 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/72487940d1f219ab26b6e81cf00d9cb7fa97994e

Thanks.

Kevin

---
>From 72487940d1f219ab26b6e81cf00d9cb7fa97994e Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu at intel.com>
Date: Thu, 20 Jan 2022 20:22:18 +0800
Subject: [PATCH] net/virtio: fix slots number when indirect feature on

[ upstream commit 787091b9d5f614ae35ab8cfb7718f6ccb64f1f3c ]

Virtio driver only occupies one slot for enqueuing chained mbufs when
indirect feature is on. Required slots calculation should depend on
indirect feature status at the end.

Fixes: 0eaf7fc2fe8e ("net/virtio: separate AVX Rx/Tx")

Signed-off-by: Marvin Liu <yong.liu at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_rxtx_packed.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx_packed.h b/drivers/net/virtio/virtio_rxtx_packed.h
index d5c259a1f6..536112983c 100644
--- a/drivers/net/virtio/virtio_rxtx_packed.h
+++ b/drivers/net/virtio/virtio_rxtx_packed.h
@@ -126,5 +126,4 @@ virtqueue_enqueue_single_packed_vec(struct virtnet_tx *txvq,
 	 * default    => number of segments + 1
 	 */
-	slots = use_indirect ? 1 : (txm->nb_segs + !can_push);
 	can_push = rte_mbuf_refcnt_read(txm) == 1 &&
 		   RTE_MBUF_DIRECT(txm) &&
@@ -132,5 +131,5 @@ virtqueue_enqueue_single_packed_vec(struct virtnet_tx *txvq,
 		   rte_pktmbuf_headroom(txm) >= hdr_size;
 
-	slots = txm->nb_segs + !can_push;
+	slots = use_indirect ? 1 : (txm->nb_segs + !can_push);
 	need = slots - vq->vq_free_cnt;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:47.715725172 +0000
+++ 0144-net-virtio-fix-slots-number-when-indirect-feature-on.patch	2022-02-21 15:22:44.299704594 +0000
@@ -1 +1 @@
-From 787091b9d5f614ae35ab8cfb7718f6ccb64f1f3c Mon Sep 17 00:00:00 2001
+From 72487940d1f219ab26b6e81cf00d9cb7fa97994e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 787091b9d5f614ae35ab8cfb7718f6ccb64f1f3c ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list