[-v1] SCSY-51090 ACC100 Padding 5GDL input BLEN
Checks
Commit Message
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(-)
@@ -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);