patch 'net/virtio: fix check of threshold for Tx freeing' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jun 30 14:25:39 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/02/25. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4863a82ac7db22f67294808bc5077b848e057a40
Thanks.
Luca Boccassi
---
>From 4863a82ac7db22f67294808bc5077b848e057a40 Mon Sep 17 00:00:00 2001
From: Hengqi Chen <hengqi.chen at gmail.com>
Date: Mon, 9 Jun 2025 07:23:47 +0000
Subject: [PATCH] net/virtio: fix check of threshold for Tx freeing
[ upstream commit 3e3c7f3fa5ac3f2748a4463d87e73eb28024b401 ]
Like most drivers, make the fast path of virtio_xmit_cleanup() behave as
described by the comments of rte_eth_txconf::tx_free_thresh ([0]):
Start freeing Tx buffers if there are
less free descriptors than this value.
The rationale behind this change is that:
* vq->vq_nentries is set during device probe
with the queue size specified by vhost backend,
this value does not reflect the real nb_tx_desc
* the real available tx desc is set to vq->vq_free_cnt
via the nb_tx_desc param of rte_eth_tx_queue_setup() API
* so `nb_used > vq->vq_nentries - vq->vq_free_thresh` could never be true
if say nb_tx_desc=2048, vq->vq_nentries=4096, vq->vq_free_thresh=32,
see bug report 1716 ([1]) for details.
[0]: https://github.com/DPDK/dpdk/commit/72514b5d5543
[1]: https://bugs.dpdk.org/show_bug.cgi?id=1716
Bugzilla ID: 1716
Fixes: 72514b5d5543 ("ethdev: fix check of threshold for Tx freeing")
Signed-off-by: Baoyuan Li <updoing at sina.com>
Signed-off-by: Hengqi Chen <hengqi.chen at gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
.mailmap | 3 +++
drivers/net/virtio/virtio_rxtx.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index f53fdf0d85..bda591c1cf 100644
--- a/.mailmap
+++ b/.mailmap
@@ -150,6 +150,8 @@ Balakrishna Bhamidipati <bbhamidipati at marvell.com>
Balasubramanian Manoharan <balasubramanian.manoharan at caviumnetworks.com>
Balazs Nemeth <bnemeth at redhat.com> <balazs.nemeth at intel.com>
Bao-Long Tran <longtb5 at viettel.com.vn>
+Baoyuan Li <updoing at sina.com>
+Bar Neuman <bneuman at nvidia.com>
Barak Enat <barak at saguna.net>
Barry Cao <barry.cao at nxp.com>
Bartosz Staszewski <bartoszx.staszewski at intel.com>
@@ -504,6 +506,7 @@ Hemant Agrawal <hemant.agrawal at nxp.com> <hemant at freescale.com>
Heng Ding <hengx.ding at intel.com>
Hengjian Zhang <hengjianx.zhang at intel.com>
Heng Jiang <jiangheng14 at huawei.com>
+Hengqi Chen <hengqi.chen at gmail.com>
Heng Wang <heng.wang at ericsson.com>
Henning Schild <henning.schild at siemens.com>
Henry Cai <caihe at huawei.com>
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index c3e686cf0c..66aaeb3c65 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1870,7 +1870,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
nb_used = virtqueue_nused(vq);
- if (likely(nb_used > vq->vq_nentries - vq->vq_free_thresh))
+ if (likely(vq->vq_free_cnt < vq->vq_free_thresh))
virtio_xmit_cleanup(vq, nb_used);
for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-30 13:21:22.117954177 +0100
+++ 0009-net-virtio-fix-check-of-threshold-for-Tx-freeing.patch 2025-06-30 13:21:21.747057360 +0100
@@ -1 +1 @@
-From 3e3c7f3fa5ac3f2748a4463d87e73eb28024b401 Mon Sep 17 00:00:00 2001
+From 4863a82ac7db22f67294808bc5077b848e057a40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e3c7f3fa5ac3f2748a4463d87e73eb28024b401 ]
+
@@ -26 +27,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
- .mailmap | 2 ++
+ .mailmap | 3 +++
@@ -34 +35 @@
- 2 files changed, 3 insertions(+), 1 deletion(-)
+ 2 files changed, 4 insertions(+), 1 deletion(-)
@@ -37 +38 @@
-index 25a53d06ca..8e898e303e 100644
+index f53fdf0d85..bda591c1cf 100644
@@ -40 +41 @@
-@@ -167,6 +167,7 @@ Balakrishna Bhamidipati <bbhamidipati at marvell.com>
+@@ -150,6 +150,8 @@ Balakrishna Bhamidipati <bbhamidipati at marvell.com>
@@ -45 +46 @@
- Bar Neuman <bneuman at nvidia.com>
++Bar Neuman <bneuman at nvidia.com>
@@ -47,2 +48,3 @@
- Barbara Skobiej <barbara.skobiej at intel.com>
-@@ -552,6 +553,7 @@ Hemant Agrawal <hemant.agrawal at nxp.com> <hemant at freescale.com>
+ Barry Cao <barry.cao at nxp.com>
+ Bartosz Staszewski <bartoszx.staszewski at intel.com>
+@@ -504,6 +506,7 @@ Hemant Agrawal <hemant.agrawal at nxp.com> <hemant at freescale.com>
@@ -57 +59 @@
-index edecd2011f..ab97f03d7d 100644
+index c3e686cf0c..66aaeb3c65 100644
@@ -60 +62 @@
-@@ -1873,7 +1873,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1870,7 +1870,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
More information about the stable
mailing list