From: "Zhang, Mingshan" <mingshan.zhang@intel.com>
To: dev@dpdk.org, akhil.goyal@nxp.com
Cc: nicolas.chautru@intel.com
Subject: [PATCH -v1] SCSY-51090 ACC100 Padding 5GDL input BLEN
Date: Tue, 16 Nov 2021 13:12:15 +0800 [thread overview]
Message-ID: <1637039535-184462-2-git-send-email-mingshan.zhang@intel.com> (raw)
In-Reply-To: <1637039535-184462-1-git-send-email-mingshan.zhang@intel.com>
From: Nicolas Chautru <nicolas.chautru@intel.com>
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 392b0f9..794ebcc 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1694,6 +1694,15 @@ static inline uint32_t hq_index(uint32_t offset)
return 0;
}
+/* May need to pad LDPC Encoder input to avoid small beat */
+static inline uint16_t pad_le_in(uint16_t blen)
+{
+ uint16_t 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,
@@ -1722,10 +1731,9 @@ static inline uint32_t hq_index(uint32_t offset)
}
next_triplet = acc100_dma_fill_blk_type_in(desc, input, in_offset,
- in_length_in_bytes,
+ pad_le_in(in_length_in_bytes),
seg_total_left, next_triplet,
- check_bit(op->ldpc_enc.op_flags,
- RTE_BBDEV_LDPC_ENC_SCATTER_GATHER));
+ false);
if (unlikely(next_triplet < 0)) {
rte_bbdev_log(ERR,
"Mismatch between data to process and mbuf data length in bbdev_op: %p",
@@ -2689,6 +2697,7 @@ static inline uint32_t hq_index(uint32_t offset)
return 1;
}
+
/* Enqueue one encode operations for ACC100 device in CB mode
* multiplexed on the same descriptor
*/
@@ -2719,7 +2728,7 @@ static inline uint32_t hq_index(uint32_t offset)
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);
out_length = (enc->cb_params.e + 7) >> 3;
desc->req.m2dlen = 1 + num;
desc->req.d2mlen = num;
@@ -4252,9 +4261,6 @@ static inline uint32_t hq_index(uint32_t offset)
/* Clearing status, it will be set based on response */
op->status = 0;
-
- op->status |= ((rsp.input_err)
- ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
@@ -4332,8 +4338,6 @@ static inline uint32_t hq_index(uint32_t offset)
rsp.val, descs_in_tb,
desc->req.numCBs);
- op->status |= ((rsp.input_err)
- ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
--
1.8.3.1
prev parent reply other threads:[~2021-11-16 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 5:12 [PATCH -v1] Update num_ops type to be uint32_t in rte_bbdev_enc_op_alloc_bulk Zhang, Mingshan
2021-11-16 5:12 ` Zhang, Mingshan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1637039535-184462-2-git-send-email-mingshan.zhang@intel.com \
--to=mingshan.zhang@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=nicolas.chautru@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).