BBDEV PMD Drivers Extension for 19.08
cover BBDEV PMD Drivers Extension for 19.08
This was deferred from 19.05 due to time running out.
Addition of a PMD for 4G FEC encoding and decoding functions for Intel PAC N300 FPGA. Extension of PMD based on Intel optimised SW libraries for 5G FEC.
The HW dependency is available now.
Nicolas Chautru (5):
baseband/fpga_lte_fec: addition of driver for 4G turbo FEC with PAC
N300 FPGA card
bbdev : Extension of BBDEV for 5G FEC
baseband/turbo_sw : Extension of turbo_sw for 5G FEC test-bbdev : Update of bbdec test-app for FPGA and 5G testing
usertools: update to usertool to allow binding of baseband device
app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 2 +- app/test-bbdev/test-bbdev.py | 9 +- app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1224 ++++++++- app/test-bbdev/test_bbdev_vector.c | 521 +++- app/test-bbdev/test_bbdev_vector.h | 16 +- app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 354 +++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 685 +++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 903 +++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_3.data | 939 +++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 50 + app/test-bbdev/test_vectors/ldpc_dec_v14298.data | 377 +++ app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 746 ++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 746 ++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 75 + app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 256 ++ .../test_vectors/ldpc_dec_v8568_low.data | 256 ++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1216 +++++++++ .../test_vectors/ldpc_dec_vcrc_fail.data | 1216 +++++++++ .../ldpc_enc_c1_k1144_r0_e1380_rm.data | 51 + .../ldpc_enc_c1_k1144_r0_e1380_rm_crc24b.data | 51 + .../test_vectors/ldpc_enc_c1_k330_r0_e360_rm.data | 44 + .../test_vectors/ldpc_enc_c1_k720_r0_e832_rm.data | 47 + .../ldpc_enc_c1_k720_r0_e864_rm_crc24b.data | 47 + .../ldpc_enc_c1_k8148_r0_e9372_rm.data | 110 + app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 42 + .../test_vectors/ldpc_enc_v3964_rv1.data | 52 + app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 69 + .../test_vectors/ldpc_enc_v8568_crc24a.data | 69 + .../turbo_dec_c1_k160_r0_e23040_teq_negllr.data | 784 ++++++ ...o_dec_c1_k160_r0_e23040_teq_negllr_scatter.data | 786 ++++++ .../turbo_dec_c1_k160_r0_e23040_teq_posllr.data | 784 ++++++ .../turbo_dec_c1_k3136_r0_e4914_sbd_negllr.data | 352 +++ ...44_r0_e12248_crc24b_sbd_teq_negllr_scatter.data | 1034 ++++++++ ...urbo_dec_c1_k6144_r0_e34560_negllr_scatter.data | 647 +++++ ...bo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data | 5 +- ...turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr.data | 991 ++++++++ ...c_c2_k3136_r0_e4920_sbd_teq_negllr_scatter.data | 993 ++++++++ ...turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr.data | 2449 ++++++++++++++++++ ...c_c6_k5888_r3_e6912_sbd_teq_negllr_scatter.data | 2451 ++++++++++++++++++ .../turbo_enc_c1_k456_r0_e1380_scatter.data | 44 + ...urbo_enc_c3_k4352_r0_e13068_crc24b_scatter.data | 328 +++ app/test-bbdev/turbo_enc_default.data | 2 +- config/common_base | 9 +- doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/turbo_sw.rst | 57 +- doc/guides/prog_guide/bbdev.rst | 509 +++- doc/guides/tools/testbbdev.rst | 125 +- drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2671 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + .../baseband/fpga_lte_fec/fpga_lte_fec_version.map | 3 + drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 707 +++++- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 137 +- lib/librte_bbdev/rte_bbdev_op.h | 577 ++++- mk/rte.app.mk | 9 +- usertools/dpdk-devbind.py | 10 +- usertools/dpdk-setup.sh | 6 +- 68 files changed, 26858 insertions(+), 404 deletions(-) create mode 100644 app/test-bbdev/ldpc_dec_default.data create mode 100644 app/test-bbdev/ldpc_enc_default.data mode change 100755 => 100644 app/test-bbdev/test-bbdev.py create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_3.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v14298.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568_low.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_vcrc_fail.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k1144_r0_e1380_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k1144_r0_e1380_rm_crc24b.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k330_r0_e360_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k720_r0_e832_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k720_r0_e864_rm_crc24b.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k8148_r0_e9372_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v3964_rv1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568_crc24a.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_posllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k3136_r0_e4914_sbd_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e12248_crc24b_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k456_r0_e1380_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c3_k4352_r0_e13068_crc24b_scatter.data create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec_version.map mode change 100755 => 100644 usertools/dpdk-devbind.py mode change 100755 => 100644 usertools/dpdk-setup.sh
Signature · 1 line
1.8.3.1
PATCH 1/5 baseband/fpga_lte_fec: addition of driver for 4G turbo FEC with PAC N300 FPGA card
From: Nicolas Chautru <[email protected]>
--- config/common_base | 6 + doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2671 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + .../baseband/fpga_lte_fec/fpga_lte_fec_version.map | 3 + mk/rte.app.mk | 1 + 9 files changed, 3104 insertions(+) create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec_version.map
config/common_base +6 -0
@@ -521,6 +521,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y # EXPERIMENTAL: API may change without prior notice # CONFIG_RTE_LIBRTE_BBDEV=y +CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y
@@ -535,6 +536,11 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=n # +# Compile PMD for Intel FPGA LTE FEC bbdev device +# +CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC=y + +# # Compile generic crypto device library # CONFIG_RTE_LIBRTE_CRYPTODEV=y
doc/guides/bbdevs/fpga_lte_fec.rst new file +318 -0
318 lines not on this page · raw message
doc/guides/bbdevs/index.rst +1 -0
@@ -10,3 +10,4 @@ Baseband Device Drivers null turbo_sw + fpga_lte_fec
drivers/baseband/Makefile +2 -0
@@ -10,5 +10,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += null DEPDIRS-null = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += turbo_sw DEPDIRS-turbo_sw = $(core-libs) +DIRS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec +DEPDIRS-fpga_lte_fec = $(core-libs) include $(RTE_SDK)/mk/rte.subdir.mk
drivers/baseband/fpga_lte_fec/Makefile new file +29 -0
@@ -0,0 +1,29 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation + +include $(RTE_SDK)/mk/rte.vars.mk + +# library name +LIB = librte_pmd_fpga_lte_fec.a + +# build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_bbdev +LDLIBS += -lrte_pci -lrte_bus_pci + +# versioning export map +EXPORT_MAP := fpga_lte_fec_version.map + +# library version +LIBABIVER := 1 + +# library source files +SRCS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec.c + +# export include files +SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC)-include += fpga_lte_fec.h + +include $(RTE_SDK)/mk/rte.lib.mk
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c new file +2671 -0
2,624 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/fpga_lte_fec.h new file +73 -0
73 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/fpga_lte_fec_version.map new file +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
PATCH 2/5 bbdev : Extension of BBDEV for 5G FEC
In reply to Nic ChautruFrom: Nicolas Chautru <[email protected]>
--- doc/guides/prog_guide/bbdev.rst | 509 ++++++++++++++++++-- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 24 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 36 +- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 137 +++++- lib/librte_bbdev/rte_bbdev_op.h | 577 ++++++++++++++++++----- 6 files changed, 1091 insertions(+), 214 deletions(-)
doc/guides/prog_guide/bbdev.rst +457 -52
@@ -78,7 +78,7 @@ From the application point of view, each instance of a bbdev device consists of one or more queues identified by queue IDs. While different devices may have different capabilities (e.g. support different operation types), all queues on a device support identical configuration possibilities. A queue is configured -for only one type of operation and is configured at initialization time. +for only one type of operation and is configured at initializations time. When an operation is enqueued to a specific queue ID, the result is dequeued from the same queue ID.
@@ -91,8 +91,7 @@ and queue configuration is applied with ``rte_bbdev_queue_configure(dev_id,queue_id,conf)``. Note that, although all queues on a device support same capabilities, they can be configured differently and will then behave differently. -Devices supporting interrupts can enable them by using -``rte_bbdev_intr_enable(dev_id)``. +Devices supporting interrupts can enable them by using ``rte_bbdev_intr_enable(dev_id)``. The configuration of each bbdev device includes the following operations:
@@ -150,8 +149,6 @@ device. Once closed, it cannot be restarted. int rte_bbdev_start(uint16_t dev_id) int rte_bbdev_stop(uint16_t dev_id) int rte_bbdev_close(uint16_t dev_id) - int rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id) - int rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id) By default, all queues are started when the device is started, but they can be
@@ -166,9 +163,9 @@ stopped individually. Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor's logical cores and interfaces utilize its local memory. Therefore -baseband operations, the mbuf being operated on should be allocated from memory +The bbdev poll mode device driver library supports NUMA architecture, in which +a processor's logical cores and interfaces utilize it's local memory. Therefore +with baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer descriptors should be populated with mbufs allocated from a mempool allocated
@@ -220,9 +217,9 @@ relation to Turbo Encoding and Decoding operations. 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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -234,8 +231,8 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, RTE_BBDEV_END_OF_CAPABILITIES_LIST()
@@ -266,12 +263,13 @@ information: struct rte_bbdev_info { int socket_id; const char *dev_name; - const struct rte_bus *bus; + const struct rte_device *device; uint16_t num_queues; bool started; struct rte_bbdev_driver_info drv; }; + Operation Processing --------------------
@@ -335,14 +333,20 @@ processed on a particular bbdev device poll mode driver. int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_enc turbo_enc; + union { + struct rte_bbdev_op_turbo_enc turbo_enc; + struct rte_bbdev_op_ldpc_enc ldpc_enc; + } }; struct rte_bbdev_dec_op { int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_dec turbo_dec; + union { + struct rte_bbdev_op_turbo_dec turbo_enc; + struct rte_bbdev_op_ldpc_dec ldpc_enc; + } }; The operation structure by itself defines the operation type. It includes an
@@ -399,19 +403,31 @@ BBDEV Inbound/Outbound Memory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo coding on a referenced mbuf data buffer. It is used for either +performing Turbo and LDPC coding on a referenced mbuf data buffer. It is used for either encode or decode operations. -Turbo Encode operation accepts one input and one output. -Turbo Decode operation accepts one input and two outputs, called *hard-decision* -and *soft-decision* outputs. *Soft-decision* output is optional. + +.. csv-table:: Operation I/O + :header: "FEC", "In", "Out" + :widths: 20, 30, 30 + + "Turbo Encode", "input", "output" + "Turbo Decode", "input", "hard output" + " ", " ", "soft output (optional)" + "LDPC Encode", "input", "output" + "LDPC Decode", "input", "hard output" + "", "HQ combine (optional)", "HQ combine (optional)" + " ", "", "soft output (optional)" + It is expected that the application provides input and output mbuf pointers -allocated and ready to use. The baseband framework supports turbo coding on -Code Blocks (CB) and Transport Blocks (TB). +allocated and ready to use. + +The baseband framework supports FEC coding on Code Blocks (CB) and +Transport Blocks (TB). For the output buffer(s), the application is required to provide an allocated -and free mbuf, so that bbdev write back the resulting output. +and free mbuf, to which the resulting output will be written. The support of split "scattered" buffers is a driver-specific feature, so it is reported individually by the supporting driver as a capability.
@@ -436,26 +452,26 @@ This structure has three elements: This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs contiguously located next to each other. A Transport Block (TB) represents a whole piece of data that is divided into one or more CBs. Maximum number of - CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + CBs can be contained in one TB is defined by + ``RTE_BBDEV_(TURBO/LDPC)MAX_CODE_BLOCKS``. An mbuf data structure cannot represent more than one TB. The smallest piece of data that can be contained in one mbuf is one CB. An mbuf can include one contiguous CB, subset of contiguous CBs that are - belonging to one TB, or all contiguous CBs that are belonging to one TB. + belonging to one TB, or all contiguous CBs that belong to one TB. If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is capable of collecting (gathering) non-contiguous (scattered) data from multiple locations in the memory. This capability is reported by the capability flags: - - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``, - - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``, ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``. - Only if a BBDEV PMD supports this feature, chained mbuf data structures are - accepted. A chained mbuf can represent one non-contiguous CB or multiple - non-contiguous CBs. - The first mbuf segment in the given chained mbuf represents the first piece + Chained mbuf data structures are only accepted if a BBDEV PMD supports this + feature. A chained mbuf can represent one non-contiguous CB or multiple non-contiguous + CBs. The first mbuf segment in the given chained mbuf represents the first piece of the CB. Offset is only applicable to the first segment. ``length`` is the total length of the CB.
@@ -506,14 +522,22 @@ BBDEV Turbo Encode Operation }; }; -The Turbo encode structure is composed of the ``input`` and ``output`` mbuf -data pointers. The provided mbuf pointer of ``input`` needs to be big enough to -stretch for extra CRC trailers. +The Turbo encode structure includes the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big +enough to stretch for extra CRC trailers. + +.. csv-table:: **struct rte_bbdev_op_turbo_enc** parameters + :header: "Parameter", "Description" + :widths: 10, 30 -``op_flags`` parameter holds all operation related flags, like whether CRC24A is -included by the application or not. + "input","input CB or TB data" + "output","rate matched CB or TB output buffer" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" -``code_block_mode`` flag identifies the mode in which bbdev is operating in. The encode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is standalone. While
@@ -525,21 +549,21 @@ are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` call belong to one mode, either CB-mode or TB-mode. -In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +In case that the TB is smaller than Z (6144 bits), then effectively the TB = CB. CRC24A is appended to the tail of the CB. The application is responsible for calculating and appending CRC24A before calling BBDEV in case that the underlying driver does not support CRC24A generation. In CB-mode, CRC24A/B is an optional operation. -The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS -36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The CB parameter ``k`` is the size of the CB (this maps to K as described +in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` informs the application with relevant capability. These flags can be set in the -``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB -before going forward with Turbo encoding. +``op_flags`` parameter to indicate to BBDEV to calculate and append CRC24A/B +to CB before going forward with Turbo encoding. Output format of the CB encode will have the encoded CB in ``e`` size output (this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf
@@ -600,13 +624,26 @@ BBDEV Turbo Decode Operation }; }; -The Turbo decode structure is composed of the ``input`` and ``output`` mbuf -data pointers. - -``op_flags`` parameter holds all operation related flags, like whether CRC24B is -retained or not. - -``code_block_mode`` flag identifies the mode in which bbdev is operating in. +The Turbo decode structure includes the ``input``, ``hard_output`` and +optionally the ``soft_output`` mbuf data pointers. + +.. csv-table:: **struct rte_bbdev_op_turbo_dec** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","virtual circular buffer, wk, size 3*Kpi for each CB" + "hard output","hard decisions buffer, decoded output, size K for each CB" + "soft output","soft LLR output buffer (optional)" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "iter_max","maximum number of iterations to perofrm in decode all CBs" + "iter_min","minimum number of iterations to perform in decoding all CBs" + "iter_count","number of iterations to performed in decoding all CBs" + "ext_scale","scale factor on extrinsic info (5 bits)" + "num_maps","number of MAP engines to use in decode" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" Similarly, the decode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is
@@ -618,7 +655,8 @@ to a bigger TB are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` call belong to one mode, either CB-mode or TB-mode. -The input ``k`` is the size of the decoded CB (this maps to K as described in + +The CB parameter ``k`` is the size of the decoded CB (this maps to K as described in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case.
@@ -638,9 +676,9 @@ Soft output is an optional capability for BBDEV PMDs. Setting flag CRC24B at the end of each CB. This might be useful for the application in debug mode. An LLR rate matched output is computed in the ``soft_output`` buffer structure -for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section -5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the -encoded buffer of size ``e``. +for the given CB parameter ``e`` size (this maps to E described in +3GPP TS 36.212 section 5.1.4.1.2). The output mbuf buffer size needs to be big +enough to hold the encoded buffer of size ``e``. The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the number of the remaining CB VCBs is calculated automatically by BBDEV before
@@ -669,6 +707,373 @@ TB-mode. CB-mode is a reduced version, where only one CB exists: Turbo decoding of Code Blocks in mbuf structure +BBDEV LDPC Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC encode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependant on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC encode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +| Set to bypass bit-level interleaver on output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_RATE_MATCH | +| Set to enabling the RATE_MATCHING processing | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24A_ATTACH | +| Set to attach transport block CRC-24A | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24B_ATTACH | +| Set to attach code block CRC-24B | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_16_ATTACH | +| Set to attach code block CRC-16 | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_INTERRUPTS | +| Set if a device supports encoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CONCATENATION | +| Set if a device supports concatenation of non byte aligned output | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC encode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + struct rte_bbdev_op_ldpc_enc { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_enc_ldpc_cb_params cb_params; + struct rte_bbdev_op_enc_ldpc_tb_params tb_params; + }; + }; + +The LDPC encode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|output |rate matched CB or TB output buffer | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ ++ +c_ab +number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits, r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the +incoming code block or transport block data. + +The mbuf output ``output`` is mandatory and is the encoded CB(s). In +CB-mode ut contains the encoded CB of size ``e`` (E in 3GPP TS 38.212 +section 6.2.5). In TB-mode it contains multiple contiguous encoded CBs +of size ``ea`` or ``eb``. +The ``output`` buffer is allocated by the application with enough room +for the output data. + +The encode interface works on both a code block (CB) and a transport +block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (attach CRC24B if required) +* CB-mode: one CB making up one TB (attach CRC24A if required) +* TB-mode: one or more CB of a partial TB (attach CRC24B(s) if required) +* TB-mode: one or more CB of a complete TB (attach CRC24AB(s) if required) + +In CB-mode if ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is set then CRC24A +is appended to the CB. If ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is not +set the application is responsible for calculating and appending CRC24A +before calling BBDEV. The input data mbuf ``length`` is inclusive of +CRC24A/B where present and is equal to the code block size ``K``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the +inbound TB data buffer, unless the ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +flag is set when it is the responsibility of BBDEV. The input data +mbuf ``length`` is total size of the CBs inclusive of any CRC24A and +CRC24B in the case they were appended by the application. + +Not all BBDEV PMDs may be capable of CRC24A/B calculation. Flags +``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` and ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` +inform the application of the relevant capability. These flags can be set +in the ``op_flags`` parameter to indicate BBDEV to calculate and append +CRC24A to CB before going forward with LDPC encoding. + +The difference between the partial and full-size TB is that BBDEV needs +the index of the first CB in this group and the number of CBs in the group. +The first CB index is given by ``r`` but the number of the CBs is +calculated by BBDEV before signalling to the driver. + +The number of CBs in the group should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +Figure 13.1 above showing the Turbo encoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC encode. + +BBDEV LDPC Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC decode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependant on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC decode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +| Set for transport block CRC-24A checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +| Set for code block CRC-24B checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +| Set to drop the last CRC bits decoding output | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on input stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +| Set for HARQ combined input stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +| Set for HARQ combined output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_BYPASS | +| Set for LDPC decoder bypass | +| | +| RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE must be set | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_SOFT_OUT | +| Set for soft-output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +| Set for Rate-Matching bypass on soft-out stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on soft-output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +| Set for iteration stopping on successful decode condition enable | +| | +| Where a successful decode is a successful syndrome check | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_INTERRUPTS | +| Set if a device supports decoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +| Set if a device supports input/output HARQ compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_LLR_COMPRESSION | +| Set if a device supports input LLR compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | +| Set if a device supports HARQ input to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | +| Set if a device supports HARQ output to device's internal memory | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC decode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + + struct rte_bbdev_op_ldpc_dec { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data hard_output; + struct rte_bbdev_op_data soft_output; + struct rte_bbdev_op_data harq_combined_input; + struct rte_bbdev_op_data harq_combined_output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t iter_max; + uint8_t iter_count; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_dec_ldpc_cb_params cb_params; + struct rte_bbdev_op_dec_ldpc_tb_params tb_params; + }; + }; + + +The LDPC decode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|hard_output |hard decisions buffer, decoded output | ++----------------+--------------------------------------------------------------------+ +|soft_output |soft LLR output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_input |HARQ combined input buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_output|HARQ combined output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|iter_max |maximum number of iterations to perform in decode all CBs | ++----------------+--------------------------------------------------------------------+ +|iter_count |number of iterations performed in decoding all CBs | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ +| |c_ab |number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs +and is the Virtual Circular Buffer data stream with null padding. +Each byte in the input circular buffer is the LLR value of each bit of +the original CB. + +The mbuf output ``hard_output`` is mandatory and is the decoded CBs size +K (CRC24A/B is the last 24-bit in each decoded CB). + +The mbuf output ``soft_output`` is optional and is an LLR rate matched +output of size ``e`` (this is ``E`` as per 3GPP TS 38.212 section 6.2.5). + +The mbuf input ``harq_combine_input`` is optional and is a buffer with +the input to the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The mbuf output ``harq_combine_output`` is optional and is a buffer for +the output of the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The output mbuf data structures are expected to be allocated by the +application with enough room for the output data. + +As with the LDPC encode, the decode interface works on both a code block +(CB) and a transport block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (check CRC24B if required) +* CB-mode: one CB making up one TB (check CRC24A if required) +* TB-mode: one or more CB making up a partial TB (check CRC24B(s) if required) +* TB-mode: one or more CB making up a complete TB (check CRC24B(s) if required) + +The mbuf ``length`` is inclusive of CRC24A/B where present and is equal +the code block size ``K``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +the number of the remaining CB VCBs is calculated automatically by BBDEV +and passed down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +Figure 13.2 above showing the Turbo decoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC decode. + Sample code -----------
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +12 -12
@@ -605,9 +605,9 @@ struct __rte_cache_aligned fpga_queue { RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP, .max_llr_modulus = INT8_MAX, .num_buffers_src = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0 } },
@@ -619,9 +619,9 @@ struct __rte_cache_aligned fpga_queue {RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_ENC_INTERRUPTS, .num_buffers_src = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_dst = - RTE_BBDEV_MAX_CODE_BLOCKS + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS } },RTE_BBDEV_END_OF_CAPABILITIES_LIST ()
@@ -1386,15 +1386,15 @@ struct __rte_cache_aligned fpga_queue { RTE_BBDEV_MAX_CB_SIZE);return -1 ; } -if (tb->c_neg > (RTE_BBDEV_MAX_CODE_BLOCKS -1 )) +if (tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ))rte_bbdev_log (ERR ,"c_neg (%u) is out of range 0 <= value <= %u" , tb->c_neg, -RTE_BBDEV_MAX_CODE_BLOCKS -1 ); -if (tb->c <1 || tb->c >RTE_BBDEV_MAX_CODE_BLOCKS ) { +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ); +if (tb->c <1 || tb->c >RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {rte_bbdev_log (ERR ,"c (%u) is out of range 1 <= value <= %u" , - tb->c,RTE_BBDEV_MAX_CODE_BLOCKS ); + tb->c,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }if (tb->cab > tb->c) {
@@ -1728,15 +1728,15 @@ struct __rte_cache_aligned fpga_queue { RTE_BBDEV_MAX_CB_SIZE);return -1 ; } -if (tb->c_neg > (RTE_BBDEV_MAX_CODE_BLOCKS -1 )) +if (tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ))rte_bbdev_log (ERR ,"c_neg (%u) is out of range 0 <= value <= %u" , tb->c_neg, -RTE_BBDEV_MAX_CODE_BLOCKS -1 ); -if (tb->c <1 || tb->c >RTE_BBDEV_MAX_CODE_BLOCKS ) { +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ); +if (tb->c <1 || tb->c >RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {rte_bbdev_log (ERR ,"c (%u) is out of range 1 <= value <= %u" , - tb->c,RTE_BBDEV_MAX_CODE_BLOCKS ); + tb->c,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }if (tb->cab > tb->c) {
drivers/baseband/turbo_sw/bbdev_turbo_software.c +18 -18
@@ -33,9 +33,9 @@ rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_TURBO_MAX_CB_SIZE >> 3) + 1) * 48)#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) -#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_TURBO_MAX_CB_SIZE + 4) * 48)/* private data structure */ struct bbdev_private {
@@ -101,7 +101,7 @@ struct turbo_sw_queue { {int32_t result =0 ; -if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE ) +if (k <RTE_BBDEV_TURBO_MIN_CB_SIZE || k >RTE_BBDEV_TURBO_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -154,9 +154,9 @@ struct turbo_sw_queue {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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -168,8 +168,8 @@ struct turbo_sw_queue { RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } },RTE_BBDEV_END_OF_CAPABILITIES_LIST ()
@@ -248,7 +248,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * + ((RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) {
@@ -268,7 +268,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_TURBO_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -286,7 +286,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_TURBO_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -304,7 +304,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->code_block =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *sizeof (*q->code_block), +RTE_BBDEV_TURBO_MAX_CB_SIZE *sizeof (*q->code_block),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->code_block ==NULL ) { rte_bbdev_log(ERR,
@@ -429,9 +429,9 @@ struct turbo_sw_queue {return -1 ; } -if (k >RTE_BBDEV_MAX_CB_SIZE ) { +if (k >RTE_BBDEV_TURBO_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,RTE_BBDEV_MAX_CB_SIZE ); + k,RTE_BBDEV_TURBO_MAX_CB_SIZE );return -1 ; }
@@ -456,9 +456,9 @@ struct turbo_sw_queue {return -1 ; } -if (kw >RTE_BBDEV_MAX_KW ) { +if (kw >RTE_BBDEV_TURBO_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,RTE_BBDEV_MAX_KW ); + kw,RTE_BBDEV_TURBO_MAX_KW );return -1 ; }
@@ -745,9 +745,9 @@ struct turbo_sw_queue {/* Clear op status */ op->status =0 ; -if (mbuf_total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +if (mbuf_total_left >RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - mbuf_total_left,RTE_BBDEV_MAX_TB_SIZE ); + mbuf_total_left,RTE_BBDEV_TURBO_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -1027,7 +1027,7 @@ struct turbo_sw_queue {* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_TURBO_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out_head, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev.c +15 -7
@@ -6,7 +6,6 @@#include <string.h> #include <stdbool.h> -#include <rte_string_fns.h> #include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h>
@@ -215,7 +214,7 @@ struct rte_bbdev * __rte_experimental bbdev->data->dev_id = dev_id; bbdev->state =RTE_BBDEV_INITIALIZED ; - ret =strlcpy (bbdev->data->name, name,RTE_BBDEV_NAME_MAX_LEN ); + ret =snprintf (bbdev->data->name,RTE_BBDEV_NAME_MAX_LEN ,"%s" , name);if ((ret <0 ) || (ret >=RTE_BBDEV_NAME_MAX_LEN )) {rte_bbdev_log (ERR ,"Copying device name \"%s\" failed" , name);return NULL ;
@@ -499,7 +498,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_ul_queue_priority);return -EINVAL ;
@@ -507,7 +506,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && conf->priority > dev_info.max_dl_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_dl_queue_priority);return -EINVAL ;
@@ -796,7 +795,7 @@ struct rte_bbdev * __rte_experimentalmemset (dev_info,0 ,sizeof (*dev_info)); dev_info->dev_name = dev->data->name; dev_info->num_queues = dev->data->num_queues; - dev_info->bus =rte_bus_find_by_device (dev->device); + dev_info->device = dev->device; dev_info->socket_id = dev->data->socket_id; dev_info->started = dev->data->started;
@@ -847,6 +846,12 @@ struct rte_bbdev * __rte_experimentalcase RTE_BBDEV_OP_TURBO_ENC : result =sizeof (struct rte_bbdev_enc_op );break ; +case RTE_BBDEV_OP_LDPC_DEC : + result =sizeof (struct rte_bbdev_dec_op ); +break ; +case RTE_BBDEV_OP_LDPC_ENC : + result =sizeof (struct rte_bbdev_enc_op ); +break ;default :break ; }
@@ -861,11 +866,12 @@ struct rte_bbdev * __rte_experimental {enum rte_bbdev_op_type type = *(enum rte_bbdev_op_type *)arg; -if (type ==RTE_BBDEV_OP_TURBO_DEC ) { +if (type ==RTE_BBDEV_OP_TURBO_DEC || type ==RTE_BBDEV_OP_LDPC_DEC ) {struct rte_bbdev_dec_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool; - }else if (type ==RTE_BBDEV_OP_TURBO_ENC ) { + }else if (type ==RTE_BBDEV_OP_TURBO_ENC || + type ==RTE_BBDEV_OP_LDPC_ENC ) {struct rte_bbdev_enc_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool;
@@ -1117,6 +1123,8 @@ struct rte_mempool * __rte_experimental"RTE_BBDEV_OP_NONE" ,"RTE_BBDEV_OP_TURBO_DEC" ,"RTE_BBDEV_OP_TURBO_ENC" , +"RTE_BBDEV_OP_LDPC_DEC" , + "RTE_BBDEV_OP_LDPC_ENC", };if (op_type <RTE_BBDEV_OP_TYPE_COUNT )
lib/librte_bbdev/rte_bbdev.h +134 -3
173 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +455 -122
848 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 3/5 baseband/turbo_sw : Extension of turbo_sw for 5G FEC
In reply to Nic ChautruFrom: Nicolas Chautru <[email protected]>
--- app/test-bbdev/test_bbdev_vector.c | 4 +- app/test-bbdev/test_bbdev_vector.h | 2 +- config/common_base | 3 +- doc/guides/bbdevs/turbo_sw.rst | 57 +- drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 679 ++++++++++++++++++++++- mk/rte.app.mk | 8 +- 7 files changed, 731 insertions(+), 37 deletions(-)
app/test-bbdev/test_bbdev_vector.c +2 -2
@@ -298,9 +298,9 @@ op_data = vector->entries[type].segments; nb_ops = &vector->entries[type].nb_segments; -if (*nb_ops >=RTE_BBDEV_MAX_CODE_BLOCKS ) { +if (*nb_ops >=RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {printf ("Too many segments (code blocks defined): %u, max %d!\n" , - *nb_ops,RTE_BBDEV_MAX_CODE_BLOCKS ); + *nb_ops,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }
app/test-bbdev/test_bbdev_vector.h +1 -1
@@ -46,7 +46,7 @@ struct op_data_buf { };struct op_data_entries { -struct op_data_buf segments[RTE_BBDEV_MAX_CODE_BLOCKS ]; +struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ];unsigned int nb_segments; };
config/common_base +2 -1
@@ -523,7 +523,8 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y CONFIG_RTE_LIBRTE_BBDEV=y CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 -CONFIG_RTE_BBDEV_OFFLOAD_COST=y +CONFIG_RTE_BBDEV_OFFLOAD_COST=n +CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512=n # # Compile PMD for NULL bbdev device
doc/guides/bbdevs/turbo_sw.rst +35 -22
130 lines not on this page · raw message
drivers/baseband/turbo_sw/Makefile +14 -1
@@ -26,12 +26,25 @@ CFLAGS += -I$(FLEXRAN_SDK)/lib_common CFLAGS += -I$(FLEXRAN_SDK)/lib_turbo CFLAGS += -I$(FLEXRAN_SDK)/lib_crc CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_matching +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512),y) +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_dematching_5gnr +endif LDLIBS += -L$(FLEXRAN_SDK)/lib_turbo -lturbo LDLIBS += -L$(FLEXRAN_SDK)/lib_crc -lcrc LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon -LDLIBS += -lstdc++ -lirc -limf -lipps +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512),y) +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif + +LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +670 -9
862 lines not on this page · raw message
mk/rte.app.mk +7 -1
@@ -225,8 +225,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lrte_pmd_bbdev_turbo_sw _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcrc _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps -lsvml endif # CONFIG_RTE_LIBRTE_BBDEV ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
Signature · 1 line
1.8.3.1
PATCH 5/5 usertools: update to usertool to allow binding of baseband device
In reply to Nic ChautruFrom: Nicolas Chautru <[email protected]>
--- usertools/dpdk-devbind.py | 10 +++++++++- usertools/dpdk-setup.sh | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) mode change 100755 => 100644 usertools/dpdk-devbind.py mode change 100755 => 100644 usertools/dpdk-setup.sh
usertools/dpdk-devbind.py +9 -1
@@ -18,6 +18,8 @@ 'SVendor': None, 'SDevice': None} intel_processor_class = {'Class': '0b', 'Vendor': '8086', 'Device': None, 'SVendor': None, 'SDevice': None} +acceleration_class = {'Class': '12', 'Vendor': None, 'Device': None, + 'SVendor': None, 'SDevice': None} cavium_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a04b,a04d', 'SVendor': None, 'SDevice': None} cavium_fpa = {'Class': '08', 'Vendor': '177d', 'Device': 'a053',
@@ -40,6 +42,7 @@ crypto_devices = [encryption_class, intel_processor_class] eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] +baseband_devices = [acceleration_class] compress_devices = [cavium_zip] # global dict ethernet devices present. Dictionary indexed by PCI address.
@@ -89,7 +92,7 @@ def usage(): --status-dev: Print the status of given device group. Supported device groups are: - "net", "crypto", "event", "mempool" and "compress" + "net", "crypto", "baseband", "event", "mempool" and "compress" -b driver, --bind=driver: Select the driver to use or \"none\" to unbind the device
@@ -586,6 +589,9 @@ def show_status(): if status_dev == "crypto" or status_dev == "all": show_device_status(crypto_devices, "Crypto") + if status_dev == "baseband" or status_dev == "all": + show_device_status(baseband_devices, "Baseband") + if status_dev == "event" or status_dev == "all": show_device_status(eventdev_devices, "Eventdev")
@@ -667,6 +673,7 @@ def do_arg_actions(): # refresh if we have changed anything get_device_details(network_devices) get_device_details(crypto_devices) + get_device_details(baseband_devices) get_device_details(eventdev_devices) get_device_details(mempool_devices) get_device_details(compress_devices)
@@ -688,6 +695,7 @@ def main(): get_device_details(network_devices) get_device_details(crypto_devices) get_device_details(eventdev_devices) + get_device_details(baseband_devices) get_device_details(mempool_devices) get_device_details(compress_devices) do_arg_actions()
usertools/dpdk-setup.sh +3 -3
@@ -496,13 +496,13 @@ step2_func() TEXT[5]="Setup hugepage mappings for NUMA systems" FUNC[5]="set_numa_pages" - TEXT[6]="Display current Ethernet/Crypto device settings" + TEXT[6]="Display current Ethernet/Crypto/Baseband device settings" FUNC[6]="show_devices" - TEXT[7]="Bind Ethernet/Crypto device to IGB UIO module" + TEXT[7]="Bind Ethernet/Crypto/Baseband device to IGB UIO module" FUNC[7]="bind_devices_to_igb_uio" - TEXT[8]="Bind Ethernet/Crypto device to VFIO module" + TEXT[8]="Bind Ethernet/Crypto/Baseband device to VFIO module" FUNC[8]="bind_devices_to_vfio" TEXT[9]="Setup VFIO permissions"
Signature · 1 line
1.8.3.1
Quoted 6 lines · Nic Chautru
This was deferred from 19.05 due to time running out. Addition of a PMD for 4G FEC encoding and decoding functions for Intel PAC N300 FPGA.
Extension of PMD based on Intel optimised SW libraries for 5G FEC. The HW dependency is available now.
Quoted 7 lines
Nicolas Chautru (5):
baseband/fpga_lte_fec: addition of driver for 4G turbo FEC with PAC
N300 FPGA card
bbdev : Extension of BBDEV for 5G FEC
baseband/turbo_sw : Extension ofturbo_swfor 5G FEC test-bbdev : Update of bbdec test-app for FPGA and 5G testing
usertools: update to usertool to allow binding of baseband device
Hi,
Please add support for building this with Meson. Thanks!
Signature · 2 lines
Kind regards, Luca Boccassi
Hi Luca,
Is that fair to consider support meson build in a separate patchset once this one is applied?
- Currently even on 19.05 there is no meson build support for the existing baseband driver ("turbo_sw").
- I believe that meson build is still experimental. Default build framework still meant to be make.
Thanks and regards ,
-Nic
-----Original Message-----
From: Luca Boccassi [mailto:[email protected]]
Sent: Monday, May 13, 2019 4:10 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 0/5] BBDEV PMD Drivers Extension for 19.08
Quoted 6 lines · Nic Chautru
This was deferred from 19.05 due to time running out. Addition of a PMD for 4G FEC encoding and decoding functions for Intel PAC N300 FPGA.
Extension of PMD based on Intel optimised SW libraries for 5G FEC. The HW dependency is available now.
Quoted 7 lines
Nicolas Chautru (5):
baseband/fpga_lte_fec: addition of driver for 4G turbo FEC with PAC
N300 FPGA card
bbdev : Extension of BBDEV for 5G FEC
baseband/turbo_sw : Extension ofturbo_swfor 5G FEC test-bbdev : Update of bbdec test-app for FPGA and 5G testing
usertools: update to usertool to allow binding of baseband device
Hi,
Please add support for building this with Meson. Thanks!
--
Kind regards,
Luca Boccassi
Hi,
14/05/2019 02:07, Chautru, Nicolas:
Quoted 3 lines
Hi Luca,
Is that fair to consider support meson build in a separate patchset once this one is applied?
No, any new code must support meson now.
Quoted 1 line
- Currently even on 19.05 there is no meson build support for the existing baseband driver ("
turbo_sw").
Yes this driver is a problem.
It is still waiting for a freely downloadable dependency,
or pending for complete removal.
I don't want to consider any new bbdev code until this issue is solved.
Quoted 1 line
- I believe that meson build is still experimental. Default build framework still meant to be make.
No, it is changing. Meson is going to be the default.
PS: please do not top-post.
Quoted 2 lines
From: Luca Boccassi [mailto:[email protected]] Please add support for building this with Meson. Thanks!
v2 cover BBDEV PMD Drivers Extension for 19.08
In reply to Nic ChautruThis was deferred from 19.05 due to time running out.
Addition of a PMD for 4G FEC encoding and decoding functions for Intel PAC N300 FPGA. Extension of PMD based on Intel optimised SW libraries for 5G FEC.
The HW dependency is available now.
v2 : Cosmetic updates from ci/checkpatch
Nicolas Chautru (5):
baseband/fpga_lte_fec: adding driver for FEC on FPGA
bbdev: extension of BBDEV for 5G FEC baseband/turbo_sw: extension of turbosw for 5G FEC
test-bbdev: update of bbdev test-app
usertools: update to usertool for baseband device
app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 2 +- app/test-bbdev/test-bbdev.py | 9 +- app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1224 ++++++++- app/test-bbdev/test_bbdev_vector.c | 521 +++- app/test-bbdev/test_bbdev_vector.h | 16 +- app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 354 +++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 685 +++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 903 +++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_3.data | 939 +++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 50 + app/test-bbdev/test_vectors/ldpc_dec_v14298.data | 377 +++ app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 746 ++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 746 ++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 75 + app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 256 ++ .../test_vectors/ldpc_dec_v8568_low.data | 256 ++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1216 +++++++++ .../test_vectors/ldpc_dec_vcrc_fail.data | 1216 +++++++++ .../ldpc_enc_c1_k1144_r0_e1380_rm.data | 51 + .../ldpc_enc_c1_k1144_r0_e1380_rm_crc24b.data | 51 + .../test_vectors/ldpc_enc_c1_k330_r0_e360_rm.data | 44 + .../test_vectors/ldpc_enc_c1_k720_r0_e832_rm.data | 47 + .../ldpc_enc_c1_k720_r0_e864_rm_crc24b.data | 47 + .../ldpc_enc_c1_k8148_r0_e9372_rm.data | 110 + app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 150 ++ .../test_vectors/ldpc_enc_v3964_rv1.data | 52 + app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 69 + .../test_vectors/ldpc_enc_v8568_crc24a.data | 69 + app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 196 ++ .../turbo_dec_c1_k160_r0_e23040_teq_negllr.data | 784 ++++++ ...o_dec_c1_k160_r0_e23040_teq_negllr_scatter.data | 786 ++++++ .../turbo_dec_c1_k160_r0_e23040_teq_posllr.data | 784 ++++++ .../turbo_dec_c1_k3136_r0_e4914_sbd_negllr.data | 352 +++ ...44_r0_e12248_crc24b_sbd_teq_negllr_scatter.data | 1034 ++++++++ ...urbo_dec_c1_k6144_r0_e34560_negllr_scatter.data | 647 +++++ ...bo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data | 5 +- ...turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr.data | 991 ++++++++ ...c_c2_k3136_r0_e4920_sbd_teq_negllr_scatter.data | 993 ++++++++ ...turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr.data | 2449 ++++++++++++++++++ ...c_c6_k5888_r3_e6912_sbd_teq_negllr_scatter.data | 2451 ++++++++++++++++++ .../turbo_enc_c1_k456_r0_e1380_scatter.data | 44 + ...urbo_enc_c3_k4352_r0_e13068_crc24b_scatter.data | 328 +++ app/test-bbdev/turbo_enc_default.data | 2 +- config/common_base | 9 +- doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/turbo_sw.rst | 57 +- doc/guides/prog_guide/bbdev.rst | 509 +++- doc/guides/tools/testbbdev.rst | 125 +- drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2674 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + .../baseband/fpga_lte_fec/fpga_lte_fec_version.map | 3 + drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 707 +++++- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 137 +- lib/librte_bbdev/rte_bbdev_op.h | 577 ++++- mk/rte.app.mk | 9 +- usertools/dpdk-devbind.py | 10 +- usertools/dpdk-setup.sh | 6 +- 70 files changed, 27207 insertions(+), 404 deletions(-) create mode 100644 app/test-bbdev/ldpc_dec_default.data create mode 100644 app/test-bbdev/ldpc_enc_default.data mode change 100755 => 100644 app/test-bbdev/test-bbdev.py create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_3.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v14298.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568_low.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_vcrc_fail.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k1144_r0_e1380_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k1144_r0_e1380_rm_crc24b.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k330_r0_e360_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k720_r0_e832_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k720_r0_e864_rm_crc24b.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k8148_r0_e9372_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v3964_rv1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568_crc24a.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_posllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k3136_r0_e4914_sbd_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e12248_crc24b_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k456_r0_e1380_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c3_k4352_r0_e13068_crc24b_scatter.data create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec_version.map mode change 100755 => 100644 usertools/dpdk-devbind.py mode change 100755 => 100644 usertools/dpdk-setup.sh
Signature · 1 line
1.8.3.1
PATCH v2 1/5 baseband/fpga_lte_fec: adding driver for FEC on FPGA
Supports for FEC 4G PMD Driver on FPGA card PAC N300
--- config/common_base | 6 + doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2674 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + .../baseband/fpga_lte_fec/fpga_lte_fec_version.map | 3 + mk/rte.app.mk | 1 + 9 files changed, 3107 insertions(+) create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec_version.map
config/common_base +6 -0
@@ -521,6 +521,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y # EXPERIMENTAL: API may change without prior notice # CONFIG_RTE_LIBRTE_BBDEV=y +CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y
@@ -535,6 +536,11 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=n # +# Compile PMD for Intel FPGA LTE FEC bbdev device +# +CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC=y + +# # Compile generic crypto device library # CONFIG_RTE_LIBRTE_CRYPTODEV=y
doc/guides/bbdevs/fpga_lte_fec.rst new file +318 -0
318 lines not on this page · raw message
doc/guides/bbdevs/index.rst +1 -0
@@ -10,3 +10,4 @@ Baseband Device Drivers null turbo_sw + fpga_lte_fec
drivers/baseband/Makefile +2 -0
@@ -10,5 +10,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += null DEPDIRS-null = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += turbo_sw DEPDIRS-turbo_sw = $(core-libs) +DIRS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec +DEPDIRS-fpga_lte_fec = $(core-libs) include $(RTE_SDK)/mk/rte.subdir.mk
drivers/baseband/fpga_lte_fec/Makefile new file +29 -0
@@ -0,0 +1,29 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation + +include $(RTE_SDK)/mk/rte.vars.mk + +# library name +LIB = librte_pmd_fpga_lte_fec.a + +# build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_bbdev +LDLIBS += -lrte_pci -lrte_bus_pci + +# versioning export map +EXPORT_MAP := fpga_lte_fec_version.map + +# library version +LIBABIVER := 1 + +# library source files +SRCS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec.c + +# export include files +SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC)-include += fpga_lte_fec.h + +include $(RTE_SDK)/mk/rte.lib.mk
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c new file +2674 -0
2,624 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/fpga_lte_fec.h new file +73 -0
73 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/fpga_lte_fec_version.map new file +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH v2 1/5] baseband/fpga_lte_fec: adding driver for FEC on FPGA
14/05/2019 21:45, Nicolas Chautru:
doc/guides/bbdevs/fpga_lte_fec.rst line 60
Quoted 11 lines
doc/guides/bbdevs/fpga_lte_fec.rst new file +11
-0+Installation +-------------- + +Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The +default set of bbdev compile flags may be found in config/common_base, where for example +the flag to build the FPGA LTE FEC device, ``CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC``, is already +set. It is assumed DPDK has been compiled for an icc 64-bit target using: + +.. code-block:: console + + make install T=x86_64-native-linuxapp-icc
I already said (2 months ago) that requiring icc is not acceptable, but I got no reply:
http://mails.dpdk.org/archives/dev/2019-March/126161.html
Re: [dpdk-dev] [PATCH v2 1/5] baseband/fpga_lte_fec: adding driver for FEC on FPGA
Quoted 15 lines · Thomas Monjalon
14/05/2019 21:45, Nicolas Chautru:
doc/guides/bbdevs/fpga_lte_fec.rst line 60
Quoted 11 lines
doc/guides/bbdevs/fpga_lte_fec.rst new file +11
-0+Installation +-------------- + +Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The +default set of bbdev compile flags may be found in config/common_base, where for example +the flag to build the FPGA LTE FEC device, ``CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC``, is already +set. It is assumed DPDK has been compiled for an icc 64-bit target using: + +.. code-block:: console + + make install T=x86_64-native-linuxapp-iccI already said (2 months ago) that requiring icc is not acceptable, but I got no reply:
Quoted 2 lines
http://mails.dpdk.org/archives/dev/2019-March/126161.html
This PMD doesn't have any dependency to ICC, gcc or clang is as good as any.
Re: [dpdk-dev] [PATCH v2 1/5] baseband/fpga_lte_fec: adding driver for FEC on FPGA
20/05/2019 15:44, Ferruh Yigit:
Quoted 19 lines · Thomas Monjalon
Quoted 15 lines
14/05/2019 21:45, Nicolas Chautru:
doc/guides/bbdevs/fpga_lte_fec.rst line 60
Quoted 11 lines
doc/guides/bbdevs/fpga_lte_fec.rst new file +11
-0+Installation +-------------- + +Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The +default set of bbdev compile flags may be found in config/common_base, where for example +the flag to build the FPGA LTE FEC device, ``CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC``, is already +set. It is assumed DPDK has been compiled for an icc 64-bit target using: + +.. code-block:: console + + make install T=x86_64-native-linuxapp-iccI already said (2 months ago) that requiring icc is not acceptable, but I got no reply:
Quoted 2 lines
http://mails.dpdk.org/archives/dev/2019-March/126161.html
Quoted 1 line
This PMD doesn't have any dependency to ICC, gcc or clang is as good as any.
Good news, so please don't use icc in your example.
And you should remove
"It is assumed DPDK has been compiled for an icc 64-bit target"
v3 cover bbdev: adding support in BBDEV for 5GNR FEC
In reply to Nicolas ChautruThis set is v3 of the serie shared weeks few ago covering BBDEV related new features for 19.08 https://patches.dpdk.org/project/dpdk/list/?series=4657&state=*
Since that, it was suggested with maintainer to have part of that contribution shared as 2 standalone series. They are pending being applied here :
https://patches.dpdk.org/project/dpdk/list/?series=5017
https://patches.dpdk.org/project/dpdk/list/?series=5093
The remaining of that contribution is now being shared on this new serie.
Since this new serie rely on the 2 series above to apply the patch, I kept this dependency formally as the first 2 squashed commits (1/10 and 2/10) so that not to break CI, but really only the last 8 commits of this serie are specifically requiring review and to be applied on top of the 2 series as flagged to Akhil.
This set enables specifically bbdev to support 5GNR operations (previously only LTE specific) and to add the related support to turbo_sw PMD driver, test framework and documentation.
Nicolas Chautru (10):
baseband/turbo_sw: baseband/turbo_sw: dependency patch baseband/fpga_lte_fec: dependency patch
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
doc: announce bbdev changes
app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++- app/test-bbdev/test_bbdev_vector.c | 521 +++- app/test-bbdev/test_bbdev_vector.h | 16 +- app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 354 +++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 685 +++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 903 +++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 50 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 746 ++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 746 ++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 75 + app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 256 ++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1216 +++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 150 ++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 69 + app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 196 ++ app/test-bbdev/turbo_enc_default.data | 2 +- config/common_base | 9 +- doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/turbo_sw.rst | 105 +- doc/guides/prog_guide/bbdev.rst | 505 +++- doc/guides/rel_notes/release_19_08.rst | 15 + drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2675 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + drivers/baseband/fpga_lte_fec/meson.build | 7 + .../rte_pmd_bbdev_fpga_lte_fec_version.map | 3 + drivers/baseband/meson.build | 2 +- drivers/baseband/turbo_sw/Makefile | 28 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 765 +++++- drivers/baseband/turbo_sw/meson.build | 40 + lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 135 +- lib/librte_bbdev/rte_bbdev_op.h | 585 ++++- meson_options.txt | 2 + mk/rte.app.mk | 12 +- 47 files changed, 12376 insertions(+), 386 deletions(-) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/meson.build create mode 100644 drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map create mode 100644 drivers/baseband/turbo_sw/meson.build
Signature · 1 line
1.8.3.1
PATCH v3 1/10 baseband/turbo_sw: baseband/turbo_sw: dependency patch
Not meant for review, purely for dependency for CI. This is a squash of the related serie which is not applied yet:
option to build turbosw PMD without SDK
https://patches.dpdk.org/project/dpdk/list/?series=5093
--- config/common_base | 3 +- doc/guides/bbdevs/turbo_sw.rst | 81 +++++++++++++----------- drivers/baseband/meson.build | 2 +- drivers/baseband/turbo_sw/Makefile | 13 ++-- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 51 ++++++++++++++- drivers/baseband/turbo_sw/meson.build | 30 +++++++++ meson_options.txt | 2 + mk/rte.app.mk | 3 + 8 files changed, 138 insertions(+), 47 deletions(-) create mode 100644 drivers/baseband/turbo_sw/meson.build
config/common_base +2 -1
@@ -528,6 +528,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y CONFIG_RTE_LIBRTE_BBDEV=y CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y +CONFIG_RTE_BBDEV_SDK_AVX2=n # # Compile PMD for NULL bbdev device
@@ -537,7 +538,7 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y # # Compile PMD for turbo software bbdev device # -CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=n +CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y # # Compile generic crypto device library
doc/guides/bbdevs/turbo_sw.rst +44 -37
142 lines not on this page · raw message
drivers/baseband/meson.build +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> -drivers = ['null'] +drivers = ['null', 'turbo_sw'] config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/baseband/turbo_sw/Makefile +7 -6
@@ -3,9 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk -ifeq ($(FLEXRAN_SDK),) -$(error "Please define FLEXRAN_SDK environment variable") -endif # library name LIB = librte_pmd_bbdev_turbo_sw.a
@@ -21,17 +18,21 @@ LDLIBS += -lrte_bus_vdev # versioning export map EXPORT_MAP := rte_pmd_bbdev_turbo_sw_version.map -# external library dependencies +# external library dependencies if available +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),y) +ifeq ($(FLEXRAN_SDK),) +$(error "Please define FLEXRAN_SDK environment variable") +endif CFLAGS += -I$(FLEXRAN_SDK)/lib_common CFLAGS += -I$(FLEXRAN_SDK)/lib_turbo CFLAGS += -I$(FLEXRAN_SDK)/lib_crc CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_matching - LDLIBS += -L$(FLEXRAN_SDK)/lib_turbo -lturbo LDLIBS += -L$(FLEXRAN_SDK)/lib_crc -lcrc LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon -LDLIBS += -lstdc++ -lirc -limf -lipps +LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml +endif # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +49 -2
145 lines not on this page · raw message
drivers/baseband/turbo_sw/meson.build new file +30 -0
@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +path = get_option('flexran_sdk') + +if dpdk_conf.has('RTE_BBDEV_SDK_AVX2') + lib = cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: false) + if not lib.found() + build = false + else + ext_deps += cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: true) + ext_deps += cc.find_library('libcrc', dirs: [path + '/lib_crc'], required: true) + ext_deps += cc.find_library('librate_matching', dirs: [path + '/lib_rate_matching'], required: true) + ext_deps += cc.find_library('libcommon', dirs: [path + '/lib_common'], required: true) + ext_deps += cc.find_library('libstdc++', required: true) + ext_deps += cc.find_library('libirc', required: true) + ext_deps += cc.find_library('libimf', required: true) + ext_deps += cc.find_library('libipps', required: true) + ext_deps += cc.find_library('libsvml', required: true) + includes += include_directories(path + '/lib_turbo') + includes += include_directories(path + '/lib_crc') + includes += include_directories(path + '/lib_rate_matching') + includes += include_directories(path + '/lib_common') + endif +endif + +deps += ['bbdev', 'bus_vdev', 'ring'] +name = 'bbdev_turbo_sw' +allow_experimental_apis = true +sources = files('bbdev_turbo_software.c')
meson_options.txt +2 -0
@@ -10,6 +10,8 @@ option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules') option('examples', type: 'string', value: '', description: 'Comma-separated list of examples to build by default') +option('flexran_sdk', type: 'string', value: '', + description: 'Path to FlexRAN SDK optional Libraries for BBDEV device') option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared', description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') option('include_subdir_arch', type: 'string', value: '',
mk/rte.app.mk +3 -0
@@ -219,11 +219,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += -lrte_pmd_bbdev_null # TURBO SOFTWARE PMD is dependent on the FLEXRAN library _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lrte_pmd_bbdev_turbo_sw +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),y) +# Dependency on the FLEXRAN SDK library if available _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcrc _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
Signature · 1 line
1.8.3.1
v4 cover bbdev: adding support in BBDEV for 5GNR FEC
v4 update: cosmetic changes reported by ci/checkpatch
This set enables specifically bbdev to support 5GNR operations (previously only LTE specific) and to add the related support to turbo_sw PMD driver, test framework and documentation.
This set is v3 of the serie shared weeks few ago covering BBDEV related new features for 19.08 https://patches.dpdk.org/project/dpdk/list/?series=4657&state=*
Since that, it was suggested with maintainer to have part of that contribution shared as 2 standalone series. They are pending being applied here :
https://patches.dpdk.org/project/dpdk/list/?series=5017
https://patches.dpdk.org/project/dpdk/list/?series=5093
The remaining of that contribution is now being shared on this new serie.
Since this new serie rely on the 2 series above to apply the patch, I kept this dependency formally as the first 2 squashed commits (1/10 and 2/10) so that not to break CI, but really only the last 8 commits of this serie are specifically requiring review and to be applied on top of the 2 series as flagged to Akhil.
Nicolas Chautru (10):
baseband/turbo_sw: baseband/turbo_sw: dependency patch baseband/fpga_lte_fec: dependency patch
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
doc: announce bbdev changes
app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++- app/test-bbdev/test_bbdev_vector.c | 521 +++- app/test-bbdev/test_bbdev_vector.h | 16 +- app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 354 +++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 685 +++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 903 +++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 50 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 746 ++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 746 ++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 75 + app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 256 ++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1216 +++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 150 ++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 69 + app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 196 ++ app/test-bbdev/turbo_enc_default.data | 2 +- config/common_base | 9 +- doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/turbo_sw.rst | 105 +- doc/guides/prog_guide/bbdev.rst | 505 +++- doc/guides/rel_notes/release_19_08.rst | 15 + drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2675 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + drivers/baseband/fpga_lte_fec/meson.build | 7 + .../rte_pmd_bbdev_fpga_lte_fec_version.map | 3 + drivers/baseband/meson.build | 2 +- drivers/baseband/turbo_sw/Makefile | 28 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 765 +++++- drivers/baseband/turbo_sw/meson.build | 40 + lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 135 +- lib/librte_bbdev/rte_bbdev_op.h | 585 ++++- meson_options.txt | 2 + mk/rte.app.mk | 12 +- 47 files changed, 12376 insertions(+), 386 deletions(-) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/meson.build create mode 100644 drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map create mode 100644 drivers/baseband/turbo_sw/meson.build
Signature · 1 line
1.8.3.1
PATCH v4 1/10 baseband/turbo_sw: baseband/turbo_sw: dependency patch
Not meant for review, purely for dependency for CI. This is a squash of the related serie which is not applied yet:
option to build turbosw PMD without SDK
https://patches.dpdk.org/project/dpdk/list/?series=5093
--- config/common_base | 3 +- doc/guides/bbdevs/turbo_sw.rst | 81 +++++++++++++----------- drivers/baseband/meson.build | 2 +- drivers/baseband/turbo_sw/Makefile | 13 ++-- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 51 ++++++++++++++- drivers/baseband/turbo_sw/meson.build | 30 +++++++++ meson_options.txt | 2 + mk/rte.app.mk | 3 + 8 files changed, 138 insertions(+), 47 deletions(-) create mode 100644 drivers/baseband/turbo_sw/meson.build
config/common_base +2 -1
@@ -528,6 +528,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y CONFIG_RTE_LIBRTE_BBDEV=y CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y +CONFIG_RTE_BBDEV_SDK_AVX2=n # # Compile PMD for NULL bbdev device
@@ -537,7 +538,7 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y # # Compile PMD for turbo software bbdev device # -CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=n +CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y # # Compile generic crypto device library
doc/guides/bbdevs/turbo_sw.rst +44 -37
142 lines not on this page · raw message
drivers/baseband/meson.build +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> -drivers = ['null'] +drivers = ['null', 'turbo_sw'] config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@'
drivers/baseband/turbo_sw/Makefile +7 -6
@@ -3,9 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk -ifeq ($(FLEXRAN_SDK),) -$(error "Please define FLEXRAN_SDK environment variable") -endif # library name LIB = librte_pmd_bbdev_turbo_sw.a
@@ -21,17 +18,21 @@ LDLIBS += -lrte_bus_vdev # versioning export map EXPORT_MAP := rte_pmd_bbdev_turbo_sw_version.map -# external library dependencies +# external library dependencies if available +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),y) +ifeq ($(FLEXRAN_SDK),) +$(error "Please define FLEXRAN_SDK environment variable") +endif CFLAGS += -I$(FLEXRAN_SDK)/lib_common CFLAGS += -I$(FLEXRAN_SDK)/lib_turbo CFLAGS += -I$(FLEXRAN_SDK)/lib_crc CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_matching - LDLIBS += -L$(FLEXRAN_SDK)/lib_turbo -lturbo LDLIBS += -L$(FLEXRAN_SDK)/lib_crc -lcrc LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon -LDLIBS += -lstdc++ -lirc -limf -lipps +LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml +endif # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +49 -2
145 lines not on this page · raw message
drivers/baseband/turbo_sw/meson.build new file +30 -0
@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +path = get_option('flexran_sdk') + +if dpdk_conf.has('RTE_BBDEV_SDK_AVX2') + lib = cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: false) + if not lib.found() + build = false + else + ext_deps += cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: true) + ext_deps += cc.find_library('libcrc', dirs: [path + '/lib_crc'], required: true) + ext_deps += cc.find_library('librate_matching', dirs: [path + '/lib_rate_matching'], required: true) + ext_deps += cc.find_library('libcommon', dirs: [path + '/lib_common'], required: true) + ext_deps += cc.find_library('libstdc++', required: true) + ext_deps += cc.find_library('libirc', required: true) + ext_deps += cc.find_library('libimf', required: true) + ext_deps += cc.find_library('libipps', required: true) + ext_deps += cc.find_library('libsvml', required: true) + includes += include_directories(path + '/lib_turbo') + includes += include_directories(path + '/lib_crc') + includes += include_directories(path + '/lib_rate_matching') + includes += include_directories(path + '/lib_common') + endif +endif + +deps += ['bbdev', 'bus_vdev', 'ring'] +name = 'bbdev_turbo_sw' +allow_experimental_apis = true +sources = files('bbdev_turbo_software.c')
meson_options.txt +2 -0
@@ -10,6 +10,8 @@ option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules') option('examples', type: 'string', value: '', description: 'Comma-separated list of examples to build by default') +option('flexran_sdk', type: 'string', value: '', + description: 'Path to FlexRAN SDK optional Libraries for BBDEV device') option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared', description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') option('include_subdir_arch', type: 'string', value: '',
mk/rte.app.mk +3 -0
@@ -219,11 +219,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += -lrte_pmd_bbdev_null # TURBO SOFTWARE PMD is dependent on the FLEXRAN library _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lrte_pmd_bbdev_turbo_sw +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),y) +# Dependency on the FLEXRAN SDK library if available _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcrc _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 01/10] baseband/turbo_sw: baseband/turbo_sw: dependency patch
Quoted 11 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 01/10] baseband/turbo_sw: baseband/turbo_sw:
dependency patch
Quoted 8 lines
Not meant for review, purely for dependency for CI. This is a squash of the related serie which is not applied yet:
option to build turbosw PMD without SDK
https://patches.dpdk.org/project/dpdk/list/?series=5093Signed-off-by Nicolas Chautru <[email protected]>---
v5 cover bbdev: adding support in BBDEV for 5GNR FEC
In reply to Nicolas Chautruv5 update: rebase and squashing release note update with related change. v4 update: cosmetic changes reported by ci/checkpatch
This set enables specifically bbdev to support 5GNR operations (previously only LTE specific) and to add the related support to turbo_sw PMD driver, test framework and documentation.
Nicolas Chautru (7):
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++++++++++++-- app/test-bbdev/test_bbdev_vector.c | 519 +++++++- app/test-bbdev/test_bbdev_vector.h | 16 +- app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 353 ++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 684 +++++++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 902 ++++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 745 ++++++++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 745 ++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 48 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 74 ++ app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 255 ++++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1215 +++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 41 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 151 +++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 43 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 70 ++ app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 197 ++++ app/test-bbdev/turbo_enc_default.data | 2 +- config/common_base | 1 + doc/guides/bbdevs/turbo_sw.rst | 42 +- doc/guides/prog_guide/bbdev.rst | 505 +++++++- doc/guides/rel_notes/release_19_08.rst | 17 +- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 103 +- drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 714 +++++++++++- drivers/baseband/turbo_sw/meson.build | 10 + lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 138 ++- lib/librte_bbdev/rte_bbdev_op.h | 585 ++++++++-- mk/rte.app.mk | 8 +- 38 files changed, 9181 insertions(+), 399 deletions(-) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data
Signature · 1 line
1.8.3.1
PATCH v5 1/7 bbdev: renaming non-generic LTE specific structure
Renaming of the enums and structure which were LTE specific to allow for extension and support for 5GNR operations.
--- app/test-bbdev/test_bbdev_vector.c | 4 +- app/test-bbdev/test_bbdev_vector.h | 2 +- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 103 ++++++++++++----------- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 39 +++++---- lib/librte_bbdev/rte_bbdev_op.h | 26 +++--- 5 files changed, 89 insertions(+), 85 deletions(-)
app/test-bbdev/test_bbdev_vector.c +2 -2
@@ -298,9 +298,9 @@ op_data = vector->entries[type].segments; nb_ops = &vector->entries[type].nb_segments; -if (*nb_ops >=RTE_BBDEV_MAX_CODE_BLOCKS ) { +if (*nb_ops >=RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {printf ("Too many segments (code blocks defined): %u, max %d!\n" , - *nb_ops,RTE_BBDEV_MAX_CODE_BLOCKS ); + *nb_ops,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }
app/test-bbdev/test_bbdev_vector.h +1 -1
@@ -46,7 +46,7 @@ struct op_data_buf { };struct op_data_entries { -struct op_data_buf segments[RTE_BBDEV_MAX_CODE_BLOCKS ]; +struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ];unsigned int nb_segments; };
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +52 -51
222 lines not on this page · raw message
drivers/baseband/turbo_sw/bbdev_turbo_software.c +21 -18
@@ -34,9 +34,9 @@ rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_TURBO_MAX_CB_SIZE >> 3) + 1) * 48)#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) -#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_TURBO_MAX_CB_SIZE + 4) * 48)/* private data structure */ struct bbdev_private {
@@ -103,7 +103,7 @@ struct turbo_sw_queue { {int32_t result =0 ; -if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE ) +if (k <RTE_BBDEV_TURBO_MIN_CB_SIZE || k >RTE_BBDEV_TURBO_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -158,9 +158,10 @@ struct turbo_sw_queue {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, + .num_buffers_src = + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -172,8 +173,10 @@ struct turbo_sw_queue {RTE_BBDEV_TURBO_CRC_24A_ATTACH |RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, #endif
@@ -257,7 +260,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * + ((RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) {
@@ -277,7 +280,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_TURBO_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -295,7 +298,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_TURBO_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -313,7 +316,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->code_block =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *sizeof (*q->code_block), +RTE_BBDEV_TURBO_MAX_CB_SIZE *sizeof (*q->code_block),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->code_block ==NULL ) { rte_bbdev_log(ERR,
@@ -439,9 +442,9 @@ struct turbo_sw_queue {return -1 ; } -if (k >RTE_BBDEV_MAX_CB_SIZE ) { +if (k >RTE_BBDEV_TURBO_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,RTE_BBDEV_MAX_CB_SIZE ); + k,RTE_BBDEV_TURBO_MAX_CB_SIZE );return -1 ; }
@@ -466,9 +469,9 @@ struct turbo_sw_queue {return -1 ; } -if (kw >RTE_BBDEV_MAX_KW ) { +if (kw >RTE_BBDEV_TURBO_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,RTE_BBDEV_MAX_KW ); + kw,RTE_BBDEV_TURBO_MAX_KW );return -1 ; }
@@ -773,9 +776,9 @@ struct turbo_sw_queue {/* Clear op status */ op->status =0 ; -if (mbuf_total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +if (mbuf_total_left >RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - mbuf_total_left,RTE_BBDEV_MAX_TB_SIZE ); + mbuf_total_left,RTE_BBDEV_TURBO_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -1074,7 +1077,7 @@ struct turbo_sw_queue {* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_TURBO_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out_head, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev_op.h +13 -13
@@ -26,22 +26,22 @@#include <rte_mempool.h> /* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ -#define RTE_BBDEV_C_SUBBLOCK (32) +#define RTE_BBDEV_TURBO_C_SUBBLOCK (32)/* Maximum size of Transport Block (36.213, Table, Table 7.1.7.2.5-1) */ -#define RTE_BBDEV_MAX_TB_SIZE (391656) +#define RTE_BBDEV_TURBO_MAX_TB_SIZE (391656)/* Maximum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MAX_CB_SIZE (6144) +#define RTE_BBDEV_TURBO_MAX_CB_SIZE (6144)/* Minimum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MIN_CB_SIZE (40) +#define RTE_BBDEV_TURBO_MIN_CB_SIZE (40)/* Maximum size of circular buffer */ -#define RTE_BBDEV_MAX_KW (18528) +#define RTE_BBDEV_TURBO_MAX_KW (18528)/* * Maximum number of Code Blocks in Transport Block. It is calculated based on * maximum size of one Code Block and one Transport Block (considering CRC24A * and CRC24B): * (391656 + 24) / (6144 - 24) = 64 */ -#define RTE_BBDEV_MAX_CODE_BLOCKS (64) +#define RTE_BBDEV_TURBO_MAX_CODE_BLOCKS (64)/** Flags for turbo decoder operation and capability structure */ enum rte_bbdev_op_td_flag_bitmasks {
@@ -133,7 +133,7 @@ struct rte_bbdev_op_data {* multiple CBs contiguously located next to each other. * A Transport Block (TB) represents a whole piece of data that is * divided into one or more CBs. Maximum number of CBs can be contained -* in one TB is defined by RTE_BBDEV_MAX_CODE_BLOCKS. +* in one TB is defined by RTE_BBDEV_TURBO_MAX_CODE_BLOCKS. * * An mbuf data structure cannot represent more than one TB. The * smallest piece of data that can be contained in one mbuf is one CB.
@@ -204,7 +204,7 @@ struct rte_bbdev_op_dec_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -288,7 +288,7 @@ struct rte_bbdev_op_turbo_dec { }; }; -struct rte_bbdev_op_enc_cb_params { +struct rte_bbdev_op_enc_turbo_cb_params {/**< The K size of the input CB, in bits [40:6144], as specified in * 3GPP TS 36.212. * This size is inclusive of CRC24A, regardless whether it was
@@ -305,7 +305,7 @@ struct rte_bbdev_op_enc_cb_params {uint16_t ncb; }; -struct rte_bbdev_op_enc_tb_params { +struct rte_bbdev_op_enc_turbo_tb_params {/**< The K- size of the input CB, in bits [40:6144], that is in the * Turbo operation when r < C-, as in 3GPP TS 36.212. * This size is inclusive of CRC24B, regardless whether it was
@@ -320,7 +320,7 @@ struct rte_bbdev_op_enc_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -375,9 +375,9 @@ struct rte_bbdev_op_turbo_enc {uint8_t code_block_mode;/**< [0 - TB : 1 - CB] */ union {/**< Struct which stores Code Block specific parameters */ -struct rte_bbdev_op_enc_cb_params cb_params; +struct rte_bbdev_op_enc_turbo_cb_params cb_params;/**< Struct which stores Transport Block specific parameters */ -struct rte_bbdev_op_enc_tb_params tb_params; +struct rte_bbdev_op_enc_turbo_tb_params tb_params; }; };
Signature · 1 line
1.8.3.1
PATCH v5 2/7 bbdev: extension of BBDEV API for 5G FEC
In reply to Nicolas ChautruExtension to BBDEV operations to support 5G
on top of existing 4G operations.
--- doc/guides/rel_notes/release_19_08.rst | 4 +- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 138 +++++++- lib/librte_bbdev/rte_bbdev_op.h | 567 ++++++++++++++++++++++++++------- 4 files changed, 608 insertions(+), 123 deletions(-)
doc/guides/rel_notes/release_19_08.rst +3 -1
@@ -126,7 +126,6 @@ New Features Added telemetry mode to l3fwd-power application to report application level busyness, empty and full polls of rte_eth_rx_burst(). - Removed Items -------------
@@ -192,6 +191,9 @@ ABI Changes Disabling unused features would facilitate efficient usage of HW/SW offload. +* bbdev: New operations and parameters added to support new 5GNR operations. + The bbdev ABI is still kept experimental. + Shared Library Versions -----------------------
lib/librte_bbdev/rte_bbdev.c +15 -7
@@ -6,7 +6,6 @@#include <string.h> #include <stdbool.h> -#include <rte_string_fns.h> #include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h>
@@ -215,7 +214,7 @@ struct rte_bbdev * bbdev->data->dev_id = dev_id; bbdev->state =RTE_BBDEV_INITIALIZED ; - ret =strlcpy (bbdev->data->name, name,RTE_BBDEV_NAME_MAX_LEN ); + ret =snprintf (bbdev->data->name,RTE_BBDEV_NAME_MAX_LEN ,"%s" , name);if ((ret <0 ) || (ret >=RTE_BBDEV_NAME_MAX_LEN )) {rte_bbdev_log (ERR ,"Copying device name \"%s\" failed" , name);return NULL ;
@@ -499,7 +498,7 @@ struct rte_bbdev *if (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_ul_queue_priority);return -EINVAL ;
@@ -507,7 +506,7 @@ struct rte_bbdev *if (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && conf->priority > dev_info.max_dl_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_dl_queue_priority);return -EINVAL ;
@@ -796,7 +795,7 @@ struct rte_bbdev *memset (dev_info,0 ,sizeof (*dev_info)); dev_info->dev_name = dev->data->name; dev_info->num_queues = dev->data->num_queues; - dev_info->bus =rte_bus_find_by_device (dev->device); + dev_info->device = dev->device; dev_info->socket_id = dev->data->socket_id; dev_info->started = dev->data->started;
@@ -847,6 +846,12 @@ struct rte_bbdev *case RTE_BBDEV_OP_TURBO_ENC : result =sizeof (struct rte_bbdev_enc_op );break ; +case RTE_BBDEV_OP_LDPC_DEC : + result =sizeof (struct rte_bbdev_dec_op ); +break ; +case RTE_BBDEV_OP_LDPC_ENC : + result =sizeof (struct rte_bbdev_enc_op ); +break ;default :break ; }
@@ -861,11 +866,12 @@ struct rte_bbdev * {enum rte_bbdev_op_type type = *(enum rte_bbdev_op_type *)arg; -if (type ==RTE_BBDEV_OP_TURBO_DEC ) { +if (type ==RTE_BBDEV_OP_TURBO_DEC || type ==RTE_BBDEV_OP_LDPC_DEC ) {struct rte_bbdev_dec_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool; - }else if (type ==RTE_BBDEV_OP_TURBO_ENC ) { + }else if (type ==RTE_BBDEV_OP_TURBO_ENC || + type ==RTE_BBDEV_OP_LDPC_ENC ) {struct rte_bbdev_enc_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool;
@@ -1117,6 +1123,8 @@ struct rte_mempool *"RTE_BBDEV_OP_NONE" ,"RTE_BBDEV_OP_TURBO_DEC" ,"RTE_BBDEV_OP_TURBO_ENC" , +"RTE_BBDEV_OP_LDPC_DEC" , + "RTE_BBDEV_OP_LDPC_ENC", };if (op_type <RTE_BBDEV_OP_TYPE_COUNT )
lib/librte_bbdev/rte_bbdev.h +136 -2
168 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +454 -113
842 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH v5 3/7 docs/guides: updating bbdev API for 5GNR operations
In reply to Nicolas ChautruThe documentation captures the related change in BBDEV API to support 5GNR encode/decode operations.
--- doc/guides/prog_guide/bbdev.rst | 505 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 458 insertions(+), 47 deletions(-)
doc/guides/prog_guide/bbdev.rst +458 -47
@@ -166,9 +166,9 @@ stopped individually. Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor's logical cores and interfaces utilize its local memory. Therefore -baseband operations, the mbuf being operated on should be allocated from memory +The bbdev poll mode device driver library supports NUMA architecture, in which +a processor's logical cores and interfaces utilize it's local memory. Therefore +with baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer descriptors should be populated with mbufs allocated from a mempool allocated
@@ -220,9 +220,9 @@ relation to Turbo Encoding and Decoding operations. 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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -234,8 +234,8 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, RTE_BBDEV_END_OF_CAPABILITIES_LIST()
@@ -266,12 +266,13 @@ information: struct rte_bbdev_info { int socket_id; const char *dev_name; - const struct rte_bus *bus; + const struct rte_device *device; uint16_t num_queues; bool started; struct rte_bbdev_driver_info drv; }; + Operation Processing --------------------
@@ -335,14 +336,20 @@ processed on a particular bbdev device poll mode driver. int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_enc turbo_enc; + union { + struct rte_bbdev_op_turbo_enc turbo_enc; + struct rte_bbdev_op_ldpc_enc ldpc_enc; + } }; struct rte_bbdev_dec_op { int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_dec turbo_dec; + union { + struct rte_bbdev_op_turbo_dec turbo_enc; + struct rte_bbdev_op_ldpc_dec ldpc_enc; + } }; The operation structure by itself defines the operation type. It includes an
@@ -399,19 +406,31 @@ BBDEV Inbound/Outbound Memory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo coding on a referenced mbuf data buffer. It is used for either +performing Turbo and LDPC coding on a referenced mbuf data buffer. It is used for either encode or decode operations. -Turbo Encode operation accepts one input and one output. -Turbo Decode operation accepts one input and two outputs, called *hard-decision* -and *soft-decision* outputs. *Soft-decision* output is optional. + +.. csv-table:: Operation I/O + :header: "FEC", "In", "Out" + :widths: 20, 30, 30 + + "Turbo Encode", "input", "output" + "Turbo Decode", "input", "hard output" + " ", " ", "soft output (optional)" + "LDPC Encode", "input", "output" + "LDPC Decode", "input", "hard output" + "", "HQ combine (optional)", "HQ combine (optional)" + " ", "", "soft output (optional)" + It is expected that the application provides input and output mbuf pointers -allocated and ready to use. The baseband framework supports turbo coding on -Code Blocks (CB) and Transport Blocks (TB). +allocated and ready to use. + +The baseband framework supports FEC coding on Code Blocks (CB) and +Transport Blocks (TB). For the output buffer(s), the application is required to provide an allocated -and free mbuf, so that bbdev write back the resulting output. +and free mbuf, to which the resulting output will be written. The support of split "scattered" buffers is a driver-specific feature, so it is reported individually by the supporting driver as a capability.
@@ -436,26 +455,26 @@ This structure has three elements: This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs contiguously located next to each other. A Transport Block (TB) represents a whole piece of data that is divided into one or more CBs. Maximum number of - CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + CBs can be contained in one TB is defined by + ``RTE_BBDEV_(TURBO/LDPC)MAX_CODE_BLOCKS``. An mbuf data structure cannot represent more than one TB. The smallest piece of data that can be contained in one mbuf is one CB. An mbuf can include one contiguous CB, subset of contiguous CBs that are - belonging to one TB, or all contiguous CBs that are belonging to one TB. + belonging to one TB, or all contiguous CBs that belong to one TB. If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is capable of collecting (gathering) non-contiguous (scattered) data from multiple locations in the memory. This capability is reported by the capability flags: - - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``, - - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``, ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``. - Only if a BBDEV PMD supports this feature, chained mbuf data structures are - accepted. A chained mbuf can represent one non-contiguous CB or multiple - non-contiguous CBs. - The first mbuf segment in the given chained mbuf represents the first piece + Chained mbuf data structures are only accepted if a BBDEV PMD supports this + feature. A chained mbuf can represent one non-contiguous CB or multiple non-contiguous + CBs. The first mbuf segment in the given chained mbuf represents the first piece of the CB. Offset is only applicable to the first segment. ``length`` is the total length of the CB.
@@ -506,14 +525,22 @@ BBDEV Turbo Encode Operation }; }; -The Turbo encode structure is composed of the ``input`` and ``output`` mbuf -data pointers. The provided mbuf pointer of ``input`` needs to be big enough to -stretch for extra CRC trailers. +The Turbo encode structure includes the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big +enough to stretch for extra CRC trailers. -``op_flags`` parameter holds all operation related flags, like whether CRC24A is -included by the application or not. +.. csv-table:: **struct rte_bbdev_op_turbo_enc** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","input CB or TB data" + "output","rate matched CB or TB output buffer" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" -``code_block_mode`` flag identifies the mode in which bbdev is operating in. The encode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is standalone. While
@@ -525,21 +552,21 @@ are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` call belong to one mode, either CB-mode or TB-mode. -In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +In case that the TB is smaller than Z (6144 bits), then effectively the TB = CB. CRC24A is appended to the tail of the CB. The application is responsible for calculating and appending CRC24A before calling BBDEV in case that the underlying driver does not support CRC24A generation. In CB-mode, CRC24A/B is an optional operation. -The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS -36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The CB parameter ``k`` is the size of the CB (this maps to K as described +in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` informs the application with relevant capability. These flags can be set in the -``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB -before going forward with Turbo encoding. +``op_flags`` parameter to indicate to BBDEV to calculate and append CRC24A/B +to CB before going forward with Turbo encoding. Output format of the CB encode will have the encoded CB in ``e`` size output (this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf
@@ -600,13 +627,26 @@ BBDEV Turbo Decode Operation }; }; -The Turbo decode structure is composed of the ``input`` and ``output`` mbuf -data pointers. - -``op_flags`` parameter holds all operation related flags, like whether CRC24B is -retained or not. - -``code_block_mode`` flag identifies the mode in which bbdev is operating in. +The Turbo decode structure includes the ``input``, ``hard_output`` and +optionally the ``soft_output`` mbuf data pointers. + +.. csv-table:: **struct rte_bbdev_op_turbo_dec** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","virtual circular buffer, wk, size 3*Kpi for each CB" + "hard output","hard decisions buffer, decoded output, size K for each CB" + "soft output","soft LLR output buffer (optional)" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "iter_max","maximum number of iterations to perofrm in decode all CBs" + "iter_min","minimum number of iterations to perform in decoding all CBs" + "iter_count","number of iterations to performed in decoding all CBs" + "ext_scale","scale factor on extrinsic info (5 bits)" + "num_maps","number of MAP engines to use in decode" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" Similarly, the decode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is
@@ -618,7 +658,8 @@ to a bigger TB are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` call belong to one mode, either CB-mode or TB-mode. -The input ``k`` is the size of the decoded CB (this maps to K as described in + +The CB parameter ``k`` is the size of the decoded CB (this maps to K as described in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case.
@@ -638,9 +679,9 @@ Soft output is an optional capability for BBDEV PMDs. Setting flag CRC24B at the end of each CB. This might be useful for the application in debug mode. An LLR rate matched output is computed in the ``soft_output`` buffer structure -for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section -5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the -encoded buffer of size ``e``. +for the given CB parameter ``e`` size (this maps to E described in +3GPP TS 36.212 section 5.1.4.1.2). The output mbuf buffer size needs to be big +enough to hold the encoded buffer of size ``e``. The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the number of the remaining CB VCBs is calculated automatically by BBDEV before
@@ -669,6 +710,376 @@ TB-mode. CB-mode is a reduced version, where only one CB exists: Turbo decoding of Code Blocks in mbuf structure +BBDEV LDPC Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC encode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC encode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +| Set to bypass bit-level interleaver on output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_RATE_MATCH | +| Set to enabling the RATE_MATCHING processing | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24A_ATTACH | +| Set to attach transport block CRC-24A | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24B_ATTACH | +| Set to attach code block CRC-24B | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_16_ATTACH | +| Set to attach code block CRC-16 | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_INTERRUPTS | +| Set if a device supports encoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CONCATENATION | +| Set if a device supports concatenation of non byte aligned output | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC encode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + struct rte_bbdev_op_ldpc_enc { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_enc_ldpc_cb_params cb_params; + struct rte_bbdev_op_enc_ldpc_tb_params tb_params; + }; + }; + +The LDPC encode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|output |rate matched CB or TB output buffer | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ ++ +c_ab +number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits, r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the +incoming code block or transport block data. + +The mbuf output ``output`` is mandatory and is the encoded CB(s). In +CB-mode ut contains the encoded CB of size ``e`` (E in 3GPP TS 38.212 +section 6.2.5). In TB-mode it contains multiple contiguous encoded CBs +of size ``ea`` or ``eb``. +The ``output`` buffer is allocated by the application with enough room +for the output data. + +The encode interface works on both a code block (CB) and a transport +block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (attach CRC24B if required) +* CB-mode: one CB making up one TB (attach CRC24A if required) +* TB-mode: one or more CB of a partial TB (attach CRC24B(s) if required) +* TB-mode: one or more CB of a complete TB (attach CRC24AB(s) if required) + +In CB-mode if ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is set then CRC24A +is appended to the CB. If ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is not +set the application is responsible for calculating and appending CRC24A +before calling BBDEV. The input data mbuf ``length`` is inclusive of +CRC24A/B where present and is equal to the code block size ``K``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the +inbound TB data buffer, unless the ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +flag is set when it is the responsibility of BBDEV. The input data +mbuf ``length`` is total size of the CBs inclusive of any CRC24A and +CRC24B in the case they were appended by the application. + +Not all BBDEV PMDs may be capable of CRC24A/B calculation. Flags +``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` and ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` +inform the application of the relevant capability. These flags can be set +in the ``op_flags`` parameter to indicate BBDEV to calculate and append +CRC24A to CB before going forward with LDPC encoding. + +The difference between the partial and full-size TB is that BBDEV needs +the index of the first CB in this group and the number of CBs in the group. +The first CB index is given by ``r`` but the number of the CBs is +calculated by BBDEV before signalling to the driver. + +The number of CBs in the group should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +Figure 13.1 above showing the Turbo encoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC encode. + +BBDEV LDPC Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC decode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC decode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +| Set for transport block CRC-24A checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +| Set for code block CRC-24B checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +| Set to drop the last CRC bits decoding output | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on input stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +| Set for HARQ combined input stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +| Set for HARQ combined output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_BYPASS | +| Set for LDPC decoder bypass | +| | +| RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE must be set | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_SOFT_OUT | +| Set for soft-output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +| Set for Rate-Matching bypass on soft-out stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on soft-output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +| Set for iteration stopping on successful decode condition enable | +| | +| Where a successful decode is a successful syndrome check | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_INTERRUPTS | +| Set if a device supports decoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +| Set if a device supports input/output HARQ compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_LLR_COMPRESSION | +| Set if a device supports input LLR compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | +| Set if a device supports HARQ input to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | +| Set if a device supports HARQ output to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK | +| Set if a device supports loopback access to HARQ internal memory | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC decode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + + struct rte_bbdev_op_ldpc_dec { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data hard_output; + struct rte_bbdev_op_data soft_output; + struct rte_bbdev_op_data harq_combined_input; + struct rte_bbdev_op_data harq_combined_output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t iter_max; + uint8_t iter_count; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_dec_ldpc_cb_params cb_params; + struct rte_bbdev_op_dec_ldpc_tb_params tb_params; + }; + }; + + +The LDPC decode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|hard_output |hard decisions buffer, decoded output | ++----------------+--------------------------------------------------------------------+ +|soft_output |soft LLR output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_input |HARQ combined input buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_output|HARQ combined output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {1,2,4,6,8} from pi/2-BPSK to 256QAM | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|iter_max |maximum number of iterations to perform in decode all CBs | ++----------------+--------------------------------------------------------------------+ +|iter_count |number of iterations performed in decoding all CBs | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ +| |c_ab |number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs +and is the Virtual Circular Buffer data stream with null padding. +Each byte in the input circular buffer is the LLR value of each bit of +the original CB. + +The mbuf output ``hard_output`` is mandatory and is the decoded CBs size +K (CRC24A/B is the last 24-bit in each decoded CB). + +The mbuf output ``soft_output`` is optional and is an LLR rate matched +output of size ``e`` (this is ``E`` as per 3GPP TS 38.212 section 6.2.5). + +The mbuf input ``harq_combine_input`` is optional and is a buffer with +the input to the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The mbuf output ``harq_combine_output`` is optional and is a buffer for +the output of the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The output mbuf data structures are expected to be allocated by the +application with enough room for the output data. + +As with the LDPC encode, the decode interface works on both a code block +(CB) and a transport block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (check CRC24B if required) +* CB-mode: one CB making up one TB (check CRC24A if required) +* TB-mode: one or more CB making up a partial TB (check CRC24B(s) if required) +* TB-mode: one or more CB making up a complete TB (check CRC24B(s) if required) + +The mbuf ``length`` is inclusive of CRC24A/B where present and is equal +the code block size ``K``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +the number of the remaining CB VCBs is calculated automatically by BBDEV +and passed down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +Figure 13.2 above showing the Turbo decoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC decode. + Sample code -----------
Signature · 1 line
1.8.3.1
PATCH v5 4/7 baseband/turbo_sw: extension of turbosw PMD for 5G
In reply to Nicolas ChautruImplementation still based on Intel SDK libraries optimized for AVX512 instructions set and 5GNR. This can be also build for AVX2 for 4G capability or without SDK dependency for maintenance.
--- config/common_base | 1 + doc/guides/rel_notes/release_19_08.rst | 15 +- drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 677 ++++++++++++++++++++++- drivers/baseband/turbo_sw/meson.build | 10 + mk/rte.app.mk | 8 +- 6 files changed, 715 insertions(+), 11 deletions(-)
config/common_base +1 -0
@@ -536,6 +536,7 @@ CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y CONFIG_RTE_BBDEV_SDK_AVX2=n +CONFIG_RTE_BBDEV_SDK_AVX512=n # # Compile PMD for NULL bbdev device
doc/guides/rel_notes/release_19_08.rst +14 -1
@@ -126,6 +126,20 @@ New Features Added telemetry mode to l3fwd-power application to report application level busyness, empty and full polls of rte_eth_rx_burst(). +* **Added a FPGA_LTE_FEC bbdev PMD.** + + Added the new ``fpga_lte_fec`` bbdev driver for the Intel® FPGA PAC + (Programmable Acceleration Card) N3000. See the + :doc:`../bbdevs/fpga_lte_fec` BBDEV guide for more details on this new driver. + +* **Updated TURBO_SW bbdev PMD.** + + Updated the ``turbo_sw`` bbdev driver with changes including: + + * Added option to build the driver with or without dependency of external + SDK libraries. + * Added support for 5GNR encode/decode operations. + Removed Items -------------
@@ -165,7 +179,6 @@ API Changes structure (``rte_crypto_cipher_xform``, ``rte_crypto_auth_xform``, and ``rte_crypto_aead_xform``) have been changed to ``const uint8_t *data``. - ABI Changes -----------
drivers/baseband/turbo_sw/Makefile +14 -1
@@ -3,7 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk - # library name LIB = librte_pmd_bbdev_turbo_sw.a
@@ -34,6 +33,20 @@ LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml endif +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),n) +$(error "CONFIG_RTE_BBDEV_SDK_AVX512 requires CONFIG_RTE_BBDEV_SDK_AVX2 set") +endif +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_dematching_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif + # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +669 -8
866 lines not on this page · raw message
drivers/baseband/turbo_sw/meson.build +10 -0
@@ -23,6 +23,16 @@ if dpdk_conf.has('RTE_BBDEV_SDK_AVX2') includes += include_directories(path + '/lib_common') endif endif +if dpdk_conf.has('RTE_BBDEV_SDK_AVX512') + ext_deps += cc.find_library('libldpc_encoder_5gnr', dirs: [path + '/lib_ldpc_encoder_5gnr'], required: true) + ext_deps += cc.find_library('libldpc_decoder_5gnr', dirs: [path + '/lib_ldpc_decoder_5gnr'], required: true) + ext_deps += cc.find_library('libLDPC_ratematch_5gnr', dirs: [path + '/lib_LDPC_ratematch_5gnr'], required: true) + ext_deps += cc.find_library('librate_dematching_5gnr', dirs: [path + '/lib_rate_dematching_5gnr'], required: true) + includes += include_directories(path + '/lib_ldpc_encoder_5gnr') + includes += include_directories(path + '/lib_ldpc_decoder_5gnr') + includes += include_directories(path + '/lib_LDPC_ratematch_5gnr') + includes += include_directories(path + '/lib_rate_dematching_5gnr') +endif deps += ['bbdev', 'bus_vdev', 'ring'] name = 'bbdev_turbo_sw'
mk/rte.app.mk +7 -1
@@ -232,7 +232,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcr _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps -lsvml +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif # CONFIG_RTE_BBDEV_SDK_AVX512 endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV
Signature · 1 line
1.8.3.1
PATCH v5 5/7 docs/guides: updating building steps for BBDEV PMD
In reply to Nicolas ChautruThis now includes steps to build with either
libraries for AVX2, or AVX512 or no dependency.
--- doc/guides/bbdevs/turbo_sw.rst | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-)
doc/guides/bbdevs/turbo_sw.rst +29 -13
@@ -5,20 +5,21 @@ SW Turbo Poll Mode Driver ========================= The SW Turbo PMD (**baseband_turbo_sw**) provides a software only poll mode bbdev -driver that can optionally utilize Intel optimized libraries for LTE Layer 1 -workloads acceleration. +driver that can optionally utilize Intel optimized libraries for LTE and 5GNR +Layer 1 workloads acceleration. Note that the driver can also be built without any dependency with reduced functionality for maintenance purpose. To enable linking to the SDK libraries see detailed installation section below. -One flag can be enabled depending on whether the target machine can support -AVX2 instructions sets and the related SDK libraries for vectorized +Two flags can be enabled depending on whether the target machine can support +AVX2 and AVX512 instructions sets and the related SDK libraries for vectorized signal processing functions are installed : - CONFIG_RTE_BBDEV_SDK_AVX2 - -By default this flag is disabled. For AVX2 machine and SDK -library installed then this flag can be enabled. +- CONFIG_RTE_BBDEV_SDK_AVX512 +By default these 2 flags are disabled by default. For AVX2 machine and SDK +library installed then the first flag can be enabled. For AVX512 machine and +SDK library installed then both flags can be enabled for full real time capability. This PMD supports the functions: FEC, Rate Matching and CRC functions detailed in the Features section.
@@ -45,11 +46,25 @@ For the LTE decode operation: * ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` * ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` +For the 5G NR LDPC encode operation: + +* ``RTE_BBDEV_LDPC_RATE_MATCH`` +* ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +* ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` + +For the 5G NR LDPC decode operation: + +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE`` +* ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE`` Limitations ----------- -* In-place operations for Turbo encode and decode are not supported +* In-place operations for encode and decode are not supported Installation ------------
@@ -60,7 +75,7 @@ FlexRAN SDK Download As an option it is possible to link this driver with FleXRAN SDK libraries which can enable real time signal processing using AVX instructions. -These libraries are available through this link `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. +These libraries are available through this `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. After download is complete, the user needs to unpack and compile on their system before building DPDK.
@@ -115,14 +130,13 @@ The following instructions should be followed in this exact order: .. code-block:: console - cd build-avx2-icc/ + cd build-avx512-icc/ make && make install - Initialization -------------- -In order to enable this virtual bbdev PMD, the user must: +In order to enable this virtual bbdev PMD, the user may: * Build the ``FLEXRAN SDK`` libraries (explained in Installation section).
@@ -137,9 +151,11 @@ Example: export FLEXRAN_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/install export DIR_WIRELESS_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/ -* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` +* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` and ``CONFIG_RTE_BBDEV_SDK_AVX512=y`` in DPDK common configuration file ``config/common_base`` to be able to use the SDK libraries as mentioned above. + For AVX2 machine it is possible to only enable CONFIG_RTE_BBDEV_SDK_AVX2 + for limited 4G functionality. If no flag are set the PMD driver will still build but its capabilities will be limited accordingly.
Signature · 1 line
1.8.3.1
PATCH v5 6/7 test-bbdev: update of bbdev test-app for 5GNR
In reply to Nicolas ChautruExtending test framework for FEC 5GNR operations
for UT verification and profiling.
--- app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++++++++++++++++++++++++--- app/test-bbdev/test_bbdev_vector.c | 515 +++++++++++++- app/test-bbdev/test_bbdev_vector.h | 14 +- app/test-bbdev/turbo_enc_default.data | 2 +- 9 files changed, 1714 insertions(+), 126 deletions(-)
app/test-bbdev/main.c +30 -18
@@ -16,11 +16,13 @@#include "main.h" +/* Defines how many testcases can be specified as cmdline args */ #define MAX_CMDLINE_TESTCASES 8static const char tc_sep =',' ; +/* Declare structure for command line test parameters and options */ static struct test_params { struct test_command *test_to_run[MAX_CMDLINE_TESTCASES]; unsigned int num_tests;
@@ -28,6 +30,7 @@unsigned int burst_sz;unsigned int num_lcores;char test_vector_filename[PATH_MAX ]; +bool init_device; } test_params; static struct test_commands_list commands_list =
@@ -46,9 +49,8 @@unsigned int total =0 , skipped =0 , succeeded =0 , failed =0 ;uint64_t start, end; -printf ( -"\n + ------------------------------------------------------- +\n" ); -printf (" + Starting Test Suite : %s\n" , suite->suite_name); +printf ("\n===========================================================\n" ); +printf ("Starting Test Suite : %s\n" , suite->suite_name); start =rte_rdtsc_precise ();
@@ -57,15 +59,13 @@if (test_result ==TEST_FAILED ) {printf (" + Test suite setup %s failed!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 1 ; }if (test_result ==TEST_SKIPPED ) {printf (" + Test suite setup %s skipped!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 0 ; } }
@@ -82,15 +82,15 @@if (test_result ==TEST_SUCCESS ) { succeeded++; -printf (" + TestCase [%2d] : %s passed\n" , total, +printf ("TestCase [%2d] : %s passed\n" , total, suite->unit_test_cases[total].name); }else if (test_result ==TEST_SKIPPED ) { skipped++; -printf (" + TestCase [%2d] : %s skipped\n" , total, +printf ("TestCase [%2d] : %s skipped\n" , total, suite->unit_test_cases[total].name); }else { failed++; -printf (" + TestCase [%2d] : %s failed\n" , total, +printf ("TestCase [%2d] : %s failed\n" , total, suite->unit_test_cases[total].name); }
@@ -103,7 +103,7 @@ end =rte_rdtsc_precise (); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );printf (" + Test Suite Summary : %s\n" , suite->suite_name);printf (" + Tests Total : %2d\n" , total);printf (" + Tests Skipped : %2d\n" , skipped);
@@ -111,7 +111,7 @@printf (" + Tests Failed : %2d\n" , failed);printf (" + Tests Lasted : %lg ms\n" , ((end - start) *1000 ) / (double )rte_get_tsc_hz ()); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );return (failed >0 ) ?1 :0 ; }
@@ -140,12 +140,18 @@return test_params.num_lcores; } +bool +get_init_device (void ) +{ +return test_params.init_device; +} +static void print_usage (const char *prog_name) {struct test_command *t; - printf("Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" + printf("***Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" "\t[-b/--burst-size BURST_SIZE]\n" "\t[-v/--test-vector VECTOR_FILE]\n" "\t[-c/--test-cases TEST_CASE[,TEST_CASE,...]]]\n",
@@ -174,11 +180,12 @@ { "test-cases", 1, 0, 'c' }, { "test-vector", 1, 0, 'v' }, { "lcores", 1, 0, 'l' }, + { "init-device", 0, 0, 'i'}, { "help", 0, 0, 'h' }, { NULL, 0, 0, 0 } }; -while ((opt =getopt_long (argc, argv,"hn:b:c:v:l:" , lgopts, +while ((opt =getopt_long (argc, argv,"hin:b:c:v:l:" , lgopts, &option_index)) !=EOF )switch (opt) {case 'n' :
@@ -226,8 +233,9 @@TEST_ASSERT (strlen (optarg) >0 ,"Config file name is null" ); -strlcpy (tp->test_vector_filename, optarg, -sizeof (tp->test_vector_filename)); +snprintf (tp->test_vector_filename, +sizeof (tp->test_vector_filename), +"%s" , optarg);break ;case 'l' : TEST_ASSERT(strlen(optarg) > 0,
@@ -237,6 +245,10 @@"Num of lcores mustn't be greater than %u" , RTE_MAX_LCORE);break ; +case 'i' : +/* indicate fpga fec config required */ + tp->init_device = true; +break ;case 'h' :print_usage (argv[0 ]);return 0 ;
@@ -279,7 +291,7 @@struct test_command *t;TAILQ_FOREACH (t, &commands_list, next) - ret |= t->callback(); + ret |= (int) t->callback();return ret; }
@@ -291,7 +303,7 @@unsigned int i;for (i =0 ; i < tp->num_tests; ++i) - ret |= tp->test_to_run[i]->callback (); + ret |= (int ) tp->test_to_run[i]->callback ();return ret; }
app/test-bbdev/main.h +5 -1
@@ -20,6 +20,7 @@#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U +#define TEST_ASSERT (cond, msg, ...) do { \ if (!(cond)) { \ printf("TestCase %s() line %d failed: " \
@@ -103,7 +104,8 @@ struct test_command { .command = RTE_STR(name), \ .callback = test_func_##name, \ }; \ - RTE_INIT(test_register_##name) \ + static void __attribute__((constructor, used)) \ + test_register_##name(void) \ { \ add_test_command(&test_struct_##name); \ }
@@ -116,4 +118,6 @@ struct test_command {unsigned int get_num_lcores (void ); +bool get_init_device (void ); +#endif
app/test-bbdev/meson.build +3 -0
@@ -7,3 +7,6 @@ sources = files('main.c', 'test_bbdev_vector.c') allow_experimental_apis = true deps += ['bbdev', 'bus_vdev'] +if dpdk_conf.has('RTE_LIBRTE_PMD_FPGA_LTE_FEC') + deps += ['bbdev_fpga_lte_fec'] +endif
app/test-bbdev/test-bbdev.py +7 -0
@@ -59,6 +59,9 @@ def kill(process): type=int, help="Number of lcores to run.", default=16) +parser.add_argument("-i", "--init-device", + action='store_true', + help="Initialise PF device with default values.") args = parser.parse_args()
@@ -82,6 +85,10 @@ def kill(process): params.extend(["-c"]) params.extend([",".join(args.test_cases)]) +if args.init_device: + params.extend(["-i"]) + + exit_status = 0 for vector in args.test_vector: for burst_size in args.burst_size:
app/test-bbdev/test_bbdev.c +5 -7
@@ -14,8 +14,6 @@#include <rte_bbdev.h> #include <rte_bbdev_op.h> #include <rte_bbdev_pmd.h> -#include <string.h> -#include <rte_string_fns.h> #include "main.h"
@@ -770,7 +768,7 @@ struct bbdev_testsuite_params { {struct rte_bbdev *dev1, *dev2;const char *name ="dev_name" ; -char name_tmp[16 ]; +char name_tmp[32 ];int num_devs, num_devs_tmp; dev1 =rte_bbdev_allocate (NULL );
@@ -790,14 +788,14 @@ struct bbdev_testsuite_params {/* Initialize the maximum amount of devices */ do { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp);TEST_ASSERT (dev2 !=NULL ,"Failed to initialize bbdev driver" ); ++num_devs; }while (num_devs < (RTE_BBDEV_MAX_DEVS -1 )); -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp); TEST_ASSERT(dev2 == NULL, "Failed to initialize bbdev driver number %d " "more drivers than RTE_BBDEV_MAX_DEVS: %d ", num_devs,
@@ -806,7 +804,7 @@ struct bbdev_testsuite_params { num_devs--;while (num_devs >= num_devs_tmp) { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_get_named_dev (name_tmp); TEST_ASSERT_SUCCESS(rte_bbdev_release(dev2), "Failed to uninitialize bbdev driver %s ",
@@ -827,7 +825,7 @@ struct bbdev_testsuite_params {TEST_ASSERT_FAIL (rte_bbdev_release (NULL ),"Failed to uninitialize bbdev driver with NULL bbdev" ); -strlcpy (name_tmp,"invalid_name" ,sizeof (name_tmp)); +sprintf (name_tmp,"%s" ,"invalid_name" ); dev2 =rte_bbdev_get_named_dev (name_tmp);TEST_ASSERT_FAIL (rte_bbdev_release (dev2),"Failed to uninitialize bbdev driver with invalid name" );
app/test-bbdev/test_bbdev_perf.c +1149 -84
1,649 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.c +503 -12
653 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.h +11 -3
@@ -28,15 +28,21 @@ enum {TEST_BBDEV_VF_NCB_NEG = (1ULL <<16 ),TEST_BBDEV_VF_NCB_POS = (1ULL <<17 ),TEST_BBDEV_VF_R = (1ULL <<18 ), -TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<19 ), -TEST_BBDEV_VF_OP_FLAGS = (1ULL <<20 ), - TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 21), +TEST_BBDEV_VF_BG = (1ULL <<19 ), +TEST_BBDEV_VF_ZC = (1ULL <<20 ), +TEST_BBDEV_VF_F = (1ULL <<21 ), +TEST_BBDEV_VF_QM = (1ULL <<22 ), +TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<23 ), +TEST_BBDEV_VF_OP_FLAGS = (1ULL <<24 ), + TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25), };enum op_data_type {DATA_INPUT =0 ,DATA_SOFT_OUTPUT ,DATA_HARD_OUTPUT , +DATA_HARQ_INPUT , +DATA_HARQ_OUTPUT ,DATA_NUM_TYPES , };
@@ -57,6 +63,8 @@ struct test_bbdev_vector {union {struct rte_bbdev_op_turbo_dec turbo_dec;struct rte_bbdev_op_turbo_enc turbo_enc; +struct rte_bbdev_op_ldpc_dec ldpc_dec; +struct rte_bbdev_op_ldpc_enc ldpc_enc; };/* Additional storage for op data entries */ struct op_data_entries entries[DATA_NUM_TYPES ];
app/test-bbdev/turbo_enc_default.data +1 -1
@@ -1 +1 @@ -test_vectors/turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data +test_vectors/turbo_enc_c1_k6144_r0_e18444.data
Signature · 1 line
1.8.3.1
PATCH v5 7/7 test-bbdev: test vectors for 5GNR verification
In reply to Nicolas ChautruAdding LDPC vectors for UT verification, coverage, and profiling for 5GNR encode/decode operations.
--- app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 353 ++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 684 +++++++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 902 +++++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 745 ++++++++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 745 ++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 48 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 74 ++ app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 255 ++++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1215 ++++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 41 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 151 +++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 43 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 70 ++ app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 197 ++++ 17 files changed, 5574 insertions(+) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data
app/test-bbdev/ldpc_dec_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/ldpc_dec_v2342.data
app/test-bbdev/ldpc_enc_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data new file +353 -0
353 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data new file +684 -0
684 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data new file +902 -0
902 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v11835.data new file +49 -0
49 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342.data new file +745 -0
745 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data new file +745 -0
263 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v7813.data new file +48 -0
48 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8480.data new file +74 -0
74 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8568.data new file +255 -0
255 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v9503.data new file +1215 -0
1,215 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v11835.data new file +41 -0
41 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v2342.data new file +151 -0
151 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v7813.data new file +43 -0
43 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v8568.data new file +70 -0
70 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v9503.data new file +197 -0
197 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
v6 cover bbdev: adding support in BBDEV for 5GNR FEC
In reply to Nicolas Chautruv6 update: minor fix for compilation issue reported on CI
v5 update: rebase and squashing release note update with related change. v4 update: cosmetic changes reported by ci/checkpatch
This set enables specifically bbdev to support 5GNR operations (previously only LTE specific) and to add the related support to turbo_sw PMD driver, test framework and documentation.
Nicolas Chautru (7):
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++++++++++++-- app/test-bbdev/test_bbdev_vector.c | 513 +++++++- app/test-bbdev/test_bbdev_vector.h | 16 +- app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 353 ++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 684 +++++++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 902 ++++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 745 ++++++++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 745 ++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 48 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 74 ++ app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 255 ++++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1215 +++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 41 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 151 +++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 43 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 70 ++ app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 197 ++++ app/test-bbdev/turbo_enc_default.data | 2 +- config/common_base | 1 + doc/guides/bbdevs/turbo_sw.rst | 42 +- doc/guides/prog_guide/bbdev.rst | 505 +++++++- doc/guides/rel_notes/release_19_08.rst | 17 +- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 103 +- drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 714 +++++++++++- drivers/baseband/turbo_sw/meson.build | 10 + lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 138 ++- lib/librte_bbdev/rte_bbdev_op.h | 585 ++++++++-- mk/rte.app.mk | 8 +- 38 files changed, 9178 insertions(+), 396 deletions(-) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data
Signature · 1 line
1.8.3.1
PATCH v6 1/7 bbdev: renaming non-generic LTE specific structure
Renaming of the enums and structure which were LTE specific to allow for extension and support for 5GNR operations.
--- app/test-bbdev/test_bbdev_vector.c | 4 +- app/test-bbdev/test_bbdev_vector.h | 2 +- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 103 ++++++++++++----------- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 39 +++++---- lib/librte_bbdev/rte_bbdev_op.h | 26 +++--- 5 files changed, 89 insertions(+), 85 deletions(-)
app/test-bbdev/test_bbdev_vector.c +2 -2
@@ -298,9 +298,9 @@ op_data = vector->entries[type].segments; nb_ops = &vector->entries[type].nb_segments; -if (*nb_ops >=RTE_BBDEV_MAX_CODE_BLOCKS ) { +if (*nb_ops >=RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {printf ("Too many segments (code blocks defined): %u, max %d!\n" , - *nb_ops,RTE_BBDEV_MAX_CODE_BLOCKS ); + *nb_ops,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }
app/test-bbdev/test_bbdev_vector.h +1 -1
@@ -46,7 +46,7 @@ struct op_data_buf { };struct op_data_entries { -struct op_data_buf segments[RTE_BBDEV_MAX_CODE_BLOCKS ]; +struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ];unsigned int nb_segments; };
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +52 -51
222 lines not on this page · raw message
drivers/baseband/turbo_sw/bbdev_turbo_software.c +21 -18
@@ -34,9 +34,9 @@ rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_TURBO_MAX_CB_SIZE >> 3) + 1) * 48)#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) -#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_TURBO_MAX_CB_SIZE + 4) * 48)/* private data structure */ struct bbdev_private {
@@ -103,7 +103,7 @@ struct turbo_sw_queue { {int32_t result =0 ; -if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE ) +if (k <RTE_BBDEV_TURBO_MIN_CB_SIZE || k >RTE_BBDEV_TURBO_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -158,9 +158,10 @@ struct turbo_sw_queue {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, + .num_buffers_src = + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -172,8 +173,10 @@ struct turbo_sw_queue {RTE_BBDEV_TURBO_CRC_24A_ATTACH |RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, #endif
@@ -257,7 +260,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * + ((RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) {
@@ -277,7 +280,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_TURBO_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -295,7 +298,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_TURBO_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -313,7 +316,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->code_block =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *sizeof (*q->code_block), +RTE_BBDEV_TURBO_MAX_CB_SIZE *sizeof (*q->code_block),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->code_block ==NULL ) { rte_bbdev_log(ERR,
@@ -439,9 +442,9 @@ struct turbo_sw_queue {return -1 ; } -if (k >RTE_BBDEV_MAX_CB_SIZE ) { +if (k >RTE_BBDEV_TURBO_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,RTE_BBDEV_MAX_CB_SIZE ); + k,RTE_BBDEV_TURBO_MAX_CB_SIZE );return -1 ; }
@@ -466,9 +469,9 @@ struct turbo_sw_queue {return -1 ; } -if (kw >RTE_BBDEV_MAX_KW ) { +if (kw >RTE_BBDEV_TURBO_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,RTE_BBDEV_MAX_KW ); + kw,RTE_BBDEV_TURBO_MAX_KW );return -1 ; }
@@ -773,9 +776,9 @@ struct turbo_sw_queue {/* Clear op status */ op->status =0 ; -if (mbuf_total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +if (mbuf_total_left >RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - mbuf_total_left,RTE_BBDEV_MAX_TB_SIZE ); + mbuf_total_left,RTE_BBDEV_TURBO_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -1074,7 +1077,7 @@ struct turbo_sw_queue {* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_TURBO_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out_head, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev_op.h +13 -13
@@ -26,22 +26,22 @@#include <rte_mempool.h> /* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ -#define RTE_BBDEV_C_SUBBLOCK (32) +#define RTE_BBDEV_TURBO_C_SUBBLOCK (32)/* Maximum size of Transport Block (36.213, Table, Table 7.1.7.2.5-1) */ -#define RTE_BBDEV_MAX_TB_SIZE (391656) +#define RTE_BBDEV_TURBO_MAX_TB_SIZE (391656)/* Maximum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MAX_CB_SIZE (6144) +#define RTE_BBDEV_TURBO_MAX_CB_SIZE (6144)/* Minimum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MIN_CB_SIZE (40) +#define RTE_BBDEV_TURBO_MIN_CB_SIZE (40)/* Maximum size of circular buffer */ -#define RTE_BBDEV_MAX_KW (18528) +#define RTE_BBDEV_TURBO_MAX_KW (18528)/* * Maximum number of Code Blocks in Transport Block. It is calculated based on * maximum size of one Code Block and one Transport Block (considering CRC24A * and CRC24B): * (391656 + 24) / (6144 - 24) = 64 */ -#define RTE_BBDEV_MAX_CODE_BLOCKS (64) +#define RTE_BBDEV_TURBO_MAX_CODE_BLOCKS (64)/** Flags for turbo decoder operation and capability structure */ enum rte_bbdev_op_td_flag_bitmasks {
@@ -133,7 +133,7 @@ struct rte_bbdev_op_data {* multiple CBs contiguously located next to each other. * A Transport Block (TB) represents a whole piece of data that is * divided into one or more CBs. Maximum number of CBs can be contained -* in one TB is defined by RTE_BBDEV_MAX_CODE_BLOCKS. +* in one TB is defined by RTE_BBDEV_TURBO_MAX_CODE_BLOCKS. * * An mbuf data structure cannot represent more than one TB. The * smallest piece of data that can be contained in one mbuf is one CB.
@@ -204,7 +204,7 @@ struct rte_bbdev_op_dec_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -288,7 +288,7 @@ struct rte_bbdev_op_turbo_dec { }; }; -struct rte_bbdev_op_enc_cb_params { +struct rte_bbdev_op_enc_turbo_cb_params {/**< The K size of the input CB, in bits [40:6144], as specified in * 3GPP TS 36.212. * This size is inclusive of CRC24A, regardless whether it was
@@ -305,7 +305,7 @@ struct rte_bbdev_op_enc_cb_params {uint16_t ncb; }; -struct rte_bbdev_op_enc_tb_params { +struct rte_bbdev_op_enc_turbo_tb_params {/**< The K- size of the input CB, in bits [40:6144], that is in the * Turbo operation when r < C-, as in 3GPP TS 36.212. * This size is inclusive of CRC24B, regardless whether it was
@@ -320,7 +320,7 @@ struct rte_bbdev_op_enc_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -375,9 +375,9 @@ struct rte_bbdev_op_turbo_enc {uint8_t code_block_mode;/**< [0 - TB : 1 - CB] */ union {/**< Struct which stores Code Block specific parameters */ -struct rte_bbdev_op_enc_cb_params cb_params; +struct rte_bbdev_op_enc_turbo_cb_params cb_params;/**< Struct which stores Transport Block specific parameters */ -struct rte_bbdev_op_enc_tb_params tb_params; +struct rte_bbdev_op_enc_turbo_tb_params tb_params; }; };
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v6 1/7] bbdev: renaming non-generic LTE specific structure
03/07/2019 17:24, Nicolas Chautru:
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c struct __rte_cache_aligned fpga_queue { · line 1660
Quoted 10 lines
Renaming of the enums and structure which were LTE specific to allow for extension and support for 5GNR operations.
Signed-off-by Nicolas Chautru <[email protected]>Acked-by Amr Mokhtar <[email protected]>---
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +2
-2-struct rte_bbdev_op_dec_cb_params *cb =NULL ; -struct rte_bbdev_op_dec_tb_params *tb =NULL ; +struct rte_bbdev_op_dec_turbo_cb_params *cb =NULL ; +struct rte_bbdev_op_dec_turbo_tb_params *tb =NULL ;
These structs are renamed only in the next patch.
I will fix.
PATCH v6 2/7 bbdev: extension of BBDEV API for 5G FEC
In reply to Nicolas ChautruExtension to BBDEV operations to support 5G
on top of existing 4G operations.
--- doc/guides/rel_notes/release_19_08.rst | 4 +- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 138 +++++++- lib/librte_bbdev/rte_bbdev_op.h | 567 ++++++++++++++++++++++++++------- 4 files changed, 608 insertions(+), 123 deletions(-)
doc/guides/rel_notes/release_19_08.rst +3 -1
@@ -126,7 +126,6 @@ New Features Added telemetry mode to l3fwd-power application to report application level busyness, empty and full polls of rte_eth_rx_burst(). - Removed Items -------------
@@ -192,6 +191,9 @@ ABI Changes Disabling unused features would facilitate efficient usage of HW/SW offload. +* bbdev: New operations and parameters added to support new 5GNR operations. + The bbdev ABI is still kept experimental. + Shared Library Versions -----------------------
lib/librte_bbdev/rte_bbdev.c +15 -7
@@ -6,7 +6,6 @@#include <string.h> #include <stdbool.h> -#include <rte_string_fns.h> #include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h>
@@ -215,7 +214,7 @@ struct rte_bbdev * bbdev->data->dev_id = dev_id; bbdev->state =RTE_BBDEV_INITIALIZED ; - ret =strlcpy (bbdev->data->name, name,RTE_BBDEV_NAME_MAX_LEN ); + ret =snprintf (bbdev->data->name,RTE_BBDEV_NAME_MAX_LEN ,"%s" , name);if ((ret <0 ) || (ret >=RTE_BBDEV_NAME_MAX_LEN )) {rte_bbdev_log (ERR ,"Copying device name \"%s\" failed" , name);return NULL ;
@@ -499,7 +498,7 @@ struct rte_bbdev *if (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_ul_queue_priority);return -EINVAL ;
@@ -507,7 +506,7 @@ struct rte_bbdev *if (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && conf->priority > dev_info.max_dl_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_dl_queue_priority);return -EINVAL ;
@@ -796,7 +795,7 @@ struct rte_bbdev *memset (dev_info,0 ,sizeof (*dev_info)); dev_info->dev_name = dev->data->name; dev_info->num_queues = dev->data->num_queues; - dev_info->bus =rte_bus_find_by_device (dev->device); + dev_info->device = dev->device; dev_info->socket_id = dev->data->socket_id; dev_info->started = dev->data->started;
@@ -847,6 +846,12 @@ struct rte_bbdev *case RTE_BBDEV_OP_TURBO_ENC : result =sizeof (struct rte_bbdev_enc_op );break ; +case RTE_BBDEV_OP_LDPC_DEC : + result =sizeof (struct rte_bbdev_dec_op ); +break ; +case RTE_BBDEV_OP_LDPC_ENC : + result =sizeof (struct rte_bbdev_enc_op ); +break ;default :break ; }
@@ -861,11 +866,12 @@ struct rte_bbdev * {enum rte_bbdev_op_type type = *(enum rte_bbdev_op_type *)arg; -if (type ==RTE_BBDEV_OP_TURBO_DEC ) { +if (type ==RTE_BBDEV_OP_TURBO_DEC || type ==RTE_BBDEV_OP_LDPC_DEC ) {struct rte_bbdev_dec_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool; - }else if (type ==RTE_BBDEV_OP_TURBO_ENC ) { + }else if (type ==RTE_BBDEV_OP_TURBO_ENC || + type ==RTE_BBDEV_OP_LDPC_ENC ) {struct rte_bbdev_enc_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool;
@@ -1117,6 +1123,8 @@ struct rte_mempool *"RTE_BBDEV_OP_NONE" ,"RTE_BBDEV_OP_TURBO_DEC" ,"RTE_BBDEV_OP_TURBO_ENC" , +"RTE_BBDEV_OP_LDPC_DEC" , + "RTE_BBDEV_OP_LDPC_ENC", };if (op_type <RTE_BBDEV_OP_TYPE_COUNT )
lib/librte_bbdev/rte_bbdev.h +136 -2
168 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +454 -113
842 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH v6 3/7 docs/guides: updating bbdev API for 5GNR operations
In reply to Nicolas ChautruThe documentation captures the related change in BBDEV API to support 5GNR encode/decode operations.
--- doc/guides/prog_guide/bbdev.rst | 505 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 458 insertions(+), 47 deletions(-)
doc/guides/prog_guide/bbdev.rst +458 -47
@@ -166,9 +166,9 @@ stopped individually. Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor's logical cores and interfaces utilize its local memory. Therefore -baseband operations, the mbuf being operated on should be allocated from memory +The bbdev poll mode device driver library supports NUMA architecture, in which +a processor's logical cores and interfaces utilize it's local memory. Therefore +with baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer descriptors should be populated with mbufs allocated from a mempool allocated
@@ -220,9 +220,9 @@ relation to Turbo Encoding and Decoding operations. 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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -234,8 +234,8 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, RTE_BBDEV_END_OF_CAPABILITIES_LIST()
@@ -266,12 +266,13 @@ information: struct rte_bbdev_info { int socket_id; const char *dev_name; - const struct rte_bus *bus; + const struct rte_device *device; uint16_t num_queues; bool started; struct rte_bbdev_driver_info drv; }; + Operation Processing --------------------
@@ -335,14 +336,20 @@ processed on a particular bbdev device poll mode driver. int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_enc turbo_enc; + union { + struct rte_bbdev_op_turbo_enc turbo_enc; + struct rte_bbdev_op_ldpc_enc ldpc_enc; + } }; struct rte_bbdev_dec_op { int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_dec turbo_dec; + union { + struct rte_bbdev_op_turbo_dec turbo_enc; + struct rte_bbdev_op_ldpc_dec ldpc_enc; + } }; The operation structure by itself defines the operation type. It includes an
@@ -399,19 +406,31 @@ BBDEV Inbound/Outbound Memory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo coding on a referenced mbuf data buffer. It is used for either +performing Turbo and LDPC coding on a referenced mbuf data buffer. It is used for either encode or decode operations. -Turbo Encode operation accepts one input and one output. -Turbo Decode operation accepts one input and two outputs, called *hard-decision* -and *soft-decision* outputs. *Soft-decision* output is optional. + +.. csv-table:: Operation I/O + :header: "FEC", "In", "Out" + :widths: 20, 30, 30 + + "Turbo Encode", "input", "output" + "Turbo Decode", "input", "hard output" + " ", " ", "soft output (optional)" + "LDPC Encode", "input", "output" + "LDPC Decode", "input", "hard output" + "", "HQ combine (optional)", "HQ combine (optional)" + " ", "", "soft output (optional)" + It is expected that the application provides input and output mbuf pointers -allocated and ready to use. The baseband framework supports turbo coding on -Code Blocks (CB) and Transport Blocks (TB). +allocated and ready to use. + +The baseband framework supports FEC coding on Code Blocks (CB) and +Transport Blocks (TB). For the output buffer(s), the application is required to provide an allocated -and free mbuf, so that bbdev write back the resulting output. +and free mbuf, to which the resulting output will be written. The support of split "scattered" buffers is a driver-specific feature, so it is reported individually by the supporting driver as a capability.
@@ -436,26 +455,26 @@ This structure has three elements: This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs contiguously located next to each other. A Transport Block (TB) represents a whole piece of data that is divided into one or more CBs. Maximum number of - CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + CBs can be contained in one TB is defined by + ``RTE_BBDEV_(TURBO/LDPC)MAX_CODE_BLOCKS``. An mbuf data structure cannot represent more than one TB. The smallest piece of data that can be contained in one mbuf is one CB. An mbuf can include one contiguous CB, subset of contiguous CBs that are - belonging to one TB, or all contiguous CBs that are belonging to one TB. + belonging to one TB, or all contiguous CBs that belong to one TB. If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is capable of collecting (gathering) non-contiguous (scattered) data from multiple locations in the memory. This capability is reported by the capability flags: - - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``, - - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``, ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``. - Only if a BBDEV PMD supports this feature, chained mbuf data structures are - accepted. A chained mbuf can represent one non-contiguous CB or multiple - non-contiguous CBs. - The first mbuf segment in the given chained mbuf represents the first piece + Chained mbuf data structures are only accepted if a BBDEV PMD supports this + feature. A chained mbuf can represent one non-contiguous CB or multiple non-contiguous + CBs. The first mbuf segment in the given chained mbuf represents the first piece of the CB. Offset is only applicable to the first segment. ``length`` is the total length of the CB.
@@ -506,14 +525,22 @@ BBDEV Turbo Encode Operation }; }; -The Turbo encode structure is composed of the ``input`` and ``output`` mbuf -data pointers. The provided mbuf pointer of ``input`` needs to be big enough to -stretch for extra CRC trailers. +The Turbo encode structure includes the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big +enough to stretch for extra CRC trailers. -``op_flags`` parameter holds all operation related flags, like whether CRC24A is -included by the application or not. +.. csv-table:: **struct rte_bbdev_op_turbo_enc** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","input CB or TB data" + "output","rate matched CB or TB output buffer" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" -``code_block_mode`` flag identifies the mode in which bbdev is operating in. The encode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is standalone. While
@@ -525,21 +552,21 @@ are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` call belong to one mode, either CB-mode or TB-mode. -In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +In case that the TB is smaller than Z (6144 bits), then effectively the TB = CB. CRC24A is appended to the tail of the CB. The application is responsible for calculating and appending CRC24A before calling BBDEV in case that the underlying driver does not support CRC24A generation. In CB-mode, CRC24A/B is an optional operation. -The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS -36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The CB parameter ``k`` is the size of the CB (this maps to K as described +in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` informs the application with relevant capability. These flags can be set in the -``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB -before going forward with Turbo encoding. +``op_flags`` parameter to indicate to BBDEV to calculate and append CRC24A/B +to CB before going forward with Turbo encoding. Output format of the CB encode will have the encoded CB in ``e`` size output (this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf
@@ -600,13 +627,26 @@ BBDEV Turbo Decode Operation }; }; -The Turbo decode structure is composed of the ``input`` and ``output`` mbuf -data pointers. - -``op_flags`` parameter holds all operation related flags, like whether CRC24B is -retained or not. - -``code_block_mode`` flag identifies the mode in which bbdev is operating in. +The Turbo decode structure includes the ``input``, ``hard_output`` and +optionally the ``soft_output`` mbuf data pointers. + +.. csv-table:: **struct rte_bbdev_op_turbo_dec** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","virtual circular buffer, wk, size 3*Kpi for each CB" + "hard output","hard decisions buffer, decoded output, size K for each CB" + "soft output","soft LLR output buffer (optional)" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "iter_max","maximum number of iterations to perofrm in decode all CBs" + "iter_min","minimum number of iterations to perform in decoding all CBs" + "iter_count","number of iterations to performed in decoding all CBs" + "ext_scale","scale factor on extrinsic info (5 bits)" + "num_maps","number of MAP engines to use in decode" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" Similarly, the decode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is
@@ -618,7 +658,8 @@ to a bigger TB are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` call belong to one mode, either CB-mode or TB-mode. -The input ``k`` is the size of the decoded CB (this maps to K as described in + +The CB parameter ``k`` is the size of the decoded CB (this maps to K as described in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case.
@@ -638,9 +679,9 @@ Soft output is an optional capability for BBDEV PMDs. Setting flag CRC24B at the end of each CB. This might be useful for the application in debug mode. An LLR rate matched output is computed in the ``soft_output`` buffer structure -for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section -5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the -encoded buffer of size ``e``. +for the given CB parameter ``e`` size (this maps to E described in +3GPP TS 36.212 section 5.1.4.1.2). The output mbuf buffer size needs to be big +enough to hold the encoded buffer of size ``e``. The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the number of the remaining CB VCBs is calculated automatically by BBDEV before
@@ -669,6 +710,376 @@ TB-mode. CB-mode is a reduced version, where only one CB exists: Turbo decoding of Code Blocks in mbuf structure +BBDEV LDPC Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC encode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC encode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +| Set to bypass bit-level interleaver on output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_RATE_MATCH | +| Set to enabling the RATE_MATCHING processing | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24A_ATTACH | +| Set to attach transport block CRC-24A | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24B_ATTACH | +| Set to attach code block CRC-24B | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_16_ATTACH | +| Set to attach code block CRC-16 | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_INTERRUPTS | +| Set if a device supports encoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CONCATENATION | +| Set if a device supports concatenation of non byte aligned output | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC encode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + struct rte_bbdev_op_ldpc_enc { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_enc_ldpc_cb_params cb_params; + struct rte_bbdev_op_enc_ldpc_tb_params tb_params; + }; + }; + +The LDPC encode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|output |rate matched CB or TB output buffer | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ ++ +c_ab +number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits, r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the +incoming code block or transport block data. + +The mbuf output ``output`` is mandatory and is the encoded CB(s). In +CB-mode ut contains the encoded CB of size ``e`` (E in 3GPP TS 38.212 +section 6.2.5). In TB-mode it contains multiple contiguous encoded CBs +of size ``ea`` or ``eb``. +The ``output`` buffer is allocated by the application with enough room +for the output data. + +The encode interface works on both a code block (CB) and a transport +block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (attach CRC24B if required) +* CB-mode: one CB making up one TB (attach CRC24A if required) +* TB-mode: one or more CB of a partial TB (attach CRC24B(s) if required) +* TB-mode: one or more CB of a complete TB (attach CRC24AB(s) if required) + +In CB-mode if ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is set then CRC24A +is appended to the CB. If ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is not +set the application is responsible for calculating and appending CRC24A +before calling BBDEV. The input data mbuf ``length`` is inclusive of +CRC24A/B where present and is equal to the code block size ``K``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the +inbound TB data buffer, unless the ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +flag is set when it is the responsibility of BBDEV. The input data +mbuf ``length`` is total size of the CBs inclusive of any CRC24A and +CRC24B in the case they were appended by the application. + +Not all BBDEV PMDs may be capable of CRC24A/B calculation. Flags +``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` and ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` +inform the application of the relevant capability. These flags can be set +in the ``op_flags`` parameter to indicate BBDEV to calculate and append +CRC24A to CB before going forward with LDPC encoding. + +The difference between the partial and full-size TB is that BBDEV needs +the index of the first CB in this group and the number of CBs in the group. +The first CB index is given by ``r`` but the number of the CBs is +calculated by BBDEV before signalling to the driver. + +The number of CBs in the group should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +Figure 13.1 above showing the Turbo encoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC encode. + +BBDEV LDPC Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC decode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC decode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +| Set for transport block CRC-24A checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +| Set for code block CRC-24B checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +| Set to drop the last CRC bits decoding output | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on input stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +| Set for HARQ combined input stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +| Set for HARQ combined output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_BYPASS | +| Set for LDPC decoder bypass | +| | +| RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE must be set | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_SOFT_OUT | +| Set for soft-output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +| Set for Rate-Matching bypass on soft-out stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on soft-output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +| Set for iteration stopping on successful decode condition enable | +| | +| Where a successful decode is a successful syndrome check | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_INTERRUPTS | +| Set if a device supports decoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +| Set if a device supports input/output HARQ compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_LLR_COMPRESSION | +| Set if a device supports input LLR compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | +| Set if a device supports HARQ input to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | +| Set if a device supports HARQ output to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK | +| Set if a device supports loopback access to HARQ internal memory | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC decode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + + struct rte_bbdev_op_ldpc_dec { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data hard_output; + struct rte_bbdev_op_data soft_output; + struct rte_bbdev_op_data harq_combined_input; + struct rte_bbdev_op_data harq_combined_output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t iter_max; + uint8_t iter_count; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_dec_ldpc_cb_params cb_params; + struct rte_bbdev_op_dec_ldpc_tb_params tb_params; + }; + }; + + +The LDPC decode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|hard_output |hard decisions buffer, decoded output | ++----------------+--------------------------------------------------------------------+ +|soft_output |soft LLR output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_input |HARQ combined input buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_output|HARQ combined output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {1,2,4,6,8} from pi/2-BPSK to 256QAM | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|iter_max |maximum number of iterations to perform in decode all CBs | ++----------------+--------------------------------------------------------------------+ +|iter_count |number of iterations performed in decoding all CBs | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ +| |c_ab |number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs +and is the Virtual Circular Buffer data stream with null padding. +Each byte in the input circular buffer is the LLR value of each bit of +the original CB. + +The mbuf output ``hard_output`` is mandatory and is the decoded CBs size +K (CRC24A/B is the last 24-bit in each decoded CB). + +The mbuf output ``soft_output`` is optional and is an LLR rate matched +output of size ``e`` (this is ``E`` as per 3GPP TS 38.212 section 6.2.5). + +The mbuf input ``harq_combine_input`` is optional and is a buffer with +the input to the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The mbuf output ``harq_combine_output`` is optional and is a buffer for +the output of the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The output mbuf data structures are expected to be allocated by the +application with enough room for the output data. + +As with the LDPC encode, the decode interface works on both a code block +(CB) and a transport block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (check CRC24B if required) +* CB-mode: one CB making up one TB (check CRC24A if required) +* TB-mode: one or more CB making up a partial TB (check CRC24B(s) if required) +* TB-mode: one or more CB making up a complete TB (check CRC24B(s) if required) + +The mbuf ``length`` is inclusive of CRC24A/B where present and is equal +the code block size ``K``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +the number of the remaining CB VCBs is calculated automatically by BBDEV +and passed down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +Figure 13.2 above showing the Turbo decoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC decode. + Sample code -----------
Signature · 1 line
1.8.3.1
PATCH v6 4/7 baseband/turbo_sw: extension of turbosw PMD for 5G
In reply to Nicolas ChautruImplementation still based on Intel SDK libraries optimized for AVX512 instructions set and 5GNR. This can be also build for AVX2 for 4G capability or without SDK dependency for maintenance.
--- config/common_base | 1 + doc/guides/rel_notes/release_19_08.rst | 15 +- drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 677 ++++++++++++++++++++++- drivers/baseband/turbo_sw/meson.build | 10 + mk/rte.app.mk | 8 +- 6 files changed, 715 insertions(+), 11 deletions(-)
config/common_base +1 -0
@@ -536,6 +536,7 @@ CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y CONFIG_RTE_BBDEV_SDK_AVX2=n +CONFIG_RTE_BBDEV_SDK_AVX512=n # # Compile PMD for NULL bbdev device
doc/guides/rel_notes/release_19_08.rst +14 -1
@@ -126,6 +126,20 @@ New Features Added telemetry mode to l3fwd-power application to report application level busyness, empty and full polls of rte_eth_rx_burst(). +* **Added a FPGA_LTE_FEC bbdev PMD.** + + Added the new ``fpga_lte_fec`` bbdev driver for the Intel® FPGA PAC + (Programmable Acceleration Card) N3000. See the + :doc:`../bbdevs/fpga_lte_fec` BBDEV guide for more details on this new driver. + +* **Updated TURBO_SW bbdev PMD.** + + Updated the ``turbo_sw`` bbdev driver with changes including: + + * Added option to build the driver with or without dependency of external + SDK libraries. + * Added support for 5GNR encode/decode operations. + Removed Items -------------
@@ -165,7 +179,6 @@ API Changes structure (``rte_crypto_cipher_xform``, ``rte_crypto_auth_xform``, and ``rte_crypto_aead_xform``) have been changed to ``const uint8_t *data``. - ABI Changes -----------
drivers/baseband/turbo_sw/Makefile +14 -1
@@ -3,7 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk - # library name LIB = librte_pmd_bbdev_turbo_sw.a
@@ -34,6 +33,20 @@ LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml endif +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),n) +$(error "CONFIG_RTE_BBDEV_SDK_AVX512 requires CONFIG_RTE_BBDEV_SDK_AVX2 set") +endif +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_dematching_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif + # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +669 -8
866 lines not on this page · raw message
drivers/baseband/turbo_sw/meson.build +10 -0
@@ -23,6 +23,16 @@ if dpdk_conf.has('RTE_BBDEV_SDK_AVX2') includes += include_directories(path + '/lib_common') endif endif +if dpdk_conf.has('RTE_BBDEV_SDK_AVX512') + ext_deps += cc.find_library('libldpc_encoder_5gnr', dirs: [path + '/lib_ldpc_encoder_5gnr'], required: true) + ext_deps += cc.find_library('libldpc_decoder_5gnr', dirs: [path + '/lib_ldpc_decoder_5gnr'], required: true) + ext_deps += cc.find_library('libLDPC_ratematch_5gnr', dirs: [path + '/lib_LDPC_ratematch_5gnr'], required: true) + ext_deps += cc.find_library('librate_dematching_5gnr', dirs: [path + '/lib_rate_dematching_5gnr'], required: true) + includes += include_directories(path + '/lib_ldpc_encoder_5gnr') + includes += include_directories(path + '/lib_ldpc_decoder_5gnr') + includes += include_directories(path + '/lib_LDPC_ratematch_5gnr') + includes += include_directories(path + '/lib_rate_dematching_5gnr') +endif deps += ['bbdev', 'bus_vdev', 'ring'] name = 'bbdev_turbo_sw'
mk/rte.app.mk +7 -1
@@ -232,7 +232,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcr _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps -lsvml +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif # CONFIG_RTE_BBDEV_SDK_AVX512 endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV
Signature · 1 line
1.8.3.1
PATCH v6 5/7 docs/guides: updating building steps for BBDEV PMD
In reply to Nicolas ChautruThis now includes steps to build with either
libraries for AVX2, or AVX512 or no dependency.
--- doc/guides/bbdevs/turbo_sw.rst | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-)
doc/guides/bbdevs/turbo_sw.rst +29 -13
@@ -5,20 +5,21 @@ SW Turbo Poll Mode Driver ========================= The SW Turbo PMD (**baseband_turbo_sw**) provides a software only poll mode bbdev -driver that can optionally utilize Intel optimized libraries for LTE Layer 1 -workloads acceleration. +driver that can optionally utilize Intel optimized libraries for LTE and 5GNR +Layer 1 workloads acceleration. Note that the driver can also be built without any dependency with reduced functionality for maintenance purpose. To enable linking to the SDK libraries see detailed installation section below. -One flag can be enabled depending on whether the target machine can support -AVX2 instructions sets and the related SDK libraries for vectorized +Two flags can be enabled depending on whether the target machine can support +AVX2 and AVX512 instructions sets and the related SDK libraries for vectorized signal processing functions are installed : - CONFIG_RTE_BBDEV_SDK_AVX2 - -By default this flag is disabled. For AVX2 machine and SDK -library installed then this flag can be enabled. +- CONFIG_RTE_BBDEV_SDK_AVX512 +By default these 2 flags are disabled by default. For AVX2 machine and SDK +library installed then the first flag can be enabled. For AVX512 machine and +SDK library installed then both flags can be enabled for full real time capability. This PMD supports the functions: FEC, Rate Matching and CRC functions detailed in the Features section.
@@ -45,11 +46,25 @@ For the LTE decode operation: * ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` * ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` +For the 5G NR LDPC encode operation: + +* ``RTE_BBDEV_LDPC_RATE_MATCH`` +* ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +* ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` + +For the 5G NR LDPC decode operation: + +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE`` +* ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE`` Limitations ----------- -* In-place operations for Turbo encode and decode are not supported +* In-place operations for encode and decode are not supported Installation ------------
@@ -60,7 +75,7 @@ FlexRAN SDK Download As an option it is possible to link this driver with FleXRAN SDK libraries which can enable real time signal processing using AVX instructions. -These libraries are available through this link `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. +These libraries are available through this `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. After download is complete, the user needs to unpack and compile on their system before building DPDK.
@@ -115,14 +130,13 @@ The following instructions should be followed in this exact order: .. code-block:: console - cd build-avx2-icc/ + cd build-avx512-icc/ make && make install - Initialization -------------- -In order to enable this virtual bbdev PMD, the user must: +In order to enable this virtual bbdev PMD, the user may: * Build the ``FLEXRAN SDK`` libraries (explained in Installation section).
@@ -137,9 +151,11 @@ Example: export FLEXRAN_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/install export DIR_WIRELESS_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/ -* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` +* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` and ``CONFIG_RTE_BBDEV_SDK_AVX512=y`` in DPDK common configuration file ``config/common_base`` to be able to use the SDK libraries as mentioned above. + For AVX2 machine it is possible to only enable CONFIG_RTE_BBDEV_SDK_AVX2 + for limited 4G functionality. If no flag are set the PMD driver will still build but its capabilities will be limited accordingly.
Signature · 1 line
1.8.3.1
PATCH v6 6/7 test-bbdev: update of bbdev test-app for 5GNR
In reply to Nicolas ChautruExtending test framework for FEC 5GNR operations
for UT verification and profiling.
--- app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++++++++++++++++++++++++--- app/test-bbdev/test_bbdev_vector.c | 509 +++++++++++++- app/test-bbdev/test_bbdev_vector.h | 14 +- app/test-bbdev/turbo_enc_default.data | 2 +- 9 files changed, 1711 insertions(+), 123 deletions(-)
app/test-bbdev/main.c +30 -18
@@ -16,11 +16,13 @@#include "main.h" +/* Defines how many testcases can be specified as cmdline args */ #define MAX_CMDLINE_TESTCASES 8static const char tc_sep =',' ; +/* Declare structure for command line test parameters and options */ static struct test_params { struct test_command *test_to_run[MAX_CMDLINE_TESTCASES]; unsigned int num_tests;
@@ -28,6 +30,7 @@unsigned int burst_sz;unsigned int num_lcores;char test_vector_filename[PATH_MAX ]; +bool init_device; } test_params; static struct test_commands_list commands_list =
@@ -46,9 +49,8 @@unsigned int total =0 , skipped =0 , succeeded =0 , failed =0 ;uint64_t start, end; -printf ( -"\n + ------------------------------------------------------- +\n" ); -printf (" + Starting Test Suite : %s\n" , suite->suite_name); +printf ("\n===========================================================\n" ); +printf ("Starting Test Suite : %s\n" , suite->suite_name); start =rte_rdtsc_precise ();
@@ -57,15 +59,13 @@if (test_result ==TEST_FAILED ) {printf (" + Test suite setup %s failed!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 1 ; }if (test_result ==TEST_SKIPPED ) {printf (" + Test suite setup %s skipped!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 0 ; } }
@@ -82,15 +82,15 @@if (test_result ==TEST_SUCCESS ) { succeeded++; -printf (" + TestCase [%2d] : %s passed\n" , total, +printf ("TestCase [%2d] : %s passed\n" , total, suite->unit_test_cases[total].name); }else if (test_result ==TEST_SKIPPED ) { skipped++; -printf (" + TestCase [%2d] : %s skipped\n" , total, +printf ("TestCase [%2d] : %s skipped\n" , total, suite->unit_test_cases[total].name); }else { failed++; -printf (" + TestCase [%2d] : %s failed\n" , total, +printf ("TestCase [%2d] : %s failed\n" , total, suite->unit_test_cases[total].name); }
@@ -103,7 +103,7 @@ end =rte_rdtsc_precise (); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );printf (" + Test Suite Summary : %s\n" , suite->suite_name);printf (" + Tests Total : %2d\n" , total);printf (" + Tests Skipped : %2d\n" , skipped);
@@ -111,7 +111,7 @@printf (" + Tests Failed : %2d\n" , failed);printf (" + Tests Lasted : %lg ms\n" , ((end - start) *1000 ) / (double )rte_get_tsc_hz ()); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );return (failed >0 ) ?1 :0 ; }
@@ -140,12 +140,18 @@return test_params.num_lcores; } +bool +get_init_device (void ) +{ +return test_params.init_device; +} +static void print_usage (const char *prog_name) {struct test_command *t; - printf("Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" + printf("***Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" "\t[-b/--burst-size BURST_SIZE]\n" "\t[-v/--test-vector VECTOR_FILE]\n" "\t[-c/--test-cases TEST_CASE[,TEST_CASE,...]]]\n",
@@ -174,11 +180,12 @@ { "test-cases", 1, 0, 'c' }, { "test-vector", 1, 0, 'v' }, { "lcores", 1, 0, 'l' }, + { "init-device", 0, 0, 'i'}, { "help", 0, 0, 'h' }, { NULL, 0, 0, 0 } }; -while ((opt =getopt_long (argc, argv,"hn:b:c:v:l:" , lgopts, +while ((opt =getopt_long (argc, argv,"hin:b:c:v:l:" , lgopts, &option_index)) !=EOF )switch (opt) {case 'n' :
@@ -226,8 +233,9 @@TEST_ASSERT (strlen (optarg) >0 ,"Config file name is null" ); -strlcpy (tp->test_vector_filename, optarg, -sizeof (tp->test_vector_filename)); +snprintf (tp->test_vector_filename, +sizeof (tp->test_vector_filename), +"%s" , optarg);break ;case 'l' : TEST_ASSERT(strlen(optarg) > 0,
@@ -237,6 +245,10 @@"Num of lcores mustn't be greater than %u" , RTE_MAX_LCORE);break ; +case 'i' : +/* indicate fpga fec config required */ + tp->init_device = true; +break ;case 'h' :print_usage (argv[0 ]);return 0 ;
@@ -279,7 +291,7 @@struct test_command *t;TAILQ_FOREACH (t, &commands_list, next) - ret |= t->callback(); + ret |= (int) t->callback();return ret; }
@@ -291,7 +303,7 @@unsigned int i;for (i =0 ; i < tp->num_tests; ++i) - ret |= tp->test_to_run[i]->callback (); + ret |= (int ) tp->test_to_run[i]->callback ();return ret; }
app/test-bbdev/main.h +5 -1
@@ -20,6 +20,7 @@#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U +#define TEST_ASSERT (cond, msg, ...) do { \ if (!(cond)) { \ printf("TestCase %s() line %d failed: " \
@@ -103,7 +104,8 @@ struct test_command { .command = RTE_STR(name), \ .callback = test_func_##name, \ }; \ - RTE_INIT(test_register_##name) \ + static void __attribute__((constructor, used)) \ + test_register_##name(void) \ { \ add_test_command(&test_struct_##name); \ }
@@ -116,4 +118,6 @@ struct test_command {unsigned int get_num_lcores (void ); +bool get_init_device (void ); +#endif
app/test-bbdev/meson.build +3 -0
@@ -7,3 +7,6 @@ sources = files('main.c', 'test_bbdev_vector.c') allow_experimental_apis = true deps += ['bbdev', 'bus_vdev'] +if dpdk_conf.has('RTE_LIBRTE_PMD_FPGA_LTE_FEC') + deps += ['bbdev_fpga_lte_fec'] +endif
app/test-bbdev/test-bbdev.py +7 -0
@@ -59,6 +59,9 @@ def kill(process): type=int, help="Number of lcores to run.", default=16) +parser.add_argument("-i", "--init-device", + action='store_true', + help="Initialise PF device with default values.") args = parser.parse_args()
@@ -82,6 +85,10 @@ def kill(process): params.extend(["-c"]) params.extend([",".join(args.test_cases)]) +if args.init_device: + params.extend(["-i"]) + + exit_status = 0 for vector in args.test_vector: for burst_size in args.burst_size:
app/test-bbdev/test_bbdev.c +5 -7
@@ -14,8 +14,6 @@#include <rte_bbdev.h> #include <rte_bbdev_op.h> #include <rte_bbdev_pmd.h> -#include <string.h> -#include <rte_string_fns.h> #include "main.h"
@@ -770,7 +768,7 @@ struct bbdev_testsuite_params { {struct rte_bbdev *dev1, *dev2;const char *name ="dev_name" ; -char name_tmp[16 ]; +char name_tmp[32 ];int num_devs, num_devs_tmp; dev1 =rte_bbdev_allocate (NULL );
@@ -790,14 +788,14 @@ struct bbdev_testsuite_params {/* Initialize the maximum amount of devices */ do { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp);TEST_ASSERT (dev2 !=NULL ,"Failed to initialize bbdev driver" ); ++num_devs; }while (num_devs < (RTE_BBDEV_MAX_DEVS -1 )); -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp); TEST_ASSERT(dev2 == NULL, "Failed to initialize bbdev driver number %d " "more drivers than RTE_BBDEV_MAX_DEVS: %d ", num_devs,
@@ -806,7 +804,7 @@ struct bbdev_testsuite_params { num_devs--;while (num_devs >= num_devs_tmp) { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_get_named_dev (name_tmp); TEST_ASSERT_SUCCESS(rte_bbdev_release(dev2), "Failed to uninitialize bbdev driver %s ",
@@ -827,7 +825,7 @@ struct bbdev_testsuite_params {TEST_ASSERT_FAIL (rte_bbdev_release (NULL ),"Failed to uninitialize bbdev driver with NULL bbdev" ); -strlcpy (name_tmp,"invalid_name" ,sizeof (name_tmp)); +sprintf (name_tmp,"%s" ,"invalid_name" ); dev2 =rte_bbdev_get_named_dev (name_tmp);TEST_ASSERT_FAIL (rte_bbdev_release (dev2),"Failed to uninitialize bbdev driver with invalid name" );
app/test-bbdev/test_bbdev_perf.c +1149 -84
1,649 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.c +500 -9
635 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.h +11 -3
@@ -28,15 +28,21 @@ enum {TEST_BBDEV_VF_NCB_NEG = (1ULL <<16 ),TEST_BBDEV_VF_NCB_POS = (1ULL <<17 ),TEST_BBDEV_VF_R = (1ULL <<18 ), -TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<19 ), -TEST_BBDEV_VF_OP_FLAGS = (1ULL <<20 ), - TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 21), +TEST_BBDEV_VF_BG = (1ULL <<19 ), +TEST_BBDEV_VF_ZC = (1ULL <<20 ), +TEST_BBDEV_VF_F = (1ULL <<21 ), +TEST_BBDEV_VF_QM = (1ULL <<22 ), +TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<23 ), +TEST_BBDEV_VF_OP_FLAGS = (1ULL <<24 ), + TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25), };enum op_data_type {DATA_INPUT =0 ,DATA_SOFT_OUTPUT ,DATA_HARD_OUTPUT , +DATA_HARQ_INPUT , +DATA_HARQ_OUTPUT ,DATA_NUM_TYPES , };
@@ -57,6 +63,8 @@ struct test_bbdev_vector {union {struct rte_bbdev_op_turbo_dec turbo_dec;struct rte_bbdev_op_turbo_enc turbo_enc; +struct rte_bbdev_op_ldpc_dec ldpc_dec; +struct rte_bbdev_op_ldpc_enc ldpc_enc; };/* Additional storage for op data entries */ struct op_data_entries entries[DATA_NUM_TYPES ];
app/test-bbdev/turbo_enc_default.data +1 -1
@@ -1 +1 @@ -test_vectors/turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data +test_vectors/turbo_enc_c1_k6144_r0_e18444.data
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v6 0/7] bbdev: adding support in BBDEV for 5GNR FEC
In reply to Nicolas ChautruHi,
Quoted 8 lines
Nicolas Chautru (7):
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
What are the news about the turbo_sw PMD?
We are still not able to compile it.
After a very long time of asking for the dependency, what can be the incentive to get Intel delivering it? Should we block any merge in bbdev until it happens?
Akhil,
I guess you did not try to compile the patch "extension of turbosw PMD for 5G" in this series?
Re: [dpdk-dev] [PATCH v6 0/7] bbdev: adding support in BBDEV for 5GNR FEC
Quoted 9 lines · Thomas
Quoted 8 lines
Nicolas Chautru (7):
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
Quoted 4 lines
What are the news about the
turbo_swPMD?
We are still not able to compile it.
After a very long time of asking for the dependency, what can be the incentive to get Intel delivering it? Should we block any merge in bbdev until it happens?
Hi Thomas,
What you are referring to was resolved with that previous serie https://patches.dpdk.org/project/dpdk/list/?series=5093&state=*
The turbo_sw_pmd is built by default now and is verified by the DPDK CI. As an option this can be built against the real time signal processing libraries (FlexRAN FEC SDK). The link to latest version of this library is also provided https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>
I believe that you reviewed this scheme previously earlier Ferruh of the Tech board as you did provide feedback on the related published article as well as recommended to split the previous serie into several patchsets.
The last serie under review here in that email thread is the extension of the turbo_sw_pmd driver to support 5GNR operations but still rely on the exact same model and dependency, the only limitation is that these libraries requires AVX512 support for 5GNR operations.
Let me know whether there is any discrepancy and want to discuss further through that mailing list, tech board or other method. In case you are trying to compile the SDK and have any issues let us know as well.
Talk to you soon,
Thanks and regards,
Nic
Re: [dpdk-dev] [PATCH v6 0/7] bbdev: adding support in BBDEV for 5GNR FEC
03/07/2019 20:31, Chautru, Nicolas:
Quoted 10 lines
Quoted 9 lines · Thomas
Quoted 8 lines
Nicolas Chautru (7):
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verification
Quoted 8 lines
Quoted 4 lines
What are the news about the
turbo_swPMD?
We are still not able to compile it.
After a very long time of asking for the dependency, what can be the incentive to get Intel delivering it? Should we block any merge in bbdev until it happens?Hi Thomas,
What you are referring to was resolved with that previous serie https://patches.dpdk.org/project/dpdk/list/?series=5093&state=*
Theturbo_sw_pmdis built by default now and is verified by the DPDK CI. As an option this can be built against the real time signal processing libraries (FlexRAN FEC SDK). The link to latest version of this library is also provided https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>
Whaouh, it happens and I did not notice it!
Quoted 1 line
I believe that you reviewed this scheme previously earlier Ferruh of the Tech board as you did provide feedback on the related published article as well as recommended to split the previous serie into several patchsets.
Indeed, and I did not follow the latest news.
Quoted 3 lines
The last serie under review here in that email thread is the extension of the
turbo_sw_pmddriver to support 5GNR operations but still rely on the exact same model and dependency, the only limitation is that these libraries requires AVX512 support for 5GNR operations.Let me know whether there is any discrepancy and want to discuss further through that mailing list, tech board or other method. In case you are trying to compile the SDK and have any issues let us know as well.
That's fine, I can keep cool, thanks.
Re: [dpdk-dev] [PATCH v6 0/7] bbdev: adding support in BBDEV for 5GNR FEC
Quoted 52 lines
03/07/2019 20:31, Chautru, Nicolas:
Quoted 10 lines
Quoted 9 lines · Thomas
Quoted 8 lines
Nicolas Chautru (7):
bbdev: renaming non-generic LTE specific structure
bbdev: extension of BBDEV API for 5G FEC docs/guides: updating bbdev API for 5GNR operations baseband/turbo_sw: extension of turbosw PMD for 5G docs/guides: updating building steps for BBDEV PMD
test-bbdev: update of bbdev test-app for 5GNR
test-bbdev: test vectors for 5GNR verificationQuoted 3 lines
Quoted 3 lines
What are the news about the
turbo_swPMD?
We are still not able to compile it.
After a very long time of asking for the dependency, what can be theincentive to get Intel delivering it?
Quoted 4 lines
Quoted 1 line
Should we block any merge in bbdev until it happens?
Hi Thomas,
What you are referring to was resolved with that previous seriehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatches.
dpdk.org%2Fproject%2Fdpdk%2Flist%2F%3Fseries%3D5093%26state%3D*& ;data=02%7C01%7Cakhil.goyal%40nxp.com%7C5a21ccb16cbd48a5e30308d6fff 4f100%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369778248117 89839&sdata=uVCL7Nm%2FOpfz97xEtCACw6sTMpCmJLiQnxqYKJ2488A%3 D&reserved=0Quoted 1 line
The
turbo_sw_pmdis built by default now and is verified by the DPDK CI. As anoption this can be built against the real time signal processing libraries (FlexRAN FEC SDK). The link to latest version of this library is also provided
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsoftware
.intel.com%2Fen-us%2Farticles%2Fflexran-lte-and-5g-nr-fec-software- development-kit- modules&data=02%7C01%7Cakhil.goyal%40nxp.com%7C5a21ccb16cbd48 a5e30308d6fff4f100%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6 36977824811789839&sdata=1TjUuljReN78TBx0j%2BhTeo2r56QzZuvO7qoY Yb45API%3D&reserved=0>Whaouh, it happens and I did not notice it!
Quoted 1 line
I believe that you reviewed this scheme previously earlier Ferruh of the Tech
board as you did provide feedback on the related published article as well as recommended to split the previous serie into several patchsets.
Indeed, and I did not follow the latest news.
Quoted 1 line
The last serie under review here in that email thread is the extension of the
turbo_sw_pmddriver to support 5GNR operations but still rely on the exact same model and dependency, the only limitation is that these libraries requires AVX512 support for 5GNR operations.Quoted 1 line
Quoted 6 lines
Quoted 1 line
Let me know whether there is any discrepancy and want to discuss further
through that mailing list, tech board or other method. In case you are trying to compile the SDK and have any issues let us know as well.
That's fine, I can keep cool, thanks.
Split the release note changes for bbdev pmd in two. fpga_lte_fec addition is merged in the previous series which added that driver Applied to dpdk-next-crypto
Thanks.
PATCH v6 7/7 test-bbdev: test vectors for 5GNR verification
In reply to Nicolas ChautruAdding LDPC vectors for UT verification, coverage, and profiling for 5GNR encode/decode operations.
--- app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 353 ++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 684 +++++++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 902 +++++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 745 ++++++++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 745 ++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 48 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 74 ++ app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 255 ++++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1215 ++++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 41 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 151 +++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 43 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 70 ++ app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 197 ++++ 17 files changed, 5574 insertions(+) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data
app/test-bbdev/ldpc_dec_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/ldpc_dec_v2342.data
app/test-bbdev/ldpc_enc_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data new file +353 -0
353 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data new file +684 -0
684 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data new file +902 -0
902 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v11835.data new file +49 -0
49 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342.data new file +745 -0
745 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data new file +745 -0
263 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v7813.data new file +48 -0
48 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8480.data new file +74 -0
74 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8568.data new file +255 -0
255 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v9503.data new file +1215 -0
1,215 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v11835.data new file +41 -0
41 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v2342.data new file +151 -0
151 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v7813.data new file +43 -0
43 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v8568.data new file +70 -0
70 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v9503.data new file +197 -0
197 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
PATCH v4 2/10 baseband/fpga_lte_fec: dependency patch
In reply to Nicolas ChautruNot meant for review, purely for dependency for CI. This is a squash of the related serie which is not applied yet:
adding driver for FEC on FPGA
https://patches.dpdk.org/project/dpdk/list/?series=5017
--- config/common_base | 5 + doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2674 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + drivers/baseband/fpga_lte_fec/meson.build | 7 + .../rte_pmd_bbdev_fpga_lte_fec_version.map | 3 + drivers/baseband/meson.build | 2 +- mk/rte.app.mk | 1 + 11 files changed, 3114 insertions(+), 1 deletion(-) create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/meson.build create mode 100644 drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map
config/common_base +5 -0
@@ -526,6 +526,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y # EXPERIMENTAL: API may change without prior notice # CONFIG_RTE_LIBRTE_BBDEV=y +CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y CONFIG_RTE_BBDEV_SDK_AVX2=n
@@ -540,6 +541,10 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y # CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y +# Compile PMD for Intel FPGA LTE FEC bbdev device +# +CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC=y + # # Compile generic crypto device library #
doc/guides/bbdevs/fpga_lte_fec.rst new file +318 -0
318 lines not on this page · raw message
doc/guides/bbdevs/index.rst +1 -0
@@ -10,3 +10,4 @@ Baseband Device Drivers null turbo_sw + fpga_lte_fec
drivers/baseband/Makefile +2 -0
@@ -10,5 +10,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += null DEPDIRS-null = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += turbo_sw DEPDIRS-turbo_sw = $(core-libs) +DIRS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec +DEPDIRS-fpga_lte_fec = $(core-libs) include $(RTE_SDK)/mk/rte.subdir.mk
drivers/baseband/fpga_lte_fec/Makefile new file +29 -0
@@ -0,0 +1,29 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +include $(RTE_SDK)/mk/rte.vars.mk + +# library name +LIB = librte_pmd_fpga_lte_fec.a + +# build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_bbdev +LDLIBS += -lrte_pci -lrte_bus_pci + +# versioning export map +EXPORT_MAP := rte_pmd_bbdev_fpga_lte_fec_version.map + +# library version +LIBABIVER := 1 + +# library source files +SRCS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec.c + +# export include files +SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC)-include += fpga_lte_fec.h + +include $(RTE_SDK)/mk/rte.lib.mk
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c new file +2674 -0
2,625 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/fpga_lte_fec.h new file +73 -0
73 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/meson.build new file +7 -0
Lines of this file are not shown. View the raw message.
drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map new file +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH v4 02/10] baseband/fpga_lte_fec: dependency patch
Quoted 23 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 02/10] baseband/fpga_lte_fec: dependency patchNot meant for review, purely for dependency for CI. This is a squash of the related serie which is not applied yet:
adding driver for FEC on FPGA
https://patches.dpdk.org/project/dpdk/list/?series=5017Signed-off-by Nicolas Chautru <[email protected]>---
+++
b/doc/guides/bbdevs/fpga_lte_fec.rst
doc/guides/bbdevs/fpga_lte_fec.rst line 3
Quoted 3 lines
doc/guides/bbdevs/fpga_lte_fec.rst new file +3
-0@@ -0,0 +1,318 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2018 Intel Corporation +
Should this be copyrighted starting 2019? Note also that I see other files related to FPGA driver are copyright 2019.
PATCH v4 3/10 bbdev: renaming non-generic LTE specific structure
In reply to Nicolas ChautruRenaming of the enums and structure which were LTE specific to allow for extension and support for 5GNR operations.
--- app/test-bbdev/test_bbdev_vector.c | 4 +- app/test-bbdev/test_bbdev_vector.h | 2 +- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 103 ++++++++++++----------- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 36 ++++---- lib/librte_bbdev/rte_bbdev_op.h | 26 +++--- 5 files changed, 86 insertions(+), 85 deletions(-)
app/test-bbdev/test_bbdev_vector.c +2 -2
@@ -298,9 +298,9 @@ op_data = vector->entries[type].segments; nb_ops = &vector->entries[type].nb_segments; -if (*nb_ops >=RTE_BBDEV_MAX_CODE_BLOCKS ) { +if (*nb_ops >=RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {printf ("Too many segments (code blocks defined): %u, max %d!\n" , - *nb_ops,RTE_BBDEV_MAX_CODE_BLOCKS ); + *nb_ops,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }
app/test-bbdev/test_bbdev_vector.h +1 -1
@@ -46,7 +46,7 @@ struct op_data_buf { };struct op_data_entries { -struct op_data_buf segments[RTE_BBDEV_MAX_CODE_BLOCKS ]; +struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ];unsigned int nb_segments; };
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +52 -51
222 lines not on this page · raw message
drivers/baseband/turbo_sw/bbdev_turbo_software.c +18 -18
@@ -34,9 +34,9 @@ rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_TURBO_MAX_CB_SIZE >> 3) + 1) * 48)#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) -#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_TURBO_MAX_CB_SIZE + 4) * 48)/* private data structure */ struct bbdev_private {
@@ -103,7 +103,7 @@ struct turbo_sw_queue { {int32_t result =0 ; -if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE ) +if (k <RTE_BBDEV_TURBO_MIN_CB_SIZE || k >RTE_BBDEV_TURBO_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -158,9 +158,9 @@ struct turbo_sw_queue {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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -172,8 +172,8 @@ struct turbo_sw_queue {RTE_BBDEV_TURBO_CRC_24A_ATTACH |RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, #endif
@@ -257,7 +257,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * + ((RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) {
@@ -277,7 +277,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_TURBO_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -295,7 +295,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_TURBO_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -313,7 +313,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->code_block =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *sizeof (*q->code_block), +RTE_BBDEV_TURBO_MAX_CB_SIZE *sizeof (*q->code_block),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->code_block ==NULL ) { rte_bbdev_log(ERR,
@@ -439,9 +439,9 @@ struct turbo_sw_queue {return -1 ; } -if (k >RTE_BBDEV_MAX_CB_SIZE ) { +if (k >RTE_BBDEV_TURBO_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,RTE_BBDEV_MAX_CB_SIZE ); + k,RTE_BBDEV_TURBO_MAX_CB_SIZE );return -1 ; }
@@ -466,9 +466,9 @@ struct turbo_sw_queue {return -1 ; } -if (kw >RTE_BBDEV_MAX_KW ) { +if (kw >RTE_BBDEV_TURBO_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,RTE_BBDEV_MAX_KW ); + kw,RTE_BBDEV_TURBO_MAX_KW );return -1 ; }
@@ -773,9 +773,9 @@ struct turbo_sw_queue {/* Clear op status */ op->status =0 ; -if (mbuf_total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +if (mbuf_total_left >RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - mbuf_total_left,RTE_BBDEV_MAX_TB_SIZE ); + mbuf_total_left,RTE_BBDEV_TURBO_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -1074,7 +1074,7 @@ struct turbo_sw_queue {* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_TURBO_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out_head, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev_op.h +13 -13
@@ -26,22 +26,22 @@#include <rte_mempool.h> /* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ -#define RTE_BBDEV_C_SUBBLOCK (32) +#define RTE_BBDEV_TURBO_C_SUBBLOCK (32)/* Maximum size of Transport Block (36.213, Table, Table 7.1.7.2.5-1) */ -#define RTE_BBDEV_MAX_TB_SIZE (391656) +#define RTE_BBDEV_TURBO_MAX_TB_SIZE (391656)/* Maximum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MAX_CB_SIZE (6144) +#define RTE_BBDEV_TURBO_MAX_CB_SIZE (6144)/* Minimum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MIN_CB_SIZE (40) +#define RTE_BBDEV_TURBO_MIN_CB_SIZE (40)/* Maximum size of circular buffer */ -#define RTE_BBDEV_MAX_KW (18528) +#define RTE_BBDEV_TURBO_MAX_KW (18528)/* * Maximum number of Code Blocks in Transport Block. It is calculated based on * maximum size of one Code Block and one Transport Block (considering CRC24A * and CRC24B): * (391656 + 24) / (6144 - 24) = 64 */ -#define RTE_BBDEV_MAX_CODE_BLOCKS (64) +#define RTE_BBDEV_TURBO_MAX_CODE_BLOCKS (64)/** Flags for turbo decoder operation and capability structure */ enum rte_bbdev_op_td_flag_bitmasks {
@@ -133,7 +133,7 @@ struct rte_bbdev_op_data {* multiple CBs contiguously located next to each other. * A Transport Block (TB) represents a whole piece of data that is * divided into one or more CBs. Maximum number of CBs can be contained -* in one TB is defined by RTE_BBDEV_MAX_CODE_BLOCKS. +* in one TB is defined by RTE_BBDEV_TURBO_MAX_CODE_BLOCKS. * * An mbuf data structure cannot represent more than one TB. The * smallest piece of data that can be contained in one mbuf is one CB.
@@ -204,7 +204,7 @@ struct rte_bbdev_op_dec_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -288,7 +288,7 @@ struct rte_bbdev_op_turbo_dec { }; }; -struct rte_bbdev_op_enc_cb_params { +struct rte_bbdev_op_enc_turbo_cb_params {/**< The K size of the input CB, in bits [40:6144], as specified in * 3GPP TS 36.212. * This size is inclusive of CRC24A, regardless whether it was
@@ -305,7 +305,7 @@ struct rte_bbdev_op_enc_cb_params {uint16_t ncb; }; -struct rte_bbdev_op_enc_tb_params { +struct rte_bbdev_op_enc_turbo_tb_params {/**< The K- size of the input CB, in bits [40:6144], that is in the * Turbo operation when r < C-, as in 3GPP TS 36.212. * This size is inclusive of CRC24B, regardless whether it was
@@ -320,7 +320,7 @@ struct rte_bbdev_op_enc_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -375,9 +375,9 @@ struct rte_bbdev_op_turbo_enc {uint8_t code_block_mode;/**< [0 - TB : 1 - CB] */ union {/**< Struct which stores Code Block specific parameters */ -struct rte_bbdev_op_enc_cb_params cb_params; +struct rte_bbdev_op_enc_turbo_cb_params cb_params;/**< Struct which stores Transport Block specific parameters */ -struct rte_bbdev_op_enc_tb_params tb_params; +struct rte_bbdev_op_enc_turbo_tb_params tb_params; }; };
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 03/10] bbdev: renaming non-generic LTE specific structure
Quoted 11 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 03/10] bbdev: renaming non-generic LTE specific structure
Quoted 5 lines
Renaming of the enums and structure which were LTE specific to allow for extension and support for 5GNR operations.
Signed-off-by Nicolas Chautru <[email protected]>---
PATCH v4 4/10 bbdev: extension of BBDEV API for 5G FEC
In reply to Nicolas ChautruExtension to BBDEV operations to support 5G
on top of existing 4G operations.
--- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 135 +++++++++- lib/librte_bbdev/rte_bbdev_op.h | 567 ++++++++++++++++++++++++++++++++-------- 3 files changed, 602 insertions(+), 122 deletions(-)
lib/librte_bbdev/rte_bbdev.c +15 -7
@@ -6,7 +6,6 @@#include <string.h> #include <stdbool.h> -#include <rte_string_fns.h> #include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h>
@@ -215,7 +214,7 @@ struct rte_bbdev * __rte_experimental bbdev->data->dev_id = dev_id; bbdev->state =RTE_BBDEV_INITIALIZED ; - ret =strlcpy (bbdev->data->name, name,RTE_BBDEV_NAME_MAX_LEN ); + ret =snprintf (bbdev->data->name,RTE_BBDEV_NAME_MAX_LEN ,"%s" , name);if ((ret <0 ) || (ret >=RTE_BBDEV_NAME_MAX_LEN )) {rte_bbdev_log (ERR ,"Copying device name \"%s\" failed" , name);return NULL ;
@@ -499,7 +498,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_ul_queue_priority);return -EINVAL ;
@@ -507,7 +506,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && conf->priority > dev_info.max_dl_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_dl_queue_priority);return -EINVAL ;
@@ -796,7 +795,7 @@ struct rte_bbdev * __rte_experimentalmemset (dev_info,0 ,sizeof (*dev_info)); dev_info->dev_name = dev->data->name; dev_info->num_queues = dev->data->num_queues; - dev_info->bus =rte_bus_find_by_device (dev->device); + dev_info->device = dev->device; dev_info->socket_id = dev->data->socket_id; dev_info->started = dev->data->started;
@@ -847,6 +846,12 @@ struct rte_bbdev * __rte_experimentalcase RTE_BBDEV_OP_TURBO_ENC : result =sizeof (struct rte_bbdev_enc_op );break ; +case RTE_BBDEV_OP_LDPC_DEC : + result =sizeof (struct rte_bbdev_dec_op ); +break ; +case RTE_BBDEV_OP_LDPC_ENC : + result =sizeof (struct rte_bbdev_enc_op ); +break ;default :break ; }
@@ -861,11 +866,12 @@ struct rte_bbdev * __rte_experimental {enum rte_bbdev_op_type type = *(enum rte_bbdev_op_type *)arg; -if (type ==RTE_BBDEV_OP_TURBO_DEC ) { +if (type ==RTE_BBDEV_OP_TURBO_DEC || type ==RTE_BBDEV_OP_LDPC_DEC ) {struct rte_bbdev_dec_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool; - }else if (type ==RTE_BBDEV_OP_TURBO_ENC ) { + }else if (type ==RTE_BBDEV_OP_TURBO_ENC || + type ==RTE_BBDEV_OP_LDPC_ENC ) {struct rte_bbdev_enc_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool;
@@ -1117,6 +1123,8 @@ struct rte_mempool * __rte_experimental"RTE_BBDEV_OP_NONE" ,"RTE_BBDEV_OP_TURBO_DEC" ,"RTE_BBDEV_OP_TURBO_ENC" , +"RTE_BBDEV_OP_LDPC_DEC" , + "RTE_BBDEV_OP_LDPC_ENC", };if (op_type <RTE_BBDEV_OP_TYPE_COUNT )
lib/librte_bbdev/rte_bbdev.h +133 -2
165 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +454 -113
842 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 04/10] bbdev: extension of BBDEV API for 5G FEC
Quoted 10 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 04/10] bbdev: extension of BBDEV API for 5G FEC
Quoted 5 lines
Extension to BBDEV operations to support 5G
on top of existing 4G operations.Signed-off-by Nicolas Chautru <[email protected]>---
PATCH v4 5/10 docs/guides: updating bbdev API for 5GNR operations
In reply to Nicolas ChautruThe documentation captures the related change in BBDEV API to support 5GNR encode/decode operations.
--- doc/guides/prog_guide/bbdev.rst | 505 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 458 insertions(+), 47 deletions(-)
doc/guides/prog_guide/bbdev.rst +458 -47
@@ -166,9 +166,9 @@ stopped individually. Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor's logical cores and interfaces utilize its local memory. Therefore -baseband operations, the mbuf being operated on should be allocated from memory +The bbdev poll mode device driver library supports NUMA architecture, in which +a processor's logical cores and interfaces utilize it's local memory. Therefore +with baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer descriptors should be populated with mbufs allocated from a mempool allocated
@@ -220,9 +220,9 @@ relation to Turbo Encoding and Decoding operations. 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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -234,8 +234,8 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, RTE_BBDEV_END_OF_CAPABILITIES_LIST()
@@ -266,12 +266,13 @@ information: struct rte_bbdev_info { int socket_id; const char *dev_name; - const struct rte_bus *bus; + const struct rte_device *device; uint16_t num_queues; bool started; struct rte_bbdev_driver_info drv; }; + Operation Processing --------------------
@@ -335,14 +336,20 @@ processed on a particular bbdev device poll mode driver. int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_enc turbo_enc; + union { + struct rte_bbdev_op_turbo_enc turbo_enc; + struct rte_bbdev_op_ldpc_enc ldpc_enc; + } }; struct rte_bbdev_dec_op { int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_dec turbo_dec; + union { + struct rte_bbdev_op_turbo_dec turbo_enc; + struct rte_bbdev_op_ldpc_dec ldpc_enc; + } }; The operation structure by itself defines the operation type. It includes an
@@ -399,19 +406,31 @@ BBDEV Inbound/Outbound Memory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo coding on a referenced mbuf data buffer. It is used for either +performing Turbo and LDPC coding on a referenced mbuf data buffer. It is used for either encode or decode operations. -Turbo Encode operation accepts one input and one output. -Turbo Decode operation accepts one input and two outputs, called *hard-decision* -and *soft-decision* outputs. *Soft-decision* output is optional. + +.. csv-table:: Operation I/O + :header: "FEC", "In", "Out" + :widths: 20, 30, 30 + + "Turbo Encode", "input", "output" + "Turbo Decode", "input", "hard output" + " ", " ", "soft output (optional)" + "LDPC Encode", "input", "output" + "LDPC Decode", "input", "hard output" + "", "HQ combine (optional)", "HQ combine (optional)" + " ", "", "soft output (optional)" + It is expected that the application provides input and output mbuf pointers -allocated and ready to use. The baseband framework supports turbo coding on -Code Blocks (CB) and Transport Blocks (TB). +allocated and ready to use. + +The baseband framework supports FEC coding on Code Blocks (CB) and +Transport Blocks (TB). For the output buffer(s), the application is required to provide an allocated -and free mbuf, so that bbdev write back the resulting output. +and free mbuf, to which the resulting output will be written. The support of split "scattered" buffers is a driver-specific feature, so it is reported individually by the supporting driver as a capability.
@@ -436,26 +455,26 @@ This structure has three elements: This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs contiguously located next to each other. A Transport Block (TB) represents a whole piece of data that is divided into one or more CBs. Maximum number of - CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + CBs can be contained in one TB is defined by + ``RTE_BBDEV_(TURBO/LDPC)MAX_CODE_BLOCKS``. An mbuf data structure cannot represent more than one TB. The smallest piece of data that can be contained in one mbuf is one CB. An mbuf can include one contiguous CB, subset of contiguous CBs that are - belonging to one TB, or all contiguous CBs that are belonging to one TB. + belonging to one TB, or all contiguous CBs that belong to one TB. If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is capable of collecting (gathering) non-contiguous (scattered) data from multiple locations in the memory. This capability is reported by the capability flags: - - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``, - - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``, ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``. - Only if a BBDEV PMD supports this feature, chained mbuf data structures are - accepted. A chained mbuf can represent one non-contiguous CB or multiple - non-contiguous CBs. - The first mbuf segment in the given chained mbuf represents the first piece + Chained mbuf data structures are only accepted if a BBDEV PMD supports this + feature. A chained mbuf can represent one non-contiguous CB or multiple non-contiguous + CBs. The first mbuf segment in the given chained mbuf represents the first piece of the CB. Offset is only applicable to the first segment. ``length`` is the total length of the CB.
@@ -506,14 +525,22 @@ BBDEV Turbo Encode Operation }; }; -The Turbo encode structure is composed of the ``input`` and ``output`` mbuf -data pointers. The provided mbuf pointer of ``input`` needs to be big enough to -stretch for extra CRC trailers. +The Turbo encode structure includes the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big +enough to stretch for extra CRC trailers. -``op_flags`` parameter holds all operation related flags, like whether CRC24A is -included by the application or not. +.. csv-table:: **struct rte_bbdev_op_turbo_enc** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","input CB or TB data" + "output","rate matched CB or TB output buffer" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" -``code_block_mode`` flag identifies the mode in which bbdev is operating in. The encode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is standalone. While
@@ -525,21 +552,21 @@ are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` call belong to one mode, either CB-mode or TB-mode. -In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +In case that the TB is smaller than Z (6144 bits), then effectively the TB = CB. CRC24A is appended to the tail of the CB. The application is responsible for calculating and appending CRC24A before calling BBDEV in case that the underlying driver does not support CRC24A generation. In CB-mode, CRC24A/B is an optional operation. -The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS -36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The CB parameter ``k`` is the size of the CB (this maps to K as described +in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` informs the application with relevant capability. These flags can be set in the -``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB -before going forward with Turbo encoding. +``op_flags`` parameter to indicate to BBDEV to calculate and append CRC24A/B +to CB before going forward with Turbo encoding. Output format of the CB encode will have the encoded CB in ``e`` size output (this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf
@@ -600,13 +627,26 @@ BBDEV Turbo Decode Operation }; }; -The Turbo decode structure is composed of the ``input`` and ``output`` mbuf -data pointers. - -``op_flags`` parameter holds all operation related flags, like whether CRC24B is -retained or not. - -``code_block_mode`` flag identifies the mode in which bbdev is operating in. +The Turbo decode structure includes the ``input``, ``hard_output`` and +optionally the ``soft_output`` mbuf data pointers. + +.. csv-table:: **struct rte_bbdev_op_turbo_dec** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","virtual circular buffer, wk, size 3*Kpi for each CB" + "hard output","hard decisions buffer, decoded output, size K for each CB" + "soft output","soft LLR output buffer (optional)" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "iter_max","maximum number of iterations to perofrm in decode all CBs" + "iter_min","minimum number of iterations to perform in decoding all CBs" + "iter_count","number of iterations to performed in decoding all CBs" + "ext_scale","scale factor on extrinsic info (5 bits)" + "num_maps","number of MAP engines to use in decode" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" Similarly, the decode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is
@@ -618,7 +658,8 @@ to a bigger TB are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` call belong to one mode, either CB-mode or TB-mode. -The input ``k`` is the size of the decoded CB (this maps to K as described in + +The CB parameter ``k`` is the size of the decoded CB (this maps to K as described in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case.
@@ -638,9 +679,9 @@ Soft output is an optional capability for BBDEV PMDs. Setting flag CRC24B at the end of each CB. This might be useful for the application in debug mode. An LLR rate matched output is computed in the ``soft_output`` buffer structure -for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section -5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the -encoded buffer of size ``e``. +for the given CB parameter ``e`` size (this maps to E described in +3GPP TS 36.212 section 5.1.4.1.2). The output mbuf buffer size needs to be big +enough to hold the encoded buffer of size ``e``. The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the number of the remaining CB VCBs is calculated automatically by BBDEV before
@@ -669,6 +710,376 @@ TB-mode. CB-mode is a reduced version, where only one CB exists: Turbo decoding of Code Blocks in mbuf structure +BBDEV LDPC Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC encode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC encode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +| Set to bypass bit-level interleaver on output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_RATE_MATCH | +| Set to enabling the RATE_MATCHING processing | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24A_ATTACH | +| Set to attach transport block CRC-24A | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24B_ATTACH | +| Set to attach code block CRC-24B | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_16_ATTACH | +| Set to attach code block CRC-16 | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_INTERRUPTS | +| Set if a device supports encoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CONCATENATION | +| Set if a device supports concatenation of non byte aligned output | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC encode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + struct rte_bbdev_op_ldpc_enc { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_enc_ldpc_cb_params cb_params; + struct rte_bbdev_op_enc_ldpc_tb_params tb_params; + }; + }; + +The LDPC encode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|output |rate matched CB or TB output buffer | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ ++ +c_ab +number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits, r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the +incoming code block or transport block data. + +The mbuf output ``output`` is mandatory and is the encoded CB(s). In +CB-mode ut contains the encoded CB of size ``e`` (E in 3GPP TS 38.212 +section 6.2.5). In TB-mode it contains multiple contiguous encoded CBs +of size ``ea`` or ``eb``. +The ``output`` buffer is allocated by the application with enough room +for the output data. + +The encode interface works on both a code block (CB) and a transport +block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (attach CRC24B if required) +* CB-mode: one CB making up one TB (attach CRC24A if required) +* TB-mode: one or more CB of a partial TB (attach CRC24B(s) if required) +* TB-mode: one or more CB of a complete TB (attach CRC24AB(s) if required) + +In CB-mode if ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is set then CRC24A +is appended to the CB. If ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is not +set the application is responsible for calculating and appending CRC24A +before calling BBDEV. The input data mbuf ``length`` is inclusive of +CRC24A/B where present and is equal to the code block size ``K``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the +inbound TB data buffer, unless the ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +flag is set when it is the responsibility of BBDEV. The input data +mbuf ``length`` is total size of the CBs inclusive of any CRC24A and +CRC24B in the case they were appended by the application. + +Not all BBDEV PMDs may be capable of CRC24A/B calculation. Flags +``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` and ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` +inform the application of the relevant capability. These flags can be set +in the ``op_flags`` parameter to indicate BBDEV to calculate and append +CRC24A to CB before going forward with LDPC encoding. + +The difference between the partial and full-size TB is that BBDEV needs +the index of the first CB in this group and the number of CBs in the group. +The first CB index is given by ``r`` but the number of the CBs is +calculated by BBDEV before signalling to the driver. + +The number of CBs in the group should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +Figure 13.1 above showing the Turbo encoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC encode. + +BBDEV LDPC Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC decode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC decode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +| Set for transport block CRC-24A checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +| Set for code block CRC-24B checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +| Set to drop the last CRC bits decoding output | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on input stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +| Set for HARQ combined input stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +| Set for HARQ combined output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_BYPASS | +| Set for LDPC decoder bypass | +| | +| RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE must be set | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_SOFT_OUT | +| Set for soft-output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +| Set for Rate-Matching bypass on soft-out stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on soft-output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +| Set for iteration stopping on successful decode condition enable | +| | +| Where a successful decode is a successful syndrome check | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_INTERRUPTS | +| Set if a device supports decoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +| Set if a device supports input/output HARQ compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_LLR_COMPRESSION | +| Set if a device supports input LLR compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | +| Set if a device supports HARQ input to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | +| Set if a device supports HARQ output to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK | +| Set if a device supports loopback access to HARQ internal memory | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC decode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + + struct rte_bbdev_op_ldpc_dec { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data hard_output; + struct rte_bbdev_op_data soft_output; + struct rte_bbdev_op_data harq_combined_input; + struct rte_bbdev_op_data harq_combined_output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t iter_max; + uint8_t iter_count; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_dec_ldpc_cb_params cb_params; + struct rte_bbdev_op_dec_ldpc_tb_params tb_params; + }; + }; + + +The LDPC decode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|hard_output |hard decisions buffer, decoded output | ++----------------+--------------------------------------------------------------------+ +|soft_output |soft LLR output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_input |HARQ combined input buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_output|HARQ combined output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {1,2,4,6,8} from pi/2-BPSK to 256QAM | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|iter_max |maximum number of iterations to perform in decode all CBs | ++----------------+--------------------------------------------------------------------+ +|iter_count |number of iterations performed in decoding all CBs | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ +| |c_ab |number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs +and is the Virtual Circular Buffer data stream with null padding. +Each byte in the input circular buffer is the LLR value of each bit of +the original CB. + +The mbuf output ``hard_output`` is mandatory and is the decoded CBs size +K (CRC24A/B is the last 24-bit in each decoded CB). + +The mbuf output ``soft_output`` is optional and is an LLR rate matched +output of size ``e`` (this is ``E`` as per 3GPP TS 38.212 section 6.2.5). + +The mbuf input ``harq_combine_input`` is optional and is a buffer with +the input to the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The mbuf output ``harq_combine_output`` is optional and is a buffer for +the output of the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The output mbuf data structures are expected to be allocated by the +application with enough room for the output data. + +As with the LDPC encode, the decode interface works on both a code block +(CB) and a transport block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (check CRC24B if required) +* CB-mode: one CB making up one TB (check CRC24A if required) +* TB-mode: one or more CB making up a partial TB (check CRC24B(s) if required) +* TB-mode: one or more CB making up a complete TB (check CRC24B(s) if required) + +The mbuf ``length`` is inclusive of CRC24A/B where present and is equal +the code block size ``K``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +the number of the remaining CB VCBs is calculated automatically by BBDEV +and passed down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +Figure 13.2 above showing the Turbo decoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC decode. + Sample code -----------
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 05/10] docs/guides: updating bbdev API for 5GNR operations
Quoted 11 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 05/10] docs/guides: updating bbdev API for 5GNR operations
Quoted 5 lines
The documentation captures the related change in BBDEV API to support 5GNR encode/decode operations.
Signed-off-by Nicolas Chautru <[email protected]>---
PATCH v4 6/10 baseband/turbo_sw: extension of turbosw PMD for 5G
In reply to Nicolas ChautruImplementation still based on Intel SDK libraries optimized for AVX512 instructions set and 5GNR. This can be also build for AVX2 for 4G capability or without SDK dependency for maintenance.
--- config/common_base | 1 + drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 686 ++++++++++++++++++++++- drivers/baseband/turbo_sw/meson.build | 10 + mk/rte.app.mk | 8 +- 5 files changed, 707 insertions(+), 13 deletions(-)
config/common_base +1 -0
@@ -530,6 +530,7 @@ CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y CONFIG_RTE_BBDEV_SDK_AVX2=n +CONFIG_RTE_BBDEV_SDK_AVX512=n # # Compile PMD for NULL bbdev device
drivers/baseband/turbo_sw/Makefile +14 -1
@@ -3,7 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk - # library name LIB = librte_pmd_bbdev_turbo_sw.a
@@ -34,6 +33,20 @@ LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml endif +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),n) +$(error "CONFIG_RTE_BBDEV_SDK_AVX512 requires CONFIG_RTE_BBDEV_SDK_AVX2 set") +endif +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_dematching_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif + # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +675 -11
884 lines not on this page · raw message
drivers/baseband/turbo_sw/meson.build +10 -0
@@ -23,6 +23,16 @@ if dpdk_conf.has('RTE_BBDEV_SDK_AVX2') includes += include_directories(path + '/lib_common') endif endif +if dpdk_conf.has('RTE_BBDEV_SDK_AVX512') + ext_deps += cc.find_library('libldpc_encoder_5gnr', dirs: [path + '/lib_ldpc_encoder_5gnr'], required: true) + ext_deps += cc.find_library('libldpc_decoder_5gnr', dirs: [path + '/lib_ldpc_decoder_5gnr'], required: true) + ext_deps += cc.find_library('libLDPC_ratematch_5gnr', dirs: [path + '/lib_LDPC_ratematch_5gnr'], required: true) + ext_deps += cc.find_library('librate_dematching_5gnr', dirs: [path + '/lib_rate_dematching_5gnr'], required: true) + includes += include_directories(path + '/lib_ldpc_encoder_5gnr') + includes += include_directories(path + '/lib_ldpc_decoder_5gnr') + includes += include_directories(path + '/lib_LDPC_ratematch_5gnr') + includes += include_directories(path + '/lib_rate_dematching_5gnr') +endif deps += ['bbdev', 'bus_vdev', 'ring'] name = 'bbdev_turbo_sw'
mk/rte.app.mk +7 -1
@@ -226,7 +226,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcr _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps -lsvml +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif # CONFIG_RTE_BBDEV_SDK_AVX512 endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 06/10] baseband/turbo_sw: extension of turbosw PMD for 5G
Quoted 11 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 06/10] baseband/turbo_sw: extension of turbosw PMD for 5G
Quoted 7 lines
Implementation still based on Intel SDK libraries optimized for AVX512 instructions set and 5GNR. This can be also build for AVX2 for 4G capability or without SDK dependency for maintenance.
Signed-off-by Nicolas Chautru <[email protected]>---
PATCH v4 7/10 docs/guides: updating building steps for BBDEV PMD
In reply to Nicolas ChautruThis now includes steps to build with either
libraries for AVX2, or AVX512 or no dependency.
--- doc/guides/bbdevs/turbo_sw.rst | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-)
doc/guides/bbdevs/turbo_sw.rst +29 -13
@@ -5,20 +5,21 @@ SW Turbo Poll Mode Driver ========================= The SW Turbo PMD (**baseband_turbo_sw**) provides a software only poll mode bbdev -driver that can optionally utilize Intel optimized libraries for LTE Layer 1 -workloads acceleration. +driver that can optionally utilize Intel optimized libraries for LTE and 5GNR +Layer 1 workloads acceleration. Note that the driver can also be built without any dependency with reduced functionality for maintenance purpose. To enable linking to the SDK libraries see detailed installation section below. -One flag can be enabled depending on whether the target machine can support -AVX2 instructions sets and the related SDK libraries for vectorized +Two flags can be enabled depending on whether the target machine can support +AVX2 and AVX512 instructions sets and the related SDK libraries for vectorized signal processing functions are installed : - CONFIG_RTE_BBDEV_SDK_AVX2 - -By default this flag is disabled. For AVX2 machine and SDK -library installed then this flag can be enabled. +- CONFIG_RTE_BBDEV_SDK_AVX512 +By default these 2 flags are disabled by default. For AVX2 machine and SDK +library installed then the first flag can be enabled. For AVX512 machine and +SDK library installed then both flags can be enabled for full real time capability. This PMD supports the functions: FEC, Rate Matching and CRC functions detailed in the Features section.
@@ -45,11 +46,25 @@ For the LTE decode operation: * ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` * ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` +For the 5G NR LDPC encode operation: + +* ``RTE_BBDEV_LDPC_RATE_MATCH`` +* ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +* ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` + +For the 5G NR LDPC decode operation: + +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE`` +* ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE`` Limitations ----------- -* In-place operations for Turbo encode and decode are not supported +* In-place operations for encode and decode are not supported Installation ------------
@@ -60,7 +75,7 @@ FlexRAN SDK Download As an option it is possible to link this driver with FleXRAN SDK libraries which can enable real time signal processing using AVX instructions. -These libraries are available through this link `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. +These libraries are available through this `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. After download is complete, the user needs to unpack and compile on their system before building DPDK.
@@ -115,14 +130,13 @@ The following instructions should be followed in this exact order: .. code-block:: console - cd build-avx2-icc/ + cd build-avx512-icc/ make && make install - Initialization -------------- -In order to enable this virtual bbdev PMD, the user must: +In order to enable this virtual bbdev PMD, the user may: * Build the ``FLEXRAN SDK`` libraries (explained in Installation section).
@@ -137,9 +151,11 @@ Example: export FLEXRAN_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/install export DIR_WIRELESS_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/ -* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` +* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` and ``CONFIG_RTE_BBDEV_SDK_AVX512=y`` in DPDK common configuration file ``config/common_base`` to be able to use the SDK libraries as mentioned above. + For AVX2 machine it is possible to only enable CONFIG_RTE_BBDEV_SDK_AVX2 + for limited 4G functionality. If no flag are set the PMD driver will still build but its capabilities will be limited accordingly.
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 07/10] docs/guides: updating building steps for BBDEV PMD
Quoted 11 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 07/10] docs/guides: updating building steps for BBDEV PMD
Quoted 5 lines
This now includes steps to build with either
libraries for AVX2, or AVX512 or no dependency.Signed-off-by Nicolas Chautru <[email protected]>---
PATCH v4 8/10 test-bbdev: update of bbdev test-app for 5GNR
In reply to Nicolas ChautruExtending test framework for FEC 5GNR operations
for UT verification and profiling.
--- app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++++++++++++++++++++++++--- app/test-bbdev/test_bbdev_vector.c | 517 +++++++++++++- app/test-bbdev/test_bbdev_vector.h | 14 +- app/test-bbdev/turbo_enc_default.data | 2 +- 9 files changed, 1715 insertions(+), 127 deletions(-)
app/test-bbdev/main.c +30 -18
@@ -16,11 +16,13 @@#include "main.h" +/* Defines how many testcases can be specified as cmdline args */ #define MAX_CMDLINE_TESTCASES 8static const char tc_sep =',' ; +/* Declare structure for command line test parameters and options */ static struct test_params { struct test_command *test_to_run[MAX_CMDLINE_TESTCASES]; unsigned int num_tests;
@@ -28,6 +30,7 @@unsigned int burst_sz;unsigned int num_lcores;char test_vector_filename[PATH_MAX ]; +bool init_device; } test_params; static struct test_commands_list commands_list =
@@ -46,9 +49,8 @@unsigned int total =0 , skipped =0 , succeeded =0 , failed =0 ;uint64_t start, end; -printf ( -"\n + ------------------------------------------------------- +\n" ); -printf (" + Starting Test Suite : %s\n" , suite->suite_name); +printf ("\n===========================================================\n" ); +printf ("Starting Test Suite : %s\n" , suite->suite_name); start =rte_rdtsc_precise ();
@@ -57,15 +59,13 @@if (test_result ==TEST_FAILED ) {printf (" + Test suite setup %s failed!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 1 ; }if (test_result ==TEST_SKIPPED ) {printf (" + Test suite setup %s skipped!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 0 ; } }
@@ -82,15 +82,15 @@if (test_result ==TEST_SUCCESS ) { succeeded++; -printf (" + TestCase [%2d] : %s passed\n" , total, +printf ("TestCase [%2d] : %s passed\n" , total, suite->unit_test_cases[total].name); }else if (test_result ==TEST_SKIPPED ) { skipped++; -printf (" + TestCase [%2d] : %s skipped\n" , total, +printf ("TestCase [%2d] : %s skipped\n" , total, suite->unit_test_cases[total].name); }else { failed++; -printf (" + TestCase [%2d] : %s failed\n" , total, +printf ("TestCase [%2d] : %s failed\n" , total, suite->unit_test_cases[total].name); }
@@ -103,7 +103,7 @@ end =rte_rdtsc_precise (); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );printf (" + Test Suite Summary : %s\n" , suite->suite_name);printf (" + Tests Total : %2d\n" , total);printf (" + Tests Skipped : %2d\n" , skipped);
@@ -111,7 +111,7 @@printf (" + Tests Failed : %2d\n" , failed);printf (" + Tests Lasted : %lg ms\n" , ((end - start) *1000 ) / (double )rte_get_tsc_hz ()); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );return (failed >0 ) ?1 :0 ; }
@@ -140,12 +140,18 @@return test_params.num_lcores; } +bool +get_init_device (void ) +{ +return test_params.init_device; +} +static void print_usage (const char *prog_name) {struct test_command *t; - printf("Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" + printf("***Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" "\t[-b/--burst-size BURST_SIZE]\n" "\t[-v/--test-vector VECTOR_FILE]\n" "\t[-c/--test-cases TEST_CASE[,TEST_CASE,...]]]\n",
@@ -174,11 +180,12 @@ { "test-cases", 1, 0, 'c' }, { "test-vector", 1, 0, 'v' }, { "lcores", 1, 0, 'l' }, + { "init-device", 0, 0, 'i'}, { "help", 0, 0, 'h' }, { NULL, 0, 0, 0 } }; -while ((opt =getopt_long (argc, argv,"hn:b:c:v:l:" , lgopts, +while ((opt =getopt_long (argc, argv,"hin:b:c:v:l:" , lgopts, &option_index)) !=EOF )switch (opt) {case 'n' :
@@ -226,8 +233,9 @@TEST_ASSERT (strlen (optarg) >0 ,"Config file name is null" ); -strlcpy (tp->test_vector_filename, optarg, -sizeof (tp->test_vector_filename)); +snprintf (tp->test_vector_filename, +sizeof (tp->test_vector_filename), +"%s" , optarg);break ;case 'l' : TEST_ASSERT(strlen(optarg) > 0,
@@ -237,6 +245,10 @@"Num of lcores mustn't be greater than %u" , RTE_MAX_LCORE);break ; +case 'i' : +/* indicate fpga fec config required */ + tp->init_device = true; +break ;case 'h' :print_usage (argv[0 ]);return 0 ;
@@ -279,7 +291,7 @@struct test_command *t;TAILQ_FOREACH (t, &commands_list, next) - ret |= t->callback(); + ret |= (int) t->callback();return ret; }
@@ -291,7 +303,7 @@unsigned int i;for (i =0 ; i < tp->num_tests; ++i) - ret |= tp->test_to_run[i]->callback (); + ret |= (int ) tp->test_to_run[i]->callback ();return ret; }
app/test-bbdev/main.h +5 -1
@@ -20,6 +20,7 @@#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U +#define TEST_ASSERT (cond, msg, ...) do { \ if (!(cond)) { \ printf("TestCase %s() line %d failed: " \
@@ -103,7 +104,8 @@ struct test_command { .command = RTE_STR(name), \ .callback = test_func_##name, \ }; \ - RTE_INIT(test_register_##name) \ + static void __attribute__((constructor, used)) \ + test_register_##name(void) \ { \ add_test_command(&test_struct_##name); \ }
@@ -116,4 +118,6 @@ struct test_command {unsigned int get_num_lcores (void ); +bool get_init_device (void ); +#endif
app/test-bbdev/meson.build +3 -0
@@ -7,3 +7,6 @@ sources = files('main.c', 'test_bbdev_vector.c') allow_experimental_apis = true deps += ['bbdev', 'bus_vdev'] +if dpdk_conf.has('RTE_LIBRTE_PMD_FPGA_LTE_FEC') + deps += ['bbdev_fpga_lte_fec'] +endif
app/test-bbdev/test-bbdev.py +7 -0
@@ -59,6 +59,9 @@ def kill(process): type=int, help="Number of lcores to run.", default=16) +parser.add_argument("-i", "--init-device", + action='store_true', + help="Initialise PF device with default values.") args = parser.parse_args()
@@ -82,6 +85,10 @@ def kill(process): params.extend(["-c"]) params.extend([",".join(args.test_cases)]) +if args.init_device: + params.extend(["-i"]) + + exit_status = 0 for vector in args.test_vector: for burst_size in args.burst_size:
app/test-bbdev/test_bbdev.c +5 -7
@@ -14,8 +14,6 @@#include <rte_bbdev.h> #include <rte_bbdev_op.h> #include <rte_bbdev_pmd.h> -#include <string.h> -#include <rte_string_fns.h> #include "main.h"
@@ -770,7 +768,7 @@ struct bbdev_testsuite_params { {struct rte_bbdev *dev1, *dev2;const char *name ="dev_name" ; -char name_tmp[16 ]; +char name_tmp[32 ];int num_devs, num_devs_tmp; dev1 =rte_bbdev_allocate (NULL );
@@ -790,14 +788,14 @@ struct bbdev_testsuite_params {/* Initialize the maximum amount of devices */ do { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp);TEST_ASSERT (dev2 !=NULL ,"Failed to initialize bbdev driver" ); ++num_devs; }while (num_devs < (RTE_BBDEV_MAX_DEVS -1 )); -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp); TEST_ASSERT(dev2 == NULL, "Failed to initialize bbdev driver number %d " "more drivers than RTE_BBDEV_MAX_DEVS: %d ", num_devs,
@@ -806,7 +804,7 @@ struct bbdev_testsuite_params { num_devs--;while (num_devs >= num_devs_tmp) { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_get_named_dev (name_tmp); TEST_ASSERT_SUCCESS(rte_bbdev_release(dev2), "Failed to uninitialize bbdev driver %s ",
@@ -827,7 +825,7 @@ struct bbdev_testsuite_params {TEST_ASSERT_FAIL (rte_bbdev_release (NULL ),"Failed to uninitialize bbdev driver with NULL bbdev" ); -strlcpy (name_tmp,"invalid_name" ,sizeof (name_tmp)); +sprintf (name_tmp,"%s" ,"invalid_name" ); dev2 =rte_bbdev_get_named_dev (name_tmp);TEST_ASSERT_FAIL (rte_bbdev_release (dev2),"Failed to uninitialize bbdev driver with invalid name" );
app/test-bbdev/test_bbdev_perf.c +1149 -84
1,649 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.c +504 -13
661 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.h +11 -3
@@ -28,15 +28,21 @@ enum {TEST_BBDEV_VF_NCB_NEG = (1ULL <<16 ),TEST_BBDEV_VF_NCB_POS = (1ULL <<17 ),TEST_BBDEV_VF_R = (1ULL <<18 ), -TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<19 ), -TEST_BBDEV_VF_OP_FLAGS = (1ULL <<20 ), - TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 21), +TEST_BBDEV_VF_BG = (1ULL <<19 ), +TEST_BBDEV_VF_ZC = (1ULL <<20 ), +TEST_BBDEV_VF_F = (1ULL <<21 ), +TEST_BBDEV_VF_QM = (1ULL <<22 ), +TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<23 ), +TEST_BBDEV_VF_OP_FLAGS = (1ULL <<24 ), + TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25), };enum op_data_type {DATA_INPUT =0 ,DATA_SOFT_OUTPUT ,DATA_HARD_OUTPUT , +DATA_HARQ_INPUT , +DATA_HARQ_OUTPUT ,DATA_NUM_TYPES , };
@@ -57,6 +63,8 @@ struct test_bbdev_vector {union {struct rte_bbdev_op_turbo_dec turbo_dec;struct rte_bbdev_op_turbo_enc turbo_enc; +struct rte_bbdev_op_ldpc_dec ldpc_dec; +struct rte_bbdev_op_ldpc_enc ldpc_enc; };/* Additional storage for op data entries */ struct op_data_entries entries[DATA_NUM_TYPES ];
app/test-bbdev/turbo_enc_default.data +1 -1
@@ -1 +1 @@ -test_vectors/turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data +test_vectors/turbo_enc_c1_k6144_r0_e18444.data
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 08/10] test-bbdev: update of bbdev test-app for 5GNR
Quoted 10 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 08/10] test-bbdev: update of bbdev test-app for 5GNR
Quoted 5 lines
Extending test framework for FEC 5GNR operations
for UT verification and profiling.Signed-off-by Nicolas Chautru <[email protected]>---
PATCH v4 9/10 test-bbdev: test vectors for 5GNR verification
In reply to Nicolas ChautruAdding LDPC vectors for UT verification, coverage, and profiling for 5GNR encode/decode operations.
--- app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 354 ++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 685 +++++++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 903 +++++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 50 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 746 ++++++++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 746 ++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 75 ++ app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 256 +++++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1216 ++++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 150 +++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 69 ++ app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 196 ++++ 17 files changed, 5581 insertions(+) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data
app/test-bbdev/ldpc_dec_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/ldpc_dec_v2342.data
app/test-bbdev/ldpc_enc_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data new file +354 -0
354 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data new file +685 -0
685 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data new file +903 -0
903 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v11835.data new file +50 -0
50 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342.data new file +746 -0
746 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data new file +746 -0
258 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v7813.data new file +49 -0
49 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8480.data new file +75 -0
75 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8568.data new file +256 -0
256 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v9503.data new file +1216 -0
1,216 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v11835.data new file +42 -0
42 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v2342.data new file +150 -0
150 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v7813.data new file +42 -0
42 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v8568.data new file +69 -0
69 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v9503.data new file +196 -0
196 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH v4 09/10] test-bbdev: test vectors for 5GNR verification
Quoted 18 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 09/10] test-bbdev: test vectors for 5GNR verificationAdding LDPC vectors for UT verification, coverage, and profiling for 5GNR encode/decode operations.
Signed-off-by Nicolas Chautru <[email protected]>---
+++ b/app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data line 3
Quoted 3 lines
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data new file +3
-0@@ -0,0 +1,354 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation +# Origin : FEC5G_UL_1/xxxx
Probably a new line between Origin and he license header helps to avoid any misconception that his somehow relates to the copyright header. Also, don't understand its purpose here?
Review line 5
Quoted 2 lines
(quoted diff) +2
-0+op_type = +RTE_BBDEV_OP_LDPC_DEC
You may retain my ack in further edits..
Re: [dpdk-dev] [PATCH v4 09/10] test-bbdev: test vectors for 5GNR verification
Hi Amr,
Quoted 16 lines
Quoted 15 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 09/10] test-bbdev: test vectors for 5GNR verificationAdding LDPC vectors for UT verification, coverage, and profiling for 5GNR encode/decode operations.
Signed-off-by Nicolas Chautru <[email protected]>---
Quoted 8 lines
Review line 2
Quoted 4 lines
+++ b/app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data
(quoted diff) +2
-0@@ -0,0 +1,354 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel +Corporation # Origin : FEC5G_UL_1/xxxxProbably a new line between Origin and he license header helps to avoid any misconception that his somehow relates to the copyright header. Also, don't understand its purpose here?
This was for internal traceability so that to be able to regenerate these vectors if required. Still I am removing these from the vectors headers in the updated serie since this can lead confusion.
Thanks
Nic
PATCH v4 10/10 doc: announce bbdev changes
In reply to Nicolas ChautruUpdate of the release notes for BBDEV features add and extension of ABI in previous commit.
--- doc/guides/rel_notes/release_19_08.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
doc/guides/rel_notes/release_19_08.rst +15 -0
@@ -88,6 +88,19 @@ New Features * Added multi-queue support to allow one af_xdp vdev with multiple netdev queues +* **Added a FPGA_LTE_FEC bbdev PMD.** + + Added the new ``fpga_lte_fec`` bbdev driver for the Intel® FPGA PAC + (Programmable Acceleration Card) N3000. See the + :doc:`../bbdevs/fpga_lte_fec` BBDEV guide for more details on this new driver. + +* **Updated TURBO_SW bbdev PMD.** + + Updated the ``turbo_sw`` bbdev driver with changes including: + + * Added option to build the driver with or without dependency of external + SDK libraries. + * Added support for 5GNR encode/decode operations. Removed Items -------------
@@ -140,6 +153,8 @@ ABI Changes Also, make sure to start the actual text at the margin. ========================================================= +* bbdev: New parameters added to support 5GNR operations. + Shared Library Versions -----------------------
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v4 10/10] doc: announce bbdev changes
Quoted 10 lines
-----Original Message-----
From: Chautru, Nicolas
Sent: Monday 24 June 2019 03:53
To: [email protected]; [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>; Chautru, Nicolas <[email protected]>
Subject: [PATCH v4 10/10] doc: announce bbdev changes
Quoted 5 lines
Update of the release notes for BBDEV features add and extension of ABI in previous commit.
Signed-off-by Nicolas Chautru <[email protected]>---
Re: [dpdk-dev] [PATCH v4 10/10] doc: announce bbdev changes
In reply to Nicolas ChautruHi Nicolas,
Quoted 44 lines
Update of the release notes for BBDEV features add and extension of ABI in previous commit.
Signed-off-by Nicolas Chautru <[email protected]>--- doc/guides/rel_notes/release_19_08.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+)doc/guides/rel_notes/release_19_08.rst +15
-1@@ -88,6 +88,19 @@ New Features * Added multi-queue support to allow one af_xdp vdev with multiple netdev queues +* **Added a FPGA_LTE_FEC bbdev PMD.** + + Added the new ``fpga_lte_fec`` bbdev driver for the Intel® FPGA PAC + (Programmable Acceleration Card) N3000. See the + :doc:`../bbdevs/fpga_lte_fec` BBDEV guide for more details on this new driver. + +* **Updated TURBO_SW bbdev PMD.** + + Updated the ``turbo_sw`` bbdev driver with changes including: + + * Added option to build the driver with or without dependency of external + SDK libraries. + * Added support for 5GNR encode/decode operations. Removed Items -------------@@ -140,6 +153,8 @@ ABI Changes Also, make sure to start the actual text at the margin. ========================================================= +* bbdev: New parameters added to support 5GNR operations. + Shared Library Versions ----------------------- --
Quoted 1 line
1.8.3.1
Release note changes should be part of the same patch which is adding that change.
One more thing, if there is a change in ABI, should you also increment the bbdev ABI version?
Please also send a rebased version of your patchset, so that builds can be verified by CI. The dependent patches are applied on the sub-tree.
-Akhil
Re: [dpdk-dev] [PATCH v4 10/10] doc: announce bbdev changes
Hi Akhil,
Quoted 41 lines
Quoted 41 lines
Update of the release notes for BBDEV features add and extension of ABI in previous commit.
Signed-off-by Nicolas Chautru <[email protected]>--- doc/guides/rel_notes/release_19_08.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+)doc/guides/rel_notes/release_19_08.rst +15
-0@@ -88,6 +88,19 @@ New Features * Added multi-queue support to allow one af_xdp vdev with multiple netdev queues +* **Added a FPGA_LTE_FEC bbdev PMD.** + + Added the new ``fpga_lte_fec`` bbdev driver for the Intel® FPGA + PAC (Programmable Acceleration Card) N3000. See the + :doc:`../bbdevs/fpga_lte_fec` BBDEV guide for more details on this new driver. + +* **Updated TURBO_SW bbdev PMD.** + + Updated the ``turbo_sw`` bbdev driver with changes including: + + * Added option to build the driver with or without dependency of external + SDK libraries. + * Added support for 5GNR encode/decode operations. Removed Items -------------@@ -140,6 +153,8 @@ ABI Changes Also, make sure to start the actual text at the margin. ========================================================= +* bbdev: New parameters added to support 5GNR operations. +
Quoted 6 lines
Quoted 4 lines
doc/guides/rel_notes/release_19_08.rst +0
-1Shared Library Versions ----------------------- --1.8.3.1
Release note changes should be part of the same patch which is adding that change.
No problem, I am pushing an updated serie : https://patches.dpdk.org/project/dpdk/list/?series=5259
Quoted 1 line
One more thing, if there is a change in ABI, should you also increment the bbdev ABI version?
The bbdev ABI is still marked as __rte_experimental hence I don't believe we have yet to increment it.
Quoted 1 line
Please also send a rebased version of your patchset, so that builds can be verified by CI. The dependent patches are applied on the sub-tree.
OK, I did this on the serie above. Note that the previous was already verified with CI since I kept the dependency within the previous serie. Still cleaner now, you should just have to apply the serie as is now.
Thanks!
Nic
Re: [dpdk-dev] [PATCH v4 10/10] doc: announce bbdev changes
01/07/2019 20:14, Chautru, Nicolas:
Quoted 4 lines
Quoted 2 lines
One more thing, if there is a change in ABI, should you also increment the bbdev ABI version?
The bbdev ABI is still marked as
__rte_experimentalhence I don't believe we have yet to increment it.
ABI version and experimental state are two different things. I think we should upgrade the version even for experimental libraries.
Re: [dpdk-dev] [PATCH v4 10/10] doc: announce bbdev changes
Quoted 8 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, July 1, 2019 12:18 PM
To: Chautru, Nicolas <[email protected]>
Cc: Akhil Goyal <[email protected]>; [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>
Subject: Re: [PATCH v4 10/10] doc: announce bbdev changes
Quoted 8 lines
01/07/2019 20:14, Chautru, Nicolas:
Quoted 4 lines
Quoted 2 lines
One more thing, if there is a change in ABI, should you also increment the bbdev ABI version?
The bbdev ABI is still marked as
__rte_experimentalhence I don't believe we have yet to increment it.ABI version and experimental state are two different things. I think we should upgrade the version even for experimental libraries.
Thanks Thomas.
Bruce, Ferruh can you comment whether bumping ABI version is required for __rte_experimental API? Arguably the documentation may be interpreted either way : https://doc.dpdk.org/guides-18.08/contributing/versioning.html
In the specific case of bbdev change in that serie, note that only new operations (for 5GNR signal processing) and related symbols are being added. Previous releases included BBDEV API changes without updating ABI version number ( librte_bbdev.so.1).
Thanks for letting me know, in both cases we may make it more explicit on the versioning page. Nic
Re: [dpdk-dev] [PATCH v4 10/10] doc: announce bbdev changes
Quoted 19 lines · Nicolas
Quoted 8 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, July 1, 2019 12:18 PM
To: Chautru, Nicolas <[email protected]>
Cc: Akhil Goyal <[email protected]>; [email protected]; Yigit, Ferruh <[email protected]>; Mokhtar, Amr <[email protected]>
Subject: Re: [PATCH v4 10/10] doc: announce bbdev changesQuoted 8 lines
01/07/2019 20:14, Chautru, Nicolas:
Quoted 4 lines
Quoted 2 lines
One more thing, if there is a change in ABI, should you also increment the bbdev ABI version?
The bbdev ABI is still marked as
__rte_experimentalhence I don't believe we have yet to increment it.ABI version and experimental state are two different things. I think we should upgrade the version even for experimental libraries.
Thanks Thomas.
Quoted 7 lines
Bruce, Ferruh can you comment whether bumping ABI version is required for
__rte_experimentalAPI? Arguably the documentation may be interpreted either way : https://doc.dpdk.org/guides-18.08/contributing/versioning.htmlIn the specific case of bbdev change in that serie, note that only new operations (for 5GNR signal processing) and related symbols are being added. Previous releases included BBDEV API changes without updating ABI version number ( librte_bbdev.so.1).
Thanks for letting me know, in both cases we may make it more explicit on the versioning page. Nic
I think there may be some misunderstanding here, so long as no existing APIs are changed or removed, we don't bump the ABI version.
/Bruce
PATCH v3 2/10 baseband/fpga_lte_fec: dependency patch
In reply to Nicolas ChautruNot meant for review, purely for dependency for CI. This is a squash of the related serie which is not applied yet:
adding driver for FEC on FPGA
https://patches.dpdk.org/project/dpdk/list/?series=5017
--- config/common_base | 5 + doc/guides/bbdevs/fpga_lte_fec.rst | 318 +++ doc/guides/bbdevs/index.rst | 1 + drivers/baseband/Makefile | 2 + drivers/baseband/fpga_lte_fec/Makefile | 29 + drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 2674 ++++++++++++++++++++ drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 73 + drivers/baseband/fpga_lte_fec/meson.build | 7 + .../rte_pmd_bbdev_fpga_lte_fec_version.map | 3 + drivers/baseband/meson.build | 2 +- mk/rte.app.mk | 1 + 11 files changed, 3114 insertions(+), 1 deletion(-) create mode 100644 doc/guides/bbdevs/fpga_lte_fec.rst create mode 100644 drivers/baseband/fpga_lte_fec/Makefile create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c create mode 100644 drivers/baseband/fpga_lte_fec/fpga_lte_fec.h create mode 100644 drivers/baseband/fpga_lte_fec/meson.build create mode 100644 drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map
config/common_base +5 -0
@@ -526,6 +526,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y # EXPERIMENTAL: API may change without prior notice # CONFIG_RTE_LIBRTE_BBDEV=y +CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y CONFIG_RTE_BBDEV_SDK_AVX2=n
@@ -540,6 +541,10 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y # CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y +# Compile PMD for Intel FPGA LTE FEC bbdev device +# +CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC=y + # # Compile generic crypto device library #
doc/guides/bbdevs/fpga_lte_fec.rst new file +318 -0
318 lines not on this page · raw message
doc/guides/bbdevs/index.rst +1 -0
@@ -10,3 +10,4 @@ Baseband Device Drivers null turbo_sw + fpga_lte_fec
drivers/baseband/Makefile +2 -0
@@ -10,5 +10,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += null DEPDIRS-null = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += turbo_sw DEPDIRS-turbo_sw = $(core-libs) +DIRS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec +DEPDIRS-fpga_lte_fec = $(core-libs) include $(RTE_SDK)/mk/rte.subdir.mk
drivers/baseband/fpga_lte_fec/Makefile new file +29 -0
@@ -0,0 +1,29 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +include $(RTE_SDK)/mk/rte.vars.mk + +# library name +LIB = librte_pmd_fpga_lte_fec.a + +# build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_bbdev +LDLIBS += -lrte_pci -lrte_bus_pci + +# versioning export map +EXPORT_MAP := rte_pmd_bbdev_fpga_lte_fec_version.map + +# library version +LIBABIVER := 1 + +# library source files +SRCS-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC) += fpga_lte_fec.c + +# export include files +SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_FPGA_LTE_FEC)-include += fpga_lte_fec.h + +include $(RTE_SDK)/mk/rte.lib.mk
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c new file +2674 -0
2,625 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/fpga_lte_fec.h new file +73 -0
73 lines not on this page · raw message
drivers/baseband/fpga_lte_fec/meson.build new file +7 -0
Lines of this file are not shown. View the raw message.
drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map new file +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
PATCH v3 3/10 bbdev: renaming non-generic LTE specific structure
In reply to Nicolas ChautruRenaming of the enums and structure which were LTE specific to allow for extension and support for 5GNR operations.
--- app/test-bbdev/test_bbdev_vector.c | 4 +- app/test-bbdev/test_bbdev_vector.h | 2 +- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 103 ++++++++++++----------- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 36 ++++---- lib/librte_bbdev/rte_bbdev_op.h | 26 +++--- 5 files changed, 86 insertions(+), 85 deletions(-)
app/test-bbdev/test_bbdev_vector.c +2 -2
@@ -298,9 +298,9 @@ op_data = vector->entries[type].segments; nb_ops = &vector->entries[type].nb_segments; -if (*nb_ops >=RTE_BBDEV_MAX_CODE_BLOCKS ) { +if (*nb_ops >=RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {printf ("Too many segments (code blocks defined): %u, max %d!\n" , - *nb_ops,RTE_BBDEV_MAX_CODE_BLOCKS ); + *nb_ops,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }
app/test-bbdev/test_bbdev_vector.h +1 -1
@@ -46,7 +46,7 @@ struct op_data_buf { };struct op_data_entries { -struct op_data_buf segments[RTE_BBDEV_MAX_CODE_BLOCKS ]; +struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ];unsigned int nb_segments; };
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +52 -51
222 lines not on this page · raw message
drivers/baseband/turbo_sw/bbdev_turbo_software.c +18 -18
@@ -34,9 +34,9 @@ rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_TURBO_MAX_CB_SIZE >> 3) + 1) * 48)#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) -#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_TURBO_MAX_CB_SIZE + 4) * 48)/* private data structure */ struct bbdev_private {
@@ -103,7 +103,7 @@ struct turbo_sw_queue { {int32_t result =0 ; -if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE ) +if (k <RTE_BBDEV_TURBO_MIN_CB_SIZE || k >RTE_BBDEV_TURBO_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -158,9 +158,9 @@ struct turbo_sw_queue {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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -172,8 +172,8 @@ struct turbo_sw_queue {RTE_BBDEV_TURBO_CRC_24A_ATTACH |RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, #endif
@@ -257,7 +257,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * + ((RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) {
@@ -277,7 +277,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_TURBO_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -295,7 +295,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_TURBO_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -313,7 +313,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->code_block =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *sizeof (*q->code_block), +RTE_BBDEV_TURBO_MAX_CB_SIZE *sizeof (*q->code_block),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->code_block ==NULL ) { rte_bbdev_log(ERR,
@@ -439,9 +439,9 @@ struct turbo_sw_queue {return -1 ; } -if (k >RTE_BBDEV_MAX_CB_SIZE ) { +if (k >RTE_BBDEV_TURBO_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,RTE_BBDEV_MAX_CB_SIZE ); + k,RTE_BBDEV_TURBO_MAX_CB_SIZE );return -1 ; }
@@ -466,9 +466,9 @@ struct turbo_sw_queue {return -1 ; } -if (kw >RTE_BBDEV_MAX_KW ) { +if (kw >RTE_BBDEV_TURBO_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,RTE_BBDEV_MAX_KW ); + kw,RTE_BBDEV_TURBO_MAX_KW );return -1 ; }
@@ -773,9 +773,9 @@ struct turbo_sw_queue {/* Clear op status */ op->status =0 ; -if (mbuf_total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +if (mbuf_total_left >RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - mbuf_total_left,RTE_BBDEV_MAX_TB_SIZE ); + mbuf_total_left,RTE_BBDEV_TURBO_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -1074,7 +1074,7 @@ struct turbo_sw_queue {* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_TURBO_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out_head, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev_op.h +13 -13
@@ -26,22 +26,22 @@#include <rte_mempool.h> /* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ -#define RTE_BBDEV_C_SUBBLOCK (32) +#define RTE_BBDEV_TURBO_C_SUBBLOCK (32)/* Maximum size of Transport Block (36.213, Table, Table 7.1.7.2.5-1) */ -#define RTE_BBDEV_MAX_TB_SIZE (391656) +#define RTE_BBDEV_TURBO_MAX_TB_SIZE (391656)/* Maximum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MAX_CB_SIZE (6144) +#define RTE_BBDEV_TURBO_MAX_CB_SIZE (6144)/* Minimum size of Code Block (36.212, Table 5.1.3-3) */ -#define RTE_BBDEV_MIN_CB_SIZE (40) +#define RTE_BBDEV_TURBO_MIN_CB_SIZE (40)/* Maximum size of circular buffer */ -#define RTE_BBDEV_MAX_KW (18528) +#define RTE_BBDEV_TURBO_MAX_KW (18528)/* * Maximum number of Code Blocks in Transport Block. It is calculated based on * maximum size of one Code Block and one Transport Block (considering CRC24A * and CRC24B): * (391656 + 24) / (6144 - 24) = 64 */ -#define RTE_BBDEV_MAX_CODE_BLOCKS (64) +#define RTE_BBDEV_TURBO_MAX_CODE_BLOCKS (64)/** Flags for turbo decoder operation and capability structure */ enum rte_bbdev_op_td_flag_bitmasks {
@@ -133,7 +133,7 @@ struct rte_bbdev_op_data {* multiple CBs contiguously located next to each other. * A Transport Block (TB) represents a whole piece of data that is * divided into one or more CBs. Maximum number of CBs can be contained -* in one TB is defined by RTE_BBDEV_MAX_CODE_BLOCKS. +* in one TB is defined by RTE_BBDEV_TURBO_MAX_CODE_BLOCKS. * * An mbuf data structure cannot represent more than one TB. The * smallest piece of data that can be contained in one mbuf is one CB.
@@ -204,7 +204,7 @@ struct rte_bbdev_op_dec_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -288,7 +288,7 @@ struct rte_bbdev_op_turbo_dec { }; }; -struct rte_bbdev_op_enc_cb_params { +struct rte_bbdev_op_enc_turbo_cb_params {/**< The K size of the input CB, in bits [40:6144], as specified in * 3GPP TS 36.212. * This size is inclusive of CRC24A, regardless whether it was
@@ -305,7 +305,7 @@ struct rte_bbdev_op_enc_cb_params {uint16_t ncb; }; -struct rte_bbdev_op_enc_tb_params { +struct rte_bbdev_op_enc_turbo_tb_params {/**< The K- size of the input CB, in bits [40:6144], that is in the * Turbo operation when r < C-, as in 3GPP TS 36.212. * This size is inclusive of CRC24B, regardless whether it was
@@ -320,7 +320,7 @@ struct rte_bbdev_op_enc_tb_params {uint16_t k_pos;/**< The number of CBs that have K- size, [0:63] */ uint8_t c_neg; -/**< The total number of CBs in the TB, [1:RTE_BBDEV_MAX_CODE_BLOCKS] */ +/**< The total number of CBs in the TB, [1:RTE_BBDEV_TURBO_MAX_CODE_BLOCKS] */ uint8_t c;/**< The number of CBs that uses Ea before switching to Eb, [0:63] */ uint8_t cab;
@@ -375,9 +375,9 @@ struct rte_bbdev_op_turbo_enc {uint8_t code_block_mode;/**< [0 - TB : 1 - CB] */ union {/**< Struct which stores Code Block specific parameters */ -struct rte_bbdev_op_enc_cb_params cb_params; +struct rte_bbdev_op_enc_turbo_cb_params cb_params;/**< Struct which stores Transport Block specific parameters */ -struct rte_bbdev_op_enc_tb_params tb_params; +struct rte_bbdev_op_enc_turbo_tb_params tb_params; }; };
Signature · 1 line
1.8.3.1
PATCH v3 4/10 bbdev: extension of BBDEV API for 5G FEC
In reply to Nicolas ChautruExtension to BBDEV operations to support 5G
on top of existing 4G operations.
--- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 135 +++++++++- lib/librte_bbdev/rte_bbdev_op.h | 567 ++++++++++++++++++++++++++++++++-------- 3 files changed, 602 insertions(+), 122 deletions(-)
lib/librte_bbdev/rte_bbdev.c +15 -7
@@ -6,7 +6,6 @@#include <string.h> #include <stdbool.h> -#include <rte_string_fns.h> #include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h>
@@ -215,7 +214,7 @@ struct rte_bbdev * __rte_experimental bbdev->data->dev_id = dev_id; bbdev->state =RTE_BBDEV_INITIALIZED ; - ret =strlcpy (bbdev->data->name, name,RTE_BBDEV_NAME_MAX_LEN ); + ret =snprintf (bbdev->data->name,RTE_BBDEV_NAME_MAX_LEN ,"%s" , name);if ((ret <0 ) || (ret >=RTE_BBDEV_NAME_MAX_LEN )) {rte_bbdev_log (ERR ,"Copying device name \"%s\" failed" , name);return NULL ;
@@ -499,7 +498,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_ul_queue_priority);return -EINVAL ;
@@ -507,7 +506,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && conf->priority > dev_info.max_dl_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_dl_queue_priority);return -EINVAL ;
@@ -796,7 +795,7 @@ struct rte_bbdev * __rte_experimentalmemset (dev_info,0 ,sizeof (*dev_info)); dev_info->dev_name = dev->data->name; dev_info->num_queues = dev->data->num_queues; - dev_info->bus =rte_bus_find_by_device (dev->device); + dev_info->device = dev->device; dev_info->socket_id = dev->data->socket_id; dev_info->started = dev->data->started;
@@ -847,6 +846,12 @@ struct rte_bbdev * __rte_experimentalcase RTE_BBDEV_OP_TURBO_ENC : result =sizeof (struct rte_bbdev_enc_op );break ; +case RTE_BBDEV_OP_LDPC_DEC : + result =sizeof (struct rte_bbdev_dec_op ); +break ; +case RTE_BBDEV_OP_LDPC_ENC : + result =sizeof (struct rte_bbdev_enc_op ); +break ;default :break ; }
@@ -861,11 +866,12 @@ struct rte_bbdev * __rte_experimental {enum rte_bbdev_op_type type = *(enum rte_bbdev_op_type *)arg; -if (type ==RTE_BBDEV_OP_TURBO_DEC ) { +if (type ==RTE_BBDEV_OP_TURBO_DEC || type ==RTE_BBDEV_OP_LDPC_DEC ) {struct rte_bbdev_dec_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool; - }else if (type ==RTE_BBDEV_OP_TURBO_ENC ) { + }else if (type ==RTE_BBDEV_OP_TURBO_ENC || + type ==RTE_BBDEV_OP_LDPC_ENC ) {struct rte_bbdev_enc_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool;
@@ -1117,6 +1123,8 @@ struct rte_mempool * __rte_experimental"RTE_BBDEV_OP_NONE" ,"RTE_BBDEV_OP_TURBO_DEC" ,"RTE_BBDEV_OP_TURBO_ENC" , +"RTE_BBDEV_OP_LDPC_DEC" , + "RTE_BBDEV_OP_LDPC_ENC", };if (op_type <RTE_BBDEV_OP_TYPE_COUNT )
lib/librte_bbdev/rte_bbdev.h +133 -2
165 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +454 -113
842 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH v3 5/10 docs/guides: updating bbdev API for 5GNR operations
In reply to Nicolas ChautruThe documentation captures the related change in BBDEV API to support 5GNR encode/decode operations.
--- doc/guides/prog_guide/bbdev.rst | 505 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 458 insertions(+), 47 deletions(-)
doc/guides/prog_guide/bbdev.rst +458 -47
@@ -166,9 +166,9 @@ stopped individually. Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor's logical cores and interfaces utilize its local memory. Therefore -baseband operations, the mbuf being operated on should be allocated from memory +The bbdev poll mode device driver library supports NUMA architecture, in which +a processor's logical cores and interfaces utilize it's local memory. Therefore +with baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer descriptors should be populated with mbufs allocated from a mempool allocated
@@ -220,9 +220,9 @@ relation to Turbo Encoding and Decoding operations. 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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -234,8 +234,8 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, RTE_BBDEV_END_OF_CAPABILITIES_LIST()
@@ -266,12 +266,13 @@ information: struct rte_bbdev_info { int socket_id; const char *dev_name; - const struct rte_bus *bus; + const struct rte_device *device; uint16_t num_queues; bool started; struct rte_bbdev_driver_info drv; }; + Operation Processing --------------------
@@ -335,14 +336,20 @@ processed on a particular bbdev device poll mode driver. int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_enc turbo_enc; + union { + struct rte_bbdev_op_turbo_enc turbo_enc; + struct rte_bbdev_op_ldpc_enc ldpc_enc; + } }; struct rte_bbdev_dec_op { int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_dec turbo_dec; + union { + struct rte_bbdev_op_turbo_dec turbo_enc; + struct rte_bbdev_op_ldpc_dec ldpc_enc; + } }; The operation structure by itself defines the operation type. It includes an
@@ -399,19 +406,31 @@ BBDEV Inbound/Outbound Memory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo coding on a referenced mbuf data buffer. It is used for either +performing Turbo and LDPC coding on a referenced mbuf data buffer. It is used for either encode or decode operations. -Turbo Encode operation accepts one input and one output. -Turbo Decode operation accepts one input and two outputs, called *hard-decision* -and *soft-decision* outputs. *Soft-decision* output is optional. + +.. csv-table:: Operation I/O + :header: "FEC", "In", "Out" + :widths: 20, 30, 30 + + "Turbo Encode", "input", "output" + "Turbo Decode", "input", "hard output" + " ", " ", "soft output (optional)" + "LDPC Encode", "input", "output" + "LDPC Decode", "input", "hard output" + "", "HQ combine (optional)", "HQ combine (optional)" + " ", "", "soft output (optional)" + It is expected that the application provides input and output mbuf pointers -allocated and ready to use. The baseband framework supports turbo coding on -Code Blocks (CB) and Transport Blocks (TB). +allocated and ready to use. + +The baseband framework supports FEC coding on Code Blocks (CB) and +Transport Blocks (TB). For the output buffer(s), the application is required to provide an allocated -and free mbuf, so that bbdev write back the resulting output. +and free mbuf, to which the resulting output will be written. The support of split "scattered" buffers is a driver-specific feature, so it is reported individually by the supporting driver as a capability.
@@ -436,26 +455,26 @@ This structure has three elements: This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs contiguously located next to each other. A Transport Block (TB) represents a whole piece of data that is divided into one or more CBs. Maximum number of - CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + CBs can be contained in one TB is defined by + ``RTE_BBDEV_(TURBO/LDPC)MAX_CODE_BLOCKS``. An mbuf data structure cannot represent more than one TB. The smallest piece of data that can be contained in one mbuf is one CB. An mbuf can include one contiguous CB, subset of contiguous CBs that are - belonging to one TB, or all contiguous CBs that are belonging to one TB. + belonging to one TB, or all contiguous CBs that belong to one TB. If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is capable of collecting (gathering) non-contiguous (scattered) data from multiple locations in the memory. This capability is reported by the capability flags: - - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``, - - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``, ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``. - Only if a BBDEV PMD supports this feature, chained mbuf data structures are - accepted. A chained mbuf can represent one non-contiguous CB or multiple - non-contiguous CBs. - The first mbuf segment in the given chained mbuf represents the first piece + Chained mbuf data structures are only accepted if a BBDEV PMD supports this + feature. A chained mbuf can represent one non-contiguous CB or multiple non-contiguous + CBs. The first mbuf segment in the given chained mbuf represents the first piece of the CB. Offset is only applicable to the first segment. ``length`` is the total length of the CB.
@@ -506,14 +525,22 @@ BBDEV Turbo Encode Operation }; }; -The Turbo encode structure is composed of the ``input`` and ``output`` mbuf -data pointers. The provided mbuf pointer of ``input`` needs to be big enough to -stretch for extra CRC trailers. +The Turbo encode structure includes the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big +enough to stretch for extra CRC trailers. -``op_flags`` parameter holds all operation related flags, like whether CRC24A is -included by the application or not. +.. csv-table:: **struct rte_bbdev_op_turbo_enc** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","input CB or TB data" + "output","rate matched CB or TB output buffer" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" -``code_block_mode`` flag identifies the mode in which bbdev is operating in. The encode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is standalone. While
@@ -525,21 +552,21 @@ are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` call belong to one mode, either CB-mode or TB-mode. -In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +In case that the TB is smaller than Z (6144 bits), then effectively the TB = CB. CRC24A is appended to the tail of the CB. The application is responsible for calculating and appending CRC24A before calling BBDEV in case that the underlying driver does not support CRC24A generation. In CB-mode, CRC24A/B is an optional operation. -The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS -36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The CB parameter ``k`` is the size of the CB (this maps to K as described +in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` informs the application with relevant capability. These flags can be set in the -``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB -before going forward with Turbo encoding. +``op_flags`` parameter to indicate to BBDEV to calculate and append CRC24A/B +to CB before going forward with Turbo encoding. Output format of the CB encode will have the encoded CB in ``e`` size output (this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf
@@ -600,13 +627,26 @@ BBDEV Turbo Decode Operation }; }; -The Turbo decode structure is composed of the ``input`` and ``output`` mbuf -data pointers. - -``op_flags`` parameter holds all operation related flags, like whether CRC24B is -retained or not. - -``code_block_mode`` flag identifies the mode in which bbdev is operating in. +The Turbo decode structure includes the ``input``, ``hard_output`` and +optionally the ``soft_output`` mbuf data pointers. + +.. csv-table:: **struct rte_bbdev_op_turbo_dec** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","virtual circular buffer, wk, size 3*Kpi for each CB" + "hard output","hard decisions buffer, decoded output, size K for each CB" + "soft output","soft LLR output buffer (optional)" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "iter_max","maximum number of iterations to perofrm in decode all CBs" + "iter_min","minimum number of iterations to perform in decoding all CBs" + "iter_count","number of iterations to performed in decoding all CBs" + "ext_scale","scale factor on extrinsic info (5 bits)" + "num_maps","number of MAP engines to use in decode" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" Similarly, the decode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is
@@ -618,7 +658,8 @@ to a bigger TB are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` call belong to one mode, either CB-mode or TB-mode. -The input ``k`` is the size of the decoded CB (this maps to K as described in + +The CB parameter ``k`` is the size of the decoded CB (this maps to K as described in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case.
@@ -638,9 +679,9 @@ Soft output is an optional capability for BBDEV PMDs. Setting flag CRC24B at the end of each CB. This might be useful for the application in debug mode. An LLR rate matched output is computed in the ``soft_output`` buffer structure -for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section -5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the -encoded buffer of size ``e``. +for the given CB parameter ``e`` size (this maps to E described in +3GPP TS 36.212 section 5.1.4.1.2). The output mbuf buffer size needs to be big +enough to hold the encoded buffer of size ``e``. The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the number of the remaining CB VCBs is calculated automatically by BBDEV before
@@ -669,6 +710,376 @@ TB-mode. CB-mode is a reduced version, where only one CB exists: Turbo decoding of Code Blocks in mbuf structure +BBDEV LDPC Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC encode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC encode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +| Set to bypass bit-level interleaver on output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_RATE_MATCH | +| Set to enabling the RATE_MATCHING processing | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24A_ATTACH | +| Set to attach transport block CRC-24A | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24B_ATTACH | +| Set to attach code block CRC-24B | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_16_ATTACH | +| Set to attach code block CRC-16 | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_INTERRUPTS | +| Set if a device supports encoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CONCATENATION | +| Set if a device supports concatenation of non byte aligned output | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC encode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + struct rte_bbdev_op_ldpc_enc { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_enc_ldpc_cb_params cb_params; + struct rte_bbdev_op_enc_ldpc_tb_params tb_params; + }; + }; + +The LDPC encode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|output |rate matched CB or TB output buffer | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ ++ +c_ab +number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits, r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the +incoming code block or transport block data. + +The mbuf output ``output`` is mandatory and is the encoded CB(s). In +CB-mode ut contains the encoded CB of size ``e`` (E in 3GPP TS 38.212 +section 6.2.5). In TB-mode it contains multiple contiguous encoded CBs +of size ``ea`` or ``eb``. +The ``output`` buffer is allocated by the application with enough room +for the output data. + +The encode interface works on both a code block (CB) and a transport +block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (attach CRC24B if required) +* CB-mode: one CB making up one TB (attach CRC24A if required) +* TB-mode: one or more CB of a partial TB (attach CRC24B(s) if required) +* TB-mode: one or more CB of a complete TB (attach CRC24AB(s) if required) + +In CB-mode if ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is set then CRC24A +is appended to the CB. If ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is not +set the application is responsible for calculating and appending CRC24A +before calling BBDEV. The input data mbuf ``length`` is inclusive of +CRC24A/B where present and is equal to the code block size ``K``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the +inbound TB data buffer, unless the ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +flag is set when it is the responsibility of BBDEV. The input data +mbuf ``length`` is total size of the CBs inclusive of any CRC24A and +CRC24B in the case they were appended by the application. + +Not all BBDEV PMDs may be capable of CRC24A/B calculation. Flags +``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` and ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` +inform the application of the relevant capability. These flags can be set +in the ``op_flags`` parameter to indicate BBDEV to calculate and append +CRC24A to CB before going forward with LDPC encoding. + +The difference between the partial and full-size TB is that BBDEV needs +the index of the first CB in this group and the number of CBs in the group. +The first CB index is given by ``r`` but the number of the CBs is +calculated by BBDEV before signalling to the driver. + +The number of CBs in the group should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +Figure 13.1 above showing the Turbo encoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC encode. + +BBDEV LDPC Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC decode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC decode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +| Set for transport block CRC-24A checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +| Set for code block CRC-24B checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +| Set to drop the last CRC bits decoding output | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on input stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +| Set for HARQ combined input stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +| Set for HARQ combined output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_BYPASS | +| Set for LDPC decoder bypass | +| | +| RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE must be set | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_SOFT_OUT | +| Set for soft-output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +| Set for Rate-Matching bypass on soft-out stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on soft-output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +| Set for iteration stopping on successful decode condition enable | +| | +| Where a successful decode is a successful syndrome check | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_INTERRUPTS | +| Set if a device supports decoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +| Set if a device supports input/output HARQ compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_LLR_COMPRESSION | +| Set if a device supports input LLR compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | +| Set if a device supports HARQ input to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | +| Set if a device supports HARQ output to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK | +| Set if a device supports loopback access to HARQ internal memory | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC decode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + + struct rte_bbdev_op_ldpc_dec { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data hard_output; + struct rte_bbdev_op_data soft_output; + struct rte_bbdev_op_data harq_combined_input; + struct rte_bbdev_op_data harq_combined_output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t iter_max; + uint8_t iter_count; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_dec_ldpc_cb_params cb_params; + struct rte_bbdev_op_dec_ldpc_tb_params tb_params; + }; + }; + + +The LDPC decode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|hard_output |hard decisions buffer, decoded output | ++----------------+--------------------------------------------------------------------+ +|soft_output |soft LLR output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_input |HARQ combined input buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_output|HARQ combined output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {1,2,4,6,8} from pi/2-BPSK to 256QAM | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|iter_max |maximum number of iterations to perform in decode all CBs | ++----------------+--------------------------------------------------------------------+ +|iter_count |number of iterations performed in decoding all CBs | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ +| |c_ab |number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs +and is the Virtual Circular Buffer data stream with null padding. +Each byte in the input circular buffer is the LLR value of each bit of +the original CB. + +The mbuf output ``hard_output`` is mandatory and is the decoded CBs size +K (CRC24A/B is the last 24-bit in each decoded CB). + +The mbuf output ``soft_output`` is optional and is an LLR rate matched +output of size ``e`` (this is ``E`` as per 3GPP TS 38.212 section 6.2.5). + +The mbuf input ``harq_combine_input`` is optional and is a buffer with +the input to the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The mbuf output ``harq_combine_output`` is optional and is a buffer for +the output of the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The output mbuf data structures are expected to be allocated by the +application with enough room for the output data. + +As with the LDPC encode, the decode interface works on both a code block +(CB) and a transport block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (check CRC24B if required) +* CB-mode: one CB making up one TB (check CRC24A if required) +* TB-mode: one or more CB making up a partial TB (check CRC24B(s) if required) +* TB-mode: one or more CB making up a complete TB (check CRC24B(s) if required) + +The mbuf ``length`` is inclusive of CRC24A/B where present and is equal +the code block size ``K``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +the number of the remaining CB VCBs is calculated automatically by BBDEV +and passed down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +Figure 13.2 above showing the Turbo decoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC decode. + Sample code -----------
Signature · 1 line
1.8.3.1
PATCH v3 6/10 baseband/turbo_sw: extension of turbosw PMD for 5G
In reply to Nicolas ChautruImplementation still based on Intel SDK libraries optimized for AVX512 instructions set and 5GNR. This can be also build for AVX2 for 4G capability or without SDK dependency for maintainance.
--- config/common_base | 1 + drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 686 ++++++++++++++++++++++- drivers/baseband/turbo_sw/meson.build | 10 + mk/rte.app.mk | 8 +- 5 files changed, 707 insertions(+), 13 deletions(-)
config/common_base +1 -0
@@ -530,6 +530,7 @@ CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y CONFIG_RTE_BBDEV_SDK_AVX2=n +CONFIG_RTE_BBDEV_SDK_AVX512=n # # Compile PMD for NULL bbdev device
drivers/baseband/turbo_sw/Makefile +14 -1
@@ -3,7 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk - # library name LIB = librte_pmd_bbdev_turbo_sw.a
@@ -34,6 +33,20 @@ LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml endif +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),n) +$(error "CONFIG_RTE_BBDEV_SDK_AVX512 requires CONFIG_RTE_BBDEV_SDK_AVX2 set") +endif +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_dematching_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif + # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +675 -11
884 lines not on this page · raw message
drivers/baseband/turbo_sw/meson.build +10 -0
@@ -23,6 +23,16 @@ if dpdk_conf.has('RTE_BBDEV_SDK_AVX2') includes += include_directories(path + '/lib_common') endif endif +if dpdk_conf.has('RTE_BBDEV_SDK_AVX512') + ext_deps += cc.find_library('libldpc_encoder_5gnr', dirs: [path + '/lib_ldpc_encoder_5gnr'], required: true) + ext_deps += cc.find_library('libldpc_decoder_5gnr', dirs: [path + '/lib_ldpc_decoder_5gnr'], required: true) + ext_deps += cc.find_library('libLDPC_ratematch_5gnr', dirs: [path + '/lib_LDPC_ratematch_5gnr'], required: true) + ext_deps += cc.find_library('librate_dematching_5gnr', dirs: [path + '/lib_rate_dematching_5gnr'], required: true) + includes += include_directories(path + '/lib_ldpc_encoder_5gnr') + includes += include_directories(path + '/lib_ldpc_decoder_5gnr') + includes += include_directories(path + '/lib_LDPC_ratematch_5gnr') + includes += include_directories(path + '/lib_rate_dematching_5gnr') +endif deps += ['bbdev', 'bus_vdev', 'ring'] name = 'bbdev_turbo_sw'
mk/rte.app.mk +7 -1
@@ -226,7 +226,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcr _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps -lsvml +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX512),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif # CONFIG_RTE_BBDEV_SDK_AVX512 endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV
Signature · 1 line
1.8.3.1
PATCH v3 7/10 docs/guides: updating building steps for BBDEV PMD
In reply to Nicolas ChautruThis now includes steps to build with either
libraries for AVX2, or AVX512 or no dependency.
--- doc/guides/bbdevs/turbo_sw.rst | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-)
doc/guides/bbdevs/turbo_sw.rst +29 -13
@@ -5,20 +5,21 @@ SW Turbo Poll Mode Driver ========================= The SW Turbo PMD (**baseband_turbo_sw**) provides a software only poll mode bbdev -driver that can optionally utilize Intel optimized libraries for LTE Layer 1 -workloads acceleration. +driver that can optionally utilize Intel optimized libraries for LTE and 5GNR +Layer 1 workloads acceleration. Note that the driver can also be built without any dependency with reduced functionality for maintenance purpose. To enable linking to the SDK libraries see detailed installation section below. -One flag can be enabled depending on whether the target machine can support -AVX2 instructions sets and the related SDK libraries for vectorized +Two flags can be enabled depending on whether the target machine can support +AVX2 and AVX512 instructions sets and the related SDK libraries for vectorized signal processing functions are installed : - CONFIG_RTE_BBDEV_SDK_AVX2 - -By default this flag is disabled. For AVX2 machine and SDK -library installed then this flag can be enabled. +- CONFIG_RTE_BBDEV_SDK_AVX512 +By default these 2 flags are disabled by default. For AVX2 machine and SDK +library installed then the first flag can be enabled. For AVX512 machine and +SDK library installed then both flags can be enabled for full real time capability. This PMD supports the functions: FEC, Rate Matching and CRC functions detailed in the Features section.
@@ -45,11 +46,25 @@ For the LTE decode operation: * ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` * ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` +For the 5G NR LDPC encode operation: + +* ``RTE_BBDEV_LDPC_RATE_MATCH`` +* ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +* ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` + +For the 5G NR LDPC decode operation: + +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK`` +* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE`` +* ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE`` +* ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE`` Limitations ----------- -* In-place operations for Turbo encode and decode are not supported +* In-place operations for encode and decode are not supported Installation ------------
@@ -60,7 +75,7 @@ FlexRAN SDK Download As an option it is possible to link this driver with FleXRAN SDK libraries which can enable real time signal processing using AVX instructions. -These libraries are available through this link `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. +These libraries are available through this `link <https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules>`_. After download is complete, the user needs to unpack and compile on their system before building DPDK.
@@ -115,14 +130,13 @@ The following instructions should be followed in this exact order: .. code-block:: console - cd build-avx2-icc/ + cd build-avx512-icc/ make && make install - Initialization -------------- -In order to enable this virtual bbdev PMD, the user must: +In order to enable this virtual bbdev PMD, the user may: * Build the ``FLEXRAN SDK`` libraries (explained in Installation section).
@@ -137,9 +151,11 @@ Example: export FLEXRAN_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/install export DIR_WIRELESS_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/ -* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` +* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` and ``CONFIG_RTE_BBDEV_SDK_AVX512=y`` in DPDK common configuration file ``config/common_base`` to be able to use the SDK libraries as mentioned above. + For AVX2 machine it is possible to only enable CONFIG_RTE_BBDEV_SDK_AVX2 + for limited 4G functionality. If no flag are set the PMD driver will still build but its capabilities will be limited accordingly.
Signature · 1 line
1.8.3.1
PATCH v3 8/10 test-bbdev: update of bbdev test-app for 5GNR
In reply to Nicolas ChautruExtending test framework for FEC 5GNR operations
for UT verification and profiling.
--- app/test-bbdev/main.c | 48 +- app/test-bbdev/main.h | 6 +- app/test-bbdev/meson.build | 3 + app/test-bbdev/test-bbdev.py | 7 + app/test-bbdev/test_bbdev.c | 12 +- app/test-bbdev/test_bbdev_perf.c | 1233 ++++++++++++++++++++++++++++++--- app/test-bbdev/test_bbdev_vector.c | 517 +++++++++++++- app/test-bbdev/test_bbdev_vector.h | 14 +- app/test-bbdev/turbo_enc_default.data | 2 +- 9 files changed, 1715 insertions(+), 127 deletions(-)
app/test-bbdev/main.c +30 -18
@@ -16,11 +16,13 @@#include "main.h" +/* Defines how many testcases can be specified as cmdline args */ #define MAX_CMDLINE_TESTCASES 8static const char tc_sep =',' ; +/* Declare structure for command line test parameters and options */ static struct test_params { struct test_command *test_to_run[MAX_CMDLINE_TESTCASES]; unsigned int num_tests;
@@ -28,6 +30,7 @@unsigned int burst_sz;unsigned int num_lcores;char test_vector_filename[PATH_MAX ]; +bool init_device; } test_params; static struct test_commands_list commands_list =
@@ -46,9 +49,8 @@unsigned int total =0 , skipped =0 , succeeded =0 , failed =0 ;uint64_t start, end; -printf ( -"\n + ------------------------------------------------------- +\n" ); -printf (" + Starting Test Suite : %s\n" , suite->suite_name); +printf ("\n===========================================================\n" ); +printf ("Starting Test Suite : %s\n" , suite->suite_name); start =rte_rdtsc_precise ();
@@ -57,15 +59,13 @@if (test_result ==TEST_FAILED ) {printf (" + Test suite setup %s failed!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 1 ; }if (test_result ==TEST_SKIPPED ) {printf (" + Test suite setup %s skipped!\n" , suite->suite_name); -printf ( -" + ------------------------------------------------------- +\n" ); +printf (" + ------------------------------------------------------- +\n" );return 0 ; } }
@@ -82,15 +82,15 @@if (test_result ==TEST_SUCCESS ) { succeeded++; -printf (" + TestCase [%2d] : %s passed\n" , total, +printf ("TestCase [%2d] : %s passed\n" , total, suite->unit_test_cases[total].name); }else if (test_result ==TEST_SKIPPED ) { skipped++; -printf (" + TestCase [%2d] : %s skipped\n" , total, +printf ("TestCase [%2d] : %s skipped\n" , total, suite->unit_test_cases[total].name); }else { failed++; -printf (" + TestCase [%2d] : %s failed\n" , total, +printf ("TestCase [%2d] : %s failed\n" , total, suite->unit_test_cases[total].name); }
@@ -103,7 +103,7 @@ end =rte_rdtsc_precise (); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );printf (" + Test Suite Summary : %s\n" , suite->suite_name);printf (" + Tests Total : %2d\n" , total);printf (" + Tests Skipped : %2d\n" , skipped);
@@ -111,7 +111,7 @@printf (" + Tests Failed : %2d\n" , failed);printf (" + Tests Lasted : %lg ms\n" , ((end - start) *1000 ) / (double )rte_get_tsc_hz ()); -printf (" + ------------------------------------------------------- +\n" ); +printf (" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\n" );return (failed >0 ) ?1 :0 ; }
@@ -140,12 +140,18 @@return test_params.num_lcores; } +bool +get_init_device (void ) +{ +return test_params.init_device; +} +static void print_usage (const char *prog_name) {struct test_command *t; - printf("Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" + printf("***Usage: %s [EAL params] [-- [-n/--num-ops NUM_OPS]\n" "\t[-b/--burst-size BURST_SIZE]\n" "\t[-v/--test-vector VECTOR_FILE]\n" "\t[-c/--test-cases TEST_CASE[,TEST_CASE,...]]]\n",
@@ -174,11 +180,12 @@ { "test-cases", 1, 0, 'c' }, { "test-vector", 1, 0, 'v' }, { "lcores", 1, 0, 'l' }, + { "init-device", 0, 0, 'i'}, { "help", 0, 0, 'h' }, { NULL, 0, 0, 0 } }; -while ((opt =getopt_long (argc, argv,"hn:b:c:v:l:" , lgopts, +while ((opt =getopt_long (argc, argv,"hin:b:c:v:l:" , lgopts, &option_index)) !=EOF )switch (opt) {case 'n' :
@@ -226,8 +233,9 @@TEST_ASSERT (strlen (optarg) >0 ,"Config file name is null" ); -strlcpy (tp->test_vector_filename, optarg, -sizeof (tp->test_vector_filename)); +snprintf (tp->test_vector_filename, +sizeof (tp->test_vector_filename), +"%s" , optarg);break ;case 'l' : TEST_ASSERT(strlen(optarg) > 0,
@@ -237,6 +245,10 @@"Num of lcores mustn't be greater than %u" , RTE_MAX_LCORE);break ; +case 'i' : +/* indicate fpga fec config required */ + tp->init_device = true; +break ;case 'h' :print_usage (argv[0 ]);return 0 ;
@@ -279,7 +291,7 @@struct test_command *t;TAILQ_FOREACH (t, &commands_list, next) - ret |= t->callback(); + ret |= (int) t->callback();return ret; }
@@ -291,7 +303,7 @@unsigned int i;for (i =0 ; i < tp->num_tests; ++i) - ret |= tp->test_to_run[i]->callback (); + ret |= (int ) tp->test_to_run[i]->callback ();return ret; }
app/test-bbdev/main.h +5 -1
@@ -20,6 +20,7 @@#define DEFAULT_BURST 32U#define DEFAULT_OPS 64U +#define TEST_ASSERT (cond, msg, ...) do { \ if (!(cond)) { \ printf("TestCase %s() line %d failed: " \
@@ -103,7 +104,8 @@ struct test_command { .command = RTE_STR(name), \ .callback = test_func_##name, \ }; \ - RTE_INIT(test_register_##name) \ + static void __attribute__((constructor, used)) \ + test_register_##name(void) \ { \ add_test_command(&test_struct_##name); \ }
@@ -116,4 +118,6 @@ struct test_command {unsigned int get_num_lcores (void ); +bool get_init_device (void ); +#endif
app/test-bbdev/meson.build +3 -0
@@ -7,3 +7,6 @@ sources = files('main.c', 'test_bbdev_vector.c') allow_experimental_apis = true deps += ['bbdev', 'bus_vdev'] +if dpdk_conf.has('RTE_LIBRTE_PMD_FPGA_LTE_FEC') + deps += ['bbdev_fpga_lte_fec'] +endif
app/test-bbdev/test-bbdev.py +7 -0
@@ -59,6 +59,9 @@ def kill(process): type=int, help="Number of lcores to run.", default=16) +parser.add_argument("-i", "--init-device", + action='store_true', + help="Initialise PF device with default values.") args = parser.parse_args()
@@ -82,6 +85,10 @@ def kill(process): params.extend(["-c"]) params.extend([",".join(args.test_cases)]) +if args.init_device: + params.extend(["-i"]) + + exit_status = 0 for vector in args.test_vector: for burst_size in args.burst_size:
app/test-bbdev/test_bbdev.c +5 -7
@@ -14,8 +14,6 @@#include <rte_bbdev.h> #include <rte_bbdev_op.h> #include <rte_bbdev_pmd.h> -#include <string.h> -#include <rte_string_fns.h> #include "main.h"
@@ -770,7 +768,7 @@ struct bbdev_testsuite_params { {struct rte_bbdev *dev1, *dev2;const char *name ="dev_name" ; -char name_tmp[16 ]; +char name_tmp[32 ];int num_devs, num_devs_tmp; dev1 =rte_bbdev_allocate (NULL );
@@ -790,14 +788,14 @@ struct bbdev_testsuite_params {/* Initialize the maximum amount of devices */ do { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp);TEST_ASSERT (dev2 !=NULL ,"Failed to initialize bbdev driver" ); ++num_devs; }while (num_devs < (RTE_BBDEV_MAX_DEVS -1 )); -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_allocate (name_tmp); TEST_ASSERT(dev2 == NULL, "Failed to initialize bbdev driver number %d " "more drivers than RTE_BBDEV_MAX_DEVS: %d ", num_devs,
@@ -806,7 +804,7 @@ struct bbdev_testsuite_params { num_devs--;while (num_devs >= num_devs_tmp) { -snprintf (name_tmp,sizeof (name_tmp),"%s%i" ,"name_" , num_devs); +sprintf (name_tmp,"%s%i" ,"name_" , num_devs); dev2 =rte_bbdev_get_named_dev (name_tmp); TEST_ASSERT_SUCCESS(rte_bbdev_release(dev2), "Failed to uninitialize bbdev driver %s ",
@@ -827,7 +825,7 @@ struct bbdev_testsuite_params {TEST_ASSERT_FAIL (rte_bbdev_release (NULL ),"Failed to uninitialize bbdev driver with NULL bbdev" ); -strlcpy (name_tmp,"invalid_name" ,sizeof (name_tmp)); +sprintf (name_tmp,"%s" ,"invalid_name" ); dev2 =rte_bbdev_get_named_dev (name_tmp);TEST_ASSERT_FAIL (rte_bbdev_release (dev2),"Failed to uninitialize bbdev driver with invalid name" );
app/test-bbdev/test_bbdev_perf.c +1149 -84
1,649 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.c +504 -13
661 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.h +11 -3
@@ -28,15 +28,21 @@ enum {TEST_BBDEV_VF_NCB_NEG = (1ULL <<16 ),TEST_BBDEV_VF_NCB_POS = (1ULL <<17 ),TEST_BBDEV_VF_R = (1ULL <<18 ), -TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<19 ), -TEST_BBDEV_VF_OP_FLAGS = (1ULL <<20 ), - TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 21), +TEST_BBDEV_VF_BG = (1ULL <<19 ), +TEST_BBDEV_VF_ZC = (1ULL <<20 ), +TEST_BBDEV_VF_F = (1ULL <<21 ), +TEST_BBDEV_VF_QM = (1ULL <<22 ), +TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL <<23 ), +TEST_BBDEV_VF_OP_FLAGS = (1ULL <<24 ), + TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25), };enum op_data_type {DATA_INPUT =0 ,DATA_SOFT_OUTPUT ,DATA_HARD_OUTPUT , +DATA_HARQ_INPUT , +DATA_HARQ_OUTPUT ,DATA_NUM_TYPES , };
@@ -57,6 +63,8 @@ struct test_bbdev_vector {union {struct rte_bbdev_op_turbo_dec turbo_dec;struct rte_bbdev_op_turbo_enc turbo_enc; +struct rte_bbdev_op_ldpc_dec ldpc_dec; +struct rte_bbdev_op_ldpc_enc ldpc_enc; };/* Additional storage for op data entries */ struct op_data_entries entries[DATA_NUM_TYPES ];
app/test-bbdev/turbo_enc_default.data +1 -1
@@ -1 +1 @@ -test_vectors/turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data +test_vectors/turbo_enc_c1_k6144_r0_e18444.data
Signature · 1 line
1.8.3.1
PATCH v3 9/10 test-bbdev: test vectors for 5GNR verification
In reply to Nicolas ChautruAdding LDPC vectors for UT verification, coverage, and profiling for 5GNR encode/decode operations.
--- app/test-bbdev/ldpc_dec_default.data | 1 + app/test-bbdev/ldpc_enc_default.data | 1 + app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data | 354 ++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data | 685 +++++++++++ app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data | 903 +++++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v11835.data | 50 + app/test-bbdev/test_vectors/ldpc_dec_v2342.data | 746 ++++++++++++ .../test_vectors/ldpc_dec_v2342_drop.data | 746 ++++++++++++ app/test-bbdev/test_vectors/ldpc_dec_v7813.data | 49 + app/test-bbdev/test_vectors/ldpc_dec_v8480.data | 75 ++ app/test-bbdev/test_vectors/ldpc_dec_v8568.data | 256 +++++ app/test-bbdev/test_vectors/ldpc_dec_v9503.data | 1216 ++++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_v11835.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v2342.data | 150 +++ app/test-bbdev/test_vectors/ldpc_enc_v7813.data | 42 + app/test-bbdev/test_vectors/ldpc_enc_v8568.data | 69 ++ app/test-bbdev/test_vectors/ldpc_enc_v9503.data | 196 ++++ 17 files changed, 5581 insertions(+) create mode 120000 app/test-bbdev/ldpc_dec_default.data create mode 120000 app/test-bbdev/ldpc_enc_default.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data
app/test-bbdev/ldpc_dec_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/ldpc_dec_v2342.data
app/test-bbdev/ldpc_enc_default.data new file +1 -0
@@ -0,0 +1 @@ +test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data new file +354 -0
354 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data new file +685 -0
685 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data new file +903 -0
903 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v11835.data new file +50 -0
50 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342.data new file +746 -0
746 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data new file +746 -0
258 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v7813.data new file +49 -0
49 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8480.data new file +75 -0
75 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v8568.data new file +256 -0
256 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_dec_v9503.data new file +1216 -0
1,216 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v11835.data new file +42 -0
42 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v2342.data new file +150 -0
150 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v7813.data new file +42 -0
42 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v8568.data new file +69 -0
69 lines not on this page · raw message
app/test-bbdev/test_vectors/ldpc_enc_v9503.data new file +196 -0
196 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.3.1
Part of the diff is not shown here. View the raw message.
PATCH v3 10/10 doc: announce bbdev changes
In reply to Nicolas Chautru--- doc/guides/rel_notes/release_19_08.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
doc/guides/rel_notes/release_19_08.rst +15 -0
@@ -88,6 +88,19 @@ New Features * Added multi-queue support to allow one af_xdp vdev with multiple netdev queues +* **Added a FPGA_LTE_FEC bbdev PMD.** + + Added the new ``fpga_lte_fec`` bbdev driver for the Intel® FPGA PAC + (Programmable Acceleration Card) N3000. See the + :doc:`../bbdevs/fpga_lte_fec` BBDEV guide for more details on this new driver. + +* **Updated TURBO_SW bbdev PMD.** + + Updated the ``turbo_sw`` bbdev driver with changes including: + + * Added option to build the driver with or without dependency of external + SDK libraries. + * Added support for 5GNR encode/decode operations. Removed Items -------------
@@ -140,6 +153,8 @@ ABI Changes Also, make sure to start the actual text at the margin. ========================================================= +* bbdev: New parameters added to support 5GNR operations. + Shared Library Versions -----------------------
Signature · 1 line
1.8.3.1
PATCH v2 2/5 bbdev: extension of BBDEV for 5G FEC
In reply to Nicolas ChautruSupporting API for FEC operation with LDPC
--- doc/guides/prog_guide/bbdev.rst | 509 ++++++++++++++++++-- drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 24 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 36 +- lib/librte_bbdev/rte_bbdev.c | 22 +- lib/librte_bbdev/rte_bbdev.h | 137 +++++- lib/librte_bbdev/rte_bbdev_op.h | 577 ++++++++++++++++++----- 6 files changed, 1091 insertions(+), 214 deletions(-)
doc/guides/prog_guide/bbdev.rst +457 -52
@@ -78,7 +78,7 @@ From the application point of view, each instance of a bbdev device consists of one or more queues identified by queue IDs. While different devices may have different capabilities (e.g. support different operation types), all queues on a device support identical configuration possibilities. A queue is configured -for only one type of operation and is configured at initialization time. +for only one type of operation and is configured at initializations time. When an operation is enqueued to a specific queue ID, the result is dequeued from the same queue ID.
@@ -91,8 +91,7 @@ and queue configuration is applied with ``rte_bbdev_queue_configure(dev_id,queue_id,conf)``. Note that, although all queues on a device support same capabilities, they can be configured differently and will then behave differently. -Devices supporting interrupts can enable them by using -``rte_bbdev_intr_enable(dev_id)``. +Devices supporting interrupts can enable them by using ``rte_bbdev_intr_enable(dev_id)``. The configuration of each bbdev device includes the following operations:
@@ -150,8 +149,6 @@ device. Once closed, it cannot be restarted. int rte_bbdev_start(uint16_t dev_id) int rte_bbdev_stop(uint16_t dev_id) int rte_bbdev_close(uint16_t dev_id) - int rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id) - int rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id) By default, all queues are started when the device is started, but they can be
@@ -166,9 +163,9 @@ stopped individually. Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor's logical cores and interfaces utilize its local memory. Therefore -baseband operations, the mbuf being operated on should be allocated from memory +The bbdev poll mode device driver library supports NUMA architecture, in which +a processor's logical cores and interfaces utilize it's local memory. Therefore +with baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer descriptors should be populated with mbufs allocated from a mempool allocated
@@ -220,9 +217,9 @@ relation to Turbo Encoding and Decoding operations. 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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -234,8 +231,8 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } }, RTE_BBDEV_END_OF_CAPABILITIES_LIST()
@@ -266,12 +263,13 @@ information: struct rte_bbdev_info { int socket_id; const char *dev_name; - const struct rte_bus *bus; + const struct rte_device *device; uint16_t num_queues; bool started; struct rte_bbdev_driver_info drv; }; + Operation Processing --------------------
@@ -335,14 +333,20 @@ processed on a particular bbdev device poll mode driver. int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_enc turbo_enc; + union { + struct rte_bbdev_op_turbo_enc turbo_enc; + struct rte_bbdev_op_ldpc_enc ldpc_enc; + } }; struct rte_bbdev_dec_op { int status; struct rte_mempool *mempool; void *opaque_data; - struct rte_bbdev_op_turbo_dec turbo_dec; + union { + struct rte_bbdev_op_turbo_dec turbo_enc; + struct rte_bbdev_op_ldpc_dec ldpc_enc; + } }; The operation structure by itself defines the operation type. It includes an
@@ -399,19 +403,31 @@ BBDEV Inbound/Outbound Memory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo coding on a referenced mbuf data buffer. It is used for either +performing Turbo and LDPC coding on a referenced mbuf data buffer. It is used for either encode or decode operations. -Turbo Encode operation accepts one input and one output. -Turbo Decode operation accepts one input and two outputs, called *hard-decision* -and *soft-decision* outputs. *Soft-decision* output is optional. + +.. csv-table:: Operation I/O + :header: "FEC", "In", "Out" + :widths: 20, 30, 30 + + "Turbo Encode", "input", "output" + "Turbo Decode", "input", "hard output" + " ", " ", "soft output (optional)" + "LDPC Encode", "input", "output" + "LDPC Decode", "input", "hard output" + "", "HQ combine (optional)", "HQ combine (optional)" + " ", "", "soft output (optional)" + It is expected that the application provides input and output mbuf pointers -allocated and ready to use. The baseband framework supports turbo coding on -Code Blocks (CB) and Transport Blocks (TB). +allocated and ready to use. + +The baseband framework supports FEC coding on Code Blocks (CB) and +Transport Blocks (TB). For the output buffer(s), the application is required to provide an allocated -and free mbuf, so that bbdev write back the resulting output. +and free mbuf, to which the resulting output will be written. The support of split "scattered" buffers is a driver-specific feature, so it is reported individually by the supporting driver as a capability.
@@ -436,26 +452,26 @@ This structure has three elements: This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs contiguously located next to each other. A Transport Block (TB) represents a whole piece of data that is divided into one or more CBs. Maximum number of - CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + CBs can be contained in one TB is defined by + ``RTE_BBDEV_(TURBO/LDPC)MAX_CODE_BLOCKS``. An mbuf data structure cannot represent more than one TB. The smallest piece of data that can be contained in one mbuf is one CB. An mbuf can include one contiguous CB, subset of contiguous CBs that are - belonging to one TB, or all contiguous CBs that are belonging to one TB. + belonging to one TB, or all contiguous CBs that belong to one TB. If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is capable of collecting (gathering) non-contiguous (scattered) data from multiple locations in the memory. This capability is reported by the capability flags: - - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``, - - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``, ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``. - Only if a BBDEV PMD supports this feature, chained mbuf data structures are - accepted. A chained mbuf can represent one non-contiguous CB or multiple - non-contiguous CBs. - The first mbuf segment in the given chained mbuf represents the first piece + Chained mbuf data structures are only accepted if a BBDEV PMD supports this + feature. A chained mbuf can represent one non-contiguous CB or multiple non-contiguous + CBs. The first mbuf segment in the given chained mbuf represents the first piece of the CB. Offset is only applicable to the first segment. ``length`` is the total length of the CB.
@@ -506,14 +522,22 @@ BBDEV Turbo Encode Operation }; }; -The Turbo encode structure is composed of the ``input`` and ``output`` mbuf -data pointers. The provided mbuf pointer of ``input`` needs to be big enough to -stretch for extra CRC trailers. +The Turbo encode structure includes the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big +enough to stretch for extra CRC trailers. + +.. csv-table:: **struct rte_bbdev_op_turbo_enc** parameters + :header: "Parameter", "Description" + :widths: 10, 30 -``op_flags`` parameter holds all operation related flags, like whether CRC24A is -included by the application or not. + "input","input CB or TB data" + "output","rate matched CB or TB output buffer" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" -``code_block_mode`` flag identifies the mode in which bbdev is operating in. The encode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is standalone. While
@@ -525,21 +549,21 @@ are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` call belong to one mode, either CB-mode or TB-mode. -In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +In case that the TB is smaller than Z (6144 bits), then effectively the TB = CB. CRC24A is appended to the tail of the CB. The application is responsible for calculating and appending CRC24A before calling BBDEV in case that the underlying driver does not support CRC24A generation. In CB-mode, CRC24A/B is an optional operation. -The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS -36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The CB parameter ``k`` is the size of the CB (this maps to K as described +in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` informs the application with relevant capability. These flags can be set in the -``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB -before going forward with Turbo encoding. +``op_flags`` parameter to indicate to BBDEV to calculate and append CRC24A/B +to CB before going forward with Turbo encoding. Output format of the CB encode will have the encoded CB in ``e`` size output (this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf
@@ -600,13 +624,26 @@ BBDEV Turbo Decode Operation }; }; -The Turbo decode structure is composed of the ``input`` and ``output`` mbuf -data pointers. - -``op_flags`` parameter holds all operation related flags, like whether CRC24B is -retained or not. - -``code_block_mode`` flag identifies the mode in which bbdev is operating in. +The Turbo decode structure includes the ``input``, ``hard_output`` and +optionally the ``soft_output`` mbuf data pointers. + +.. csv-table:: **struct rte_bbdev_op_turbo_dec** parameters + :header: "Parameter", "Description" + :widths: 10, 30 + + "input","virtual circular buffer, wk, size 3*Kpi for each CB" + "hard output","hard decisions buffer, decoded output, size K for each CB" + "soft output","soft LLR output buffer (optional)" + "op_flags","bitmask of all active operation capabilities" + "rv_index","redundancy version index [0..3]" + "iter_max","maximum number of iterations to perofrm in decode all CBs" + "iter_min","minimum number of iterations to perform in decoding all CBs" + "iter_count","number of iterations to performed in decoding all CBs" + "ext_scale","scale factor on extrinsic info (5 bits)" + "num_maps","number of MAP engines to use in decode" + "code_block_mode","code block or transport block mode" + "cb_params", "code block specific parameters (code block mode only)" + "tb_params", "transport block specific parameters (transport block mode only)" Similarly, the decode interface works on both the code block (CB) and the transport block (TB). An operation executes in "CB-mode" when the CB is
@@ -618,7 +655,8 @@ to a bigger TB are being enqueued. **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` call belong to one mode, either CB-mode or TB-mode. -The input ``k`` is the size of the decoded CB (this maps to K as described in + +The CB parameter ``k`` is the size of the decoded CB (this maps to K as described in 3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case.
@@ -638,9 +676,9 @@ Soft output is an optional capability for BBDEV PMDs. Setting flag CRC24B at the end of each CB. This might be useful for the application in debug mode. An LLR rate matched output is computed in the ``soft_output`` buffer structure -for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section -5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the -encoded buffer of size ``e``. +for the given CB parameter ``e`` size (this maps to E described in +3GPP TS 36.212 section 5.1.4.1.2). The output mbuf buffer size needs to be big +enough to hold the encoded buffer of size ``e``. The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the number of the remaining CB VCBs is calculated automatically by BBDEV before
@@ -669,6 +707,373 @@ TB-mode. CB-mode is a reduced version, where only one CB exists: Turbo decoding of Code Blocks in mbuf structure +BBDEV LDPC Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC encode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC encode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +| Set to bypass bit-level interleaver on output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_RATE_MATCH | +| Set to enabling the RATE_MATCHING processing | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24A_ATTACH | +| Set to attach transport block CRC-24A | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_24B_ATTACH | +| Set to attach code block CRC-24B | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_16_ATTACH | +| Set to attach code block CRC-16 | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_INTERRUPTS | +| Set if a device supports encoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_CONCATENATION | +| Set if a device supports concatenation of non byte aligned output | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC encode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + struct rte_bbdev_op_ldpc_enc { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_enc_ldpc_cb_params cb_params; + struct rte_bbdev_op_enc_ldpc_tb_params tb_params; + }; + }; + +The LDPC encode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|output |rate matched CB or TB output buffer | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ ++ +c_ab +number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits, r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` is mandatory for all BBDEV PMDs and is the +incoming code block or transport block data. + +The mbuf output ``output`` is mandatory and is the encoded CB(s). In +CB-mode ut contains the encoded CB of size ``e`` (E in 3GPP TS 38.212 +section 6.2.5). In TB-mode it contains multiple contiguous encoded CBs +of size ``ea`` or ``eb``. +The ``output`` buffer is allocated by the application with enough room +for the output data. + +The encode interface works on both a code block (CB) and a transport +block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (attach CRC24B if required) +* CB-mode: one CB making up one TB (attach CRC24A if required) +* TB-mode: one or more CB of a partial TB (attach CRC24B(s) if required) +* TB-mode: one or more CB of a complete TB (attach CRC24AB(s) if required) + +In CB-mode if ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is set then CRC24A +is appended to the CB. If ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` is not +set the application is responsible for calculating and appending CRC24A +before calling BBDEV. The input data mbuf ``length`` is inclusive of +CRC24A/B where present and is equal to the code block size ``K``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the +inbound TB data buffer, unless the ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` +flag is set when it is the responsibility of BBDEV. The input data +mbuf ``length`` is total size of the CBs inclusive of any CRC24A and +CRC24B in the case they were appended by the application. + +Not all BBDEV PMDs may be capable of CRC24A/B calculation. Flags +``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` and ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` +inform the application of the relevant capability. These flags can be set +in the ``op_flags`` parameter to indicate BBDEV to calculate and append +CRC24A to CB before going forward with LDPC encoding. + +The difference between the partial and full-size TB is that BBDEV needs +the index of the first CB in this group and the number of CBs in the group. +The first CB index is given by ``r`` but the number of the CBs is +calculated by BBDEV before signalling to the driver. + +The number of CBs in the group should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +Figure 13.1 above showing the Turbo encoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC encode. + +BBDEV LDPC Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The operation flags that can be set for each LDPC decode operation are +given below. + + **NOTE:** The actual operation flags that may be used with a specific + BBDEV PMD are dependent on the driver capabilities as reported via + ``rte_bbdev_info_get()``, and may be a subset of those below. + ++--------------------------------------------------------------------+ +|Description of LDPC decode capability flags | ++====================================================================+ +|RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +| Set for transport block CRC-24A checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +| Set for code block CRC-24B checking | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +| Set to drop the last CRC bits decoding output | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on input stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +| Set for HARQ combined input stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +| Set for HARQ combined output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_BYPASS | +| Set for LDPC decoder bypass | +| | +| RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE must be set | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DECODE_SOFT_OUT | +| Set for soft-output stream enable | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +| Set for Rate-Matching bypass on soft-out stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +| Set for bit-level de-interleaver bypass on soft-output stream | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +| Set for iteration stopping on successful decode condition enable | +| | +| Where a successful decode is a successful syndrome check | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_INTERRUPTS | +| Set if a device supports decoder dequeue interrupts | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +| Set if a device supports scatter-gather functionality | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +| Set if a device supports input/output HARQ compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_LLR_COMPRESSION | +| Set if a device supports input LLR compression | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE | +| Set if a device supports HARQ input to device's internal memory | ++--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE | +| Set if a device supports HARQ output to device's internal memory | ++--------------------------------------------------------------------+ + +The structure passed for each LDPC decode operation is given below, +with the operation flags forming a bitmask in the ``op_flags`` field. + +.. code-block:: c + + + struct rte_bbdev_op_ldpc_dec { + + struct rte_bbdev_op_data input; + struct rte_bbdev_op_data hard_output; + struct rte_bbdev_op_data soft_output; + struct rte_bbdev_op_data harq_combined_input; + struct rte_bbdev_op_data harq_combined_output; + + uint32_t op_flags; + uint8_t rv_index; + uint8_t basegraph; + uint16_t z_c; + uint16_t n_cb; + uint8_t q_m; + uint16_t n_filler; + uint8_t iter_max; + uint8_t iter_count; + uint8_t code_block_mode; + union { + struct rte_bbdev_op_dec_ldpc_cb_params cb_params; + struct rte_bbdev_op_dec_ldpc_tb_params tb_params; + }; + }; + + +The LDPC decode parameters are set out in the table below. + ++----------------+--------------------------------------------------------------------+ +|Parameter |Description | ++================+====================================================================+ +|input |input CB or TB data | ++----------------+--------------------------------------------------------------------+ +|hard_output |hard decisions buffer, decoded output | ++----------------+--------------------------------------------------------------------+ +|soft_output |soft LLR output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_input |HARQ combined input buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|harq_comb_output|HARQ combined output buffer (optional) | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|rv_index |redundancy version index [0..3] | ++----------------+--------------------------------------------------------------------+ +|basegraph |Basegraph 1 or 2 | ++----------------+--------------------------------------------------------------------+ +|z_c |Zc, LDPC lifting size | ++----------------+--------------------------------------------------------------------+ +|n_cb |Ncb, length of the circular buffer in bits. | ++----------------+--------------------------------------------------------------------+ +|q_m |Qm, modulation order {2,4,6,8,10} | ++----------------+--------------------------------------------------------------------+ +|n_filler |number of filler bits | ++----------------+--------------------------------------------------------------------+ +|iter_max |maximum number of iterations to perform in decode all CBs | ++----------------+--------------------------------------------------------------------+ +|iter_count |number of iterations performed in decoding all CBs | ++----------------+--------------------------------------------------------------------+ +|code_block_mode |code block or transport block mode | ++----------------+--------------------------------------------------------------------+ +|op_flags |bitmask of all active operation capabilities | ++----------------+--------------------------------------------------------------------+ +|**cb_params** |code block specific parameters (code block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |e |E, length of the rate matched output sequence in bits | ++----------------+------------+-------------------------------------------------------+ +|**tb_params** | transport block specific parameters (transport block mode only) | ++----------------+------------+-------------------------------------------------------+ +| |c |number of CBs in the TB or partial TB | ++----------------+------------+-------------------------------------------------------+ +| |r |index of the first CB in the inbound mbuf data | ++----------------+------------+-------------------------------------------------------+ +| |c_ab |number of CBs that use Ea before switching to Eb | ++----------------+------------+-------------------------------------------------------+ +| |ea |Ea, length of the RM output sequence in bits, r < cab | ++----------------+------------+-------------------------------------------------------+ +| |eb |Eb, length of the RM output sequence in bits r >= cab | ++----------------+------------+-------------------------------------------------------+ + +The mbuf input ``input`` encoded CB data is mandatory for all BBDEV PMDs +and is the Virtual Circular Buffer data stream with null padding. +Each byte in the input circular buffer is the LLR value of each bit of +the original CB. + +The mbuf output ``hard_output`` is mandatory and is the decoded CBs size +K (CRC24A/B is the last 24-bit in each decoded CB). + +The mbuf output ``soft_output`` is optional and is an LLR rate matched +output of size ``e`` (this is ``E`` as per 3GPP TS 38.212 section 6.2.5). + +The mbuf input ``harq_combine_input`` is optional and is a buffer with +the input to the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The mbuf output ``harq_combine_output`` is optional and is a buffer for +the output of the HARQ combination function of the device. If the +capability RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_OUT_ENABLE is set +then the HARQ is stored in memory internal to the device and not visible +to BBDEV. + +The output mbuf data structures are expected to be allocated by the +application with enough room for the output data. + +As with the LDPC encode, the decode interface works on both a code block +(CB) and a transport block (TB) basis. + + **NOTE:** All enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The valid modes of operation are: + +* CB-mode: one CB (check CRC24B if required) +* CB-mode: one CB making up one TB (check CRC24A if required) +* TB-mode: one or more CB making up a partial TB (check CRC24B(s) if required) +* TB-mode: one or more CB making up a complete TB (check CRC24B(s) if required) + +The mbuf ``length`` is inclusive of CRC24A/B where present and is equal +the code block size ``K``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +the number of the remaining CB VCBs is calculated automatically by BBDEV +and passed down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``, the +total number of CBs in the full TB (``C`` as per 3GPP TS 38.212 section 5.2.2) + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +Figure 13.2 above showing the Turbo decoding of CBs using BBDEV +interface in TB-mode is also valid for LDPC decode. + Sample code -----------
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c +12 -12
@@ -607,9 +607,9 @@ struct __rte_cache_aligned fpga_queue { RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP, .max_llr_modulus = INT8_MAX, .num_buffers_src = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0 } },
@@ -621,9 +621,9 @@ struct __rte_cache_aligned fpga_queue {RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_ENC_INTERRUPTS, .num_buffers_src = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_dst = - RTE_BBDEV_MAX_CODE_BLOCKS + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS } },RTE_BBDEV_END_OF_CAPABILITIES_LIST ()
@@ -1389,15 +1389,15 @@ struct __rte_cache_aligned fpga_queue { RTE_BBDEV_MAX_CB_SIZE);return -1 ; } -if (tb->c_neg > (RTE_BBDEV_MAX_CODE_BLOCKS -1 )) +if (tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ))rte_bbdev_log (ERR ,"c_neg (%u) is out of range 0 <= value <= %u" , tb->c_neg, -RTE_BBDEV_MAX_CODE_BLOCKS -1 ); -if (tb->c <1 || tb->c >RTE_BBDEV_MAX_CODE_BLOCKS ) { +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ); +if (tb->c <1 || tb->c >RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {rte_bbdev_log (ERR ,"c (%u) is out of range 1 <= value <= %u" , - tb->c,RTE_BBDEV_MAX_CODE_BLOCKS ); + tb->c,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }if (tb->cab > tb->c) {
@@ -1731,15 +1731,15 @@ struct __rte_cache_aligned fpga_queue { RTE_BBDEV_MAX_CB_SIZE);return -1 ; } -if (tb->c_neg > (RTE_BBDEV_MAX_CODE_BLOCKS -1 )) +if (tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ))rte_bbdev_log (ERR ,"c_neg (%u) is out of range 0 <= value <= %u" , tb->c_neg, -RTE_BBDEV_MAX_CODE_BLOCKS -1 ); -if (tb->c <1 || tb->c >RTE_BBDEV_MAX_CODE_BLOCKS ) { +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS -1 ); +if (tb->c <1 || tb->c >RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {rte_bbdev_log (ERR ,"c (%u) is out of range 1 <= value <= %u" , - tb->c,RTE_BBDEV_MAX_CODE_BLOCKS ); + tb->c,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }if (tb->cab > tb->c) {
drivers/baseband/turbo_sw/bbdev_turbo_software.c +18 -18
@@ -33,9 +33,9 @@ rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_TURBO_MAX_CB_SIZE >> 3) + 1) * 48)#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) -#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_TURBO_MAX_CB_SIZE + 4) * 48)/* private data structure */ struct bbdev_private {
@@ -101,7 +101,7 @@ struct turbo_sw_queue { {int32_t result =0 ; -if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE ) +if (k <RTE_BBDEV_TURBO_MIN_CB_SIZE || k >RTE_BBDEV_TURBO_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -154,9 +154,9 @@ struct turbo_sw_queue {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, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_hard_out = - RTE_BBDEV_MAX_CODE_BLOCKS, + RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, .num_buffers_soft_out = 0, } },
@@ -168,8 +168,8 @@ struct turbo_sw_queue { RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, - .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, - .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, + .num_buffers_src = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, + .num_buffers_dst = RTE_BBDEV_TURBO_MAX_CODE_BLOCKS, } },RTE_BBDEV_END_OF_CAPABILITIES_LIST ()
@@ -248,7 +248,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * + ((RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) {
@@ -268,7 +268,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_TURBO_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -286,7 +286,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_TURBO_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -304,7 +304,7 @@ struct turbo_sw_queue {return -ENAMETOOLONG ; } q->code_block =rte_zmalloc_socket (name, -RTE_BBDEV_MAX_CB_SIZE *sizeof (*q->code_block), +RTE_BBDEV_TURBO_MAX_CB_SIZE *sizeof (*q->code_block),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->code_block ==NULL ) { rte_bbdev_log(ERR,
@@ -429,9 +429,9 @@ struct turbo_sw_queue {return -1 ; } -if (k >RTE_BBDEV_MAX_CB_SIZE ) { +if (k >RTE_BBDEV_TURBO_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,RTE_BBDEV_MAX_CB_SIZE ); + k,RTE_BBDEV_TURBO_MAX_CB_SIZE );return -1 ; }
@@ -456,9 +456,9 @@ struct turbo_sw_queue {return -1 ; } -if (kw >RTE_BBDEV_MAX_KW ) { +if (kw >RTE_BBDEV_TURBO_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,RTE_BBDEV_MAX_KW ); + kw,RTE_BBDEV_TURBO_MAX_KW );return -1 ; }
@@ -745,9 +745,9 @@ struct turbo_sw_queue {/* Clear op status */ op->status =0 ; -if (mbuf_total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +if (mbuf_total_left >RTE_BBDEV_TURBO_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - mbuf_total_left,RTE_BBDEV_MAX_TB_SIZE ); + mbuf_total_left,RTE_BBDEV_TURBO_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -1027,7 +1027,7 @@ struct turbo_sw_queue {* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_TURBO_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out_head, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev.c +15 -7
@@ -6,7 +6,6 @@#include <string.h> #include <stdbool.h> -#include <rte_string_fns.h> #include <rte_compat.h> #include <rte_common.h> #include <rte_errno.h>
@@ -215,7 +214,7 @@ struct rte_bbdev * __rte_experimental bbdev->data->dev_id = dev_id; bbdev->state =RTE_BBDEV_INITIALIZED ; - ret =strlcpy (bbdev->data->name, name,RTE_BBDEV_NAME_MAX_LEN ); + ret =snprintf (bbdev->data->name,RTE_BBDEV_NAME_MAX_LEN ,"%s" , name);if ((ret <0 ) || (ret >=RTE_BBDEV_NAME_MAX_LEN )) {rte_bbdev_log (ERR ,"Copying device name \"%s\" failed" , name);return NULL ;
@@ -499,7 +498,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_ul_queue_priority);return -EINVAL ;
@@ -507,7 +506,7 @@ struct rte_bbdev * __rte_experimentalif (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && conf->priority > dev_info.max_dl_queue_priority) {rte_bbdev_log (ERR , -"Priority (%u) of queue %u of bdev %u must be <= %u" , +"Priority (%u) of queue %u of bbdev %u must be <= %u" , conf->priority, queue_id, dev_id, dev_info.max_dl_queue_priority);return -EINVAL ;
@@ -796,7 +795,7 @@ struct rte_bbdev * __rte_experimentalmemset (dev_info,0 ,sizeof (*dev_info)); dev_info->dev_name = dev->data->name; dev_info->num_queues = dev->data->num_queues; - dev_info->bus =rte_bus_find_by_device (dev->device); + dev_info->device = dev->device; dev_info->socket_id = dev->data->socket_id; dev_info->started = dev->data->started;
@@ -847,6 +846,12 @@ struct rte_bbdev * __rte_experimentalcase RTE_BBDEV_OP_TURBO_ENC : result =sizeof (struct rte_bbdev_enc_op );break ; +case RTE_BBDEV_OP_LDPC_DEC : + result =sizeof (struct rte_bbdev_dec_op ); +break ; +case RTE_BBDEV_OP_LDPC_ENC : + result =sizeof (struct rte_bbdev_enc_op ); +break ;default :break ; }
@@ -861,11 +866,12 @@ struct rte_bbdev * __rte_experimental {enum rte_bbdev_op_type type = *(enum rte_bbdev_op_type *)arg; -if (type ==RTE_BBDEV_OP_TURBO_DEC ) { +if (type ==RTE_BBDEV_OP_TURBO_DEC || type ==RTE_BBDEV_OP_LDPC_DEC ) {struct rte_bbdev_dec_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool; - }else if (type ==RTE_BBDEV_OP_TURBO_ENC ) { + }else if (type ==RTE_BBDEV_OP_TURBO_ENC || + type ==RTE_BBDEV_OP_LDPC_ENC ) {struct rte_bbdev_enc_op *op = element;memset (op,0 , mempool->elt_size); op->mempool = mempool;
@@ -1117,6 +1123,8 @@ struct rte_mempool * __rte_experimental"RTE_BBDEV_OP_NONE" ,"RTE_BBDEV_OP_TURBO_DEC" ,"RTE_BBDEV_OP_TURBO_ENC" , +"RTE_BBDEV_OP_LDPC_DEC" , + "RTE_BBDEV_OP_LDPC_ENC", };if (op_type <RTE_BBDEV_OP_TYPE_COUNT )
lib/librte_bbdev/rte_bbdev.h +134 -3
173 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +455 -122
848 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH v2 3/5 baseband/turbo_sw: extension of turbosw for 5G FEC
In reply to Nicolas ChautruImplementation still based on Intel SDK libraries
Optimized for AVX512 instructions set
--- app/test-bbdev/test_bbdev_vector.c | 4 +- app/test-bbdev/test_bbdev_vector.h | 2 +- config/common_base | 3 +- doc/guides/bbdevs/turbo_sw.rst | 57 +- drivers/baseband/turbo_sw/Makefile | 15 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 679 ++++++++++++++++++++++- mk/rte.app.mk | 8 +- 7 files changed, 731 insertions(+), 37 deletions(-)
app/test-bbdev/test_bbdev_vector.c +2 -2
@@ -298,9 +298,9 @@ op_data = vector->entries[type].segments; nb_ops = &vector->entries[type].nb_segments; -if (*nb_ops >=RTE_BBDEV_MAX_CODE_BLOCKS ) { +if (*nb_ops >=RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ) {printf ("Too many segments (code blocks defined): %u, max %d!\n" , - *nb_ops,RTE_BBDEV_MAX_CODE_BLOCKS ); + *nb_ops,RTE_BBDEV_TURBO_MAX_CODE_BLOCKS );return -1 ; }
app/test-bbdev/test_bbdev_vector.h +1 -1
@@ -46,7 +46,7 @@ struct op_data_buf { };struct op_data_entries { -struct op_data_buf segments[RTE_BBDEV_MAX_CODE_BLOCKS ]; +struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS ];unsigned int nb_segments; };
config/common_base +2 -1
@@ -523,7 +523,8 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y CONFIG_RTE_LIBRTE_BBDEV=y CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n CONFIG_RTE_BBDEV_MAX_DEVS=128 -CONFIG_RTE_BBDEV_OFFLOAD_COST=y +CONFIG_RTE_BBDEV_OFFLOAD_COST=n +CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512=n # # Compile PMD for NULL bbdev device
doc/guides/bbdevs/turbo_sw.rst +35 -22
130 lines not on this page · raw message
drivers/baseband/turbo_sw/Makefile +14 -1
@@ -26,12 +26,25 @@ CFLAGS += -I$(FLEXRAN_SDK)/lib_common CFLAGS += -I$(FLEXRAN_SDK)/lib_turbo CFLAGS += -I$(FLEXRAN_SDK)/lib_crc CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_matching +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512),y) +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr +CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_dematching_5gnr +endif LDLIBS += -L$(FLEXRAN_SDK)/lib_turbo -lturbo LDLIBS += -L$(FLEXRAN_SDK)/lib_crc -lcrc LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon -LDLIBS += -lstdc++ -lirc -limf -lipps +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512),y) +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif + +LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml # library version LIBABIVER := 1
drivers/baseband/turbo_sw/bbdev_turbo_software.c +670 -9
862 lines not on this page · raw message
mk/rte.app.mk +7 -1
@@ -225,8 +225,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lrte_pmd_bbdev_turbo_sw _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcrc _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_AVX512),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_LDPC_ratematch_5gnr -lLDPC_ratematch_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_encoder_5gnr -lldpc_encoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_ldpc_decoder_5gnr -lldpc_decoder_5gnr +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_dematching_5gnr -lrate_dematching_5gnr +endif _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps -lsvml endif # CONFIG_RTE_LIBRTE_BBDEV ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
Signature · 1 line
1.8.3.1
PATCH v2 5/5 usertools: update to usertool for baseband device
In reply to Nicolas ChautruAllows binding of baseband devices
--- usertools/dpdk-devbind.py | 10 +++++++++- usertools/dpdk-setup.sh | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) mode change 100755 => 100644 usertools/dpdk-devbind.py mode change 100755 => 100644 usertools/dpdk-setup.sh
usertools/dpdk-devbind.py +9 -1
@@ -18,6 +18,8 @@ 'SVendor': None, 'SDevice': None} intel_processor_class = {'Class': '0b', 'Vendor': '8086', 'Device': None, 'SVendor': None, 'SDevice': None} +acceleration_class = {'Class': '12', 'Vendor': None, 'Device': None, + 'SVendor': None, 'SDevice': None} cavium_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a04b,a04d', 'SVendor': None, 'SDevice': None} cavium_fpa = {'Class': '08', 'Vendor': '177d', 'Device': 'a053',
@@ -40,6 +42,7 @@ crypto_devices = [encryption_class, intel_processor_class] eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] +baseband_devices = [acceleration_class] compress_devices = [cavium_zip] # global dict ethernet devices present. Dictionary indexed by PCI address.
@@ -89,7 +92,7 @@ def usage(): --status-dev: Print the status of given device group. Supported device groups are: - "net", "crypto", "event", "mempool" and "compress" + "net", "crypto", "baseband", "event", "mempool" and "compress" -b driver, --bind=driver: Select the driver to use or \"none\" to unbind the device
@@ -586,6 +589,9 @@ def show_status(): if status_dev == "crypto" or status_dev == "all": show_device_status(crypto_devices, "Crypto") + if status_dev == "baseband" or status_dev == "all": + show_device_status(baseband_devices, "Baseband") + if status_dev == "event" or status_dev == "all": show_device_status(eventdev_devices, "Eventdev")
@@ -667,6 +673,7 @@ def do_arg_actions(): # refresh if we have changed anything get_device_details(network_devices) get_device_details(crypto_devices) + get_device_details(baseband_devices) get_device_details(eventdev_devices) get_device_details(mempool_devices) get_device_details(compress_devices)
@@ -688,6 +695,7 @@ def main(): get_device_details(network_devices) get_device_details(crypto_devices) get_device_details(eventdev_devices) + get_device_details(baseband_devices) get_device_details(mempool_devices) get_device_details(compress_devices) do_arg_actions()
usertools/dpdk-setup.sh +3 -3
@@ -496,13 +496,13 @@ step2_func() TEXT[5]="Setup hugepage mappings for NUMA systems" FUNC[5]="set_numa_pages" - TEXT[6]="Display current Ethernet/Crypto device settings" + TEXT[6]="Display current Ethernet/Crypto/Baseband device settings" FUNC[6]="show_devices" - TEXT[7]="Bind Ethernet/Crypto device to IGB UIO module" + TEXT[7]="Bind Ethernet/Crypto/Baseband device to IGB UIO module" FUNC[7]="bind_devices_to_igb_uio" - TEXT[8]="Bind Ethernet/Crypto device to VFIO module" + TEXT[8]="Bind Ethernet/Crypto/Baseband device to VFIO module" FUNC[8]="bind_devices_to_vfio" TEXT[9]="Setup VFIO permissions"
Signature · 1 line
1.8.3.1
14/05/2019 21:45, Nicolas Chautru:
Quoted 1 line
This was deferred from 19.05 due to time running out.
No it is deferred because I am against new bbdev code in DPDK. We cannot compile the first PMD "turbo_sw", so it might be removed.
Quoted 3 lines
Addition of a PMD for 4G FEC encoding and decoding functions for Intel PAC N300 FPGA. Extension of PMD based on Intel optimised SW libraries for 5G FEC.
The HW dependency is available now.
Where is the software dependency?
Quoted 34 lines
create mode 100644 app/test-bbdev/ldpc_dec_default.data create mode 100644 app/test-bbdev/ldpc_enc_default.data mode change 100755 => 100644 app/test-bbdev/test-bbdev.py create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_0.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_2.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_HARQ_1_3.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v14298.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v2342_drop.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8480.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v8568_low.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_v9503.data create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_vcrc_fail.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k1144_r0_e1380_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k1144_r0_e1380_rm_crc24b.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k330_r0_e360_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k720_r0_e832_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k720_r0_e864_rm_crc24b.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_c1_k8148_r0_e9372_rm.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v11835.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v2342.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v3964_rv1.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v7813.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v8568_crc24a.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_v9503.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k160_r0_e23040_teq_posllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k3136_r0_e4914_sbd_negllr.data
Quoted 8 lines
create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e12248_crc24b_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c6_k5888_r3_e6912_sbd_teq_negllr_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k456_r0_e1380_scatter.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c3_k4352_r0_e13068_crc24b_scatter.data
We cannot merge so much big data files.
I cannot even open the patch because it is too big.
You should had a hint when you received automatic replies because the patch number 4 is too big, isn't it?