From patchwork Thu Nov 5 14:16:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan Goddard X-Patchwork-Id: 83743 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2AD8AA04DD; Thu, 5 Nov 2020 15:16:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C7E7C82A; Thu, 5 Nov 2020 15:16:20 +0100 (CET) Received: from GBR01-LO2-obe.outbound.protection.outlook.com (mail-eopbgr100128.outbound.protection.outlook.com [40.107.10.128]) by dpdk.org (Postfix) with ESMTP id D5762C826 for ; Thu, 5 Nov 2020 15:16:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fqYhm+r0KHd5+ZhK4gRUXGlMZ9nSY2nXc/WVZ8z0A9Dr4do6Rjpol/0cdsJaJD1iSAsrS7hwZXAz8KmphN573vGR2Z3fik4EIJUcuTZBVCJZRn1qlUrCg0eLp0+W1kJHX/k3OHCSAEN4OYYm/thfS6l40ZogsjxQ1QrZZV3HLSDgSI5+h12ToMOjFR59jMNHpNQu4t+fEF1y+hKH8BcbtvnF6rXW458fEQJzYhIgFVgflu0IyiZPIunnlr4XHMeUSbcCoGSYyg0ZrecnlmPsW0vvBrtn0EuaUgxrxBlH4I5OCjglSCK0xD1no3p94+zBApi0904a5psV7/zQyPKELw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WuWwurHeYSvZ1/26ecf8SpZfytxNQo6Po5ozv0qIwog=; b=h3Q/j34zgiCSKN7TArFlrIxW46BIqSK+tUJa43DobyB7x1vZynBWAs3WJMi7lxJiqBhdYAxRRUoFM8H9pq3151bOmqj3UCWC8H6/in7xu1GC1hMPGDZPfFFBgep93DnAD1sc1UzYbZOZt+i+iD89t8JliXkTwn8KTOWbqfRB/2PoLk8e6s0UgaMSBC3tGq4fTMAfjSU8GT2NYa4CUpE0O+bfUZeK92QFgmAwWcvbaAsc1SY/VhtTvcEAr7ZXyhhBlrl3LTFXXsZPxFvLa7tvmZf5M+9QKUPjaFAc2Gm3kfKbnrgChtMHaimLWK3pQv4llIEmEYLrJeZJSCSH0l86BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=accelercomm.com; dmarc=pass action=none header.from=accelercomm.com; dkim=pass header.d=accelercomm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=accelercomm.onmicrosoft.com; s=selector1-accelercomm-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WuWwurHeYSvZ1/26ecf8SpZfytxNQo6Po5ozv0qIwog=; b=dd/VyVX1byH2LA6dJf0L8j3nOlGN4NgV8sIVQFx42ydhdMk1KTqMBtX7ha7OlLV2zTylA91VCOtgGAJzCIiXgrsbp5xzUwTBi/vIHFGWVrCZqJzlwCwVkuAom8gTKLKcZuk4vLwrslmN5lESzhyJIJaY/anFo+3c5FfBoTBE9HE= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=accelercomm.com; Received: from LNXP265MB0825.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:1a::22) by LO0P265MB2762.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:149::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Thu, 5 Nov 2020 14:16:15 +0000 Received: from LNXP265MB0825.GBRP265.PROD.OUTLOOK.COM ([fe80::c081:231c:4cb1:7bb2]) by LNXP265MB0825.GBRP265.PROD.OUTLOOK.COM ([fe80::c081:231c:4cb1:7bb2%6]) with mapi id 15.20.3499.032; Thu, 5 Nov 2020 14:16:15 +0000 From: Aidan Goddard To: akhil.goyal@nxp.com Cc: nicolas.chautru@intel.com, dev@dpdk.org, Aidan Goddard Date: Thu, 5 Nov 2020 14:16:11 +0000 Message-Id: <1604585771-24303-1-git-send-email-aidan.goddard@accelercomm.com> X-Mailer: git-send-email 1.8.3.1 X-Originating-IP: [81.100.143.234] X-ClientProxiedBy: LO2P265CA0093.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::33) To LNXP265MB0825.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:1a::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from centossw-2.home (81.100.143.234) by LO2P265CA0093.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Thu, 5 Nov 2020 14:16:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4bc5dbce-b877-413b-c5c5-08d881955b4d X-MS-TrafficTypeDiagnostic: LO0P265MB2762: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lkilAAkIcJt8L16bABx0Xt1PThVKtU6olVFGGfp1yYM7BQ4r6xOkiOItrOhcT1c+N6UPWddLyTvO0CRETKTW/lkfqZFSK+E8E/adwOR/zNPLTU0QAG43uiXWwCHlQBmp2VVmEd32BC6Hpk4/s/p/1OY8iTyhCBaXYxIFvOCZODlBDHi8XSIWngRCQ53u2x8aNp+7fkJ2LErJHW9PE+F1OuzLWzMY0Z39SHQ72vJsjGAqKlPrO0K5HHFvyjMqSz+fn0txePa+rHZHiUj5gwh55hlfwgORU4xOXE1ym2oM7l13aNTA8nwOkCQlgxRW6GPV X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LNXP265MB0825.GBRP265.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(396003)(39830400003)(376002)(346002)(366004)(66476007)(66556008)(86362001)(6506007)(5660300002)(26005)(52116002)(8936002)(44832011)(30864003)(66946007)(186003)(16526019)(8886007)(6666004)(8676002)(2616005)(956004)(478600001)(2906002)(316002)(6512007)(36756003)(6486002)(4326008)(6916009)(83380400001)(107886003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Z1EejlK9Jn40/3WXYIfVEZmbzVLbJmDQeQu3GRiCWkGFjXNIjkW2GZAMHvnJTUV2mTmDjKZIhx3hyUt33YYkkCm85rVS3tZLQcpBmgBwV7RDDbpPqgqL+hrMpXCn5fhKzM8GYyD/lBDDvK+JunuQbBoSJ9R4dENBViR73xkfzdKibF7RHyuUleHYLXzcPp6XNIz4/c6jTZwW1nGxgKxYkT8YLL6yiOh3MhMRP3k9t1JChCaoYqWy6tuzv9NIcAAb3yY67SgrVilS1WZYdRuJmPZxDhWyZ101RgoI+1awNfKrFnMs0tNslJnk5KTFX4zMJ4eLSzDCNvL0d181P75Cx201S50/bnDK34bnUks2eyn3iGmyapQZ2tlHy6UMsecv9P1QF+5uv+DhZ3aMXmNklvyfkPsZZbbY0T7lBXe1VMayvZOB7daOVkGfJNXxdnQfjAX5l2DmXaNZS2BZH4zcseWAVKz1WtsfdxFzCeI8jP/HoWv7E6eVVDnba1YK8md9VKRtYd6OWSNeUMxxmqfWlfhHvhcG+jxNI27zMa9kyIKw3XN9GlYIzy0fqRbN5gl9mmfUCKbsKfUmNUcx884CpjmC3SiTC26zYWyP6FZ0F/XqoeolUhcBGyeqh94gJtU2PMhqeuw2DaFX84SKVN6BIA== X-OriginatorOrg: accelercomm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4bc5dbce-b877-413b-c5c5-08d881955b4d X-MS-Exchange-CrossTenant-AuthSource: LNXP265MB0825.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2020 14:16:15.7767 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a4aefd0f-62ef-4258-bd2b-0b6f6112bf2c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s+r+e6es05knqURV9w658oFRVyRuAFEKmJnpJmJtigXYh2DFQSRV9r7qM54Zg9xouRC6G+FEW+cZ11dNAbbAVnLg7aXYfzQ0dynsz677uVQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB2762 Subject: [dpdk-dev] [PATCH v2] BBDEV: add LDPC op parameters and flags to support CBGT X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This commit adds support to BBDEV for LDPC Code Block Group Transmission (CBGT) as defined in 3GPP TS 38.214. The following changes facilitate this: - add RTE_BBDEV_LDPC_[ENC/DEC]_CBGT feature flag - add CBGT input parameters to LDPC encode transport block op structure - add CBGT input and output parameters to LDPC decode transport block op - add support for reading these parameters from test vector files - add sanity tests for RTE_BBDEV_LDPC_[ENC/DEC]_CBGT flag in test vector read - update user guide with the flags and parameters CBGT parameters are only required when the RTE_BBDEV_LDPC_[ENC/DEC]_CBGT op flag is specified. Reported-by: Rob Maunder Signed-off-by: Aidan Goddard Acked-by: Dave Burley --- app/test-bbdev/test_bbdev_vector.c | 46 +++++++++++++++++++--- app/test-bbdev/test_bbdev_vector.h | 3 ++ doc/guides/prog_guide/bbdev.rst | 29 ++++++++++++++ lib/librte_bbdev/rte_bbdev_op.h | 80 +++++++++++++++++++++++++++++++++++++- 4 files changed, 151 insertions(+), 7 deletions(-) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index 50d1da0..e5808b2 100644 --- a/app/test-bbdev/test_bbdev_vector.c +++ b/app/test-bbdev/test_bbdev_vector.c @@ -200,6 +200,8 @@ else if (!strcmp(token, "RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK")) *op_flag_value = RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK; + else if (!strcmp(token, "RTE_BBDEV_LDPC_DEC_CBGT")) + *op_flag_value = RTE_BBDEV_LDPC_DEC_CBGT; else { printf("The given value is not a LDPC decoder flag\n"); return -1; @@ -248,8 +250,10 @@ *op_flag_value = RTE_BBDEV_LDPC_ENC_INTERRUPTS; else if (!strcmp(token, "RTE_BBDEV_LDPC_ENC_SCATTER_GATHER")) *op_flag_value = RTE_BBDEV_LDPC_ENC_SCATTER_GATHER; + else if (!strcmp(token, "RTE_BBDEV_LDPC_ENC_CBGT")) + *op_flag_value = RTE_BBDEV_LDPC_ENC_CBGT; else { - printf("The given value is not a turbo encoder flag\n"); + printf("The given value is not a LDPC encoder flag\n"); return -1; } @@ -718,6 +722,14 @@ vector->mask |= TEST_BBDEV_VF_CODE_BLOCK_MODE; ldpc_enc->code_block_mode = (uint8_t) strtoul(token, &err, 0); ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; + } else if (!strcmp(key_token, "max_cbg")) { + vector->mask |= TEST_BBDEV_VF_MAX_CBG_PER_TB; + ldpc_enc->tb_params.max_cbg = (uint8_t) strtoul(token, &err, 0); + ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; + } else if (!strcmp(key_token, "cbgti")) { + vector->mask |= TEST_BBDEV_VF_CBGTI; + ldpc_enc->tb_params.cbgti = (uint8_t) strtoul(token, &err, 0); + ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; } else if (!strcmp(key_token, "op_flags")) { vector->mask |= TEST_BBDEV_VF_OP_FLAGS; ret = parse_turbo_flags(token, &op_flags, vector->op_type); @@ -828,6 +840,18 @@ vector->mask |= TEST_BBDEV_VF_CODE_BLOCK_MODE; ldpc_dec->code_block_mode = (uint8_t) strtoul(token, &err, 0); ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; + } else if (!strcmp(key_token, "max_cbg")) { + vector->mask |= TEST_BBDEV_VF_MAX_CBG_PER_TB; + ldpc_dec->tb_params.max_cbg = (uint8_t) strtoul(token, &err, 0); + ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; + } else if (!strcmp(key_token, "cbgti")) { + vector->mask |= TEST_BBDEV_VF_CBGTI; + ldpc_dec->tb_params.cbgti = (uint8_t) strtoul(token, &err, 0); + ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; + } else if (!strcmp(key_token, "cbgfi")) { + vector->mask |= TEST_BBDEV_VF_CBGFI; + ldpc_dec->tb_params.cbgfi = (uint8_t) strtoul(token, &err, 0); + ret = ((err == NULL) || (*err != '\0')) ? -1 : 0; } else if (!strcmp(key_token, "op_flags")) { vector->mask |= TEST_BBDEV_VF_OP_FLAGS; ret = parse_turbo_flags(token, &op_flags, vector->op_type); @@ -1162,6 +1186,12 @@ if (!(mask & TEST_BBDEV_VF_R)) printf( "WARNING: r was not specified in vector file and will be set to 0\n"); + if (!(mask & TEST_BBDEV_VF_MAX_CBG_PER_TB) && (ldpc_dec->op_flags & + RTE_BBDEV_LDPC_DEC_CBGT)) { + printf( + "WARNING: max_cbg was not specified in vector file and will be set to 1\n"); + ldpc_dec->tb_params.max_cbg = 1; + } } else { if (!(mask & TEST_BBDEV_VF_E)) printf( @@ -1298,12 +1328,18 @@ if (!(mask & TEST_BBDEV_VF_CODE_BLOCK_MODE)) { printf( "WARNING: code_block_mode was not specified in vector file and will be set to 1\n"); - vector->turbo_enc.code_block_mode = 1; + vector->ldpc_enc.code_block_mode = 1; } - if (vector->turbo_enc.code_block_mode == 0) { + if (vector->ldpc_enc.code_block_mode == 0) { + if (!(mask & TEST_BBDEV_VF_MAX_CBG_PER_TB) && (vector->ldpc_enc.op_flags & + RTE_BBDEV_LDPC_ENC_CBGT)) { + printf( + "WARNING: max_cbg was not specified in vector file and will be set to 1\n"); + vector->ldpc_enc.tb_params.max_cbg = 1; + } } else { - if (!(mask & TEST_BBDEV_VF_E) && (vector->turbo_enc.op_flags & - RTE_BBDEV_TURBO_RATE_MATCH)) + if (!(mask & TEST_BBDEV_VF_E) && (vector->ldpc_enc.op_flags & + RTE_BBDEV_LDPC_RATE_MATCH)) printf( "WARNING: e was not specified in vector file and will be set to 0\n"); if (!(mask & TEST_BBDEV_VF_NCB)) diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-bbdev/test_bbdev_vector.h index 4e5dbf5..69f5b9c 100644 --- a/app/test-bbdev/test_bbdev_vector.h +++ b/app/test-bbdev/test_bbdev_vector.h @@ -35,6 +35,9 @@ enum { TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL << 23), TEST_BBDEV_VF_OP_FLAGS = (1ULL << 24), TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25), + TEST_BBDEV_VF_MAX_CBG_PER_TB = (1ULL << 26), + TEST_BBDEV_VF_CBGTI = (1ULL << 27), + TEST_BBDEV_VF_CBGFI = (1ULL << 28), }; enum op_data_type { diff --git a/doc/guides/prog_guide/bbdev.rst b/doc/guides/prog_guide/bbdev.rst index 6b2bd54..0ff4039 100644 --- a/doc/guides/prog_guide/bbdev.rst +++ b/doc/guides/prog_guide/bbdev.rst @@ -747,6 +747,9 @@ given below. |RTE_BBDEV_LDPC_ENC_CONCATENATION | | Set if a device supports concatenation of non byte aligned output | +--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CBGT | +| Set if a device supports CB group transmission | ++--------------------------------------------------------------------+ The structure passed for each LDPC encode operation is given below, with the operation flags forming a bitmask in the ``op_flags`` field. @@ -815,6 +818,10 @@ The LDPC encode parameters are set out in the table below. +----------------+------------+-------------------------------------------------------+ | |eb |Eb, length of the RM output sequence in bits, r >= cab | +----------------+------------+-------------------------------------------------------+ +| |max_cbg |maximum number of CB groups per TB: 1-8 | ++----------------+------------+-------------------------------------------------------+ +| |cbgti |CB group transmission information bitfield | ++----------------+------------+-------------------------------------------------------+ The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the incoming code block or transport block data. @@ -869,6 +876,11 @@ Figure :numref:`figure_turbo_tb_encode` above showing the Turbo encoding of CBs using BBDEV interface in TB-mode is also valid for LDPC encode. +In TB-mode, If the ``RTE_BBDEV_LDPC_ENC_CBGT`` flag is specified the +``max_cbg`` and ``cbgti`` parameters are used for CB group transmission. If +the ``RTE_BBDEV_LDPC_ENC_CBGT`` flag is not specified, these parameters +are ignored. + BBDEV LDPC Decode Operation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -942,6 +954,9 @@ given below. |RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK | | Set if a device supports loopback access to HARQ internal memory | +--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_CBGT | +| Set if a device supports CB group transmission | ++--------------------------------------------------------------------+ The structure passed for each LDPC decode operation is given below, with the operation flags forming a bitmask in the ``op_flags`` field. @@ -1027,6 +1042,14 @@ The LDPC decode parameters are set out in the table below. +----------------+------------+-------------------------------------------------------+ | |eb |Eb, length of the RM output sequence in bits r >= cab | +----------------+------------+-------------------------------------------------------+ +| |max_cbg |maximum number of CB groups per TB: 1-8 | ++----------------+------------+-------------------------------------------------------+ +| |cbgti |CB group transmission information bitfield | ++----------------+------------+-------------------------------------------------------+ +| |cbgfi |CB group Flushing out Information (CBGFI) | ++----------------+------------+-------------------------------------------------------+ +| |cbg_crc_err |CB group CRC failure bitfield (output) | ++----------------+------------+-------------------------------------------------------+ The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs and is the Virtual Circular Buffer data stream with null padding. @@ -1084,6 +1107,12 @@ Figure :numref:`figure_turbo_tb_decode` above showing the Turbo decoding of CBs using BBDEV interface in TB-mode is also valid for LDPC decode. +In TB-mode, If the ``RTE_BBDEV_LDPC_DEC_CBGT`` flag is specified the +``max_cbg`` and ``cbgti`` parameters are used for CB group transmission. The +``cbg_crc_err`` output parameter is a bitfield used to indicate crc failures +in the respective CB groups. If the ``RTE_BBDEV_LDPC_DEC_CBGT`` flag is not +specified, these parameters are ignored. + Sample code ----------- diff --git a/lib/librte_bbdev/rte_bbdev_op.h b/lib/librte_bbdev/rte_bbdev_op.h index f726d73..f3d00dc 100644 --- a/lib/librte_bbdev/rte_bbdev_op.h +++ b/lib/librte_bbdev/rte_bbdev_op.h @@ -186,7 +186,9 @@ enum rte_bbdev_op_ldpcdec_flag_bitmasks { * for HARQ memory. If not set, it is assumed the filler bits are not * in HARQ memory and handled directly by the LDPC decoder. */ - RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_FILLERS = (1ULL << 18) + RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_FILLERS = (1ULL << 18), + /** Set if a device supports CB group transmission. */ + RTE_BBDEV_LDPC_DEC_CBGT = (1ULL << 19) }; /** Flags for LDPC encoder operation and capability structure */ @@ -206,7 +208,9 @@ enum rte_bbdev_op_ldpcenc_flag_bitmasks { /** Set if a device supports scatter-gather functionality. */ RTE_BBDEV_LDPC_ENC_SCATTER_GATHER = (1ULL << 6), /** Set if a device supports concatenation of non byte aligned output */ - RTE_BBDEV_LDPC_ENC_CONCATENATION = (1ULL << 7) + RTE_BBDEV_LDPC_ENC_CONCATENATION = (1ULL << 7), + /** Set if a device supports CB group transmission. */ + RTE_BBDEV_LDPC_ENC_CBGT = (1ULL << 8) }; /** Data input and output buffer for BBDEV operations */ @@ -334,6 +338,56 @@ struct rte_bbdev_op_dec_ldpc_tb_params { uint8_t r; /** The number of CBs that use Ea before switching to Eb, [0:63] */ uint8_t cab; + /** If the RTE_BBDEV_LDPC_DEC_CBGT capability is not asserted, then + * the value of max_cbg is ignored. Otherwise, a max_cbg value of + * 0 or 1 indicates that codeBlockGroupTransmission is disabled, + * as defined in 3GPP TS 38.214. + * + * A max_cbg value of 2, 4, 6, or 8 sets the value of + * maxCodeBlockGroupsPerTransportBlock and indicates that + * codeBlockGroupTransmission is enabled, as defined in 3GPP TS 38.214. + */ + uint8_t max_cbg; + /** If codeBlockGroupTransmission is disabled, then the value of cbgti + * is ignored. Otherwise, cbgti represents the Code Block Group + * Transmission Information (CBGTI), as defined in 3GPP TS 38.214. + * In this case, the M = min(C, max_cbg) number of Most Significant + * Bits (MSBs) of the uint8_t cbgti have an in-order one-to-one mapping + * with the M code block groups (CBGs) of the transport block, with the + * MSB mapped to CBG#0, as detailed in 3GPP TS 38.214. + * + * Here, C is the total number of code blocks in the full transport block, + * as defined in 3GPP TS 38.212. + */ + uint8_t cbgti; + /** If codeBlockGroupTransmission is disabled, then the value of cbgfi + * should be ignored. Otherwise, cbgfi represents the Code Block Group + * Flushing out Information (CBGFI), as defined in 3GPP TS 38.214. In this + * case, if the LSB of the uint8_t cbgfi is set to 0, this indicates that + * the earlier received instances of the same CBGs being decoded may be + * corrupted and that the corresponding contents of the HARQ memory should + * be flushed and not combined with the present CBGs being decoded. If the + * LSB of the uint8_t cbgfi is set to 1, this indicates that the earlier + * received instances of the same CBGs being decoded should be combined with + * the present CBGs being decoded. + */ + uint8_t cbgfi; + + /** If codeBlockGroupTransmission is disabled or if + * RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK is not asserted, then the value of + * cbg_crc_err should be ignored. Otherwise, cbg_crc_err reports whether + * any CRC24B failures have been encountered in each of the code block + * groups (CBGs). In this case, the M = min(C, max_cbg) number of Most + * Significant Bits (MSBs) of the uint8_t cbg_crc_error have an in-order + * one-to-one mapping with the M CBGs of the transport block, with the MSB + * mapped to CBG#0, as detailed in 3GPP TS 38.214. An asserted bit + * indicates that a CRC24B failure was encountered among the code blocks + * of the corresponding CBG. + * + * Here, C is the total number of code blocks in the full transport block, + * as defined in 3GPP TS 38.212. + */ + uint8_t cbg_crc_err; }; /** Operation structure for Turbo decode. @@ -584,6 +638,28 @@ struct rte_bbdev_op_enc_ldpc_tb_params { uint8_t r; /** The number of CBs that use Ea before switching to Eb, [0:63] */ uint8_t cab; + /** If the RTE_BBDEV_LDPC_ENC_CBGT capability is not asserted, then + * the value of max_cbg is ignored. Otherwise, a max_cbg value of + * 0 or 1 indicates that codeBlockGroupTransmission is disabled, + * as defined in 3GPP TS 38.214. + * + * A max_cbg value of 2, 4, 6, or 8 sets the value of + * maxCodeBlockGroupsPerTransportBlock and indicates that + * codeBlockGroupTransmission is enabled, as defined in 3GPP TS 38.214. + */ + uint8_t max_cbg; + /** If codeBlockGroupTransmission is disabled, then the value of cbgti + * is ignored. Otherwise, cbgti represents the Code Block Group + * Transmission Information (CBGTI), as defined in 3GPP TS 38.214. + * In this case, the M = min(C, max_cbg) number of Most Significant + * Bits (MSBs) of the uint8_t cbgti have an in-order one-to-one mapping + * with the M code block groups (CBGs) of the transport block, with the + * MSB mapped to CBG#0, as detailed in 3GPP TS 38.214. + * + * Here, C is the total number of code blocks in the full transport block, + * as defined in 3GPP TS 38.212. + */ + uint8_t cbgti; }; /** Operation structure for Turbo encode.