From: Kamil Chalupnik <kamilx.chalupnik@intel.com>
To: dev@dpdk.org
Cc: amr.mokhtar@intel.com, pablo.de.lara.guarch@intel.com,
KamilX Chalupnik <kamilx.chalupnik@intel.com>
Subject: [dpdk-dev] [PATCH v2 06/14] baseband/turbo_sw: support for optional CRC overlap
Date: Wed, 9 May 2018 16:28:03 +0200 [thread overview]
Message-ID: <20180509142803.23528-1-kamilx.chalupnik@intel.com> (raw)
In-Reply-To: <20180426133008.12388-7-kamilx.chalupnik@intel.com>
From: KamilX Chalupnik <kamilx.chalupnik@intel.com>
Support for optional CRC overlap in decode processing implemented
in Turbo Software driver
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
---
app/test-bbdev/test_bbdev_vector.c | 2 ++
doc/guides/bbdevs/turbo_sw.rst | 2 ++
drivers/baseband/turbo_sw/bbdev_turbo_software.c | 21 ++++++++++++++-------
lib/librte_bbdev/rte_bbdev_op.h | 6 +++++-
4 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
index addef05..a37e35f 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -144,6 +144,8 @@ op_decoder_flag_strtoul(char *token, uint32_t *op_flag_value)
*op_flag_value = RTE_BBDEV_TURBO_MAP_DEC;
else if (!strcmp(token, "RTE_BBDEV_TURBO_DEC_SCATTER_GATHER"))
*op_flag_value = RTE_BBDEV_TURBO_DEC_SCATTER_GATHER;
+ else if (!strcmp(token, "RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP"))
+ *op_flag_value = RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP;
else {
printf("The given value is not a turbo decoder flag\n");
return -1;
diff --git a/doc/guides/bbdevs/turbo_sw.rst b/doc/guides/bbdevs/turbo_sw.rst
index 996b2a2..7448dc9 100644
--- a/doc/guides/bbdevs/turbo_sw.rst
+++ b/doc/guides/bbdevs/turbo_sw.rst
@@ -26,6 +26,8 @@ For the decode operation:
* ``RTE_BBDEV_TURBO_CRC_TYPE_24B``
* ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN``
* ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN``
+* ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP``
+* ``RTE_BBDEV_TURBO_EARLY_TERMINATION``
Limitations
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index c3c250b..b9bb37c 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -138,6 +138,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN |
RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN |
RTE_BBDEV_TURBO_CRC_TYPE_24B |
+ RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP |
RTE_BBDEV_TURBO_EARLY_TERMINATION,
.max_llr_modulus = 16,
.num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS,
@@ -862,7 +863,7 @@ static inline void
process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
uint8_t c, uint16_t k, uint16_t kw, struct rte_mbuf *m_in,
struct rte_mbuf *m_out, uint16_t in_offset, uint16_t out_offset,
- bool check_crc_24b, uint16_t total_left)
+ bool check_crc_24b, uint16_t crc24_overlap, uint16_t total_left)
{
int ret;
int32_t k_idx;
@@ -920,7 +921,7 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,
adapter_resp.pharqout = q->adapter_output;
bblib_turbo_adapter_ul(&adapter_req, &adapter_resp);
- out = (uint8_t *)rte_pktmbuf_append(m_out, (k >> 3));
+ out = (uint8_t *)rte_pktmbuf_append(m_out, ((k - crc24_overlap) >> 3));
if (out == NULL) {
op->status |= 1 << RTE_BBDEV_DATA_ERROR;
rte_bbdev_log(ERR, "Too little space in output mbuf");
@@ -960,6 +961,7 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op)
{
uint8_t c, r = 0;
uint16_t kw, k = 0;
+ uint16_t crc24_overlap = 0;
struct rte_bbdev_op_turbo_dec *dec = &op->turbo_dec;
struct rte_mbuf *m_in = dec->input.data;
struct rte_mbuf *m_out = dec->hard_output.data;
@@ -983,6 +985,10 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op)
c = 1;
}
+ if ((c > 1) && !check_bit(dec->op_flags,
+ RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP))
+ crc24_overlap = 24;
+
while (total_left > 0) {
if (dec->code_block_mode == 0)
k = (r < dec->tb_params.c_neg) ?
@@ -1002,17 +1008,18 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op)
process_dec_cb(q, op, c, k, kw, m_in, m_out, in_offset,
out_offset, check_bit(dec->op_flags,
- RTE_BBDEV_TURBO_CRC_TYPE_24B), total_left);
- /* As a result of decoding we get Code Block with included
- * decoded CRC24 at the end of Code Block. Type of CRC24 is
- * specified by flag.
+ RTE_BBDEV_TURBO_CRC_TYPE_24B), crc24_overlap,
+ total_left);
+ /* To keep CRC24 attached to end of Code block, use
+ * RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP flag as it
+ * removed by default once verified.
*/
/* Update total_left */
total_left -= kw;
/* Update offsets for next CBs (if exist) */
in_offset += kw;
- out_offset += (k >> 3);
+ out_offset += ((k - crc24_overlap) >> 3);
r++;
}
if (total_left != 0) {
diff --git a/lib/librte_bbdev/rte_bbdev_op.h b/lib/librte_bbdev/rte_bbdev_op.h
index 90a688e..83f62c2 100644
--- a/lib/librte_bbdev/rte_bbdev_op.h
+++ b/lib/librte_bbdev/rte_bbdev_op.h
@@ -102,7 +102,11 @@ enum rte_bbdev_op_td_flag_bitmasks {
*/
RTE_BBDEV_TURBO_MAP_DEC = (1ULL << 14),
/**< Set if a device supports scatter-gather functionality */
- RTE_BBDEV_TURBO_DEC_SCATTER_GATHER = (1ULL << 15)
+ RTE_BBDEV_TURBO_DEC_SCATTER_GATHER = (1ULL << 15),
+ /**< Set to keep CRC24B bits appended while decoding. Only usable when
+ * decoding Transport Blocks (code_block_mode = 0).
+ */
+ RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP = (1ULL << 16)
};
/** Flags for turbo encoder operation and capability structure */
--
2.5.5
next prev parent reply other threads:[~2018-05-09 14:28 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 13:29 [dpdk-dev] [PATCH 01/13] baseband/turbo_sw: update DPDK to work with FlexRAN 1.4.0 Kamil Chalupnik
2018-04-26 13:29 ` [dpdk-dev] [PATCH 02/13] doc/turbo_sw: update Wireless Baseband Device documentation Kamil Chalupnik
2018-05-07 13:37 ` De Lara Guarch, Pablo
2018-05-09 14:46 ` [dpdk-dev] [PATCH v2 12/14] " Kamil Chalupnik
2018-04-26 13:29 ` [dpdk-dev] [PATCH 03/13] doc/bbdev: dynamic lib support Kamil Chalupnik
2018-05-09 14:51 ` [dpdk-dev] [PATCH v2 13/14] " Kamil Chalupnik
2018-04-26 13:29 ` [dpdk-dev] [PATCH 04/13] baseband/turbo_sw: memcpy changed or removed from driver Kamil Chalupnik
2018-05-07 12:26 ` De Lara Guarch, Pablo
2018-05-09 14:17 ` [dpdk-dev] [PATCH v2 02/14] baseband/turbo_sw: memory copying optimized or removed Kamil Chalupnik
2018-04-26 13:29 ` [dpdk-dev] [PATCH 05/13] baseband/turbo_sw: scalling input LLR to range [-16 16] Kamil Chalupnik
2018-05-07 12:50 ` De Lara Guarch, Pablo
2018-05-09 14:23 ` [dpdk-dev] [PATCH v2 04/14] baseband/turbo_sw: scalling likelihood ratio (LLR) input Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 06/13] baseband/turbo_sw: increase internal buffers Kamil Chalupnik
2018-05-09 14:25 ` [dpdk-dev] [PATCH v2 05/14] " Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 07/13] baseband/turbo_sw: support for optional CRC overlap Kamil Chalupnik
2018-05-09 14:28 ` Kamil Chalupnik [this message]
2018-04-26 13:30 ` [dpdk-dev] [PATCH 08/13] app/bbdev: update test vectors names Kamil Chalupnik
2018-05-07 13:15 ` De Lara Guarch, Pablo
2018-05-09 14:37 ` [dpdk-dev] [PATCH v2 09/14] " Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 09/13] bbdev: measure offload cost Kamil Chalupnik
2018-05-07 13:29 ` De Lara Guarch, Pablo
[not found] ` <EEA9FF629BF25B47BD67ADE995041EE23D0352A7@IRSMSX103.ger.corp.intel.com>
2018-05-08 9:08 ` De Lara Guarch, Pablo
[not found] ` <EEA9FF629BF25B47BD67ADE995041EE23D035350@IRSMSX103.ger.corp.intel.com>
2018-05-08 10:16 ` De Lara Guarch, Pablo
2018-05-09 14:30 ` [dpdk-dev] [PATCH v2 07/14] " Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 10/13] doc: update tests and usage of test app description Kamil Chalupnik
2018-05-09 14:55 ` [dpdk-dev] [PATCH v2 14/14] " Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 11/13] app/bbdev: added new test vectors Kamil Chalupnik
2018-05-09 14:39 ` [dpdk-dev] [PATCH v2 10/14] " Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 12/13] bbdev: split queue groups Kamil Chalupnik
2018-05-09 14:35 ` [dpdk-dev] [PATCH v2 08/14] " Kamil Chalupnik
2018-04-26 13:30 ` [dpdk-dev] [PATCH 13/13] app/bbdev: improve readability of test application Kamil Chalupnik
2018-05-09 14:42 ` [dpdk-dev] [PATCH v2 11/14] " Kamil Chalupnik
2018-05-09 18:55 ` De Lara Guarch, Pablo
2018-04-26 13:30 ` [dpdk-dev] [PATCH 00/13] Documentation and Turbo Software Baseband Device Update Kamil Chalupnik
2018-05-09 14:14 ` [dpdk-dev] [PATCH v2 01/14] baseband/turbo_sw: update DPDK to work with FlexRAN 1.4.0 Kamil Chalupnik
2018-05-09 14:14 ` [dpdk-dev] [PATCH v2 00/14] Documentation and Turbo Software Baseband Device Update Kamil Chalupnik
2018-05-09 19:21 ` De Lara Guarch, Pablo
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=20180509142803.23528-1-kamilx.chalupnik@intel.com \
--to=kamilx.chalupnik@intel.com \
--cc=amr.mokhtar@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@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).