patch 'dma/idxd: fix burst capacity calculation' has been queued to stable release 21.11.1
Kevin Traynor
ktraynor at redhat.com
Mon Feb 21 16:33:16 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/cb7d9a39cb58dae8792de670b60b31e942225ef6
Thanks.
Kevin
---
>From cb7d9a39cb58dae8792de670b60b31e942225ef6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Tue, 11 Jan 2022 13:41:02 +0000
Subject: [PATCH] dma/idxd: fix burst capacity calculation
[ upstream commit a2b43447e923a54a4d8293fae960fbe2dc3f641e ]
When the maximum burst size supported by HW is less than the available
ring space, incorrect capacity was returned when there was already some
jobs queued up for submission. This was because the capacity calculation
failed to subtract the number of already-enqueued jobs from the max
burst size. After subtraction is done, ensure that any negative values
(which should never occur if the user respects the reported limits), are
clamped to zero.
Fixes: 9459de4edc99 ("dma/idxd: add burst capacity")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Kevin Laatz <kevin.laatz at intel.com>
Tested-by: Jiayu Hu <jiayu.hu at intel.com>
---
drivers/dma/idxd/idxd_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c
index fc11b11337..4442d1cbbd 100644
--- a/drivers/dma/idxd/idxd_common.c
+++ b/drivers/dma/idxd/idxd_common.c
@@ -486,5 +486,7 @@ idxd_burst_capacity(const void *dev_private, uint16_t vchan __rte_unused)
used_space = write_idx - idxd->ids_returned;
- return RTE_MIN((idxd->desc_ring_mask - used_space), idxd->max_batch_size);
+ const int ret = RTE_MIN((idxd->desc_ring_mask - used_space),
+ (idxd->max_batch_size - idxd->batch_size));
+ return ret < 0 ? 0 : (uint16_t)ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.852003793 +0000
+++ 0007-dma-idxd-fix-burst-capacity-calculation.patch 2022-02-21 15:22:44.035703999 +0000
@@ -1 +1 @@
-From a2b43447e923a54a4d8293fae960fbe2dc3f641e Mon Sep 17 00:00:00 2001
+From cb7d9a39cb58dae8792de670b60b31e942225ef6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a2b43447e923a54a4d8293fae960fbe2dc3f641e ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list