baseband/acc100: support 4G CRC drop
authorNicolas Chautru <nicolas.chautru@intel.com>
Wed, 8 Sep 2021 01:15:39 +0000 (18:15 -0700)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 8 Oct 2021 19:31:07 +0000 (21:31 +0200)
This implements in PMD the option to drop the CB CRC
after 4G decoding to help transport block concatenation.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
doc/guides/bbdevs/acc100.rst
doc/guides/rel_notes/release_21_11.rst
drivers/baseband/acc100/rte_acc100_pmd.c

index ff0fa4b..9fff6ab 100644 (file)
@@ -58,6 +58,7 @@ ACC100 5G/4G FEC PMD supports the following BBDEV capabilities:
    - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN`` :  set if negative LLR encoder i/p is supported
    - ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN`` :  set if positive LLR encoder i/p is supported
    - ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` :  keep CRC24B bits appended while decoding
+   - ``RTE_BBDEV_TURBO_DEC_CRC_24B_DROP`` : option to drop the code block CRC after decoding
    - ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` :  set early termination feature
    - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER`` :  supports scatter-gather for input/output data
    - ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN`` :  set half iteration granularity
index e0e12d2..5446878 100644 (file)
@@ -122,6 +122,10 @@ New Features
 
   * Added PDCP short MAC-I support.
 
+* **Updated the ACC100 bbdev PMD.**
+
+  Added support for more comprehensive CRC options.
+
 * **Updated the turbo_sw bbdev PMD.**
 
   Added support for more comprehensive CRC options.
index 68ba523..2e9ce92 100644 (file)
@@ -980,6 +980,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
                                        RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN |
                                        RTE_BBDEV_TURBO_MAP_DEC |
                                        RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP |
+                                       RTE_BBDEV_TURBO_DEC_CRC_24B_DROP |
                                        RTE_BBDEV_TURBO_DEC_SCATTER_GATHER,
                                .max_llr_modulus = INT8_MAX,
                                .num_buffers_src =
@@ -1708,8 +1709,12 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
        }
 
        if ((op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
-               && !check_bit(op->turbo_dec.op_flags,
-               RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP))
+                       && !check_bit(op->turbo_dec.op_flags,
+                       RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP))
+               crc24_overlap = 24;
+       if ((op->turbo_dec.code_block_mode == RTE_BBDEV_CODE_BLOCK)
+                       && check_bit(op->turbo_dec.op_flags,
+                       RTE_BBDEV_TURBO_DEC_CRC_24B_DROP))
                crc24_overlap = 24;
 
        /* Calculates circular buffer size.
@@ -1744,7 +1749,8 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 
        next_triplet = acc100_dma_fill_blk_type_out(
                        desc, h_output, *h_out_offset,
-                       k >> 3, next_triplet, ACC100_DMA_BLKID_OUT_HARD);
+                       k >> 3, next_triplet,
+                       ACC100_DMA_BLKID_OUT_HARD);
        if (unlikely(next_triplet < 0)) {
                rte_bbdev_log(ERR,
                                "Mismatch between data to process and mbuf data length in bbdev_op: %p",