patch 'baseband/acc100: add LDPC encoder padding function' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Sat Nov 5 18:11:36 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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

Thanks.

Luca Boccassi

---
>From a68bdd7eda31aee34ea52b45a94fd32d4699bdb9 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas at intel.com>
Date: Thu, 20 Oct 2022 22:20:37 -0700
Subject: [PATCH] baseband/acc100: add LDPC encoder padding function

[ upstream commit 6f3325bbfa556e8fe39df15f32424f40b2eb1d05 ]

LDPC Encoder input may need to be padded to avoid small beat for ACC100.
Padding 5GDL input buffer length (BLEN) to avoid case (BLEN % 64) <= 8.
Adding protection for corner case to avoid for 5GDL occurrence of last
beat within the ACC100 fabric with <= 8B which might trigger a fabric
corner case hang issue.

Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions")

Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/baseband/acc100/rte_acc100_pmd.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 5dca9e01d8..f9e45a61e7 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1618,12 +1618,25 @@ acc100_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
 	return 0;
 }
 
+/* May need to pad LDPC Encoder input to avoid small beat for ACC100. */
+static inline uint16_t
+pad_le_in(uint16_t blen, struct acc100_queue *q __rte_unused)
+{
+	uint16_t last_beat;
+
+	last_beat = blen % 64;
+	if ((last_beat > 0) && (last_beat <= 8))
+		blen += 8;
+
+	return blen;
+}
+
 static inline int
 acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
 		struct acc100_dma_req_desc *desc, struct rte_mbuf **input,
 		struct rte_mbuf *output, uint32_t *in_offset,
 		uint32_t *out_offset, uint32_t *out_length,
-		uint32_t *mbuf_total_left, uint32_t *seg_total_left)
+		uint32_t *mbuf_total_left, uint32_t *seg_total_left, struct acc100_queue *q)
 {
 	int next_triplet = 1; /* FCW already done */
 	uint16_t K, in_length_in_bits, in_length_in_bytes;
@@ -1647,8 +1660,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
 	}
 
 	next_triplet = acc100_dma_fill_blk_type_in(desc, input, in_offset,
-			in_length_in_bytes,
-			seg_total_left, next_triplet);
+			pad_le_in(in_length_in_bytes, q), seg_total_left, next_triplet);
 	if (unlikely(next_triplet < 0)) {
 		rte_bbdev_log(ERR,
 				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
@@ -2363,7 +2375,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
 	acc100_header_init(&desc->req);
 	desc->req.numCBs = num;
 
-	in_length_in_bytes = ops[0]->ldpc_enc.input.data->data_len;
+	in_length_in_bytes = pad_le_in(ops[0]->ldpc_enc.input.data->data_len, q);
 	out_length = (enc->cb_params.e + 7) >> 3;
 	desc->req.m2dlen = 1 + num;
 	desc->req.d2mlen = num;
@@ -2432,7 +2444,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 
 	ret = acc100_dma_desc_le_fill(op, &desc->req, &input, output,
 			&in_offset, &out_offset, &out_length, &mbuf_total_left,
-			&seg_total_left);
+			&seg_total_left, q);
 
 	if (unlikely(ret < 0))
 		return ret;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-05 17:11:11.953066330 +0000
+++ 0037-baseband-acc100-add-LDPC-encoder-padding-function.patch	2022-11-05 17:11:08.798945303 +0000
@@ -1 +1 @@
-From 6f3325bbfa556e8fe39df15f32424f40b2eb1d05 Mon Sep 17 00:00:00 2001
+From a68bdd7eda31aee34ea52b45a94fd32d4699bdb9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f3325bbfa556e8fe39df15f32424f40b2eb1d05 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +19,2 @@
- drivers/baseband/acc/rte_acc100_pmd.c | 28 ++++++++++++++++++++-------
- 1 file changed, 21 insertions(+), 7 deletions(-)
+ drivers/baseband/acc100/rte_acc100_pmd.c | 22 +++++++++++++++++-----
+ 1 file changed, 17 insertions(+), 5 deletions(-)
@@ -21,22 +22,6 @@
-diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
-index 7500ef6eb5..577c107e9a 100644
---- a/drivers/baseband/acc/rte_acc100_pmd.c
-+++ b/drivers/baseband/acc/rte_acc100_pmd.c
-@@ -1017,14 +1017,13 @@ acc100_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc_fcw_td *fcw)
- 			RTE_BBDEV_TURBO_HALF_ITERATION_EVEN);
- }
- 
--#ifdef RTE_LIBRTE_BBDEV_DEBUG
--
- static inline bool
- is_acc100(struct acc_queue *q)
- {
- 	return (q->d->device_variant == ACC100_VARIANT);
- }
- 
-+#ifdef RTE_LIBRTE_BBDEV_DEBUG
- static inline bool
- validate_op_required(struct acc_queue *q)
- {
-@@ -1355,12 +1354,28 @@ acc100_dma_fill_blk_type_in(struct acc_dma_req_desc *desc,
- 	return next_triplet;
+diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
+index 5dca9e01d8..f9e45a61e7 100644
+--- a/drivers/baseband/acc100/rte_acc100_pmd.c
++++ b/drivers/baseband/acc100/rte_acc100_pmd.c
+@@ -1618,12 +1618,25 @@ acc100_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
+ 	return 0;
@@ -47 +32 @@
-+pad_le_in(uint16_t blen, struct acc_queue *q)
++pad_le_in(uint16_t blen, struct acc100_queue *q __rte_unused)
@@ -51,3 +35,0 @@
-+	if (!is_acc100(q))
-+		return blen;
-+
@@ -63 +45 @@
- 		struct acc_dma_req_desc *desc, struct rte_mbuf **input,
+ 		struct acc100_dma_req_desc *desc, struct rte_mbuf **input,
@@ -67 +49 @@
-+		uint32_t *mbuf_total_left, uint32_t *seg_total_left, struct acc_queue *q)
++		uint32_t *mbuf_total_left, uint32_t *seg_total_left, struct acc100_queue *q)
@@ -71 +53 @@
-@@ -1384,8 +1399,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
+@@ -1647,8 +1660,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
@@ -81,2 +63,2 @@
-@@ -2035,7 +2049,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops,
- 	acc_header_init(&desc->req);
+@@ -2363,7 +2375,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
+ 	acc100_header_init(&desc->req);
@@ -90 +72 @@
-@@ -2102,7 +2116,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
+@@ -2432,7 +2444,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,


More information about the stable mailing list