VRB2 bbdev PMD introduction
v2 cover VRB2 bbdev PMD introduction
v2: doc, comments and commit-log updates.
This serie includes changes to the VRB BBDEV PMD for 23.11.
This allows the VRB unified driver to support the new VRB2 implementation variant on GNR-D.
This also include minor change to the dev_info to expose FFT version flexibility to expose information to the application on what windows LUT is configured dynamically on the device.
Nicolas Chautru (7):
bbdev: add FFT version member in driver info baseband/acc: add FFT version in the VRB PMD baseband/acc: remove the 4G SO capability for VRB1 baseband/acc: allocate FCW memory separately baseband/acc: add support for MLD operation baseband/acc: introduce the new VRB2 variant baseband/acc: add configure helper for VRB2
doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/vrb1.rst | 4 - doc/guides/bbdevs/vrb2.rst | 269 ++++ doc/guides/rel_notes/release_23_11.rst | 3 + drivers/baseband/acc/acc100_pmd.h | 2 + drivers/baseband/acc/acc_common.h | 97 +- drivers/baseband/acc/rte_acc100_pmd.c | 10 +- drivers/baseband/acc/rte_vrb_pmd.c | 1949 +++++++++++++++++++++--- drivers/baseband/acc/vrb1_pf_enum.h | 17 +- drivers/baseband/acc/vrb2_pf_enum.h | 124 ++ drivers/baseband/acc/vrb2_vf_enum.h | 121 ++ drivers/baseband/acc/vrb_cfg.h | 16 + drivers/baseband/acc/vrb_pmd.h | 173 ++- lib/bbdev/rte_bbdev.h | 2 + 14 files changed, 2560 insertions(+), 228 deletions(-) create mode 100644 doc/guides/bbdevs/vrb2.rst create mode 100644 drivers/baseband/acc/vrb2_pf_enum.h create mode 100644 drivers/baseband/acc/vrb2_vf_enum.h
Signature · 1 line
2.34.1
PATCH v2 1/7 bbdev: add FFT version member in driver info
This can be used to distinguish different version of the flexible pointwise windowing applied to the FFT and expose this platform configuration to the application.
The SRS processing chain
(https://doc.dpdk.org/guides/prog_guide/bbdev.html#bbdev-fft-operation)
includes a pointwise multiplication by time window whose degrees of liberty cannot be exposed through a standard fixed API but through a hash matching a version of such window definition (not HW IP specific) defined as a long array of complex numbers.
Using that mechanism user application can retrieve information related to what tables have been dynamically programmed on any bbdev device supporting FFT windowing operation.
--- lib/bbdev/rte_bbdev.h | 2 ++ 1 file changed, 2 insertions(+)
lib/bbdev/rte_bbdev.h +2 -0
@@ -349,6 +349,8 @@ struct rte_bbdev_driver_info {const struct rte_bbdev_op_cap *capabilities;/** Device cpu_flag requirements */ const enum rte_cpu_flag_t *cpu_flag_reqs; +/** Versioning number for the FFT configured on the device. */ +uint16_t fft_version; };/** Macro used at end of bbdev PMD list */
Signature · 1 line
2.34.1
PATCH v2 2/7 baseband/acc: add FFT version in the VRB PMD
In reply to Nicolas ChautruThis allows to expose the flexible version of the pointwise flexible multiplication being dynamically configured on the device.
--- drivers/baseband/acc/acc_common.h | 1 + drivers/baseband/acc/rte_vrb_pmd.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+)
drivers/baseband/acc/acc_common.h +1 -0
@@ -512,6 +512,7 @@ struct acc_deq_intr_details {enum {ACC_VF2PF_STATUS_REQUEST =1 ,ACC_VF2PF_USING_VF =2 , +ACC_VF2PF_LUT_VER_REQUEST =3 , };
drivers/baseband/acc/rte_vrb_pmd.c +22 -0
@@ -298,6 +298,27 @@ vrb_device_status(struct rte_bbdev *dev)return reg; } +/* Request device FFT related version information. */ +static inline uint32_t +vrb_device_fft_ver (struct rte_bbdev *dev) +{ +struct acc_device *d = dev->data->dev_private; +uint32_t reg, time_out =0 ; + +if (d->pf_device) +return 0 ; + +vrb_vf2pf (d,ACC_VF2PF_LUT_VER_REQUEST ); + reg =acc_reg_read (d, d->reg_addr->pf2vf_doorbell); +while ((time_out <ACC_STATUS_TO ) && (reg ==RTE_BBDEV_DEV_NOSTATUS )) { +usleep (ACC_STATUS_WAIT );/*< Wait or VF->PF->VF Comms */ + reg =acc_reg_read (d, d->reg_addr->pf2vf_doorbell); + time_out++; + } + +return reg; +} +/* Checks PF Info Ring to find the interrupt cause and handles it accordingly. */ static inline void vrb_check_ir (struct acc_device *acc_dev)
@@ -1100,6 +1121,7 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)fetch_acc_config (dev);/* Check the status of device. */ dev_info->device_status =vrb_device_status (dev); + dev_info->fft_version =vrb_device_fft_ver (dev);/* Exposed number of queues. */ dev_info->num_queues[RTE_BBDEV_OP_NONE ] =0 ;
Signature · 1 line
2.34.1
PATCH v2 3/7 baseband/acc: remove the 4G SO capability for VRB1
In reply to Nicolas ChautruThis removes the specific capability and support of LTE Decoder Soft Output option on the VRB1 PMD.
This is triggered as a vendor decision to defeature the related optional capability so that to avoid theoretical risk of race conditions impacting the device reliability. That optional APP LLR output is not impacting the actual decoder hard output.
--- doc/guides/bbdevs/vrb1.rst | 4 ---- drivers/baseband/acc/rte_vrb_pmd.c | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-)
doc/guides/bbdevs/vrb1.rst +0 -4
@@ -71,11 +71,7 @@ The Intel vRAN Boost v1.0 PMD supports the following bbdev capabilities: - ``RTE_BBDEV_TURBO_EARLY_TERMINATION``: set early termination feature. - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``: supports scatter-gather for input/output data. - ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN``: set half iteration granularity. - - ``RTE_BBDEV_TURBO_SOFT_OUTPUT``: set the APP LLR soft output. - - ``RTE_BBDEV_TURBO_EQUALIZER``: set the turbo equalizer feature. - - ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE``: set the soft output saturation. - ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH``: set to run an extra odd iteration after CRC match. - - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT``: set if negative APP LLR output supported. - ``RTE_BBDEV_TURBO_MAP_DEC``: supports flexible parallel MAP engine decoding. * For the FFT operation:
drivers/baseband/acc/rte_vrb_pmd.c +3 -4
@@ -1018,15 +1018,11 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE |RTE_BBDEV_TURBO_CRC_TYPE_24B |RTE_BBDEV_TURBO_DEC_CRC_24B_DROP | -RTE_BBDEV_TURBO_EQUALIZER | -RTE_BBDEV_TURBO_SOFT_OUT_SATURATE |RTE_BBDEV_TURBO_HALF_ITERATION_EVEN |RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH | -RTE_BBDEV_TURBO_SOFT_OUTPUT |RTE_BBDEV_TURBO_EARLY_TERMINATION |RTE_BBDEV_TURBO_DEC_INTERRUPTS |RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN | -RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT |RTE_BBDEV_TURBO_MAP_DEC |RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP | RTE_BBDEV_TURBO_DEC_SCATTER_GATHER,
@@ -1975,6 +1971,9 @@ enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,struct rte_mbuf *input, *h_output_head, *h_output, *s_output_head, *s_output; +/* Disable explicitly SO for VRB 1. */ + op->turbo_dec.op_flags &= ~RTE_BBDEV_TURBO_SOFT_OUTPUT ; + desc =acc_desc (q, total_enqueued_cbs);vrb_fcw_td_fill (op, &desc->req.fcw_td);
Signature · 1 line
2.34.1
PATCH v2 4/7 baseband/acc: allocate FCW memory separately
In reply to Nicolas ChautruThis allows more flexibility to the FCW size for the unified driver. No actual functional change.
--- drivers/baseband/acc/acc_common.h | 4 +++- drivers/baseband/acc/rte_vrb_pmd.c | 25 ++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-)
drivers/baseband/acc/acc_common.h +3 -1
@@ -101,6 +101,7 @@#define ACC_NUM_QGRPS_PER_WORD 8#define ACC_MAX_NUM_QGRPS 32#define ACC_RING_SIZE_GRANULARITY 64 +#define ACC_MAX_FCW_SIZE 128/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define ACC_N_ZC_1 66/* N = 66 Zc for BG 1 */
@@ -582,13 +583,14 @@ struct __rte_cache_aligned acc_queue {uint32_t aq_enqueued;/* Count how many "batches" have been enqueued */ uint32_t aq_dequeued;/* Count how many "batches" have been dequeued */ uint32_t irq_enable;/* Enable ops dequeue interrupts if set to 1 */ -struct rte_mempool *fcw_mempool;/* FCW mempool */ enum rte_bbdev_op_type op_type;/* Type of this Queue: TE or TD */ /* Internal Buffers for loopback input */ uint8_t *lb_in;uint8_t *lb_out; +uint8_t *fcw_ring;rte_iova_t lb_in_addr_iova;rte_iova_t lb_out_addr_iova; +rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; };
drivers/baseband/acc/rte_vrb_pmd.c +24 -1
@@ -883,6 +883,25 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, goto free_companion_ring_addr; } + q->fcw_ring =rte_zmalloc_socket (dev->device->driver->name, +ACC_MAX_FCW_SIZE * d->sw_ring_max_depth, +RTE_CACHE_LINE_SIZE , conf->socket); +if (q->fcw_ring ==NULL ) { +rte_bbdev_log (ERR ,"Failed to allocate fcw_ring memory" ); + ret = -ENOMEM ; + goto free_companion_ring_addr; + } + q->fcw_ring_addr_iova =rte_malloc_virt2iova (q->fcw_ring); + +/* For FFT we need to store the FCW separately */ +if (conf->op_type ==RTE_BBDEV_OP_FFT ) { +for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { + desc = q->ring_addr + desc_idx; + desc->req.data_ptrs[0 ].address = q->fcw_ring_addr_iova + + desc_idx *ACC_MAX_FCW_SIZE ; + } + } + q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; q->aq_id = q_idx &0xF ;
@@ -994,6 +1013,7 @@ vrb_queue_release(struct rte_bbdev *dev, uint16_t q_id)if (q !=NULL ) {/* Mark the Queue as un-assigned. */ d->q_assigned_bit_map[q->qgrp_id] &= (~0ULL - (1 << (uint64_t ) q->aq_id)); +rte_free (q->fcw_ring);rte_free (q->companion_ring_addr);rte_free (q->lb_in);rte_free (q->lb_out);
@@ -3224,7 +3244,10 @@ vrb_enqueue_fft_one_op(struct acc_queue *q, struct rte_bbdev_fft_op *op, output = op->fft.base_output.data; in_offset = op->fft.base_input.offset; out_offset = op->fft.base_output.offset; - fcw = &desc->req.fcw_fft; + + fcw = (struct acc_fcw_fft *) (q->fcw_ring + + ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask) + *ACC_MAX_FCW_SIZE );vrb1_fcw_fft_fill (op, fcw);vrb1_dma_desc_fft_fill (op, &desc->req, input, output, &in_offset, &out_offset);
Signature · 1 line
2.34.1
Re: [PATCH v2 4/7] baseband/acc: allocate FCW memory separately
Quoted 44 lines · Nicolas Chautru
This allows more flexibility to the FCW size for the unified driver. No actual functional change.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 4 +++- drivers/baseband/acc/rte_vrb_pmd.c | 25 ++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-)drivers/baseband/acc/acc_common.h +3
-1@@ -101,6 +101,7 @@#define ACC_NUM_QGRPS_PER_WORD 8#define ACC_MAX_NUM_QGRPS 32#define ACC_RING_SIZE_GRANULARITY 64 +#define ACC_MAX_FCW_SIZE 128/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define ACC_N_ZC_1 66/* N = 66 Zc for BG 1 */ @@ -582,13 +583,14 @@ struct __rte_cache_aligned acc_queue {uint32_t aq_enqueued;/* Count how many "batches" have been enqueued */ uint32_t aq_dequeued;/* Count how many "batches" have been dequeued */ uint32_t irq_enable;/* Enable ops dequeue interrupts if set to 1 */ -struct rte_mempool *fcw_mempool;/* FCW mempool */ enum rte_bbdev_op_type op_type;/* Type of this Queue: TE or TD */ /* Internal Buffers for loopback input */ uint8_t *lb_in;uint8_t *lb_out; +uint8_t *fcw_ring;rte_iova_t lb_in_addr_iova;rte_iova_t lb_out_addr_iova; +rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; };drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -883,6 +883,25 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, goto free_companion_ring_addr; }
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, · line 894
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +9
-0+ q->fcw_ring =rte_zmalloc_socket (dev->device->driver->name, +ACC_MAX_FCW_SIZE * d->sw_ring_max_depth, +RTE_CACHE_LINE_SIZE , conf->socket); +if (q->fcw_ring ==NULL ) { +rte_bbdev_log (ERR ,"Failed to allocate fcw_ring memory" ); + ret = -ENOMEM ; + goto free_companion_ring_addr; + } + q->fcw_ring_addr_iova =rte_malloc_virt2iova (q->fcw_ring);
I see this is not done for other rte_malloc_virt2iova(), but this API may returns an error (RTE_BAD_IOVA), so it should be checked.
Quoted 23 lines
drivers/baseband/acc/rte_vrb_pmd.c +11
-0+ +/* For FFT we need to store the FCW separately */ +if (conf->op_type ==RTE_BBDEV_OP_FFT ) { +for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { + desc = q->ring_addr + desc_idx; + desc->req.data_ptrs[0 ].address = q->fcw_ring_addr_iova + + desc_idx *ACC_MAX_FCW_SIZE ; + } + } + q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; q->aq_id = q_idx &0xF ;@@ -994,6 +1013,7 @@ vrb_queue_release(struct rte_bbdev *dev, uint16_t q_id)if (q !=NULL ) {/* Mark the Queue as un-assigned. */ d->q_assigned_bit_map[q->qgrp_id] &= (~0ULL - (1 << (uint64_t ) q->aq_id)); +rte_free (q->fcw_ring);rte_free (q->companion_ring_addr);rte_free (q->lb_in);rte_free (q->lb_out);@@ -3224,7 +3244,10 @@ vrb_enqueue_fft_one_op(struct acc_queue *q, struct rte_bbdev_fft_op *op, output = op->fft.base_output.data;
drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_fft_one_op(struct acc_queue *q, struct rte_bbdev_fft_op *op, · line 3253
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1in_offset = op->fft.base_input.offset; out_offset = op->fft.base_output.offset; - fcw = &desc->req.fcw_fft; + + fcw = (struct acc_fcw_fft *) (q->fcw_ring + + ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask) + *ACC_MAX_FCW_SIZE );vrb1_fcw_fft_fill (op, fcw);vrb1_dma_desc_fft_fill (op, &desc->req, input, output, &in_offset, &out_offset);
With above suggested check added, the patch looks good to me.
Thanks,
Maxime
RE: [PATCH v2 4/7] baseband/acc: allocate FCW memory separately
Hi Maxime,
Quoted 62 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, September 27, 2023 1:28 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 4/7] baseband/acc: allocate FCW memory separatelyQuoted 22 lines · Nicolas Chautru
This allows more flexibility to the FCW size for the unified driver. No actual functional change.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 4 +++- drivers/baseband/acc/rte_vrb_pmd.c | 25 ++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-)drivers/baseband/acc/acc_common.h +1
-0@@ -101,6 +101,7 @@#define ACC_NUM_QGRPS_PER_WORD 8#define ACC_MAX_NUM_QGRPS 32#define ACC_RING_SIZE_GRANULARITY 64 +#define ACC_MAX_FCW_SIZE 128/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define ACC_N_ZC_1 66 /* N = 66 Zc for BG 1 */ @@ -582,13 +583,14 @@Quoted 2 lines
struct
__rte_cache_alignedacc_queue{
uint32_taq_enqueued; /* Count how many "batches" have beenenqueued */
Quoted 1 line
uint32_taq_dequeued; /* Count how many "batches" have beendequeued */
drivers/baseband/acc/acc_common.h
Quoted 3 lines
uint32_tirq_enable; /* Enable ops dequeue interrupts if set to 1 */drivers/baseband/acc/acc_common.h +0
-1-struct rte_mempool *fcw_mempool;/* FCW mempool */ enum rte_bbdev_op_type op_type;/* Type of this Queue: TE or TD */
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 16 lines
/* Internal Buffers for loopback input */
uint8_t*lb_in;
uint8_t*lb_out;drivers/baseband/acc/acc_common.h +2
-0+uint8_t *fcw_ring;rte_iova_t lb_in_addr_iova;rte_iova_t lb_out_addr_iova; +rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; };drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -883,6 +883,25 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0goto free_companion_ring_addr; }
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, · line 894
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +9
-0+ q->fcw_ring =rte_zmalloc_socket (dev->device->driver->name, +ACC_MAX_FCW_SIZE * d->sw_ring_max_depth, +RTE_CACHE_LINE_SIZE , conf->socket); +if (q->fcw_ring ==NULL ) { +rte_bbdev_log (ERR ,"Failed to allocate fcw_ring memory" ); + ret = -ENOMEM ; + goto free_companion_ring_addr; + } + q->fcw_ring_addr_iova =rte_malloc_virt2iova (q->fcw_ring);I see this is not done for other
rte_malloc_virt2iova(), but this API may returns an error (RTE_BAD_IOVA), so it should be checked.
But can it really fail? I don't think so, we just got the ptr from the malloc etc...
Also we don’t do this anywhere (including out of baseband/drivers) when doing such basic virt2iova from pinned memory. If we need to add it eventually (I doubt it) probably best to do it everywhere to keep code consistency. Suggesting to keep this one as is if okay with you.
Quoted 47 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +/* For FFT we need to store the FCW separately */ +if (conf->op_type ==RTE_BBDEV_OP_FFT ) { + for (desc_idx = 0; desc_idx < d->sw_ring_max_depth;desc_idx++) {
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_release(struct rte_bbdev *dev, uint16_t
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ desc = q->ring_addr + desc_idx; + desc->req.data_ptrs[0].address = q-
fcw_ring_addr_iova+drivers/baseband/acc/rte_vrb_pmd.c +4
-0+desc_idx *ACC_MAX_FCW_SIZE ; + } + } + q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; q->aq_id = q_idx &0xF ;@@ -994,6 +1013,7 @@ vrb_queue_release(struct rte_bbdev *dev, uint16_t
q_id)drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_release(struct rte_bbdev *dev, uint16_t q_id)
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0if (q !=NULL ) {/* Mark the Queue as un-assigned. */ d->q_assigned_bit_map[q->qgrp_id] &= (~0ULL - (1 <<(
uint64_t)drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_fft_one_op(struct acc_queue *q,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0q->aq_id)); +rte_free (q->fcw_ring);rte_free (q->companion_ring_addr);rte_free (q->lb_in);rte_free(q->lb_out);drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -3224,7 +3244,10 @@ vrb_enqueue_fft_one_op(struct acc_queue *q,struct
rte_bbdev_fft_op*op,Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1output = op->fft.base_output.data; in_offset = op->fft.base_input.offset; out_offset = op->fft.base_output.offset; - fcw = &desc->req.fcw_fft; + + fcw = (struct acc_fcw_fft *) (q->fcw_ring + + ((q->sw_ring_head + total_enqueued_cbs) & q- sw_ring_wrap_mask) + *ACC_MAX_FCW_SIZE );vrb1_fcw_fft_fill (op, fcw);Quoted 2 lines
vrb1_dma_desc_fft_fill(op,
&desc->req, input, output,&in_offset,&out_offset);With above suggested check added, the patch looks good to me.
Thanks,
Maxime
PATCH v2 5/7 baseband/acc: add support for MLD operation
In reply to Nicolas ChautruThere is no functionality related to the MLD operation but allows the unified PMD to support the operation being added moving forward.
--- drivers/baseband/acc/acc_common.h | 1 + drivers/baseband/acc/rte_vrb_pmd.c | 39 ++++++++++++++++++++++++------ drivers/baseband/acc/vrb_pmd.h | 12 +++++++++ 3 files changed, 45 insertions(+), 7 deletions(-)
drivers/baseband/acc/acc_common.h +1 -0
@@ -87,6 +87,7 @@#define ACC_FCW_LE_BLEN 32#define ACC_FCW_LD_BLEN 36#define ACC_FCW_FFT_BLEN 28 +#define ACC_FCW_MLDTS_BLEN 32#define ACC_5GUL_SIZE_0 16#define ACC_5GUL_SIZE_1 40#define ACC_5GUL_OFFSET_0 36
drivers/baseband/acc/rte_vrb_pmd.c +32 -7
@@ -37,7 +37,7 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_idreturn ((qgrp_id <<7 ) + (aq_id <<3 ) + VRB1_VfQmgrIngressAq); } -enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,NUM_ACC }; +enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC };/* Return the accelerator enum for a Queue Group Index. */ static inline int
@@ -53,6 +53,7 @@ accFromQgid(int qg_idx, const struct rte_acc_conf *acc_conf) NumQGroupsPerFn[DL_4G ] = acc_conf->q_dl_4g.num_qgroups; NumQGroupsPerFn[DL_5G ] = acc_conf->q_dl_5g.num_qgroups; NumQGroupsPerFn[FFT ] = acc_conf->q_fft.num_qgroups; + NumQGroupsPerFn[MLD ] = acc_conf->q_mld.num_qgroups;for (acc =UL_4G ; acc <NUM_ACC ; acc++)for (qgIdx =0 ; qgIdx < NumQGroupsPerFn[acc]; qgIdx++) accQg[qgIndex++] = acc;
@@ -83,6 +84,9 @@ qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_ccase FFT : p_qtop = &(acc_conf->q_fft);break ; +case MLD : + p_qtop = &(acc_conf->q_mld); +break ;default :/* NOTREACHED. */ rte_bbdev_log (ERR ,"Unexpected error evaluating %s using %d" , __func__, acc_enum);
@@ -139,6 +143,9 @@ initQTop(struct rte_acc_conf *acc_conf) acc_conf->q_fft.num_aqs_per_groups =0 ; acc_conf->q_fft.num_qgroups =0 ; acc_conf->q_fft.first_qgroup_index =-1 ; + acc_conf->q_mld.num_aqs_per_groups =0 ; + acc_conf->q_mld.num_qgroups =0 ; + acc_conf->q_mld.first_qgroup_index =-1 ; } static inline void
@@ -250,7 +257,7 @@ fetch_acc_config(struct rte_bbdev *dev) } rte_bbdev_log_debug( - "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u AQ %u %u %u %u %u Len %u %u %u %u %u\n", + "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u\n", (d->pf_device) ? "PF" : "VF", (acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG", (acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
@@ -259,16 +266,19 @@ fetch_acc_config(struct rte_bbdev *dev) acc_conf->q_ul_5g.num_qgroups, acc_conf->q_dl_5g.num_qgroups, acc_conf->q_fft.num_qgroups, + acc_conf->q_mld.num_qgroups, acc_conf->q_ul_4g.num_aqs_per_groups, acc_conf->q_dl_4g.num_aqs_per_groups, acc_conf->q_ul_5g.num_aqs_per_groups, acc_conf->q_dl_5g.num_aqs_per_groups, acc_conf->q_fft.num_aqs_per_groups, + acc_conf->q_mld.num_aqs_per_groups, acc_conf->q_ul_4g.aq_depth_log2, acc_conf->q_dl_4g.aq_depth_log2, acc_conf->q_ul_5g.aq_depth_log2, acc_conf->q_dl_5g.aq_depth_log2, - acc_conf->q_fft.aq_depth_log2); + acc_conf->q_fft.aq_depth_log2, + acc_conf->q_mld.aq_depth_log2); } static inline void
@@ -332,7 +342,7 @@ vrb_check_ir(struct acc_device *acc_dev)while (ring_data->valid) {if ((ring_data->int_nb <ACC_PF_INT_DMA_DL_DESC_IRQ ) || ( - ring_data->int_nb >ACC_PF_INT_DMA_DL5G_DESC_IRQ )) { + ring_data->int_nb >ACC_PF_INT_DMA_MLD_DESC_IRQ )) {rte_bbdev_log (WARNING ,"InfoRing: ITR:%d Info:0x%x" , ring_data->int_nb, ring_data->detailed_info);/* Initialize Info Ring entry and move forward. */
@@ -366,6 +376,7 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_PF_INT_DMA_FFT_DESC_IRQ :case ACC_PF_INT_DMA_UL5G_DESC_IRQ :case ACC_PF_INT_DMA_DL5G_DESC_IRQ : +case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info ( dev->data, *ring_data);if (deq_intr_det.queue_id ==UINT16_MAX ) {
@@ -393,6 +404,7 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_VF_INT_DMA_FFT_DESC_IRQ :case ACC_VF_INT_DMA_UL5G_DESC_IRQ :case ACC_VF_INT_DMA_DL5G_DESC_IRQ : +case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */ ring_data->vf_id =0 ; deq_intr_det.queue_id = get_queue_id_from_ring_info(
@@ -741,7 +753,7 @@ vrb_find_free_queue_idx(struct rte_bbdev *dev, const struct rte_bbdev_queue_conf *conf) {struct acc_device *d = dev->data->dev_private; -int op_2_acc[6 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT }; +int op_2_acc[7 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT ,MLD };int acc = op_2_acc[conf->op_type];struct rte_acc_queue_topology *qtop =NULL ;uint16_t group_idx;
@@ -804,7 +816,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,int fcw_len = (conf->op_type ==RTE_BBDEV_OP_LDPC_ENC ?ACC_FCW_LE_BLEN : (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC ?ACC_FCW_TD_BLEN : (conf->op_type ==RTE_BBDEV_OP_LDPC_DEC ? -ACC_FCW_LD_BLEN :ACC_FCW_FFT_BLEN ))); +ACC_FCW_LD_BLEN : (conf->op_type ==RTE_BBDEV_OP_FFT ? +ACC_FCW_FFT_BLEN :ACC_FCW_MLDTS_BLEN ))));for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx;
@@ -916,6 +929,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, q->aq_depth = (1 << d->acc_conf.q_dl_5g.aq_depth_log2); else if (conf->op_type == RTE_BBDEV_OP_FFT) q->aq_depth = (1 << d->acc_conf.q_fft.aq_depth_log2); + else if (conf->op_type == RTE_BBDEV_OP_MLDTS) + q->aq_depth = (1 << d->acc_conf.q_mld.aq_depth_log2); q->mmio_reg_enqueue =RTE_PTR_ADD (d->mmio_base, d->queue_offset (d->pf_device, q->vf_id, q->qgrp_id, q->aq_id));
@@ -972,6 +987,13 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type, op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e, op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index ); + }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { +struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op; +rte_bbdev_log (INFO ," Op MLD %d RBs %d NL %d Rp %d %d %x\n" , + index, + op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers, + op_mldts->mldts.r_rep, + op_mldts->mldts.c_rep, op_mldts->mldts.op_flags); } }
@@ -1151,13 +1173,16 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) d->acc_conf.q_dl_5g.num_qgroups; dev_info->num_queues[RTE_BBDEV_OP_FFT ] = d->acc_conf.q_fft.num_aqs_per_groups * d->acc_conf.q_fft.num_qgroups; + dev_info->num_queues[RTE_BBDEV_OP_MLDTS ] = d->acc_conf.q_mld.num_aqs_per_groups * + d->acc_conf.q_mld.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC ] = d->acc_conf.q_ul_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC ] = d->acc_conf.q_dl_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC ] = d->acc_conf.q_ul_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC ] = d->acc_conf.q_dl_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_FFT ] = d->acc_conf.q_fft.num_qgroups; + dev_info->queue_priority[RTE_BBDEV_OP_MLDTS ] = d->acc_conf.q_mld.num_qgroups; dev_info->max_num_queues =0 ; -for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_FFT ; i++) +for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_MLDTS ; i++) dev_info->max_num_queues += dev_info->num_queues[i]; dev_info->queue_size_lim =ACC_MAX_QUEUE_DEPTH ; dev_info->hardware_accelerated = true;
drivers/baseband/acc/vrb_pmd.h +12 -0
@@ -101,6 +101,8 @@ struct acc_registry_addr {unsigned int dma_ring_ul4g_lo;unsigned int dma_ring_fft_hi;unsigned int dma_ring_fft_lo; +unsigned int dma_ring_mld_hi; +unsigned int dma_ring_mld_lo;unsigned int ring_size;unsigned int info_ring_hi;unsigned int info_ring_lo;
@@ -116,6 +118,8 @@ struct acc_registry_addr {unsigned int tail_ptrs_ul4g_lo;unsigned int tail_ptrs_fft_hi;unsigned int tail_ptrs_fft_lo; +unsigned int tail_ptrs_mld_hi; +unsigned int tail_ptrs_mld_lo;unsigned int depth_log0_offset;unsigned int depth_log1_offset;unsigned int qman_group_func;
@@ -140,6 +144,8 @@ static const struct acc_registry_addr vrb1_pf_reg_addr = { .dma_ring_ul4g_lo = VRB1_PfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_PfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_PfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_PfQmgrRingSizeVf, .info_ring_hi = VRB1_PfHiInfoRingBaseHiRegPf, .info_ring_lo = VRB1_PfHiInfoRingBaseLoRegPf,
@@ -155,6 +161,8 @@ static const struct acc_registry_addr vrb1_pf_reg_addr = { .tail_ptrs_ul4g_lo = VRB1_PfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi = VRB1_PfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo = VRB1_PfDmaFftRespPtrLoRegVf, + .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_PfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_PfQmgrGrpDepthLog21Vf, .qman_group_func = VRB1_PfQmgrGrpFunction0,
@@ -179,6 +187,8 @@ static const struct acc_registry_addr vrb1_vf_reg_addr = { .dma_ring_ul4g_lo = VRB1_VfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_VfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_VfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_VfQmgrRingSizeVf, .info_ring_hi = VRB1_VfHiInfoRingBaseHiVf, .info_ring_lo = VRB1_VfHiInfoRingBaseLoVf,
@@ -194,6 +204,8 @@ static const struct acc_registry_addr vrb1_vf_reg_addr = { .tail_ptrs_ul4g_lo = VRB1_VfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi = VRB1_VfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo = VRB1_VfDmaFftRespPtrLoRegVf, + .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_VfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_VfQmgrGrpDepthLog21Vf, .qman_group_func = VRB1_VfQmgrGrpFunction0Vf,
Signature · 1 line
2.34.1
Re: [PATCH v2 5/7] baseband/acc: add support for MLD operation
Quoted 167 lines · Nicolas Chautru
There is no functionality related to the MLD operation but allows the unified PMD to support the operation being added moving forward.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 1 + drivers/baseband/acc/rte_vrb_pmd.c | 39 ++++++++++++++++++++++++------ drivers/baseband/acc/vrb_pmd.h | 12 +++++++++ 3 files changed, 45 insertions(+), 7 deletions(-)drivers/baseband/acc/acc_common.h +1
-0@@ -87,6 +87,7 @@#define ACC_FCW_LE_BLEN 32#define ACC_FCW_LD_BLEN 36#define ACC_FCW_FFT_BLEN 28 +#define ACC_FCW_MLDTS_BLEN 32#define ACC_5GUL_SIZE_0 16#define ACC_5GUL_SIZE_1 40#define ACC_5GUL_OFFSET_0 36drivers/baseband/acc/rte_vrb_pmd.c +30
-6@@ -37,7 +37,7 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_idreturn ((qgrp_id <<7 ) + (aq_id <<3 ) + VRB1_VfQmgrIngressAq); } -enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,NUM_ACC }; +enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC };/* Return the accelerator enum for a Queue Group Index. */ static inline int@@ -53,6 +53,7 @@ accFromQgid(int qg_idx, const struct rte_acc_conf *acc_conf) NumQGroupsPerFn[DL_4G ] = acc_conf->q_dl_4g.num_qgroups; NumQGroupsPerFn[DL_5G ] = acc_conf->q_dl_5g.num_qgroups; NumQGroupsPerFn[FFT ] = acc_conf->q_fft.num_qgroups; + NumQGroupsPerFn[MLD ] = acc_conf->q_mld.num_qgroups;for (acc =UL_4G ; acc <NUM_ACC ; acc++)for (qgIdx =0 ; qgIdx < NumQGroupsPerFn[acc]; qgIdx++) accQg[qgIndex++] = acc;@@ -83,6 +84,9 @@ qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_ccase FFT : p_qtop = &(acc_conf->q_fft);break ; +case MLD : + p_qtop = &(acc_conf->q_mld); +break ;default :/* NOTREACHED. */ rte_bbdev_log (ERR ,"Unexpected error evaluating %s using %d" , __func__, acc_enum);@@ -139,6 +143,9 @@ initQTop(struct rte_acc_conf *acc_conf) acc_conf->q_fft.num_aqs_per_groups =0 ; acc_conf->q_fft.num_qgroups =0 ; acc_conf->q_fft.first_qgroup_index =-1 ; + acc_conf->q_mld.num_aqs_per_groups =0 ; + acc_conf->q_mld.num_qgroups =0 ; + acc_conf->q_mld.first_qgroup_index =-1 ; } static inline void@@ -250,7 +257,7 @@ fetch_acc_config(struct rte_bbdev *dev) } rte_bbdev_log_debug( - "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u AQ %u %u %u %u %u Len %u %u %u %u %u\n", + "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u\n", (d->pf_device) ? "PF" : "VF", (acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG", (acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",@@ -259,16 +266,19 @@ fetch_acc_config(struct rte_bbdev *dev) acc_conf->q_ul_5g.num_qgroups, acc_conf->q_dl_5g.num_qgroups, acc_conf->q_fft.num_qgroups, + acc_conf->q_mld.num_qgroups, acc_conf->q_ul_4g.num_aqs_per_groups, acc_conf->q_dl_4g.num_aqs_per_groups, acc_conf->q_ul_5g.num_aqs_per_groups, acc_conf->q_dl_5g.num_aqs_per_groups, acc_conf->q_fft.num_aqs_per_groups, + acc_conf->q_mld.num_aqs_per_groups, acc_conf->q_ul_4g.aq_depth_log2, acc_conf->q_dl_4g.aq_depth_log2, acc_conf->q_ul_5g.aq_depth_log2, acc_conf->q_dl_5g.aq_depth_log2, - acc_conf->q_fft.aq_depth_log2); + acc_conf->q_fft.aq_depth_log2, + acc_conf->q_mld.aq_depth_log2); } static inline void@@ -332,7 +342,7 @@ vrb_check_ir(struct acc_device *acc_dev)while (ring_data->valid) {if ((ring_data->int_nb <ACC_PF_INT_DMA_DL_DESC_IRQ ) || ( - ring_data->int_nb >ACC_PF_INT_DMA_DL5G_DESC_IRQ )) { + ring_data->int_nb >ACC_PF_INT_DMA_MLD_DESC_IRQ )) {rte_bbdev_log (WARNING ,"InfoRing: ITR:%d Info:0x%x" , ring_data->int_nb, ring_data->detailed_info);/* Initialize Info Ring entry and move forward. */ @@ -366,6 +376,7 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_PF_INT_DMA_FFT_DESC_IRQ :case ACC_PF_INT_DMA_UL5G_DESC_IRQ :case ACC_PF_INT_DMA_DL5G_DESC_IRQ : +case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info ( dev->data, *ring_data);if (deq_intr_det.queue_id ==UINT16_MAX ) {@@ -393,6 +404,7 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_VF_INT_DMA_FFT_DESC_IRQ :case ACC_VF_INT_DMA_UL5G_DESC_IRQ :case ACC_VF_INT_DMA_DL5G_DESC_IRQ : +case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */ ring_data->vf_id =0 ; deq_intr_det.queue_id = get_queue_id_from_ring_info(@@ -741,7 +753,7 @@ vrb_find_free_queue_idx(struct rte_bbdev *dev, const struct rte_bbdev_queue_conf *conf) {struct acc_device *d = dev->data->dev_private; -int op_2_acc[6 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT }; +int op_2_acc[7 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT ,MLD };int acc = op_2_acc[conf->op_type];struct rte_acc_queue_topology *qtop =NULL ;uint16_t group_idx;@@ -804,7 +816,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,int fcw_len = (conf->op_type ==RTE_BBDEV_OP_LDPC_ENC ?ACC_FCW_LE_BLEN : (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC ?ACC_FCW_TD_BLEN : (conf->op_type ==RTE_BBDEV_OP_LDPC_DEC ? -ACC_FCW_LD_BLEN :ACC_FCW_FFT_BLEN ))); +ACC_FCW_LD_BLEN : (conf->op_type ==RTE_BBDEV_OP_FFT ? +ACC_FCW_FFT_BLEN :ACC_FCW_MLDTS_BLEN ))));for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx;@@ -916,6 +929,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, q->aq_depth = (1 << d->acc_conf.q_dl_5g.aq_depth_log2); else if (conf->op_type == RTE_BBDEV_OP_FFT) q->aq_depth = (1 << d->acc_conf.q_fft.aq_depth_log2); + else if (conf->op_type == RTE_BBDEV_OP_MLDTS) + q->aq_depth = (1 << d->acc_conf.q_mld.aq_depth_log2); q->mmio_reg_enqueue =RTE_PTR_ADD (d->mmio_base, d->queue_offset (d->pf_device, q->vf_id, q->qgrp_id, q->aq_id));@@ -972,6 +987,13 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type, op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e, op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index ); + }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { +struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op; +rte_bbdev_log (INFO ," Op MLD %d RBs %d NL %d Rp %d %d %x\n" , + index, + op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers, + op_mldts->mldts.r_rep, + op_mldts->mldts.c_rep, op_mldts->mldts.op_flags); } }@@ -1151,13 +1173,16 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) d->acc_conf.q_dl_5g.num_qgroups; dev_info->num_queues[RTE_BBDEV_OP_FFT ] = d->acc_conf.q_fft.num_aqs_per_groups * d->acc_conf.q_fft.num_qgroups; + dev_info->num_queues[RTE_BBDEV_OP_MLDTS ] = d->acc_conf.q_mld.num_aqs_per_groups * + d->acc_conf.q_mld.num_qgroups;
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1186
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC ] = d->acc_conf.q_ul_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC ] = d->acc_conf.q_dl_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC ] = d->acc_conf.q_ul_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC ] = d->acc_conf.q_dl_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_FFT ] = d->acc_conf.q_fft.num_qgroups; + dev_info->queue_priority[RTE_BBDEV_OP_MLDTS ] = d->acc_conf.q_mld.num_qgroups; dev_info->max_num_queues =0 ; -for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_FFT ; i++) +for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_MLDTS ; i++) dev_info->max_num_queues += dev_info->num_queues[i];
Shouldn't the info reported be different for VRB1 and VRB2? IIUC, VRB1 does not support MLDTS?
Quoted 60 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0dev_info->queue_size_lim =ACC_MAX_QUEUE_DEPTH ; dev_info->hardware_accelerated = true;drivers/baseband/acc/vrb_pmd.h +12
-0@@ -101,6 +101,8 @@ struct acc_registry_addr {unsigned int dma_ring_ul4g_lo;unsigned int dma_ring_fft_hi;unsigned int dma_ring_fft_lo; +unsigned int dma_ring_mld_hi; +unsigned int dma_ring_mld_lo;unsigned int ring_size;unsigned int info_ring_hi;unsigned int info_ring_lo;@@ -116,6 +118,8 @@ struct acc_registry_addr {unsigned int tail_ptrs_ul4g_lo;unsigned int tail_ptrs_fft_hi;unsigned int tail_ptrs_fft_lo; +unsigned int tail_ptrs_mld_hi; +unsigned int tail_ptrs_mld_lo;unsigned int depth_log0_offset;unsigned int depth_log1_offset;unsigned int qman_group_func;@@ -140,6 +144,8 @@ static const struct acc_registry_addr vrb1_pf_reg_addr = { .dma_ring_ul4g_lo = VRB1_PfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_PfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_PfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_PfQmgrRingSizeVf, .info_ring_hi = VRB1_PfHiInfoRingBaseHiRegPf, .info_ring_lo = VRB1_PfHiInfoRingBaseLoRegPf,@@ -155,6 +161,8 @@ static const struct acc_registry_addr vrb1_pf_reg_addr = { .tail_ptrs_ul4g_lo = VRB1_PfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi = VRB1_PfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo = VRB1_PfDmaFftRespPtrLoRegVf, + .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_PfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_PfQmgrGrpDepthLog21Vf, .qman_group_func = VRB1_PfQmgrGrpFunction0,@@ -179,6 +187,8 @@ static const struct acc_registry_addr vrb1_vf_reg_addr = { .dma_ring_ul4g_lo = VRB1_VfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_VfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_VfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_VfQmgrRingSizeVf, .info_ring_hi = VRB1_VfHiInfoRingBaseHiVf, .info_ring_lo = VRB1_VfHiInfoRingBaseLoVf,@@ -194,6 +204,8 @@ static const struct acc_registry_addr vrb1_vf_reg_addr = { .tail_ptrs_ul4g_lo = VRB1_VfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi = VRB1_VfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo = VRB1_VfDmaFftRespPtrLoRegVf, + .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_VfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_VfQmgrGrpDepthLog21Vf, .qman_group_func = VRB1_VfQmgrGrpFunction0Vf,
Maxime Coquelin
Reviewed-byRe: [PATCH v2 5/7] baseband/acc: add support for MLD operation
Quoted 179 lines · Maxime Coquelin
Quoted 176 lines · Nicolas Chautru
There is no functionality related to the MLD operation but allows the unified PMD to support the operation being added moving forward.
Signed-off-by Nicolas Chautru <[email protected]>---
drivers/baseband/acc/acc_common.h | 1 +drivers/baseband/acc/rte_vrb_pmd.c| 39 ++++++++++++++++++++++++------ drivers/baseband/acc/vrb_pmd.h | 12 +++++++++3 files changed, 45 insertions(+), 7 deletions(-)drivers/baseband/acc/acc_common.h +1
-0@@ -87,6 +87,7 @@ #define ACC_FCW_LE_BLEN 32 #define ACC_FCW_LD_BLEN 36 #define ACC_FCW_FFT_BLEN 28 +#define ACC_FCW_MLDTS_BLEN 32 #define ACC_5GUL_SIZE_0 16 #define ACC_5GUL_SIZE_1 40 #define ACC_5GUL_OFFSET_0 36drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -37,7 +37,7 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id,
uint8_tqgrp_id,uint16_taq_id
return ((qgrp_id<< 7) + (aq_id<< 3) +VRB1_VfQmgrIngressAq); }drivers/baseband/acc/rte_vrb_pmd.c +1
-1-enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,NUM_ACC }; +enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC };/* Return the accelerator enum for a Queue Group Index. */ static inline int
drivers/baseband/acc/rte_vrb_pmd.c +1
-0@@ -53,6 +53,7 @@ accFromQgid(int qg_idx, const struct rte_acc_conf *acc_conf) NumQGroupsPerFn[DL_4G] = acc_conf->q_dl_4g.num_qgroups; NumQGroupsPerFn[DL_5G] = acc_conf->q_dl_5g.num_qgroups; NumQGroupsPerFn[FFT] = acc_conf->q_fft.num_qgroups; + NumQGroupsPerFn[MLD] = acc_conf->q_mld.num_qgroups; for (acc = UL_4G; acc < NUM_ACC; acc++) for (qgIdx = 0; qgIdx < NumQGroupsPerFn[acc]; qgIdx++)accQg[qgIndex++] = acc;
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -83,6 +84,9 @@ qtopFromAcc(struct rte_acc_queue_topology **qtop,int
acc_enum, structrte_acc_c
case FFT:
p_qtop= &(acc_conf->q_fft);
break;
+ case MLD:
+p_qtop= &(acc_conf->q_mld);
+ break;
default:
/* NOTREACHED. */
rte_bbdev_log(ERR, "Unexpected error evaluating %s using %d", __func__, acc_enum);drivers/baseband/acc/rte_vrb_pmd.c +3
-0@@ -139,6 +143,9 @@ initQTop(struct rte_acc_conf *acc_conf) acc_conf->q_fft.num_aqs_per_groups = 0; acc_conf->q_fft.num_qgroups = 0; acc_conf->q_fft.first_qgroup_index = -1; + acc_conf->q_mld.num_aqs_per_groups = 0; + acc_conf->q_mld.num_qgroups = 0; + acc_conf->q_mld.first_qgroup_index = -1; }static inline void
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -250,7 +257,7 @@ fetch_acc_config(struct rte_bbdev *dev) }rte_bbdev_log_debug(
- "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u AQ %u %u %u %u %u Len %u %u %u %u %u\n",
+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u\n",
(d->pf_device) ? "PF" : "VF", (acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG", (acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",drivers/baseband/acc/rte_vrb_pmd.c +4
-1@@ -259,16 +266,19 @@ fetch_acc_config(struct rte_bbdev *dev) acc_conf->q_ul_5g.num_qgroups, acc_conf->q_dl_5g.num_qgroups, acc_conf->q_fft.num_qgroups, + acc_conf->q_mld.num_qgroups, acc_conf->q_ul_4g.num_aqs_per_groups, acc_conf->q_dl_4g.num_aqs_per_groups, acc_conf->q_ul_5g.num_aqs_per_groups, acc_conf->q_dl_5g.num_aqs_per_groups, acc_conf->q_fft.num_aqs_per_groups, + acc_conf->q_mld.num_aqs_per_groups, acc_conf->q_ul_4g.aq_depth_log2, acc_conf->q_dl_4g.aq_depth_log2, acc_conf->q_ul_5g.aq_depth_log2, acc_conf->q_dl_5g.aq_depth_log2, - acc_conf->q_fft.aq_depth_log2); + acc_conf->q_fft.aq_depth_log2, + acc_conf->q_mld.aq_depth_log2); }static inline void
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -332,7 +342,7 @@ vrb_check_ir(struct acc_device *acc_dev) while (ring_data->valid) {if ((
ring_data->int_nb<ACC_PF_INT_DMA_DL_DESC_IRQ) || ( -ring_data->int_nb>ACC_PF_INT_DMA_DL5G_DESC_IRQ)) { +ring_data->int_nb>ACC_PF_INT_DMA_MLD_DESC_IRQ)) {rte_bbdev_log(WARNING, "InfoRing: ITR:%d Info:0x%x", ring_data->int_nb, ring_data->detailed_info); /* Initialize Info Ring entry and move forward. */drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -366,6 +376,7 @@ vrb_dev_interrupt_handler(void *cb_arg)case
ACC_PF_INT_DMA_FFT_DESC_IRQ:
caseACC_PF_INT_DMA_UL5G_DESC_IRQ:
caseACC_PF_INT_DMA_DL5G_DESC_IRQ:
+ caseACC_PF_INT_DMA_MLD_DESC_IRQ:
deq_intr_det.queue_id =get_queue_id_from_ring_info( dev->data, *ring_data);
if (deq_intr_det.queue_id ==UINT16_MAX) {drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -393,6 +404,7 @@ vrb_dev_interrupt_handler(void *cb_arg)case
ACC_VF_INT_DMA_FFT_DESC_IRQ:
caseACC_VF_INT_DMA_UL5G_DESC_IRQ:
caseACC_VF_INT_DMA_DL5G_DESC_IRQ:
+ caseACC_VF_INT_DMA_MLD_DESC_IRQ:
/* VFs are not aware of theirvf_id- it's set to 0. */ring_data->vf_id= 0;
deq_intr_det.queue_id = get_queue_id_from_ring_info(drivers/baseband/acc/rte_vrb_pmd.c +1
-1@@ -741,7 +753,7 @@ vrb_find_free_queue_idx(struct rte_bbdev *dev, const struct rte_bbdev_queue_conf *conf) { struct acc_device *d = dev->data->dev_private; - int op_2_acc[6] = {0, UL_4G, DL_4G, UL_5G, DL_5G, FFT}; + int op_2_acc[7] = {0, UL_4G, DL_4G, UL_5G, DL_5G, FFT, MLD}; int acc = op_2_acc[conf->op_type]; struct rte_acc_queue_topology *qtop = NULL; uint16_t group_idx;@@ -804,7 +816,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,int
fcw_len= (conf->op_type==RTE_BBDEV_OP_LDPC_ENC?ACC_FCW_LE_BLEN: (conf->op_type==RTE_BBDEV_OP_TURBO_DEC?ACC_FCW_TD_BLEN: (conf->op_type==RTE_BBDEV_OP_LDPC_DEC? -ACC_FCW_LD_BLEN:ACC_FCW_FFT_BLEN)));
+ACC_FCW_LD_BLEN: (conf->op_type==RTE_BBDEV_OP_FFT? +ACC_FCW_FFT_BLEN:ACC_FCW_MLDTS_BLEN))));
for (desc_idx= 0;desc_idx<d->sw_ring_max_depth; desc_idx++) { desc =q->ring_addr+desc_idx;drivers/baseband/acc/rte_vrb_pmd.c +2
-0@@ -916,6 +929,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, q->aq_depth = (1 << d->acc_conf.q_dl_5g.aq_depth_log2); else if (conf->op_type == RTE_BBDEV_OP_FFT) q->aq_depth = (1 << d->acc_conf.q_fft.aq_depth_log2); + else if (conf->op_type == RTE_BBDEV_OP_MLDTS) + q->aq_depth = (1 << d->acc_conf.q_mld.aq_depth_log2); q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base, d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id, q->aq_id));@@ -972,6 +987,13 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enumrte_bbdev_op_type op_type, op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
op_dl->ldpc_enc.op_flags,op_dl->ldpc_enc.rv_index);
+ } else if (op_type==RTE_BBDEV_OP_MLDTS) {
+ structrte_bbdev_mldts_op*op_mldts= (structrte_bbdev_mldts_op*) op;
+ rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x\n", + index,
+op_mldts->mldts.num_rbs,op_mldts->mldts.num_layers, +op_mldts->mldts.r_rep,
+op_mldts->mldts.c_rep,op_mldts->mldts.op_flags); }
}drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1151,13 +1173,16 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) d->acc_conf.q_dl_5g.num_qgroups;dev_info->num_queues[RTE_BBDEV_OP_FFT] =
d->acc_conf.q_fft.num_aqs_per_groups*d->acc_conf.q_fft.num_qgroups;
+ dev_info->num_queues[RTE_BBDEV_OP_MLDTS] =d->acc_conf.q_mld.num_aqs_per_groups*
+d->acc_conf.q_mld.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] =d->acc_conf.q_ul_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] =d->acc_conf.q_dl_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] =d->acc_conf.q_ul_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] =d->acc_conf.q_dl_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_FFT] =d->acc_conf.q_fft.num_qgroups; + dev_info->queue_priority[RTE_BBDEV_OP_MLDTS] =d->acc_conf.q_mld.num_qgroups;
Quoted 8 lines
Quoted 4 lines
dev_info->max_num_queues= 0;
- for (i =RTE_BBDEV_OP_NONE; i <=RTE_BBDEV_OP_FFT; i++) + for (i =RTE_BBDEV_OP_NONE; i <=RTE_BBDEV_OP_MLDTS; i++)dev_info->max_num_queues+= dev_info->num_queues[i];Shouldn't the info reported be different for VRB1 and VRB2? IIUC, VRB1 does not support MLDTS?
Ha yes, it is. dev_info->num_queues[RTE_BBDEV_OP_MLDTS] will be 0 in case of VRB1.
Quoted 56 lines
Quoted 56 lines
dev_info->queue_size_lim=ACC_MAX_QUEUE_DEPTH;dev_info->hardware_accelerated= true;drivers/baseband/acc/vrb_pmd.h +6
-0@@ -101,6 +101,8 @@ struct acc_registry_addr { unsigned int dma_ring_ul4g_lo; unsigned int dma_ring_fft_hi; unsigned int dma_ring_fft_lo; + unsigned int dma_ring_mld_hi; + unsigned int dma_ring_mld_lo; unsigned int ring_size; unsigned int info_ring_hi; unsigned int info_ring_lo;@@ -116,6 +118,8 @@ struct acc_registry_addr { unsigned int tail_ptrs_ul4g_lo; unsigned int tail_ptrs_fft_hi; unsigned int tail_ptrs_fft_lo; + unsigned int tail_ptrs_mld_hi; + unsigned int tail_ptrs_mld_lo; unsigned int depth_log0_offset; unsigned int depth_log1_offset; unsigned int qman_group_func;@@ -140,6 +144,8 @@ static const struct acc_registry_addr vrb1_pf_reg_addr = { .dma_ring_ul4g_lo = VRB1_PfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_PfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_PfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_PfQmgrRingSizeVf, .info_ring_hi = VRB1_PfHiInfoRingBaseHiRegPf,.info_ring_lo =
VRB1_PfHiInfoRingBaseLoRegPf,drivers/baseband/acc/vrb_pmd.h +2
-0@@ -155,6 +161,8 @@ static const struct acc_registry_addr vrb1_pf_reg_addr = { .tail_ptrs_ul4g_lo = VRB1_PfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi = VRB1_PfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo = VRB1_PfDmaFftRespPtrLoRegVf, + .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_PfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_PfQmgrGrpDepthLog21Vf,.qman_group_func =
VRB1_PfQmgrGrpFunction0,drivers/baseband/acc/vrb_pmd.h +2
-0@@ -179,6 +187,8 @@ static const struct acc_registry_addr vrb1_vf_reg_addr = { .dma_ring_ul4g_lo = VRB1_VfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_VfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_VfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_VfQmgrRingSizeVf, .info_ring_hi = VRB1_VfHiInfoRingBaseHiVf,.info_ring_lo =
VRB1_VfHiInfoRingBaseLoVf,drivers/baseband/acc/vrb_pmd.h +0
-0@@ -194,6 +204,8 @@ static const struct acc_registry_addr vrb1_vf_reg_addr = {
Quoted 8 lines
Quoted 8 lines
drivers/baseband/acc/vrb_pmd.h +2
-0.tail_ptrs_ul4g_lo = VRB1_VfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi = VRB1_VfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo = VRB1_VfDmaFftRespPtrLoRegVf, + .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_VfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_VfQmgrGrpDepthLog21Vf,.qman_group_func =
VRB1_VfQmgrGrpFunction0Vf,
Thanks,
Maxime
RE: [PATCH v2 5/7] baseband/acc: add support for MLD operation
In reply to Maxime CoquelinHi Maxime,
Quoted 226 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, September 27, 2023 1:41 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 5/7] baseband/acc: add support for MLD operationQuoted 7 lines · Nicolas Chautru
There is no functionality related to the MLD operation but allows the unified PMD to support the operation being added moving forward.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 1 + drivers/baseband/acc/rte_vrb_pmd.c | 39 ++++++++++++++++++++++++------
drivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id,
Quoted 22 lines
drivers/baseband/acc/vrb_pmd.h | 12 +++++++++ 3 files changed, 45 insertions(+), 7 deletions(-)drivers/baseband/acc/acc_common.h +1
-0@@ -87,6 +87,7 @@#define ACC_FCW_LE_BLEN 32#define ACC_FCW_LD_BLEN 36#define ACC_FCW_FFT_BLEN 28 +#define ACC_FCW_MLDTS_BLEN 32#define ACC_5GUL_SIZE_0 16#define ACC_5GUL_SIZE_1 40#define ACC_5GUL_OFFSET_0 36drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -37,7 +37,7 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id,
uint8_tqgrp_id,uint16_taq_iddrivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, · line 37
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return ((qgrp_id << 7) + (aq_id << 3) +
VRB1_VfQmgrIngressAq);drivers/baseband/acc/rte_vrb_pmd.c accFromQgid(int qg_idx, const struct rte_acc_conf
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1} -enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,NUM_ACC }; +enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC };/* Return the accelerator enum for a Queue Group Index. */ static inline int@@ -53,6 +53,7 @@ accFromQgid(int qg_idx, const struct rte_acc_conf
*acc_conf)drivers/baseband/acc/rte_vrb_pmd.c qtopFromAcc(struct rte_acc_queue_topology **qtop,
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0NumQGroupsPerFn[DL_4G ] = acc_conf->q_dl_4g.num_qgroups; NumQGroupsPerFn[DL_5G ] = acc_conf->q_dl_5g.num_qgroups; NumQGroupsPerFn[FFT ] = acc_conf->q_fft.num_qgroups; + NumQGroupsPerFn[MLD ] = acc_conf->q_mld.num_qgroups;for (acc =UL_4G ; acc <NUM_ACC ; acc++)for (qgIdx =0 ; qgIdx < NumQGroupsPerFn[acc]; qgIdx++) accQg[qgIndex++] = acc;@@ -83,6 +84,9 @@ qtopFromAcc(struct rte_acc_queue_topology **qtop,int
acc_enum, structrte_acc_cdrivers/baseband/acc/rte_vrb_pmd.c qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_c
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0case FFT : p_qtop = &(acc_conf->q_fft);break ; +case MLD : + p_qtop = &(acc_conf->q_mld); +break ;default :/* NOTREACHED. */ rte_bbdev_log(ERR, "Unexpected error evaluating %s using%d",
Quoted 1 line
__func__,acc_enum); @@ -139,6 +143,9 @@ initQTop(structrte_acc_conf
*acc_conf)Quoted 10 lines
acc_conf->q_fft.num_aqs_per_groups = 0; acc_conf->q_fft.num_qgroups = 0; acc_conf->q_fft.first_qgroup_index = -1;drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ acc_conf->q_mld.num_aqs_per_groups =0 ; + acc_conf->q_mld.num_qgroups =0 ; + acc_conf->q_mld.first_qgroup_index =-1 ; } static inline voiddrivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev) · line 253
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1@@ -250,7 +257,7 @@ fetch_acc_config(struct rte_bbdev *dev) } rte_bbdev_log_debug( - "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u%u AQ %u %u %u %u %u Len %u %u %u %u %u\n",
drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev) · line 260
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u%u %u AQ %u %u %u
drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev) · line 263
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+%u %u %u Len %u %u %u %u %u %u\n", (d->pf_device) ?"PF" :"VF" , (acc_conf->input_pos_llr_1_bit) ?"POS" :"NEG" , (acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",@@ -259,16
Quoted 22 lines
+266,19 @@
fetch_acc_config(struct rte_bbdev *dev)
acc_conf->q_ul_5g.num_qgroups,acc_conf->q_dl_5g.num_qgroups,acc_conf->q_fft.num_qgroups,drivers/baseband/acc/rte_vrb_pmd.c +4
-1+ acc_conf->q_mld.num_qgroups, acc_conf->q_ul_4g.num_aqs_per_groups, acc_conf->q_dl_4g.num_aqs_per_groups, acc_conf->q_ul_5g.num_aqs_per_groups, acc_conf->q_dl_5g.num_aqs_per_groups, acc_conf->q_fft.num_aqs_per_groups, + acc_conf->q_mld.num_aqs_per_groups, acc_conf->q_ul_4g.aq_depth_log2, acc_conf->q_dl_4g.aq_depth_log2, acc_conf->q_ul_5g.aq_depth_log2, acc_conf->q_dl_5g.aq_depth_log2, - acc_conf->q_fft.aq_depth_log2); + acc_conf->q_fft.aq_depth_log2, + acc_conf->q_mld.aq_depth_log2); } static inline voiddrivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 335
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1@@ -332,7 +342,7 @@ vrb_check_ir(struct acc_device *acc_dev)while (ring_data->valid) { if ((ring_data->int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( - ring_data->int_nb >
ACC_PF_INT_DMA_DL5G_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 345
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 346
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ring_data->int_nb, ring_data- detailed_info);/* Initialize Info Ring entry and move forward. */ @@
-366,6
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
+376,7 @@
vrb_dev_interrupt_handler(void *cb_arg)
caseACC_PF_INT_DMA_FFT_DESC_IRQ:
caseACC_PF_INT_DMA_UL5G_DESC_IRQ:
caseACC_PF_INT_DMA_DL5G_DESC_IRQ:drivers/baseband/acc/rte_vrb_pmd.c +1
-0+case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info(
Quoted 2 lines
dev->data, *ring_data); if (deq_intr_det.queue_id == UINT16_MAX) {(quoted diff) +0
-0@@ -393,6 +404,7 @@ > vrb_dev_interrupt_handler(void *cb_arg)drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
case
ACC_VF_INT_DMA_FFT_DESC_IRQ:
caseACC_VF_INT_DMA_UL5G_DESC_IRQ:
caseACC_VF_INT_DMA_DL5G_DESC_IRQ:drivers/baseband/acc/rte_vrb_pmd.c +1
-0+case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */ > ring_data->vf_id = 0; > deq_intr_det.queue_id =get_queue_id_from_ring_info( @@ -741,7
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 10 lines
+753,7 @@ vrb_find_free_queue_idx(struct
rte_bbdev*dev,
const structrte_bbdev_queue_conf*conf)
{
structacc_device*d =dev->data->dev_private;drivers/baseband/acc/rte_vrb_pmd.c +1
-1-int op_2_acc[6 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT }; +int op_2_acc[7 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT ,MLD };int acc = op_2_acc[conf->op_type];struct rte_acc_queue_topology *qtop =NULL ;uint16_t group_idx;@@ -804,7 +816,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 817
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0int fcw_len = (conf->op_type == RTE_BBDEV_OP_LDPC_ENC ? ACC_FCW_LE_BLEN : (conf->op_type ==
RTE_BBDEV_OP_TURBO_DEC?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 818
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ACC_FCW_TD_BLEN : (conf->op_type ==
RTE_BBDEV_OP_LDPC_DEC?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 819
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- ACC_FCW_LD_BLEN : ACC_FCW_FFT_BLEN))); + ACC_FCW_LD_BLEN : (conf->op_type ==
RTE_BBDEV_OP_FFT?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ACC_FCW_FFT_BLEN : ACC_FCW_MLDTS_BLEN))));for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx;@@ -916,6 +929,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0q->aq_depth = (1 << d->acc_conf.q_dl_5g.aq_depth_log2); else if (conf->op_type == RTE_BBDEV_OP_FFT) q->aq_depth = (1 << d->acc_conf.q_fft.aq_depth_log2); + else if (conf->op_type == RTE_BBDEV_OP_MLDTS) + q->aq_depth = (1 << d->acc_conf.q_mld.aq_depth_log2); q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base, d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id,
q->aq_id));drivers/baseband/acc/rte_vrb_pmd.c vrb_print_op(struct rte_bbdev_dec_op *op, enum
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -972,6 +987,13 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enum
rte_bbdev_op_typeop_type,drivers/baseband/acc/rte_vrb_pmd.c vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0op_dl->ldpc_enc.n_filler, op_dl- ldpc_enc.cb_params.e, op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index ); + }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { + struct rte_bbdev_mldts_op *op_mldts = (struct
rte_bbdev_mldts_op*) op;drivers/baseband/acc/rte_vrb_pmd.c vrb_print_op(struct rte_bbdev_dec_op *op, enum · line 993
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d%x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ index, + op_mldts->mldts.num_rbs, op_mldts- mldts.num_layers, + op_mldts->mldts.r_rep, + op_mldts->mldts.c_rep, op_mldts- mldts.op_flags);} }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1151,13 +1173,16 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
rte_bbdev_driver_info*dev_info)Quoted 19 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0d->acc_conf.q_dl_5g.num_qgroups; dev_info->num_queues[RTE_BBDEV_OP_FFT] = d-acc_conf.q_fft.num_aqs_per_groups *
d->acc_conf.q_fft.num_qgroups;drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ dev_info->num_queues[RTE_BBDEV_OP_MLDTS] = d-acc_conf.q_mld.num_aqs_per_groups *
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ d->acc_conf.q_mld.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d-acc_conf.q_ul_4g.num_qgroups;
dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d-
acc_conf.q_dl_4g.num_qgroups;
dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d-
acc_conf.q_ul_5g.num_qgroups;
dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d-
acc_conf.q_dl_5g.num_qgroups;
dev_info->queue_priority[RTE_BBDEV_OP_FFT] =d->acc_conf.q_fft.num_qgroups;drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ dev_info->queue_priority[RTE_BBDEV_OP_MLDTS ] = +d->acc_conf.q_mld.num_qgroups;
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1186
Quoted 4 lines
dev_info->max_num_queues = 0;drivers/baseband/acc/rte_vrb_pmd.c +1
-1-for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_FFT ; i++) +for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_MLDTS ; i++) dev_info->max_num_queues += dev_info->num_queues[i];Shouldn't the info reported be different for VRB1 and VRB2? IIUC, VRB1 does not support MLDTS?
It doesn’t have to be handled differently, this is purely based on what is configured on the device, in case there are no queue for a given configuration it will be adding zero.
Quoted 64 lines
drivers/baseband/acc/vrb_pmd.h static const struct acc_registry_addr
Quoted 26 lines
dev_info->queue_size_lim=ACC_MAX_QUEUE_DEPTH;dev_info->hardware_accelerated= true; diff --gita/drivers/baseband/acc/vrb_pmd.hb/drivers/baseband/acc/vrb_pmd.hindex01028273e7..1cabc0b7f4100644drivers/baseband/acc/vrb_pmd.h +4
-0@@ -101,6 +101,8 @@ struct acc_registry_addr {unsigned int dma_ring_ul4g_lo;unsigned int dma_ring_fft_hi;unsigned int dma_ring_fft_lo; +unsigned int dma_ring_mld_hi; +unsigned int dma_ring_mld_lo;unsigned int ring_size;unsigned int info_ring_hi;unsigned int info_ring_lo;@@ -116,6 +118,8 @@ struct acc_registry_addr {unsigned int tail_ptrs_ul4g_lo;unsigned int tail_ptrs_fft_hi;unsigned int tail_ptrs_fft_lo; +unsigned int tail_ptrs_mld_hi; +unsigned int tail_ptrs_mld_lo;unsigned int depth_log0_offset;unsigned int depth_log1_offset;unsigned int qman_group_func;@@ -140,6 +144,8 @@ static const struct acc_registry_addr
vrb1_pf_reg_addr= {drivers/baseband/acc/vrb_pmd.h static const struct acc_registry_addr vrb1_pf_reg_addr = {
Quoted 8 lines
drivers/baseband/acc/vrb_pmd.h +2
-0.dma_ring_ul4g_lo = VRB1_PfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi = VRB1_PfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo = VRB1_PfDmaFftDescBaseLoRegVf, + .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_PfQmgrRingSizeVf, .info_ring_hi = VRB1_PfHiInfoRingBaseHiRegPf, .info_ring_lo = VRB1_PfHiInfoRingBaseLoRegPf, @@ -155,6 +161,8@@
drivers/baseband/acc/vrb_pmd.h static const struct acc_registry_addr vrb1_pf_reg_addr = {
Quoted 9 lines
static const struct
acc_registry_addrvrb1_pf_reg_addr= {
.tail_ptrs_ul4g_lo =VRB1_PfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi =VRB1_PfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo =VRB1_PfDmaFftRespPtrLoRegVf,drivers/baseband/acc/vrb_pmd.h +2
-0+ .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_PfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_PfQmgrGrpDepthLog21Vf, .qman_group_func = VRB1_PfQmgrGrpFunction0, @@ -179,6 +187,8@@
Quoted 18 lines
static const struct
acc_registry_addrvrb1_vf_reg_addr= {
.dma_ring_ul4g_lo =VRB1_VfDmaFec4GulDescBaseLoRegVf, .dma_ring_fft_hi =VRB1_VfDmaFftDescBaseHiRegVf, .dma_ring_fft_lo =VRB1_VfDmaFftDescBaseLoRegVf,drivers/baseband/acc/vrb_pmd.h +2
-0+ .dma_ring_mld_hi = 0, + .dma_ring_mld_lo = 0, .ring_size = VRB1_VfQmgrRingSizeVf, .info_ring_hi = VRB1_VfHiInfoRingBaseHiVf, .info_ring_lo = VRB1_VfHiInfoRingBaseLoVf, @@ -194,6 +204,8 @@static const struct
acc_registry_addrvrb1_vf_reg_addr= {
.tail_ptrs_ul4g_lo =VRB1_VfDmaFec4GulRespPtrLoRegVf, .tail_ptrs_fft_hi =VRB1_VfDmaFftRespPtrHiRegVf, .tail_ptrs_fft_lo =VRB1_VfDmaFftRespPtrLoRegVf,drivers/baseband/acc/vrb_pmd.h +2
-0+ .tail_ptrs_mld_hi = 0, + .tail_ptrs_mld_lo = 0, .depth_log0_offset = VRB1_VfQmgrGrpDepthLog20Vf, .depth_log1_offset = VRB1_VfQmgrGrpDepthLog21Vf, .qman_group_func = VRB1_VfQmgrGrpFunction0Vf,
Re: [PATCH v2 5/7] baseband/acc: add support for MLD operation
Quoted 237 lines · Nicolas
Hi Maxime,
Quoted 226 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, September 27, 2023 1:41 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 5/7] baseband/acc: add support for MLD operationQuoted 7 lines · Nicolas Chautru
There is no functionality related to the MLD operation but allows the unified PMD to support the operation being added moving forward.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 1 + drivers/baseband/acc/rte_vrb_pmd.c | 39 ++++++++++++++++++++++++------
drivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id,
Quoted 22 lines
drivers/baseband/acc/vrb_pmd.h | 12 +++++++++ 3 files changed, 45 insertions(+), 7 deletions(-)drivers/baseband/acc/acc_common.h +1
-0@@ -87,6 +87,7 @@#define ACC_FCW_LE_BLEN 32#define ACC_FCW_LD_BLEN 36#define ACC_FCW_FFT_BLEN 28 +#define ACC_FCW_MLDTS_BLEN 32#define ACC_5GUL_SIZE_0 16#define ACC_5GUL_SIZE_1 40#define ACC_5GUL_OFFSET_0 36drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -37,7 +37,7 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id,
uint8_tqgrp_id,uint16_taq_iddrivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, · line 37
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return ((qgrp_id << 7) + (aq_id << 3) +
VRB1_VfQmgrIngressAq);drivers/baseband/acc/rte_vrb_pmd.c accFromQgid(int qg_idx, const struct rte_acc_conf
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1} -enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,NUM_ACC }; +enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC };/* Return the accelerator enum for a Queue Group Index. */ static inline int@@ -53,6 +53,7 @@ accFromQgid(int qg_idx, const struct rte_acc_conf
*acc_conf)drivers/baseband/acc/rte_vrb_pmd.c qtopFromAcc(struct rte_acc_queue_topology **qtop,
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0NumQGroupsPerFn[DL_4G ] = acc_conf->q_dl_4g.num_qgroups; NumQGroupsPerFn[DL_5G ] = acc_conf->q_dl_5g.num_qgroups; NumQGroupsPerFn[FFT ] = acc_conf->q_fft.num_qgroups; + NumQGroupsPerFn[MLD ] = acc_conf->q_mld.num_qgroups;for (acc =UL_4G ; acc <NUM_ACC ; acc++)for (qgIdx =0 ; qgIdx < NumQGroupsPerFn[acc]; qgIdx++) accQg[qgIndex++] = acc;@@ -83,6 +84,9 @@ qtopFromAcc(struct rte_acc_queue_topology **qtop,int
acc_enum, structrte_acc_cdrivers/baseband/acc/rte_vrb_pmd.c qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_c
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0case FFT : p_qtop = &(acc_conf->q_fft);break ; +case MLD : + p_qtop = &(acc_conf->q_mld); +break ;default :/* NOTREACHED. */ rte_bbdev_log(ERR, "Unexpected error evaluating %s using%d",
Quoted 1 line
__func__,acc_enum); @@ -139,6 +143,9 @@ initQTop(structrte_acc_conf
*acc_conf)Quoted 10 lines
acc_conf->q_fft.num_aqs_per_groups = 0; acc_conf->q_fft.num_qgroups = 0; acc_conf->q_fft.first_qgroup_index = -1;drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ acc_conf->q_mld.num_aqs_per_groups =0 ; + acc_conf->q_mld.num_qgroups =0 ; + acc_conf->q_mld.first_qgroup_index =-1 ; } static inline voiddrivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev) · line 253
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1@@ -250,7 +257,7 @@ fetch_acc_config(struct rte_bbdev *dev) } rte_bbdev_log_debug( - "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u%u AQ %u %u %u %u %u Len %u %u %u %u %u\n",
drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev) · line 260
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u%u %u AQ %u %u %u
drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev) · line 263
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+%u %u %u Len %u %u %u %u %u %u\n", (d->pf_device) ?"PF" :"VF" , (acc_conf->input_pos_llr_1_bit) ?"POS" :"NEG" , (acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",@@ -259,16
Quoted 22 lines
+266,19 @@
fetch_acc_config(struct rte_bbdev *dev)
acc_conf->q_ul_5g.num_qgroups,acc_conf->q_dl_5g.num_qgroups,acc_conf->q_fft.num_qgroups,drivers/baseband/acc/rte_vrb_pmd.c +4
-1+ acc_conf->q_mld.num_qgroups, acc_conf->q_ul_4g.num_aqs_per_groups, acc_conf->q_dl_4g.num_aqs_per_groups, acc_conf->q_ul_5g.num_aqs_per_groups, acc_conf->q_dl_5g.num_aqs_per_groups, acc_conf->q_fft.num_aqs_per_groups, + acc_conf->q_mld.num_aqs_per_groups, acc_conf->q_ul_4g.aq_depth_log2, acc_conf->q_dl_4g.aq_depth_log2, acc_conf->q_ul_5g.aq_depth_log2, acc_conf->q_dl_5g.aq_depth_log2, - acc_conf->q_fft.aq_depth_log2); + acc_conf->q_fft.aq_depth_log2, + acc_conf->q_mld.aq_depth_log2); } static inline voiddrivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 335
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1@@ -332,7 +342,7 @@ vrb_check_ir(struct acc_device *acc_dev)while (ring_data->valid) { if ((ring_data->int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( - ring_data->int_nb >
ACC_PF_INT_DMA_DL5G_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 345
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 346
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ring_data->int_nb, ring_data- detailed_info);/* Initialize Info Ring entry and move forward. */ @@-366,6
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
+376,7 @@
vrb_dev_interrupt_handler(void *cb_arg)
caseACC_PF_INT_DMA_FFT_DESC_IRQ:
caseACC_PF_INT_DMA_UL5G_DESC_IRQ:
caseACC_PF_INT_DMA_DL5G_DESC_IRQ:drivers/baseband/acc/rte_vrb_pmd.c +1
-0+case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info(
Quoted 2 lines
dev->data, *ring_data); if (deq_intr_det.queue_id == UINT16_MAX) {(quoted diff) +0
-0@@ -393,6 +404,7 @@ > vrb_dev_interrupt_handler(void *cb_arg)drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
case
ACC_VF_INT_DMA_FFT_DESC_IRQ:
caseACC_VF_INT_DMA_UL5G_DESC_IRQ:
caseACC_VF_INT_DMA_DL5G_DESC_IRQ:drivers/baseband/acc/rte_vrb_pmd.c +1
-0+case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */
Quoted 2 lines
ring_data->vf_id = 0; deq_intr_det.queue_id =get_queue_id_from_ring_info( @@ -741,7
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 10 lines
+753,7 @@ vrb_find_free_queue_idx(struct
rte_bbdev*dev,
const structrte_bbdev_queue_conf*conf){ struct acc_device *d = dev->data->dev_private;drivers/baseband/acc/rte_vrb_pmd.c +1
-1-int op_2_acc[6 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT }; +int op_2_acc[7 ] = {0 ,UL_4G ,DL_4G ,UL_5G ,DL_5G ,FFT ,MLD };int acc = op_2_acc[conf->op_type];struct rte_acc_queue_topology *qtop =NULL ;uint16_t group_idx;@@ -804,7 +816,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 817
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0int fcw_len = (conf->op_type == RTE_BBDEV_OP_LDPC_ENC ? ACC_FCW_LE_BLEN : (conf->op_type ==
RTE_BBDEV_OP_TURBO_DEC?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 818
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ACC_FCW_TD_BLEN : (conf->op_type ==
RTE_BBDEV_OP_LDPC_DEC?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 819
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- ACC_FCW_LD_BLEN : ACC_FCW_FFT_BLEN))); + ACC_FCW_LD_BLEN : (conf->op_type ==
RTE_BBDEV_OP_FFT?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ACC_FCW_FFT_BLEN : ACC_FCW_MLDTS_BLEN))));for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx;@@ -916,6 +929,8 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0q->aq_depth = (1 << d->acc_conf.q_dl_5g.aq_depth_log2); else if (conf->op_type == RTE_BBDEV_OP_FFT) q->aq_depth = (1 << d->acc_conf.q_fft.aq_depth_log2); + else if (conf->op_type == RTE_BBDEV_OP_MLDTS) + q->aq_depth = (1 << d->acc_conf.q_mld.aq_depth_log2); q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base, d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id,
q->aq_id));drivers/baseband/acc/rte_vrb_pmd.c vrb_print_op(struct rte_bbdev_dec_op *op, enum
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -972,6 +987,13 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enum
rte_bbdev_op_typeop_type,drivers/baseband/acc/rte_vrb_pmd.c vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0op_dl->ldpc_enc.n_filler, op_dl- ldpc_enc.cb_params.e, op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index ); + }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { + struct rte_bbdev_mldts_op *op_mldts = (struct
rte_bbdev_mldts_op*) op;drivers/baseband/acc/rte_vrb_pmd.c vrb_print_op(struct rte_bbdev_dec_op *op, enum · line 993
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d%x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ index, + op_mldts->mldts.num_rbs, op_mldts- mldts.num_layers, + op_mldts->mldts.r_rep, + op_mldts->mldts.c_rep, op_mldts- mldts.op_flags);} }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1151,13 +1173,16 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
rte_bbdev_driver_info*dev_info)Quoted 19 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0d->acc_conf.q_dl_5g.num_qgroups; dev_info->num_queues[RTE_BBDEV_OP_FFT] = d-acc_conf.q_fft.num_aqs_per_groups *
d->acc_conf.q_fft.num_qgroups;drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ dev_info->num_queues[RTE_BBDEV_OP_MLDTS] = d-acc_conf.q_mld.num_aqs_per_groups *
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ d->acc_conf.q_mld.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d-acc_conf.q_ul_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d- acc_conf.q_dl_4g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d- acc_conf.q_ul_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d- acc_conf.q_dl_5g.num_qgroups; dev_info->queue_priority[RTE_BBDEV_OP_FFT] =
d->acc_conf.q_fft.num_qgroups;drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ dev_info->queue_priority[RTE_BBDEV_OP_MLDTS ] = +d->acc_conf.q_mld.num_qgroups;Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1186
Quoted 4 lines
dev_info->max_num_queues = 0;drivers/baseband/acc/rte_vrb_pmd.c +1
-1-for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_FFT ; i++) +for (i =RTE_BBDEV_OP_NONE ; i <=RTE_BBDEV_OP_MLDTS ; i++) dev_info->max_num_queues += dev_info->num_queues[i];Shouldn't the info reported be different for VRB1 and VRB2? IIUC, VRB1 does not support MLDTS?
Quoted 1 line
It doesn’t have to be handled differently, this is purely based on what is configured on the device, in case there are no queue for a given configuration it will be adding zero.
Right, as I replied afterwards I misread the code initially. -ENOTENOUGHCOFFEE
Maxime
PATCH v2 6/7 baseband/acc: introduce the new VRB2 variant
In reply to Nicolas ChautruThis extends the unified driver to support both the VRB1 and VRB2 implementations of Intel vRAN Boost.
--- doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/vrb2.rst | 269 +++++ doc/guides/rel_notes/release_23_11.rst | 3 + drivers/baseband/acc/acc_common.h | 84 +- drivers/baseband/acc/rte_acc100_pmd.c | 4 +- drivers/baseband/acc/rte_vrb_pmd.c | 1442 +++++++++++++++++++++--- drivers/baseband/acc/vrb1_pf_enum.h | 17 +- drivers/baseband/acc/vrb2_pf_enum.h | 124 ++ drivers/baseband/acc/vrb2_vf_enum.h | 121 ++ drivers/baseband/acc/vrb_pmd.h | 161 ++- 10 files changed, 2062 insertions(+), 164 deletions(-) create mode 100644 doc/guides/bbdevs/vrb2.rst create mode 100644 drivers/baseband/acc/vrb2_pf_enum.h create mode 100644 drivers/baseband/acc/vrb2_vf_enum.h
doc/guides/bbdevs/index.rst +1 -0
@@ -15,4 +15,5 @@ Baseband Device Drivers fpga_5gnr_fec acc100 vrb1 + vrb2 la12xx
doc/guides/bbdevs/vrb2.rst new file +269 -0
269 lines not on this page · raw message
doc/guides/rel_notes/release_23_11.rst +3 -0
@@ -78,6 +78,9 @@ New Features * build: Optional libraries can now be selected with the new ``enable_libs`` build option similarly to the existing ``enable_drivers`` build option. +* **Updated Intel vRAN Boost bbdev PMD.** + + Added support for the new Intel vRAN Boost v2 device variant (GNR-D) within the unified driver. Removed Items -------------
drivers/baseband/acc/acc_common.h +70 -14
128 lines not on this page · raw message
drivers/baseband/acc/rte_acc100_pmd.c +2 -2
@@ -294,7 +294,7 @@ acc100_pf_interrupt_handler(struct rte_bbdev *dev)case ACC100_PF_INT_DMA_UL5G_DESC_IRQ :case ACC100_PF_INT_DMA_DL5G_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info ( - dev->data, *ring_data); + dev->data, *ring_data, acc100_dev->device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u",
@@ -348,7 +348,7 @@ acc100_vf_interrupt_handler(struct rte_bbdev *dev)*/ ring_data->vf_id =0 ; deq_intr_det.queue_id =get_queue_id_from_ring_info ( - dev->data, *ring_data); + dev->data, *ring_data, acc100_dev->device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue: aq_id: %u, qg_id: %u",
drivers/baseband/acc/rte_vrb_pmd.c +1303 -139
1,798 lines not on this page · raw message
drivers/baseband/acc/vrb1_pf_enum.h +12 -5
@@ -98,11 +98,18 @@ enum {ACC_PF_INT_DMA_UL5G_DESC_IRQ =8 ,ACC_PF_INT_DMA_DL5G_DESC_IRQ =9 ,ACC_PF_INT_DMA_MLD_DESC_IRQ =10 , -ACC_PF_INT_ARAM_ECC_1BIT_ERR =11 , -ACC_PF_INT_PARITY_ERR =12 , -ACC_PF_INT_QMGR_ERR =13 , -ACC_PF_INT_INT_REQ_OVERFLOW =14 , - ACC_PF_INT_APB_TIMEOUT = 15, +ACC_PF_INT_ARAM_ACCESS_ERR =11 , +ACC_PF_INT_ARAM_ECC_1BIT_ERR =12 , +ACC_PF_INT_PARITY_ERR =13 , +ACC_PF_INT_QMGR_OVERFLOW =14 , +ACC_PF_INT_QMGR_ERR =15 , +ACC_PF_INT_ATS_ERR =22 , +ACC_PF_INT_ARAM_FUUL =23 , +ACC_PF_INT_EXTRA_READ =24 , +ACC_PF_INT_COMPLETION_TIMEOUT =25 , +ACC_PF_INT_CORE_HANG =26 , +ACC_PF_INT_DMA_HANG =28 , + ACC_PF_INT_DS_HANG = 27, };#endif /* VRB1_PF_ENUM_H */
drivers/baseband/acc/vrb2_pf_enum.h new file +124 -0
124 lines not on this page · raw message
drivers/baseband/acc/vrb2_vf_enum.h new file +121 -0
121 lines not on this page · raw message
drivers/baseband/acc/vrb_pmd.h +157 -4
192 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variant
Quoted 16 lines · Nicolas Chautru
This extends the unified driver to support both the VRB1 and VRB2 implementations of Intel vRAN Boost.
Signed-off-by Nicolas Chautru <[email protected]>--- doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/vrb2.rst | 269 +++++ doc/guides/rel_notes/release_23_11.rst | 3 + drivers/baseband/acc/acc_common.h | 84 +- drivers/baseband/acc/rte_acc100_pmd.c | 4 +- drivers/baseband/acc/rte_vrb_pmd.c | 1442 +++++++++++++++++++++--- drivers/baseband/acc/vrb1_pf_enum.h | 17 +- drivers/baseband/acc/vrb2_pf_enum.h | 124 ++ drivers/baseband/acc/vrb2_vf_enum.h | 121 ++ drivers/baseband/acc/vrb_pmd.h | 161 ++- 10 files changed, 2062 insertions(+), 164 deletions(-)
Quoted 3 lines
create mode 100644
doc/guides/bbdevs/vrb2.rstcreate mode 100644drivers/baseband/acc/vrb2_pf_enum.hcreate mode 100644drivers/baseband/acc/vrb2_vf_enum.h
As a general comment, the review process would be easier if the patch was split by features introduced:
- Base init, no capabilities exposed
- Add LDPC capabilities and related code
- ADD FFT capabilities and related code
- MLD-TS ...
We had this very discussion last week at the techboard for a Net PMD, and it was a shared opinion across the board.
Quoted 135 lines
doc/guides/bbdevs/index.rst +1
-0@@ -15,4 +15,5 @@ Baseband Device Drivers fpga_5gnr_fec acc100 vrb1 + vrb2 la12xxdoc/guides/bbdevs/vrb2.rst new file +118
-0@@ -0,0 +1,269 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2023 Intel Corporation + +.. include:: <isonum.txt> + +Intel\ |reg| vRAN Boost v2 Poll Mode Driver (PMD) +================================================= + +The Intel\ |reg| vRAN Boost integrated accelerator enables +cost-effective 4G and 5G next-generation virtualized Radio Access Network (vRAN) +solutions. +The Intel vRAN Boost v2.0 (VRB2 in the code) is specifically integrated on the +Intel\ |reg| Xeon\ |reg| Granite Rapids-D Process (GNR-D). + +Features +-------- + +Intel vRAN Boost v2.0 includes a 5G Low Density Parity Check (LDPC) encoder/decoder, +rate match/dematch, Hybrid Automatic Repeat Request (HARQ) with access to DDR +memory for buffer management, a 4G Turbo encoder/decoder, +a Fast Fourier Transform (FFT) block providing DFT/iDFT processing offload +for the 5G Sounding Reference Signal (SRS), a MLD-TS accelerator, a Queue Manager (QMGR), +and a DMA subsystem. +There is no dedicated on-card memory for HARQ, the coherent memory on the CPU side is being used. + +These hardware blocks provide the following features exposed by the PMD: + +- LDPC Encode in the Downlink (5GNR) +- LDPC Decode in the Uplink (5GNR) +- Turbo Encode in the Downlink (4G) +- Turbo Decode in the Uplink (4G) +- FFT processing +- MLD-TS processing +- Single Root I/O Virtualization (SR-IOV) with 16 Virtual Functions (VFs) per Physical Function (PF) +- Maximum of 2048 queues per VF +- Message Signaled Interrupts (MSIs) + +The Intel vRAN Boost v2.0 PMD supports the following bbdev capabilities: + +* For the LDPC encode operation: + - ``RTE_BBDEV_LDPC_CRC_24B_ATTACH``: set to attach CRC24B to CB(s). + - ``RTE_BBDEV_LDPC_RATE_MATCH``: if set then do not do Rate Match bypass. + - ``RTE_BBDEV_LDPC_INTERLEAVER_BYPASS``: if set then bypass interleaver. + - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``: supports scatter-gather for input/output data. + - ``RTE_BBDEV_LDPC_ENC_CONCATENATION``: concatenate code blocks with bit granularity. + +* For the LDPC decode operation: + - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK``: check CRC24B from CB(s). + - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP``: drops CRC24B bits appended while decoding. + - ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK``: check CRC24A from CB(s). + - ``RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK``: check CRC16 from CB(s). + - ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE``: provides an input for HARQ combining. + - ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE``: provides an input for HARQ combining. + - ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE``: disable early termination. + - ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``: supports scatter-gather for input/output data. + - ``RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION``: supports compression of the HARQ input/output. + - ``RTE_BBDEV_LDPC_LLR_COMPRESSION``: supports LLR input compression. + - ``RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION``: supports compression of the HARQ input/output. + - ``RTE_BBDEV_LDPC_SOFT_OUT_ENABLE``: set the APP LLR soft output. + - ``RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS``: set the APP LLR soft output after rate-matching. + - ``RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS``: disables the de-interleaver. + +* For the turbo encode operation: + - ``RTE_BBDEV_TURBO_CRC_24B_ATTACH``: set to attach CRC24B to CB(s). + - ``RTE_BBDEV_TURBO_RATE_MATCH``: if set then do not do Rate Match bypass. + - ``RTE_BBDEV_TURBO_ENC_INTERRUPTS``: set for encoder dequeue interrupts. + - ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS``: set to bypass RV index. + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``: supports scatter-gather for input/output data. + +* For the turbo decode operation: + - ``RTE_BBDEV_TURBO_CRC_TYPE_24B``: check CRC24B from CB(s). + - ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE``: perform subblock de-interleave. + - ``RTE_BBDEV_TURBO_DEC_INTERRUPTS``: set for decoder dequeue interrupts. + - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN``: set if negative LLR input is supported. + - ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP``: keep CRC24B bits appended while decoding. + - ``RTE_BBDEV_TURBO_DEC_CRC_24B_DROP``: option to drop the code block CRC after decoding. + - ``RTE_BBDEV_TURBO_EARLY_TERMINATION``: set early termination feature. + - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``: supports scatter-gather for input/output data. + - ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN``: set half iteration granularity. + - ``RTE_BBDEV_TURBO_SOFT_OUTPUT``: set the APP LLR soft output. + - ``RTE_BBDEV_TURBO_EQUALIZER``: set the turbo equalizer feature. + - ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE``: set the soft output saturation. + - ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH``: set to run an extra odd iteration after CRC match. + - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT``: set if negative APP LLR output supported. + - ``RTE_BBDEV_TURBO_MAP_DEC``: supports flexible parallel MAP engine decoding. + +* For the FFT operation: + - ``RTE_BBDEV_FFT_WINDOWING``: flexible windowing capability. + - ``RTE_BBDEV_FFT_CS_ADJUSTMENT``: flexible adjustment of Cyclic Shift time offset. + - ``RTE_BBDEV_FFT_DFT_BYPASS``: set for bypass the DFT and get directly into iDFT input. + - ``RTE_BBDEV_FFT_IDFT_BYPASS``: set for bypass the IDFT and get directly the DFT output. + - ``RTE_BBDEV_FFT_WINDOWING_BYPASS``: set for bypass time domain windowing. + +* For the MLD-TS operation: + - ``RTE_BBDEV_MLDTS_REP``: set to repeat and reuse channel across operations. + +Installation +------------ + +Section 3 of the DPDK manual provides instructions on installing and compiling DPDK. + +DPDK requires hugepages to be configured as detailed in section 2 of the DPDK manual. +The bbdev test application has been tested with a configuration 40 x 1GB hugepages. +The hugepage configuration of a server may be examined using: + +.. code-block:: console + + grep Huge* /proc/meminfo + + +Initialization +-------------- + +When the device first powers up, its PCI Physical Functions (PF) +can be listed through these commands for Intel vRAN Boost v2: + +.. code-block:: console +
doc/guides/bbdevs/vrb2.rst line 128
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ sudo lspci -vd8086:57c2 + +The physical and virtual functions are compatible with Linux UIO drivers: +``vfio`` and ``igb_uio``. +However, in order to work the 5G/4G FEC device first needs to be bound +to one of these Linux drivers through DPDK. + + +Bind PF UIO driver(s) +~~~~~~~~~~~~~~~~~~~~~
Please document with VFIO instead of IGB_UIO, which is being deprecated.
Quoted 250 lines
doc/guides/bbdevs/vrb2.rst new file +140
-0+Install the DPDK igb_uio driver, bind it with the PF PCI device ID and use +``lspci`` to confirm the PF device is under use by ``igb_uio`` DPDK UIO driver. + +The igb_uio driver may be bound to the PF PCI device using one of two methods +for Intel vRAN Boost v2: + +#. PCI functions (physical or virtual, depending on the use case) can be bound +to the UIO driver by repeating this command for every function. + +.. code-block:: console + + cd <dpdk-top-level-directory> + insmod build/kmod/igb_uio.ko + echo "8086 57c2" > /sys/bus/pci/drivers/igb_uio/new_id + lspci -vd8086:57c2 + +#. Another way to bind PF with DPDK UIO driver is by using the ``dpdk-devbind.py`` tool + +.. code-block:: console + + cd <dpdk-top-level-directory> + usertools/dpdk-devbind.py -b igb_uio 0000:f7:00.0 + +where the PCI device ID (example: 0000:f7:00.0) is obtained using ``lspci -vd8086:57c2``. + +In a similar way the PF may be bound with vfio-pci as any PCIe device. + + +Enable Virtual Functions +~~~~~~~~~~~~~~~~~~~~~~~~ + +Now, it should be visible in the printouts that PCI PF is under igb_uio control +"``Kernel driver in use: igb_uio``" + +To show the number of available VFs on the device, read ``sriov_totalvfs`` file. + +.. code-block:: console + + cat /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_totalvfs + +where ``0000\:<b>\:<d>.<f>`` is the PCI device ID + +To enable VFs via igb_uio, echo the number of virtual functions intended +to enable to ``max_vfs`` file. + +.. code-block:: console + + echo <num-of-vfs> > /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/max_vfs + +Afterwards, all VFs must be bound to appropriate UIO drivers as required, +same way it was done with the physical function previously. + +Enabling SR-IOV via VFIO driver is pretty much the same, +except that the file name is different: + +.. code-block:: console + + echo <num-of-vfs> > /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_numvfs + + +Configure the VFs through PF +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The PCI virtual functions must be configured before working or getting assigned +to VMs/Containers. +The configuration involves allocating the number of hardware queues, priorities, +load balance, bandwidth and other settings necessary for the device +to perform FEC functions. + +This configuration needs to be executed at least once after reboot or PCI FLR +and can be achieved by using the functions ``rte_acc_configure()``, +which sets up the parameters defined in the compatible ``rte_acc_conf`` structure. + + +Test Application +---------------- + +The bbdev class is provided with a test application, ``test-bbdev.py`` +and range of test data for testing the functionality of the device, +depending on the device's capabilities. +The test application is located under app/test-bbdev folder +and has the following options: + +.. code-block:: console + + "-p", "--testapp-path": specifies path to the bbdev test app. + "-e", "--eal-params": EAL arguments which are passed to the test app. + "-t", "--timeout": Timeout in seconds (default=300). + "-c", "--test-cases": Defines test cases to run. Run all if not specified. + "-v", "--test-vector": Test vector path. + "-n", "--num-ops": Number of operations to process on device (default=32). + "-b", "--burst-size": Operations enqueue/dequeue burst size (default=32). + "-s", "--snr": SNR in dB used when generating LLRs for bler tests. + "-s", "--iter_max": Number of iterations for LDPC decoder. + "-l", "--num-lcores": Number of lcores to run (default=16). + "-i", "--init-device": Initialise PF device with default values. + + +To execute the test application tool using simple decode or encode data, +type one of the following: + +.. code-block:: console + + ./test-bbdev.py -c validation -n 64 -b 1 -v ./ldpc_dec_default.data + ./test-bbdev.py -c validation -n 64 -b 1 -v ./ldpc_enc_default.data + + +The test application ``test-bbdev.py``, supports the ability to configure the +PF device with a default set of values, if the "-i" or "- -init-device" option +is included. The default values are defined in test_bbdev_perf.c. + + +Test Vectors +~~~~~~~~~~~~ + +In addition to the simple LDPC decoder and LDPC encoder tests, +bbdev also provides a range of additional tests under the test_vectors folder, +which may be useful. +The results of these tests will depend on the device capabilities which may +cause some test cases to be skipped, but no failure should be reported. + + +Alternate Baseband Device configuration tool +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +On top of the embedded configuration feature supported in test-bbdev using +"- -init-device" option mentioned above, there is also a tool available +to perform that device configuration using a companion application. +The ``pf_bb_config`` application notably enables then to run bbdev-test +from the VF and not only limited to the PF as captured above. + +See for more details: https://github.com/intel/pf-bb-config + +Specifically for the bbdev Intel vRAN Boost v2 PMD, the command below can be used +(note that ACC200 was used previously to refer to VRB2): + +.. code-block:: console + + pf_bb_config VRB2 -c ./vrb2/vrb2_config_vf_5g.cfg + test-bbdev.py -e="-c 0xff0 -a${VF_PCI_ADDR}" -c validation -n 64 -b 64 -l 1 -v ./ldpc_dec_default.datadoc/guides/rel_notes/release_23_11.rst +3
-0@@ -78,6 +78,9 @@ New Features * build: Optional libraries can now be selected with the new ``enable_libs`` build option similarly to the existing ``enable_drivers`` build option. +* **Updated Intel vRAN Boost bbdev PMD.** + + Added support for the new Intel vRAN Boost v2 device variant (GNR-D) within the unified driver. Removed Items -------------drivers/baseband/acc/acc_common.h +48
-8@@ -18,6 +18,7 @@#define ACC_DMA_BLKID_OUT_HARQ 3#define ACC_DMA_BLKID_IN_HARQ 3#define ACC_DMA_BLKID_IN_MLD_R 3 +#define ACC_DMA_BLKID_DEWIN_IN 3/* Values used in filling in decode FCWs */ #define ACC_FCW_TD_VER 1@@ -103,6 +104,9 @@#define ACC_MAX_NUM_QGRPS 32#define ACC_RING_SIZE_GRANULARITY 64#define ACC_MAX_FCW_SIZE 128 +#define ACC_IQ_SIZE 4 + +#define ACC_FCW_FFT_BLEN_3 28/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define ACC_N_ZC_1 66/* N = 66 Zc for BG 1 */ @@ -132,6 +136,11 @@#define ACC_LIM_21 14/* 0.21 */ #define ACC_LIM_31 20/* 0.31 */ #define ACC_MAX_E (128 * 1024 - 2) +#define ACC_MAX_CS 12 + +#define ACC100_VARIANT 0 +#define VRB1_VARIANT 2 +#define VRB2_VARIANT 3/* Helper macro for logging */ #define rte_acc_log (level, fmt, ...) \@@ -332,6 +341,37 @@ struct __rte_packed acc_fcw_fft { res:19 ; }; +/* FFT Frame Control Word. */ +struct __rte_packed acc_fcw_fft_3 { + uint32_t in_frame_size:16, + leading_pad_size:16; + uint32_t out_frame_size:16, + leading_depad_size:16; +uint32_t cs_window_sel; + uint32_t cs_window_sel2:16, + cs_enable_bmap:16; + uint32_t num_antennas:8, + idft_size:8, + dft_size:8, + cs_offset:8; + uint32_t idft_shift:8, + dft_shift:8, + cs_multiplier:16; + uint32_t bypass:2, + fp16_in:1, + fp16_out:1, + exp_adj:4, + power_shift:4, + power_en:1, + enable_dewin:1, + freq_resample_mode:2, + depad_ouput_size:16; +uint16_t cs_theta_0[ACC_MAX_CS ]; +uint32_t cs_theta_d[ACC_MAX_CS ]; +int8_t cs_time_offset[ACC_MAX_CS ]; +}; + +/* MLD-TS Frame Control Word */ struct __rte_packed acc_fcw_mldts { uint32_t fcw_version:4,@@ -473,14 +513,14 @@ union acc_info_ring_data { uint16_t valid: 1; };struct { -uint32_t aq_id_3:6 ; -uint32_t qg_id_3:5 ; -uint32_t vf_id_3:6 ; -uint32_t int_nb_3:6 ; -uint32_t msi_0_3:1 ; -uint32_t vf2pf_3:6 ; -uint32_t loop_3:1 ; -uint32_t valid_3:1 ; +uint32_t aq_id_vrb2:6 ; +uint32_t qg_id_vrb2:5 ; +uint32_t vf_id_vrb2:6 ; +uint32_t int_nb_vrb2:6 ; +uint32_t msi_0_vrb2:1 ; +uint32_t vf2pf_vrb2:6 ; +uint32_t loop_vrb2:1 ; +uint32_t valid_vrb2:1 ; }; } __rte_packed;
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d, · line 808
Quoted 5 lines
drivers/baseband/acc/acc_common.h +1
-1@@ -765,16 +805,20 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,*/ static inline uint16_t get_queue_id_from_ring_info (struct rte_bbdev_data *data, -const union acc_info_ring_data ring_data) +const union acc_info_ring_data ring_data,uint16_t device_variant)
The device variant ID should be derived from the data, which stores device private pointer. No need to add an extra parameter.
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d, · line 814
Quoted 6 lines
drivers/baseband/acc/acc_common.h +4
-0{uint16_t queue_id; +struct acc_queue *acc_q; +uint16_t vf_id = (device_variant ==VRB2_VARIANT ) ? ring_data.vf_id_vrb2 : ring_data.vf_id; +uint16_t aq_id = (device_variant ==VRB2_VARIANT ) ? ring_data.aq_id_vrb2 : ring_data.aq_id; +uint16_t qg_id = (device_variant ==VRB2_VARIANT ) ? ring_data.qg_id_vrb2 : ring_data.qg_id;
Wouldn't it be better to have an intermediate representation, and each variant implements a callback to fill it?
It will become messy otherwise when other variants will be added.
Something like the existing queue_offset callback would be great.
Quoted 19 lines
drivers/baseband/acc/acc_common.h +5
-5for (queue_id =0 ; queue_id < data->num_queues; ++queue_id) { -struct acc_queue *acc_q = - data->queues[queue_id].queue_private; -if (acc_q !=NULL && acc_q->aq_id == ring_data.aq_id && - acc_q->qgrp_id == ring_data.qg_id && - acc_q->vf_id == ring_data.vf_id) + acc_q = data->queues[queue_id].queue_private; + +if (acc_q !=NULL && acc_q->aq_id == aq_id && + acc_q->qgrp_id == qg_id && + acc_q->vf_id == vf_id)return queue_id; }@@ -1436,4 +1480,16 @@ get_num_cbs_in_tb_ldpc_enc(struct rte_bbdev_op_ldpc_enc *ldpc_enc)return cbs_in_tb; }
drivers/baseband/acc/acc_common.h get_num_cbs_in_tb_ldpc_enc(struct rte_bbdev_op_ldpc_enc *ldpc_enc) · line 1492
Quoted 10 lines
drivers/baseband/acc/acc_common.h +10
-0+#ifdef RTE_LIBRTE_BBDEV_DEBUG +static inline void +acc_memdump (const char *string,void *buf,uint16_t bytes) +{ +printf ("%s\n" , string); +uint32_t *data = buf; +uint16_t i; +for (i =0 ; i < bytes /4 ; i++) +printf ("0x%08X\n" , data[i]); +}
For consistency and to avoid code dumplication, please use rte_memdump() directly as you did in ACC100.
Quoted 174 lines
drivers/baseband/acc/acc_common.h +2
-0+#endif +#endif /* _ACC_COMMON_H_ */ drivers/baseband/acc/rte_acc100_pmd.c +2
-2@@ -294,7 +294,7 @@ acc100_pf_interrupt_handler(struct rte_bbdev *dev)case ACC100_PF_INT_DMA_UL5G_DESC_IRQ :case ACC100_PF_INT_DMA_DL5G_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info ( - dev->data, *ring_data); + dev->data, *ring_data, acc100_dev->device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u",@@ -348,7 +348,7 @@ acc100_vf_interrupt_handler(struct rte_bbdev *dev)*/ ring_data->vf_id =0 ; deq_intr_det.queue_id =get_queue_id_from_ring_info ( - dev->data, *ring_data); + dev->data, *ring_data, acc100_dev->device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue: aq_id: %u, qg_id: %u",drivers/baseband/acc/rte_vrb_pmd.c +87
-29@@ -37,6 +37,15 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_idreturn ((qgrp_id <<7 ) + (aq_id <<3 ) + VRB1_VfQmgrIngressAq); } +static inline uint32_t +vrb2_queue_offset (bool pf_device,uint8_t vf_id,uint8_t qgrp_id,uint16_t aq_id) +{ +if (pf_device) +return ((vf_id <<14 ) + (qgrp_id <<9 ) + (aq_id <<3 ) + VRB2_PfQmgrIngressAq); +else +return ((qgrp_id <<9 ) + (aq_id <<3 ) + VRB2_VfQmgrIngressAq); +} +enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC };/* Return the accelerator enum for a Queue Group Index. */ @@ -197,7 +206,7 @@ fetch_acc_config(struct rte_bbdev *dev)struct acc_device *d = dev->data->dev_private;struct rte_acc_conf *acc_conf = &d->acc_conf;uint8_t acc, qg; -uint32_t reg_aq, reg_len0, reg_len1, reg0, reg1; +uint32_t reg_aq, reg_len0, reg_len1, reg_len2, reg_len3, reg0, reg1, reg2, reg3;uint32_t reg_mode, idx;struct rte_acc_queue_topology *q_top =NULL ;int qman_func_id[VRB_NUM_ACCS ] = {ACC_ACCMAP_0 ,ACC_ACCMAP_1 ,@@ -219,32 +228,81 @@ fetch_acc_config(struct rte_bbdev *dev) acc_conf->num_vf_bundles =1 ;initQTop (acc_conf); - reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); - reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); -for (qg =0 ; qg < d->num_qgroups; qg++) { - reg_aq =acc_reg_read (d, d->queue_offset (d->pf_device,0 , qg,0 )); -if (reg_aq &ACC_QUEUE_ENABLE ) { -if (qg <ACC_NUM_QGRPS_PER_WORD ) - idx = (reg0 >> (qg *4 )) &0x7 ; +if (d->device_variant ==VRB1_VARIANT ) { + reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); + reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); +for (qg =0 ; qg < d->num_qgroups; qg++) { + reg_aq =acc_reg_read (d, d->queue_offset (d->pf_device,0 , qg,0 )); +if (reg_aq &ACC_QUEUE_ENABLE ) { +if (qg <ACC_NUM_QGRPS_PER_WORD ) + idx = (reg0 >> (qg *4 )) &0x7 ; +else + idx = (reg1 >> ((qg -ACC_NUM_QGRPS_PER_WORD ) *4 )) &0x7 ; +if (idx <VRB1_NUM_ACCS ) { + acc = qman_func_id[idx]; +updateQtop (acc, qg, acc_conf, d); + } + } + } + +/* Check the depth of the AQs. */ + reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); + reg_len1 =acc_reg_read (d, d->reg_addr->depth_log1_offset); +for (acc =0 ; acc <NUM_ACC ; acc++) { +qtopFromAcc (&q_top, acc, acc_conf); +if (q_top->first_qgroup_index <ACC_NUM_QGRPS_PER_WORD ) + q_top->aq_depth_log2 = + (reg_len0 >> (q_top->first_qgroup_index *4 )) &0xF ;else - idx = (reg1 >> ((qg -ACC_NUM_QGRPS_PER_WORD ) *4 )) &0x7 ; -if (idx <VRB1_NUM_ACCS ) { - acc = qman_func_id[idx]; -updateQtop (acc, qg, acc_conf, d); + q_top->aq_depth_log2 = (reg_len1 >> ((q_top->first_qgroup_index - +ACC_NUM_QGRPS_PER_WORD ) *4 )) &0xF ; + } + }else { + reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); + reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); + reg2 =acc_reg_read (d, d->reg_addr->qman_group_func +8 ); + reg3 =acc_reg_read (d, d->reg_addr->qman_group_func +12 ); +/* printf("Debug Function %08x %08x %08x %08x\n", reg0, reg1, reg2, reg3);*/ +for (qg =0 ; qg <VRB2_NUM_QGRPS ; qg++) { + reg_aq =acc_reg_read (d,vrb2_queue_offset (d->pf_device,0 , qg,0 )); +if (reg_aq &ACC_QUEUE_ENABLE ) { +/* printf("Qg enabled %d %x\n", qg, reg_aq);*/ +if (qg /ACC_NUM_QGRPS_PER_WORD ==0 ) + idx = (reg0 >> ((qg %ACC_NUM_QGRPS_PER_WORD ) *4 )) &0x7 ; +else if (qg /ACC_NUM_QGRPS_PER_WORD ==1 ) + idx = (reg1 >> ((qg %ACC_NUM_QGRPS_PER_WORD ) *4 )) &0x7 ; +else if (qg /ACC_NUM_QGRPS_PER_WORD ==2 ) + idx = (reg2 >> ((qg %ACC_NUM_QGRPS_PER_WORD ) *4 )) &0x7 ; +else + idx = (reg3 >> ((qg %ACC_NUM_QGRPS_PER_WORD ) *4 )) &0x7 ; +if (idx <VRB_NUM_ACCS ) { + acc = qman_func_id[idx]; +updateQtop (acc, qg, acc_conf, d); + } } } - } -/* Check the depth of the AQs. */ - reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); - reg_len1 =acc_reg_read (d, d->reg_addr->depth_log1_offset); -for (acc =0 ; acc <NUM_ACC ; acc++) { -qtopFromAcc (&q_top, acc, acc_conf); -if (q_top->first_qgroup_index <ACC_NUM_QGRPS_PER_WORD ) - q_top->aq_depth_log2 = (reg_len0 >> (q_top->first_qgroup_index *4 )) &0xF ; -else - q_top->aq_depth_log2 = (reg_len1 >> ((q_top->first_qgroup_index - -ACC_NUM_QGRPS_PER_WORD ) *4 )) &0xF ; +/* Check the depth of the AQs. */ + reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); + reg_len1 =acc_reg_read (d, d->reg_addr->depth_log0_offset +4 ); + reg_len2 =acc_reg_read (d, d->reg_addr->depth_log0_offset +8 ); + reg_len3 =acc_reg_read (d, d->reg_addr->depth_log0_offset +12 ); + +for (acc =0 ; acc <NUM_ACC ; acc++) { +qtopFromAcc (&q_top, acc, acc_conf); +if (q_top->first_qgroup_index /ACC_NUM_QGRPS_PER_WORD ==0 ) + q_top->aq_depth_log2 = (reg_len0 >> ((q_top->first_qgroup_index % +ACC_NUM_QGRPS_PER_WORD ) *4 )) &0xF ; +else if (q_top->first_qgroup_index /ACC_NUM_QGRPS_PER_WORD ==1 ) + q_top->aq_depth_log2 = (reg_len1 >> ((q_top->first_qgroup_index % +ACC_NUM_QGRPS_PER_WORD ) *4 )) &0xF ; +else if (q_top->first_qgroup_index /ACC_NUM_QGRPS_PER_WORD ==2 ) + q_top->aq_depth_log2 = (reg_len2 >> ((q_top->first_qgroup_index % +ACC_NUM_QGRPS_PER_WORD ) *4 )) &0xF ; +else + q_top->aq_depth_log2 = (reg_len3 >> ((q_top->first_qgroup_index % +ACC_NUM_QGRPS_PER_WORD ) *4 )) &0xF ; + } }/* Read PF mode. */ @@ -341,18 +399,29 @@ vrb_check_ir(struct acc_device *acc_dev) ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &ACC_INFO_RING_MASK );while (ring_data->valid) { -if ((ring_data->int_nb <ACC_PF_INT_DMA_DL_DESC_IRQ ) || ( - ring_data->int_nb >ACC_PF_INT_DMA_MLD_DESC_IRQ )) { -rte_bbdev_log (WARNING ,"InfoRing: ITR:%d Info:0x%x" , - ring_data->int_nb, ring_data->detailed_info); -/* Initialize Info Ring entry and move forward. */ - ring_data->val =0 ; +if (acc_dev->device_variant ==VRB1_VARIANT ) { +if ((ring_data->int_nb <ACC_PF_INT_DMA_DL_DESC_IRQ ) || ( + ring_data->int_nb >ACC_PF_INT_DMA_MLD_DESC_IRQ )) { +rte_bbdev_log (WARNING ,"InfoRing: ITR:%d Info:0x%x" , + ring_data->int_nb, ring_data->detailed_info); +/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 417
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +10
-0+ ring_data->val =0 ; + } + }else {/* VRB2_VARIANT */ +if ((ring_data->int_nb_vrb2 <ACC_PF_INT_DMA_DL_DESC_IRQ ) || ( + ring_data->int_nb_vrb2 >ACC_PF_INT_DMA_MLD_DESC_IRQ )) { +rte_bbdev_log (WARNING ,"InfoRing: ITR:%d Info:0x%x" , + ring_data->int_nb_vrb2, ring_data->val); +/* Initialize Info Ring entry and move forward. */ + ring_data->val =0 ; + }
Same as get_queue_id_from_ring_info().
Having a callback to get the different parameters (int_nb, vf_id, ...) implemented by each variant would avoid duplication like above.
It would make it more easier to add new variants, i.e. just implement the callback without needing to patch every function making use of these info.
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 424
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0} info_ring_head++; ring_data = acc_dev->info_ring + (info_ring_head &ACC_INFO_RING_MASK ); } } +
Remove new line.
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Interrupt handler triggered by dev for handling specific interrupt. */ static void vrb_dev_interrupt_handler (void *cb_arg)@@ -361,16 +430,22 @@ vrb_dev_interrupt_handler(void *cb_arg)struct acc_device *acc_dev = dev->data->dev_private;volatile union acc_info_ring_data *ring_data;
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 441
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0struct acc_deq_intr_details deq_intr_det; +uint16_t vf_id, aq_id, qg_id, int_nb; +bool isVrb1 = (acc_dev->device_variant ==VRB1_VARIANT ); ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &ACC_INFO_RING_MASK );while (ring_data->valid) { + vf_id = isVrb1 ? ring_data->vf_id : ring_data->vf_id_vrb2; + aq_id = isVrb1 ? ring_data->aq_id : ring_data->aq_id_vrb2; + qg_id = isVrb1 ? ring_data->qg_id : ring_data->qg_id_vrb2; > + int_nb = isVrb1 ? ring_data->int_nb : ring_data->int_nb_vrb2;
Same comment as above.
Quoted 41 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-9if (acc_dev->pf_device) {rte_bbdev_log_debug ( -"VRB1 PF Interrupt received, Info Ring data: 0x%x -> %d" , - ring_data->val, ring_data->int_nb); +"PF Interrupt received, Info Ring data: 0x%x -> %d" , + ring_data->val, int_nb); -switch (ring_data->int_nb) { +switch (int_nb) {case ACC_PF_INT_DMA_DL_DESC_IRQ :case ACC_PF_INT_DMA_UL_DESC_IRQ :case ACC_PF_INT_DMA_FFT_DESC_IRQ :@@ -378,13 +453,11 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_PF_INT_DMA_DL5G_DESC_IRQ :case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info ( - dev->data, *ring_data); + dev->data, *ring_data, acc_dev->device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) {rte_bbdev_log (ERR ,"Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u" , - ring_data->aq_id, - ring_data->qg_id, - ring_data->vf_id); + aq_id, qg_id, vf_id);return ; } rte_bbdev_pmd_callback_process(dev,@@ -396,9 +469,9 @@ vrb_dev_interrupt_handler(void *cb_arg) } }else {rte_bbdev_log_debug ( -"VRB1 VF Interrupt received, Info Ring data: 0x%x\n" , +"VRB VF Interrupt received, Info Ring data: 0x%x\n" , ring_data->val); -switch (ring_data->int_nb) { +switch (int_nb) {case ACC_VF_INT_DMA_DL_DESC_IRQ :case ACC_VF_INT_DMA_UL_DESC_IRQ :case ACC_VF_INT_DMA_FFT_DESC_IRQ :
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 485
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1@@ -406,14 +479,16 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_VF_INT_DMA_DL5G_DESC_IRQ :case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */ - ring_data->vf_id =0 ; +if (acc_dev->device_variant ==VRB1_VARIANT ) + ring_data->vf_id =0 ; +else + ring_data->vf_id_vrb2 =0 ;
Ditto, you also need a way to set these fields in a generic way.
Quoted 23 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-5deq_intr_det.queue_id =get_queue_id_from_ring_info ( - dev->data, *ring_data); + dev->data, *ring_data, acc_dev->device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) {rte_bbdev_log (ERR ,"Couldn't find queue: aq_id: %u, qg_id: %u" , - ring_data->aq_id, - ring_data->qg_id); + aq_id, qg_id);return ; } rte_bbdev_pmd_callback_process(dev,@@ -428,8 +503,7 @@ vrb_dev_interrupt_handler(void *cb_arg)/* Initialize Info Ring entry and move forward. */ ring_data->val =0 ; ++acc_dev->info_ring_head; - ring_data = acc_dev->info_ring + - (acc_dev->info_ring_head &ACC_INFO_RING_MASK ); + ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &ACC_INFO_RING_MASK ); } }
drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 541
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1@@ -461,7 +535,10 @@ allocate_info_ring(struct rte_bbdev *dev) phys_low = (uint32_t )(info_ring_iova);acc_reg_write (d, d->reg_addr->info_ring_hi, phys_high);acc_reg_write (d, d->reg_addr->info_ring_lo, phys_low); -acc_reg_write (d, d->reg_addr->info_ring_en,VRB1_REG_IRQ_EN_ALL ); +if (d->device_variant ==VRB1_VARIANT ) +acc_reg_write (d, d->reg_addr->info_ring_en,VRB1_REG_IRQ_EN_ALL ); +else +acc_reg_write (d, d->reg_addr->info_ring_en,VRB2_REG_IRQ_EN_ALL );
My guess is the mask value difference between the two is the VRB2 added MLD-TS related interrupts, is it?
If so, it would be more future proof to configure this based on the device capabilities instead of its variant?
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 596
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0d->info_ring_head = (acc_reg_read (d, d->reg_addr->info_ring_ptr) &0xFFF ) /sizeof (union acc_info_ring_data );return 0 ;@@ -516,6 +593,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) phys_high = (uint32_t )(d->sw_rings_iova >>32 ); phys_low = (uint32_t )(d->sw_rings_iova & ~(ACC_SIZE_64MBYTE -1 )); +
Remove new line.
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 623
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0/* Read the populated cfg from device registers. */ fetch_acc_config (dev);@@ -540,6 +618,10 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)acc_reg_write (d, d->reg_addr->dma_ring_dl4g_lo, phys_low);acc_reg_write (d, d->reg_addr->dma_ring_fft_hi, phys_high);acc_reg_write (d, d->reg_addr->dma_ring_fft_lo, phys_low); +if (d->device_variant ==VRB2_VARIANT ) { +acc_reg_write (d, d->reg_addr->dma_ring_mld_hi, phys_high); +acc_reg_write (d, d->reg_addr->dma_ring_mld_lo, phys_low);
Same, wouldn't it be more future-proof to set this based on the capabilities of the device and not its variant?
Quoted 15 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-2+ }/* * Configure Ring Size to the max queue ring size * (used for wrapping purpose). @@ -549,8 +631,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)/* Configure tail pointer for use when SDONE enabled. */ if (d->tail_ptrs ==NULL ) - d->tail_ptrs =rte_zmalloc_socket ( - dev->device->driver->name, + d->tail_ptrs =rte_zmalloc_socket (dev->device->driver->name,VRB_MAX_QGRPS *VRB_MAX_AQS *sizeof (uint32_t ),RTE_CACHE_LINE_SIZE , socket_id);if (d->tail_ptrs ==NULL ) {
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 661
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0@@ -574,6 +655,10 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)acc_reg_write (d, d->reg_addr->tail_ptrs_dl4g_lo, phys_low);acc_reg_write (d, d->reg_addr->tail_ptrs_fft_hi, phys_high);acc_reg_write (d, d->reg_addr->tail_ptrs_fft_lo, phys_low); +if (d->device_variant ==VRB2_VARIANT ) { +acc_reg_write (d, d->reg_addr->tail_ptrs_mld_hi, phys_high); +acc_reg_write (d, d->reg_addr->tail_ptrs_mld_lo, phys_low); + }
Ditto.
Quoted 26 lines
drivers/baseband/acc/rte_vrb_pmd.c +11
-4ret =allocate_info_ring (dev);if (ret <0 ) {@@ -671,10 +756,17 @@ vrb_intr_enable(struct rte_bbdev *dev)return ret; } -if (acc_dev->pf_device) - max_queues =VRB1_MAX_PF_MSIX ; -else - max_queues =VRB1_MAX_VF_MSIX ; +if (d->device_variant ==VRB1_VARIANT ) { +if (acc_dev->pf_device) + max_queues =VRB1_MAX_PF_MSIX ; +else + max_queues =VRB1_MAX_VF_MSIX ; + }else { +if (acc_dev->pf_device) + max_queues =VRB2_MAX_PF_MSIX ; +else + max_queues =VRB2_MAX_VF_MSIX ; + }if (rte_intr_efd_enable (dev->intr_handle, max_queues)) { rte_bbdev_log(ERR, "Failed to create fds for %u queues",
drivers/baseband/acc/rte_vrb_pmd.c vrb_find_free_queue_idx(struct rte_bbdev *dev, · line 874
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1@@ -776,7 +868,10 @@ vrb_find_free_queue_idx(struct rte_bbdev *dev,/* Mark the Queue as assigned. */ d->q_assigned_bit_map[group_idx] |= (1ULL << aq_idx);/* Report the AQ Index. */ -return (group_idx <<VRB1_GRP_ID_SHIFT ) + aq_idx; +if (d->device_variant ==VRB1_VARIANT ) +return (group_idx <<VRB1_GRP_ID_SHIFT ) + aq_idx; +else +return (group_idx <<VRB2_GRP_ID_SHIFT ) + aq_idx;
This is the same bitmap as in acc_info_ring_data, isn't it? We could maybe share some code to to the decoding as suggested ealier in this patch.
Quoted 20 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-3} } rte_bbdev_log(INFO, "Failed to find free queue on %s, priority %u",@@ -819,6 +914,9 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, ACC_FCW_LD_BLEN : (conf->op_type ==RTE_BBDEV_OP_FFT ? ACC_FCW_FFT_BLEN : ACC_FCW_MLDTS_BLEN)))); +if ((q->d->device_variant ==VRB2_VARIANT ) && (conf->op_type ==RTE_BBDEV_OP_FFT )) + fcw_len =ACC_FCW_FFT_BLEN_3 ; +for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx; desc->req.word0 =ACC_DMA_DESC_TYPE ;@@ -915,9 +1013,16 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, } } - q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; - q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; - q->aq_id = q_idx &0xF ;
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, · line 1025
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +10
-0+if (d->device_variant ==VRB1_VARIANT ) { + q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; + q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; + q->aq_id = q_idx &0xF ; + }else { + q->qgrp_id = (q_idx >>VRB2_GRP_ID_SHIFT ) &0x1F ; + q->vf_id = (q_idx >>VRB2_VF_ID_SHIFT ) &0x3F ; + q->aq_id = q_idx &0x3F ; + } +
Same remark as before.
Quoted 102 lines
drivers/baseband/acc/rte_vrb_pmd.c +95
-0q->aq_depth =0 ;if (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC ) q->aq_depth = (1 << d->acc_conf.q_ul_4g.aq_depth_log2);@@ -1149,6 +1254,127 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)RTE_BBDEV_END_OF_CAPABILITIES_LIST () }; +static const struct rte_bbdev_op_cap vrb2_bbdev_capabilities[] = { + { + .type =RTE_BBDEV_OP_TURBO_DEC , + .cap.turbo_dec = { + .capability_flags = +RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE | +RTE_BBDEV_TURBO_CRC_TYPE_24B | +RTE_BBDEV_TURBO_DEC_CRC_24B_DROP | +RTE_BBDEV_TURBO_EQUALIZER | +RTE_BBDEV_TURBO_SOFT_OUT_SATURATE | +RTE_BBDEV_TURBO_HALF_ITERATION_EVEN | +RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH | +RTE_BBDEV_TURBO_SOFT_OUTPUT | +RTE_BBDEV_TURBO_EARLY_TERMINATION | +RTE_BBDEV_TURBO_DEC_INTERRUPTS | +RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN | +RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT | +RTE_BBDEV_TURBO_MAP_DEC | +RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP | +RTE_BBDEV_TURBO_DEC_SCATTER_GATHER , + .max_llr_modulus =INT8_MAX , + .num_buffers_src = +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS , + .num_buffers_hard_out = +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS , + .num_buffers_soft_out = +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS , + } + }, + { + .type =RTE_BBDEV_OP_TURBO_ENC , + .cap.turbo_enc = { + .capability_flags = +RTE_BBDEV_TURBO_CRC_24B_ATTACH | +RTE_BBDEV_TURBO_RV_INDEX_BYPASS | +RTE_BBDEV_TURBO_RATE_MATCH | +RTE_BBDEV_TURBO_ENC_INTERRUPTS | +RTE_BBDEV_TURBO_ENC_SCATTER_GATHER , + .num_buffers_src = +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS , + .num_buffers_dst = +RTE_BBDEV_TURBO_MAX_CODE_BLOCKS , + } + }, + { + .type =RTE_BBDEV_OP_LDPC_ENC , + .cap.ldpc_enc = { + .capability_flags = +RTE_BBDEV_LDPC_RATE_MATCH | +RTE_BBDEV_LDPC_CRC_24B_ATTACH | +RTE_BBDEV_LDPC_INTERLEAVER_BYPASS | +RTE_BBDEV_LDPC_ENC_INTERRUPTS | +RTE_BBDEV_LDPC_ENC_SCATTER_GATHER | +RTE_BBDEV_LDPC_ENC_CONCATENATION , + .num_buffers_src = +RTE_BBDEV_LDPC_MAX_CODE_BLOCKS , + .num_buffers_dst = +RTE_BBDEV_LDPC_MAX_CODE_BLOCKS , + } + }, + { + .type =RTE_BBDEV_OP_LDPC_DEC , + .cap.ldpc_dec = { + .capability_flags = +RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK | +RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE | +RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE | +RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE | +RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | +RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION | +RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION | +RTE_BBDEV_LDPC_LLR_COMPRESSION | +RTE_BBDEV_LDPC_SOFT_OUT_ENABLE | +RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS | +RTE_BBDEV_LDPC_DEC_INTERRUPTS , + .llr_size =8 , + .llr_decimals =2 , + .num_buffers_src = +RTE_BBDEV_LDPC_MAX_CODE_BLOCKS , + .num_buffers_hard_out = +RTE_BBDEV_LDPC_MAX_CODE_BLOCKS , + .num_buffers_soft_out =0 , + } + }, + { + .type =RTE_BBDEV_OP_FFT , + .cap.fft = { + .capability_flags = +RTE_BBDEV_FFT_WINDOWING | + RTE_BBDEV_FFT_CS_ADJUSTMENT |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1361
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +10
-0+RTE_BBDEV_FFT_DFT_BYPASS | +RTE_BBDEV_FFT_IDFT_BYPASS | +RTE_BBDEV_FFT_FP16_INPUT | +RTE_BBDEV_FFT_FP16_OUTPUT | +RTE_BBDEV_FFT_POWER_MEAS | + RTE_BBDEV_FFT_WINDOWING_BYPASS, + .num_buffers_src = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, + .num_buffers_dst = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
Is that a copy/pasta error or is it expected to have LDPC defines in FFT capabilities?
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1372
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +11
-0+ } + }, + { + .type = RTE_BBDEV_OP_MLDTS, + .cap.fft = { + .capability_flags = + RTE_BBDEV_MLDTS_REP, + .num_buffers_src = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, + .num_buffers_dst = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
Same question here, that looks suspicious but maybe I'm wrong.
Quoted 31 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-1+ } + }, + RTE_BBDEV_END_OF_CAPABILITIES_LIST() + }; +static struct rte_bbdev_queue_conf default_queue_conf; default_queue_conf.socket = dev->data->socket_id; default_queue_conf.queue_size =ACC_MAX_QUEUE_DEPTH ;@@ -1193,7 +1419,10 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) dev_info->default_queue_conf = default_queue_conf; dev_info->cpu_flag_reqs =NULL ; dev_info->min_alignment =1 ; - dev_info->capabilities = vrb1_bbdev_capabilities; +if (d->device_variant ==VRB1_VARIANT ) + dev_info->capabilities = vrb1_bbdev_capabilities; +else + dev_info->capabilities = vrb2_bbdev_capabilities; dev_info->harq_buffer_size =0 ;vrb_check_ir (d);@@ -1242,6 +1471,9 @@ static struct rte_pci_id pci_id_vrb_pf_map[] = { {RTE_PCI_DEVICE (RTE_VRB1_VENDOR_ID ,RTE_VRB1_PF_DEVICE_ID ) }, + { +RTE_PCI_DEVICE (RTE_VRB2_VENDOR_ID ,RTE_VRB2_PF_DEVICE_ID ) + }, {.device_id = 0}, };
drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_vf_map[] = { · line 1490
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0@@ -1250,6 +1482,9 @@ static struct rte_pci_id pci_id_vrb_vf_map[] = { {RTE_PCI_DEVICE (RTE_VRB1_VENDOR_ID ,RTE_VRB1_VF_DEVICE_ID ) }, + { +RTE_PCI_DEVICE (RTE_VRB2_VENDOR_ID ,RTE_VRB2_VF_DEVICE_ID ) + }, {.device_id = 0}, };
I'm stopping the review here for now.
Thanks,
Maxime
RE: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variant
Hi Maxime,
Quoted 39 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, September 27, 2023 6:40 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variantQuoted 16 lines · Nicolas Chautru
This extends the unified driver to support both the VRB1 and VRB2 implementations of Intel vRAN Boost.
Signed-off-by Nicolas Chautru <[email protected]>--- doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/vrb2.rst | 269 +++++ doc/guides/rel_notes/release_23_11.rst | 3 + drivers/baseband/acc/acc_common.h | 84 +- drivers/baseband/acc/rte_acc100_pmd.c | 4 +- drivers/baseband/acc/rte_vrb_pmd.c | 1442 +++++++++++++++++++++--- drivers/baseband/acc/vrb1_pf_enum.h | 17 +- drivers/baseband/acc/vrb2_pf_enum.h | 124 ++ drivers/baseband/acc/vrb2_vf_enum.h | 121 ++ drivers/baseband/acc/vrb_pmd.h | 161 ++- 10 files changed, 2062 insertions(+), 164 deletions(-)Quoted 3 lines
create mode 100644
doc/guides/bbdevs/vrb2.rstcreate mode 100644drivers/baseband/acc/vrb2_pf_enum.hcreate mode 100644drivers/baseband/acc/vrb2_vf_enum.hAs a general comment, the review process would be easier if the patch was split by features introduced:
- Base init, no capabilities exposed
- Add LDPC capabilities and related code
- ADD FFT capabilities and related code
- MLD-TS ...
Quoted 2 lines
We had this very discussion last week at the techboard for a Net PMD, and it was a shared opinion across the board.
Yes I realize there is more code that I first thought. Will do in v3.
Quoted 181 lines
Quoted 19 lines
doc/guides/bbdevs/index.rst +1
-0@@ -15,4 +15,5 @@ Baseband Device Drivers fpga_5gnr_fec acc100 vrb1 + vrb2 la12xxdoc/guides/bbdevs/vrb2.rst new file +3
-0@@ -0,0 +1,269 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2023 Intel Corporation +doc/guides/bbdevs/vrb2.rst line 13
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+.. include:: <isonum.txt> + +Intel\ |reg| vRAN Boost v2 Poll Mode Driver (PMD) +================================================= + +The Intel\ |reg| vRAN Boost integrated accelerator enables +cost-effective 4G and 5G next-generation virtualized Radio Access +Network (vRAN) solutions. +The Intel vRAN Boost v2.0 (VRB2 in the code) is specifically +integrated on the Intel\ |reg| Xeon\ |reg| Granite Rapids-D Process (GNR-D).
doc/guides/bbdevs/vrb2.rst line 23
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +Features +-------- + +Intel vRAN Boost v2.0 includes a 5G Low Density Parity Check (LDPC) +encoder/decoder, rate match/dematch, Hybrid Automatic Repeat Request +(HARQ) with access to DDR memory for buffer management, a 4G Turbo +encoder/decoder, a Fast Fourier Transform (FFT) block providing +DFT/iDFT processing offload for the 5G Sounding Reference Signal +(SRS), a MLD-TS accelerator, a Queue Manager (QMGR), and a DMAsubsystem.
doc/guides/bbdevs/vrb2.rst line 24
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+There is no dedicated on-card memory for HARQ, the coherent memory onthe CPU side is being used.
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ +These hardware blocks provide the following features exposed by the PMD: + +- LDPC Encode in the Downlink (5GNR) +- LDPC Decode in the Uplink (5GNR) +- Turbo Encode in the Downlink (4G) +- Turbo Decode in the Uplink (4G) +- FFT processing +- MLD-TS processingdoc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+- Single Root I/O Virtualization (SR-IOV) with 16 Virtual Functions +(VFs) per Physical Function (PF) +- Maximum of 2048 queues per VF +- Message Signaled Interrupts (MSIs) + +The Intel vRAN Boost v2.0 PMD supports the following bbdev capabilities: + +* For the LDPC encode operation: + - ``RTE_BBDEV_LDPC_CRC_24B_ATTACH``: set to attach CRC24B to CB(s). + - ``RTE_BBDEV_LDPC_RATE_MATCH``: if set then do not do Rate Matchbypass.
doc/guides/bbdevs/vrb2.rst line 44
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_INTERLEAVER_BYPASS``: if set then bypassinterleaver.
doc/guides/bbdevs/vrb2.rst line 45
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``: supports scatter-gatherfor input/output data.
doc/guides/bbdevs/vrb2.rst line 46
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_ENC_CONCATENATION``: concatenate code blockswith bit granularity.
doc/guides/bbdevs/vrb2.rst
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +4
-0+ +* For the LDPC decode operation: + - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK``: check CRC24B from CB(s). + - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP``: drops CRC24B bitsappended while decoding.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ - ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK``: check CRC24A from CB(s). + - ``RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK``: check CRC16 from CB(s). + - ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE``: provides an input forHARQ combining.
doc/guides/bbdevs/vrb2.rst line 54
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE``: provides an inputfor HARQ combining.
doc/guides/bbdevs/vrb2.rst line 55
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE``: disable earlytermination.
doc/guides/bbdevs/vrb2.rst line 56
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``: supports scatter-gatherfor input/output data.
doc/guides/bbdevs/vrb2.rst line 57
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION``: supportscompression of the HARQ input/output.
doc/guides/bbdevs/vrb2.rst line 58
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_LLR_COMPRESSION``: supports LLR inputcompression.
doc/guides/bbdevs/vrb2.rst line 59
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION``: supportscompression of the HARQ input/output.
doc/guides/bbdevs/vrb2.rst line 61
Quoted 2 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+ - ``RTE_BBDEV_LDPC_SOFT_OUT_ENABLE``: set the APP LLR soft output. + - ``RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS``: set the APP LLR softoutput after rate-matching.
doc/guides/bbdevs/vrb2.rst line 62
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS``: disables thede-interleaver.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ +* For the turbo encode operation: + - ``RTE_BBDEV_TURBO_CRC_24B_ATTACH``: set to attach CRC24B toCB(s).
doc/guides/bbdevs/vrb2.rst line 66
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_RATE_MATCH``: if set then do not do Rate Matchbypass.
doc/guides/bbdevs/vrb2.rst line 67
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_ENC_INTERRUPTS``: set for encoder dequeueinterrupts.
doc/guides/bbdevs/vrb2.rst line 69
Quoted 2 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+ - ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS``: set to bypass RV index. + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``: supports scatter-gather for input/output data.
doc/guides/bbdevs/vrb2.rst
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +4
-0+ +* For the turbo decode operation: + - ``RTE_BBDEV_TURBO_CRC_TYPE_24B``: check CRC24B from CB(s). + - ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE``: perform subblockde-interleave.
doc/guides/bbdevs/vrb2.rst line 74
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_INTERRUPTS``: set for decoder dequeueinterrupts.
doc/guides/bbdevs/vrb2.rst line 75
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN``: set if negative LLR input issupported.
doc/guides/bbdevs/vrb2.rst line 76
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP``: keep CRC24B bitsappended while decoding.
doc/guides/bbdevs/vrb2.rst line 77
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_CRC_24B_DROP``: option to drop the codeblock CRC after decoding.
doc/guides/bbdevs/vrb2.rst line 78
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_EARLY_TERMINATION``: set early terminationfeature.
doc/guides/bbdevs/vrb2.rst line 79
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``: supports scatter-gather for input/output data.
doc/guides/bbdevs/vrb2.rst line 80
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN``: set half iterationgranularity.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ - ``RTE_BBDEV_TURBO_SOFT_OUTPUT``: set the APP LLR soft output. + - ``RTE_BBDEV_TURBO_EQUALIZER``: set the turbo equalizer feature. + - ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE``: set the soft outputsaturation.
doc/guides/bbdevs/vrb2.rst line 84
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH``: set to run an extraodd iteration after CRC match.
doc/guides/bbdevs/vrb2.rst line 85
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT``: set if negative APPLLR output supported.
doc/guides/bbdevs/vrb2.rst line 86
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_MAP_DEC``: supports flexible parallel MAPengine decoding.
doc/guides/bbdevs/vrb2.rst
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +4
-0+ +* For the FFT operation: + - ``RTE_BBDEV_FFT_WINDOWING``: flexible windowing capability. + - ``RTE_BBDEV_FFT_CS_ADJUSTMENT``: flexible adjustment of Cyclic Shifttime offset.
doc/guides/bbdevs/vrb2.rst line 91
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_FFT_DFT_BYPASS``: set for bypass the DFT and getdirectly into iDFT input.
doc/guides/bbdevs/vrb2.rst line 92
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_FFT_IDFT_BYPASS``: set for bypass the IDFT and getdirectly the DFT output.
doc/guides/bbdevs/vrb2.rst line 93
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_FFT_WINDOWING_BYPASS``: set for bypass time domainwindowing.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ +* For the MLD-TS operation: + - ``RTE_BBDEV_MLDTS_REP``: set to repeat and reuse channel acrossoperations.
doc/guides/bbdevs/vrb2.rst
Quoted 5 lines
doc/guides/bbdevs/vrb2.rst new file +5
-0+ +Installation +------------ + +Section 3 of the DPDK manual provides instructions on installing andcompiling DPDK.
doc/guides/bbdevs/vrb2.rst line 103
Quoted 2 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+ +DPDK requires hugepages to be configured as detailed in section 2 of theDPDK manual.
doc/guides/bbdevs/vrb2.rst line 104
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+The bbdev test application has been tested with a configuration 40 x 1GBhugepages.
Quoted 20 lines
doc/guides/bbdevs/vrb2.rst new file +20
-0+The hugepage configuration of a server may be examined using: + +.. code-block:: console + + grep Huge* /proc/meminfo + + +Initialization +-------------- + +When the device first powers up, its PCI Physical Functions (PF) can +be listed through these commands for Intel vRAN Boost v2: + +.. code-block:: console + + sudo lspci -vd8086:57c2 + +The physical and virtual functions are compatible with Linux UIO drivers: +``vfio`` and ``igb_uio``. +However, in order to work the 5G/4G FEC device first needs to be
Quoted 8 lines
doc/guides/bbdevs/vrb2.rst line 128
Quoted 6 lines
doc/guides/bbdevs/vrb2.rst new file +5
-0+bound to one of these Linux drivers through DPDK. + + +Bind PF UIO driver(s) +~~~~~~~~~~~~~~~~~~~~~Please document with VFIO instead of
IGB_UIO, which is being deprecated.
There are still some deployment with igb_uio, so keeping for a bit. Then we can remove in all documentations.
Quoted 274 lines
doc/guides/bbdevs/vrb2.rst line 131
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+Install the DPDK igb_uio driver, bind it with the PF PCI device ID +and use ``lspci`` to confirm the PF device is under use by ``igb_uio`` DPDKUIO driver.
Quoted 13 lines
doc/guides/bbdevs/vrb2.rst new file +13
-0+ +The igb_uio driver may be bound to the PF PCI device using one of two +methods for Intel vRAN Boost v2: + +#. PCI functions (physical or virtual, depending on the use case) can +be bound to the UIO driver by repeating this command for every function. + +.. code-block:: console + + cd <dpdk-top-level-directory> + insmod build/kmod/igb_uio.ko + echo "8086 57c2" > /sys/bus/pci/drivers/igb_uio/new_id + lspci -vd8086:57c2doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +#. Another way to bind PF with DPDK UIO driver is by using the +``dpdk-devbind.py`` tool + +.. code-block:: console + + cd <dpdk-top-level-directory> + usertools/dpdk-devbind.py -b igb_uio 0000:f7:00.0 + +where the PCI device ID (example: 0000:f7:00.0) is obtained using ``lspci -vd8086:57c2``.
doc/guides/bbdevs/vrb2.rst
Quoted 11 lines
doc/guides/bbdevs/vrb2.rst new file +11
-0+ +In a similar way the PF may be bound with vfio-pci as any PCIe device. + + +Enable Virtual Functions +~~~~~~~~~~~~~~~~~~~~~~~~ + +Now, it should be visible in the printouts that PCI PF is under +igb_uio control "``Kernel driver in use: igb_uio``" + +To show the number of available VFs on the device, read ``sriov_totalvfs``file.
Quoted 29 lines
doc/guides/bbdevs/vrb2.rst new file +29
-0+ +.. code-block:: console + + cat /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_totalvfs + +where ``0000\:<b>\:<d>.<f>`` is the PCI device ID + +To enable VFs via igb_uio, echo the number of virtual functions +intended to enable to ``max_vfs`` file. + +.. code-block:: console + + echo <num-of-vfs> > + /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/max_vfs + +Afterwards, all VFs must be bound to appropriate UIO drivers as +required, same way it was done with the physical function previously. + +Enabling SR-IOV via VFIO driver is pretty much the same, except that +the file name is different: + +.. code-block:: console + + echo <num-of-vfs> > + /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_numvfs + + +Configure the VFs through PF +~~~~~~~~~~~~~~~~~~~~~~~~~~~~doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +The PCI virtual functions must be configured before working or +getting assigned to VMs/Containers. +The configuration involves allocating the number of hardware queues, +priorities, load balance, bandwidth and other settings necessary for +the device to perform FEC functions. + +This configuration needs to be executed at least once after reboot or +PCI FLR and can be achieved by using the functions +``rte_acc_configure()``, which sets up the parameters defined in thecompatible ``rte_acc_conf`` structure.
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ + +Test Application +---------------- + +The bbdev class is provided with a test application, +``test-bbdev.py`` and range of test data for testing the +functionality of the device, depending on the device's capabilities. +The test application is located under app/test-bbdev folder and hasdoc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+the following options: + +.. code-block:: console + + "-p", "--testapp-path": specifies path to the bbdev test app. + "-e", "--eal-params": EAL arguments which are passed to the test app. + "-t", "--timeout": Timeout in seconds (default=300). + "-c", "--test-cases": Defines test cases to run. Run all if not specified. + "-v", "--test-vector": Test vector path. + "-n", "--num-ops": Number of operations to process on device(default=32).
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ "-b", "--burst-size": Operations enqueue/dequeue burst size (default=32). + "-s", "--snr": SNR in dB used when generating LLRs for bler tests. + "-s", "--iter_max": Number of iterations for LDPC decoder. + "-l", "--num-lcores": Number of lcores to run (default=16). + "-i", "--init-device": Initialise PF device with default values. + + +To execute the test application tool using simple decode or encode +data, type one of the following:doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +.. code-block:: console + + ./test-bbdev.py -c validation -n 64 -b 1 -v ./ldpc_dec_default.data + ./test-bbdev.py -c validation -n 64 -b 1 -v ./ldpc_enc_default.data + + +The test application ``test-bbdev.py``, supports the ability to +configure the PF device with a default set of values, if the "-i" or +"- -init-device" option is included. The default values are defined in
test_bbdev_perf.c.doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ + +Test Vectors +~~~~~~~~~~~~ + +In addition to the simple LDPC decoder and LDPC encoder tests, bbdev +also provides a range of additional tests under the test_vectors +folder, which may be useful. +The results of these tests will depend on the device capabilities +which may cause some test cases to be skipped, but no failure should bereported.
doc/guides/bbdevs/vrb2.rst
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ + +Alternate Baseband Device configuration tool +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +On top of the embedded configuration feature supported in test-bbdev +using +"- -init-device" option mentioned above, there is also a tool +available to perform that device configuration using a companionapplication.
Quoted 19 lines
doc/guides/bbdevs/vrb2.rst new file +13
-0+The ``pf_bb_config`` application notably enables then to run +bbdev-test from the VF and not only limited to the PF as captured above. + +See for more details: https://github.com/intel/pf-bb-config + +Specifically for the bbdev Intel vRAN Boost v2 PMD, the command below +can be used (note that ACC200 was used previously to refer to VRB2): + +.. code-block:: console + + pf_bb_config VRB2 -c ./vrb2/vrb2_config_vf_5g.cfg + test-bbdev.py -e="-c 0xff0 -a${VF_PCI_ADDR}" -c validation -n 64 + -b 64 -l 1 -v ./ldpc_dec_default.datadoc/guides/rel_notes/release_23_11.rst +0
-0doc/guides/rel_notes/release_23_11.rst New Features · line 83
Quoted 6 lines
doc/guides/rel_notes/release_23_11.rst +3
-0@@ -78,6 +78,9 @@ New Features * build: Optional libraries can now be selected with the new ``enable_libs`` build option similarly to the existing ``enable_drivers`` build option. +* **Updated Intel vRAN Boost bbdev PMD.** + + Added support for the new Intel vRAN Boost v2 device variant (GNR-D)within the unified driver.
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev,
Quoted 99 lines
doc/guides/rel_notes/release_23_11.rst +0
-0Removed Items -------------drivers/baseband/acc/acc_common.h +4
-0@@ -18,6 +18,7 @@#define ACC_DMA_BLKID_OUT_HARQ 3#define ACC_DMA_BLKID_IN_HARQ 3#define ACC_DMA_BLKID_IN_MLD_R 3 +#define ACC_DMA_BLKID_DEWIN_IN 3/* Values used in filling in decode FCWs */ #define ACC_FCW_TD_VER 1@@ -103,6 +104,9 @@#define ACC_MAX_NUM_QGRPS 32#define ACC_RING_SIZE_GRANULARITY 64#define ACC_MAX_FCW_SIZE 128 +#define ACC_IQ_SIZE 4 + +#define ACC_FCW_FFT_BLEN_3 28/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define ACC_N_ZC_1 66 /* N = 66 Zc for BG 1 */ @@ -132,6 +136,11 @@#define ACC_LIM_21 14 /* 0.21 */ #define ACC_LIM_31 20 /* 0.31 */ #define ACC_MAX_E (128 * 1024 - 2)drivers/baseband/acc/acc_common.h +5
-0+#define ACC_MAX_CS 12 + +#define ACC100_VARIANT 0 +#define VRB1_VARIANT 2 +#define VRB2_VARIANT 3/* Helper macro for logging */ #define rte_acc_log (level, fmt, ...) \ @@ -332,6 +341,37 @@ struct
__rte_packedacc_fcw_fft{
res:19;
};drivers/baseband/acc/acc_common.h +39
-8+/* FFT Frame Control Word. */ +struct __rte_packed acc_fcw_fft_3 { + uint32_t in_frame_size:16, + leading_pad_size:16; + uint32_t out_frame_size:16, + leading_depad_size:16; +uint32_t cs_window_sel; + uint32_t cs_window_sel2:16, + cs_enable_bmap:16; + uint32_t num_antennas:8, + idft_size:8, + dft_size:8, + cs_offset:8; + uint32_t idft_shift:8, + dft_shift:8, + cs_multiplier:16; + uint32_t bypass:2, + fp16_in:1, + fp16_out:1, + exp_adj:4, + power_shift:4, + power_en:1, + enable_dewin:1, + freq_resample_mode:2, + depad_ouput_size:16; +uint16_t cs_theta_0[ACC_MAX_CS ]; +uint32_t cs_theta_d[ACC_MAX_CS ]; +int8_t cs_time_offset[ACC_MAX_CS ]; +}; + +/* MLD-TS Frame Control Word */ struct __rte_packed acc_fcw_mldts { uint32_t fcw_version:4,@@ -473,14 +513,14 @@ union acc_info_ring_data { uint16_t valid: 1; };struct { -uint32_t aq_id_3:6 ; -uint32_t qg_id_3:5 ; -uint32_t vf_id_3:6 ; -uint32_t int_nb_3:6 ; -uint32_t msi_0_3:1 ; -uint32_t vf2pf_3:6 ; -uint32_t loop_3:1 ; -uint32_t valid_3:1 ; +uint32_t aq_id_vrb2:6 ; +uint32_t qg_id_vrb2:5 ; +uint32_t vf_id_vrb2:6 ; +uint32_t int_nb_vrb2:6 ; +uint32_t msi_0_vrb2:1 ; +uint32_t vf2pf_vrb2:6 ; +uint32_t loop_vrb2:1 ; +uint32_t valid_vrb2:1 ; }; } __rte_packed;@@ -765,16 +805,20 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev,struct
acc_device*d,drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
Quoted 5 lines
drivers/baseband/acc/acc_common.h +1
-1*/ static inline uint16_t get_queue_id_from_ring_info (struct rte_bbdev_data *data, -const union acc_info_ring_data ring_data) + const union acc_info_ring_data ring_data, uint16_t
device_variant)
Quoted 2 lines
The device variant ID should be derived from the data, which stores device private pointer. No need to add an extra parameter.
the device variant comes from directly forom dev-> not from dev->data.
Quoted 14 lines
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
Quoted 5 lines
drivers/baseband/acc/acc_common.h +2
-0{uint16_t queue_id; +struct acc_queue *acc_q; + uint16_t vf_id = (device_variant == VRB2_VARIANT) ?ring_data.vf_id_vrb2 : ring_data.vf_id;
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, · line 813
Quoted 1 line
drivers/baseband/acc/acc_common.h +1
-0+ uint16_t aq_id = (device_variant == VRB2_VARIANT) ?ring_data.aq_id_vrb2 : ring_data.aq_id;
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, · line 815
Quoted 2 lines
drivers/baseband/acc/acc_common.h +2
-0+uint16_t qg_id = (device_variant ==VRB2_VARIANT ) ? +ring_data.qg_id_vrb2 : ring_data.qg_id;Wouldn't it be better to have an intermediate representation, and each variant implements a callback to fill it?
Quoted 3 lines
It will become messy otherwise when other variants will be added.
Something like the existing
queue_offsetcallback would be great.
ok fair enough.
Quoted 21 lines
drivers/baseband/acc/acc_common.h get_num_cbs_in_tb_ldpc_enc(struct
Quoted 17 lines
drivers/baseband/acc/acc_common.h +5
-5for (queue_id =0 ; queue_id < data->num_queues; ++queue_id) { -struct acc_queue *acc_q = - data->queues[queue_id].queue_private; -if (acc_q !=NULL && acc_q->aq_id == ring_data.aq_id && - acc_q->qgrp_id == ring_data.qg_id && - acc_q->vf_id == ring_data.vf_id) + acc_q = data->queues[queue_id].queue_private; + +if (acc_q !=NULL && acc_q->aq_id == aq_id && + acc_q->qgrp_id == qg_id && + acc_q->vf_id == vf_id)return queue_id; }@@ -1436,4 +1480,16 @@ get_num_cbs_in_tb_ldpc_enc(struct
rte_bbdev_op_ldpc_enc*ldpc_enc)Quoted 3 lines
drivers/baseband/acc/acc_common.h +0
-0return cbs_in_tb; }
Quoted 12 lines
drivers/baseband/acc/acc_common.h get_num_cbs_in_tb_ldpc_enc(struct rte_bbdev_op_ldpc_enc *ldpc_enc) · line 1492
Quoted 9 lines
drivers/baseband/acc/acc_common.h +9
-0+#ifdef RTE_LIBRTE_BBDEV_DEBUG +static inline void +acc_memdump (const char *string,void *buf,uint16_t bytes) { +printf ("%s\n" , string); +uint32_t *data = buf; +uint16_t i; +for (i =0 ; i < bytes /4 ; i++) +printf ("0x%08X\n" , data[i]); +}For consistency and to avoid code dumplication, please use
rte_memdump()directly as you did in ACC100.
I can do for now, it is just that for format is quite poor. Will change.
Quoted 252 lines
drivers/baseband/acc/rte_acc100_pmd.c acc100_pf_interrupt_handler(struct rte_bbdev *dev) · line 296
Quoted 13 lines
drivers/baseband/acc/acc_common.h +2
-0+#endif +#endif /* _ACC_COMMON_H_ */ drivers/baseband/acc/rte_acc100_pmd.c +0
-0@@ -294,7 +294,7 @@ acc100_pf_interrupt_handler(struct rte_bbdev *dev)case ACC100_PF_INT_DMA_UL5G_DESC_IRQ :case ACC100_PF_INT_DMA_DL5G_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info(
Quoted 6 lines
drivers/baseband/acc/rte_acc100_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data, acc100_dev- device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR,"Couldn't find queue:
aq_id:%u,
qg_id: %u,vf_id: %u", @@Quoted 4 lines
-348,7 +348,7 @@
acc100_vf_interrupt_handler(struct rte_bbdev *dev)
*/
ring_data->vf_id= 0; deq_intr_det.queue_id =get_queue_id_from_ring_info(
Quoted 6 lines
drivers/baseband/acc/rte_acc100_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data, acc100_dev-
device_variant);
if (deq_intr_det.queue_id ==UINT16_MAX) {
rte_bbdev_log(ERR,
"Couldn't find queue:aq_id:%u,
qg_id: %u", diff --gitdrivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id,
Quoted 6 lines
a/drivers/baseband/acc/rte_vrb_pmd.cb/drivers/baseband/acc/rte_vrb_pmd.c
indexe82ed55ca7..a787592ec9100644drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -37,6 +37,15 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id,
uint8_tqgrp_id,uint16_taq_iddrivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, · line 37
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return ((qgrp_id << 7) + (aq_id << 3) +
VRB1_VfQmgrIngressAq);drivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_id
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0} +static inline uint32_t +vrb2_queue_offset (bool pf_device,uint8_t vf_id,uint8_t qgrp_id, +uint16_t aq_id) { +if (pf_device) + return ((vf_id << 14) + (qgrp_id << 9) + (aq_id << 3) +
VRB2_PfQmgrIngressAq);drivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, · line 46
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + return ((qgrp_id << 9) + (aq_id << 3) +
VRB2_VfQmgrIngressAq); }Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC }; /* Return the accelerator enum for a Queue Group Index. */ @@ -197,7 +206,7 @@ fetch_acc_config(struct rte_bbdev *dev)struct acc_device *d = dev->data->dev_private; struct rte_acc_conf *acc_conf = &d->acc_conf; uint8_t acc, qg;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1-uint32_t reg_aq, reg_len0, reg_len1, reg0, reg1; +uint32_t reg_aq, reg_len0, reg_len1, reg_len2, reg_len3, reg0, reg1, +reg2, reg3;uint32_t reg_mode, idx;struct rte_acc_queue_topology *q_top =NULL ;int qman_func_id[VRB_NUM_ACCS ] = {ACC_ACCMAP_0 ,
ACC_ACCMAP_1, @@drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 8 lines
-219,32 +228,81 @@
fetch_acc_config(struct rte_bbdev *dev)
acc_conf->num_vf_bundles= 1;initQTop(acc_conf);drivers/baseband/acc/rte_vrb_pmd.c +0
-4- reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); - reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); -for (qg =0 ; qg < d->num_qgroups; qg++) { - reg_aq = acc_reg_read(d, d->queue_offset(d->pf_device, 0,qg, 0));
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-3-if (reg_aq &ACC_QUEUE_ENABLE ) { -if (qg <ACC_NUM_QGRPS_PER_WORD ) - idx = (reg0 >> (qg *4 )) &0x7 ; +if (d->device_variant ==VRB1_VARIANT ) { + reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); + reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); +for (qg =0 ; qg < d->num_qgroups; qg++) { + reg_aq = acc_reg_read(d, d->queue_offset(d-
pf_device, 0, qg, 0));drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0+if (reg_aq &ACC_QUEUE_ENABLE ) { +if (qg <ACC_NUM_QGRPS_PER_WORD ) + idx = (reg0 >> (qg *4 )) &0x7 ; +else + idx = (reg1 >> ((qg -
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +13
-0+if (idx <VRB1_NUM_ACCS ) { + acc = qman_func_id[idx]; +updateQtop (acc, qg, acc_conf, d); + } + } + } + +/* Check the depth of the AQs. */ + reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); + reg_len1 =acc_reg_read (d, d->reg_addr->depth_log1_offset); +for (acc =0 ; acc <NUM_ACC ; acc++) { +qtopFromAcc (&q_top, acc, acc_conf); + if (q_top->first_qgroup_index <
ACC_NUM_QGRPS_PER_WORD)drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ q_top->aq_depth_log2 = + (reg_len0 >> (q_top-
first_qgroup_index* 4)) &0xF;
elsedrivers/baseband/acc/rte_vrb_pmd.c +0
-1- idx = (reg1 >> ((qg -
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-3-if (idx <VRB1_NUM_ACCS ) { - acc = qman_func_id[idx]; -updateQtop (acc, qg, acc_conf, d); + q_top->aq_depth_log2 = (reg_len1 >> ((q_top-
first_qgroup_index-
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + }else { + reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); + reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); + reg2 =acc_reg_read (d, d->reg_addr->qman_group_func +8 ); + reg3 =acc_reg_read (d, d->reg_addr->qman_group_func +12 ); +/* printf("Debug Function %08x %08x %08x %08x\n", reg0, reg1, reg2, reg3);*/
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+for (qg =0 ; qg <VRB2_NUM_QGRPS ; qg++) { + reg_aq = acc_reg_read(d, vrb2_queue_offset(d-
pf_device, 0, qg, 0));drivers/baseband/acc/rte_vrb_pmd.c +2
-0+if (reg_aq &ACC_QUEUE_ENABLE ) { +/* printf("Qg enabled %d %x\n", qg, reg_aq);*/
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+if (qg /ACC_NUM_QGRPS_PER_WORD ==0 ) + idx = (reg0 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (qg / ACC_NUM_QGRPS_PER_WORD ==1)
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ idx = (reg1 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (qg / ACC_NUM_QGRPS_PER_WORD ==2)
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ idx = (reg2 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + idx = (reg3 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+if (idx <VRB_NUM_ACCS ) { + acc = qman_func_id[idx]; +updateQtop (acc, qg, acc_conf, d); + }drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-7} } - } -/* Check the depth of the AQs. */ - reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); - reg_len1 =acc_reg_read (d, d->reg_addr->depth_log1_offset); -for (acc =0 ; acc <NUM_ACC ; acc++) { -qtopFromAcc (&q_top, acc, acc_conf); - if (q_top->first_qgroup_index <
ACC_NUM_QGRPS_PER_WORD)drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1- q_top->aq_depth_log2 = (reg_len0 >> (q_top-
first_qgroup_index* 4)) &0xF;drivers/baseband/acc/rte_vrb_pmd.c +0
-2-else - q_top->aq_depth_log2 = (reg_len1 >> ((q_top-
first_qgroup_index-drivers/baseband/acc/rte_vrb_pmd.c +0
-1- ACC_NUM_QGRPS_PER_WORD) * 4))&
0xF;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+/* Check the depth of the AQs. */ + reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); + reg_len1 = acc_reg_read(d, d->reg_addr->depth_log0_offset +4);
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ reg_len2 = acc_reg_read(d, d->reg_addr->depth_log0_offset +8);
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ reg_len3 = acc_reg_read(d, d->reg_addr->depth_log0_offset +12);
drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +for (acc =0 ; acc <NUM_ACC ; acc++) { +qtopFromAcc (&q_top, acc, acc_conf); + if (q_top->first_qgroup_index /
ACC_NUM_QGRPS_PER_WORD== 0)Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ q_top->aq_depth_log2 = (reg_len0 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (q_top->first_qgroup_index /
ACC_NUM_QGRPS_PER_WORD== 1)Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ q_top->aq_depth_log2 = (reg_len1 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (q_top->first_qgroup_index /
ACC_NUM_QGRPS_PER_WORD== 2)Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ q_top->aq_depth_log2 = (reg_len2 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + q_top->aq_depth_log2 = (reg_len3 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 346
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-2+ } }/* Read PF mode. */ @@ -341,18 +399,29 @@ vrb_check_ir(struct acc_device *acc_dev) ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &ACC_INFO_RING_MASK );while (ring_data->valid) { - if ((ring_data->int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( - ring_data->int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 347
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-1- rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-3- ring_data->int_nb, ring_data- detailed_info); -/* Initialize Info Ring entry and move forward. */ - ring_data->val =0 ; +if (acc_dev->device_variant ==VRB1_VARIANT ) { + if ((ring_data->int_nb <
ACC_PF_INT_DMA_DL_DESC_IRQ) || (drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 406
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 407
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 410
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ ring_data->int_nb, ring_data- detailed_info); +/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ ring_data->val =0 ; + } + }else {/* VRB2_VARIANT */ + if ((ring_data->int_nb_vrb2 <
ACC_PF_INT_DMA_DL_DESC_IRQ) || (drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 415
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb_vrb2 >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 416
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 417
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb_vrb2,
ring_data->val);drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 418
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 420
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ ring_data->val =0 ; + }Same as
get_queue_id_from_ring_info().
Having a callback to get the different parameters (int_nb,vf_id, ...) implemented by each variant would avoid duplication like above.
Quoted 2 lines
It would make it more easier to add new variants, i.e. just implement the callback without needing to patch every function making use of these info.
ok, fair enough.
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0} info_ring_head++; ring_data = acc_dev->info_ring + (info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 427
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0} } +Remove new line.
ok
Quoted 14 lines
Quoted 14 lines
/* Interrupt handler triggered by dev for handling specific interrupt. */ static void
vrb_dev_interrupt_handler(void *cb_arg)@@ -361,16 +430,22 @@vrb_dev_interrupt_handler(void *cb_arg)
structacc_device*acc_dev=dev->data->dev_private; volatile unionacc_info_ring_data*ring_data;
structacc_deq_intr_detailsdeq_intr_det;drivers/baseband/acc/rte_vrb_pmd.c +2
-0+uint16_t vf_id, aq_id, qg_id, int_nb; +bool isVrb1 = (acc_dev->device_variant ==VRB1_VARIANT ); ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &
ACC_INFO_RING_MASK);
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg)
Quoted 4 lines
while (ring_data->valid) {drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ vf_id = isVrb1 ? ring_data->vf_id : ring_data->vf_id_vrb2; + aq_id = isVrb1 ? ring_data->aq_id : ring_data->aq_id_vrb2; + qg_id = isVrb1 ? ring_data->qg_id : ring_data->qg_id_vrb2; > +int_nb = isVrb1 ? ring_data->int_nb : ring_data->int_nb_vrb2;Same comment as above.
ok
Quoted 53 lines
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 4 lines
if (acc_dev->pf_device) { rte_bbdev_log_debug(drivers/baseband/acc/rte_vrb_pmd.c +0
-1- "VRB1 PF Interrupt received, Info Ringdata: 0x%x -> %d",
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- ring_data->val, ring_data->int_nb); + "PF Interrupt received, Info Ring data:0x%x -> %d",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 455
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1+ ring_data->val, int_nb); -switch (ring_data->int_nb) { +switch (int_nb) {case ACC_PF_INT_DMA_DL_DESC_IRQ :case ACC_PF_INT_DMA_UL_DESC_IRQ :case ACC_PF_INT_DMA_FFT_DESC_IRQ :@@ -378,13 +453,11 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_PF_INT_DMA_DL5G_DESC_IRQ :case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info(
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 456
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data,
acc_dev->device_variant);drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 459
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue:
aq_id: %u,qg_id: %u,vf_id: %u",drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 399
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-4- ring_data->aq_id, - ring_data->qg_id, - ring_data->vf_id); + aq_id, qg_id, vf_id);return ; } rte_bbdev_pmd_callback_process(dev,@@ -396,9 +469,9 @@ vrb_dev_interrupt_handler(void *cb_arg) } }else { rte_bbdev_log_debug( - "VRB1 VF Interrupt received, Info Ringdata: 0x%x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 472
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ "VRB VF Interrupt received, Info Ringdata: 0x%x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 481
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ring_data->val); -switch (ring_data->int_nb) { +switch (int_nb) {case ACC_VF_INT_DMA_DL_DESC_IRQ :case ACC_VF_INT_DMA_UL_DESC_IRQ :case ACC_VF_INT_DMA_FFT_DESC_IRQ :@@ -406,14 +479,16 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_VF_INT_DMA_DL5G_DESC_IRQ :case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 482
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- ring_data->vf_id =0 ; + if (acc_dev->device_variant ==
VRB1_VARIANT)drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 485
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ ring_data->vf_id =0 ; + else + ring_data->vf_id_vrb2 = 0;Ditto, you also need a way to set these fields in a generic way.
ok
Quoted 41 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 486
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0deq_intr_det.queue_id =get_queue_id_from_ring_info(
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 487
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data,
acc_dev->device_variant);drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 490
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue:
aq_id: %u,qg_id: %u",drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 432
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-4- ring_data->aq_id, - ring_data->qg_id); + aq_id, qg_id);return ; } rte_bbdev_pmd_callback_process(dev,@@ -428,8 +503,7 @@ vrb_dev_interrupt_handler(void *cb_arg)/* Initialize Info Ring entry and move forward. */ ring_data->val =0 ; ++acc_dev->info_ring_head; - ring_data = acc_dev->info_ring + - (acc_dev->info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 464
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1+ ring_data = acc_dev->info_ring + (acc_dev->info_ring_head & +ACC_INFO_RING_MASK ); } }@@ -461,7 +535,10 @@ allocate_info_ring(struct rte_bbdev *dev) phys_low = (uint32_t )(info_ring_iova);acc_reg_write (d, d->reg_addr->info_ring_hi, phys_high);acc_reg_write (d, d->reg_addr->info_ring_lo, phys_low); - acc_reg_write(d, d->reg_addr->info_ring_en,
VRB1_REG_IRQ_EN_ALL);drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 539
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+if (d->device_variant ==VRB1_VARIANT ) + acc_reg_write(d, d->reg_addr->info_ring_en,
VRB1_REG_IRQ_EN_ALL);drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 541
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + acc_reg_write(d, d->reg_addr->info_ring_en,
VRB2_REG_IRQ_EN_ALL);
Quoted 5 lines
My guess is the mask value difference between the two is the VRB2 added MLD-TS related interrupts, is it?
If so, it would be more future proof to configure this based on the device capabilities instead of its variant?
There are some differences in these implementations, best to to keep them separate.
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0d->info_ring_head = (acc_reg_read (d, d->reg_addr->info_ring_ptr) &0xFFF ) /sizeof (union acc_info_ring_data );return 0 ;@@ -516,6 +593,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t
num_queues, intsocket_id)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 596
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0phys_high = (uint32_t )(d->sw_rings_iova >>32 ); phys_low = (uint32_t )(d->sw_rings_iova & ~(ACC_SIZE_64MBYTE -1 )); +Remove new line.
ok
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Read the populated cfg from device registers. */ fetch_acc_config (dev);@@ -540,6 +618,10 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t
num_queues, intsocket_id)
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 623
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0acc_reg_write (d, d->reg_addr->dma_ring_dl4g_lo, phys_low);acc_reg_write (d, d->reg_addr->dma_ring_fft_hi, phys_high);acc_reg_write (d, d->reg_addr->dma_ring_fft_lo, phys_low); +if (d->device_variant ==VRB2_VARIANT ) { +acc_reg_write (d, d->reg_addr->dma_ring_mld_hi, phys_high); +acc_reg_write (d, d->reg_addr->dma_ring_mld_lo, phys_low);Same, wouldn't it be more future-proof to set this based on the capabilities of the device and not its variant?
Checking capability on the fly would be cumbersome I think. I dont see problem related to next gen extension for this. Thanks
Quoted 64 lines
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ }/* * Configure Ring Size to the max queue ring size * (used for wrapping purpose). drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t · line 636
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-2@@ -549,8 +631,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)/* Configure tail pointer for use when SDONE enabled. */ if (d->tail_ptrs ==NULL ) - d->tail_ptrs = rte_zmalloc_socket( - dev->device->driver->name, + d->tail_ptrs = rte_zmalloc_socket(dev->device->driver->name, VRB_MAX_QGRPS * VRB_MAX_AQS *
sizeof(uint32_t),drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0RTE_CACHE_LINE_SIZE, socket_id);if (d->tail_ptrs == NULL) {drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -574,6 +655,10 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t
num_queues, intsocket_id)drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 661
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0acc_reg_write (d, d->reg_addr->tail_ptrs_dl4g_lo, phys_low);acc_reg_write (d, d->reg_addr->tail_ptrs_fft_hi, phys_high);acc_reg_write (d, d->reg_addr->tail_ptrs_fft_lo, phys_low); +if (d->device_variant ==VRB2_VARIANT ) { +acc_reg_write (d, d->reg_addr->tail_ptrs_mld_hi, phys_high); +acc_reg_write (d, d->reg_addr->tail_ptrs_mld_lo, phys_low); + }Ditto.
Quoted 15 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-4ret =allocate_info_ring (dev);if (ret <0 ) {@@ -671,10 +756,17 @@ vrb_intr_enable(struct rte_bbdev *dev)return ret; } -if (acc_dev->pf_device) - max_queues =VRB1_MAX_PF_MSIX ; -else - max_queues =VRB1_MAX_VF_MSIX ; +if (d->device_variant ==VRB1_VARIANT ) { +if (acc_dev->pf_device) + max_queues =VRB1_MAX_PF_MSIX ; +else drivers/baseband/acc/rte_vrb_pmd.c vrb_intr_enable(struct rte_bbdev *dev) · line 772
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ max_queues =VRB1_MAX_VF_MSIX ; + }else { +if (acc_dev->pf_device) + max_queues =VRB2_MAX_PF_MSIX ; +else + max_queues =VRB2_MAX_VF_MSIX ; + }if (rte_intr_efd_enable (dev->intr_handle, max_queues)) { rte_bbdev_log(ERR, "Failed to create fds for %uqueues", @@
Quoted 3 lines
-776,7 +868,10 @@ vrb_find_free_queue_idx(struct
rte_bbdev*dev,
/* Mark the Queue as assigned. */ d->q_assigned_bit_map[group_idx] |= (1ULL <<
aq_idx);drivers/baseband/acc/rte_vrb_pmd.c vrb_find_free_queue_idx(struct rte_bbdev *dev,
Quoted 4 lines
/* Report the AQ Index. */
drivers/baseband/acc/rte_vrb_pmd.c +2
-1-return (group_idx <<VRB1_GRP_ID_SHIFT ) + aq_idx; +if (d->device_variant ==VRB1_VARIANT ) + return (group_idx << VRB1_GRP_ID_SHIFT) +
aq_idx;
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + return (group_idx << VRB2_GRP_ID_SHIFT) +
aq_idx;This is the same bitmap as in
acc_info_ring_data, isn't it? We could maybe share some code to to the decoding as suggested ealier in this patch.
you mean just to add an inline function for the grp_id_shift(variant) right? fair enough
Quoted 22 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 5 lines
} } rte_bbdev_log(INFO, "Failed to find free queue on %s, priority %u",drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -819,6 +914,9 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 914
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ACC_FCW_LD_BLEN : (conf->op_type ==
RTE_BBDEV_OP_FFT?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0ACC_FCW_FFT_BLEN : ACC_FCW_MLDTS_BLEN)))); + if ((q->d->device_variant == VRB2_VARIANT) && (conf->op_type ==
RTE_BBDEV_OP_FFT))drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ fcw_len =ACC_FCW_FFT_BLEN_3 ; +for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx; desc->req.word0 = ACC_DMA_DESC_TYPE; @@ -915,9+1013,16 @@
Quoted 4 lines
vrb_queue_setup(struct
rte_bbdev*dev,uint16_tqueue_id,
}
}
Quoted 15 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, · line 1025
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +10
-3- q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; - q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; - q->aq_id = q_idx &0xF ; +if (d->device_variant ==VRB1_VARIANT ) { + q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; + q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; + q->aq_id = q_idx &0xF ; + }else { + q->qgrp_id = (q_idx >>VRB2_GRP_ID_SHIFT ) &0x1F ; + q->vf_id = (q_idx >>VRB2_VF_ID_SHIFT ) &0x3F ; + q->aq_id = q_idx &0x3F ; + } +Same remark as before.
yes, still valid
Quoted 156 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct
Quoted 5 lines
q->aq_depth = 0; if (conf->op_type == RTE_BBDEV_OP_TURBO_DEC) q->aq_depth = (1 << d->acc_conf.q_ul_4g.aq_depth_log2);drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1149,6 +1254,127 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
rte_bbdev_driver_info*dev_info)drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +6
-0RTE_BBDEV_END_OF_CAPABILITIES_LIST () }; +static const struct rte_bbdev_op_cap vrb2_bbdev_capabilities[] = { + { + .type =RTE_BBDEV_OP_TURBO_DEC , + .cap.turbo_dec = { + .capability_flags = +
RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1264
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_CRC_TYPE_24B | +RTE_BBDEV_TURBO_DEC_CRC_24B_DROP |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1266
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_EQUALIZER | +
RTE_BBDEV_TURBO_SOFT_OUT_SATURATE|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1267
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_HALF_ITERATION_EVEN|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1268
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1270
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_SOFT_OUTPUT | +
RTE_BBDEV_TURBO_EARLY_TERMINATION|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1271
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_DEC_INTERRUPTS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1272
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1273
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1275
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_MAP_DEC | +RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1276
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_DEC_SCATTER_GATHER,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ .max_llr_modulus = INT8_MAX, + .num_buffers_src = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_hard_out = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1283
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_soft_out = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + }, + { + .type = RTE_BBDEV_OP_TURBO_ENC, + .cap.turbo_enc = { + .capability_flags = +
RTE_BBDEV_TURBO_CRC_24B_ATTACH|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1291
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_RV_INDEX_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1293
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_RATE_MATCH | +
RTE_BBDEV_TURBO_ENC_INTERRUPTS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1294
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_ENC_SCATTER_GATHER,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1296
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_src = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1298
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +8
-0+ } + }, + { + .type = RTE_BBDEV_OP_LDPC_ENC, + .cap.ldpc_enc = { + .capability_flags = +RTE_BBDEV_LDPC_RATE_MATCH | +RTE_BBDEV_LDPC_CRC_24B_ATTACH |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1307
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_INTERLEAVER_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1308
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_LDPC_ENC_INTERRUPTS |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1309
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_ENC_SCATTER_GATHER|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1310
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_ENC_CONCATENATION,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1312
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1314
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +11
-0+ } + }, + { + .type = RTE_BBDEV_OP_LDPC_DEC, + .cap.ldpc_dec = { + .capability_flags = +RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK | +RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1326
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1327
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | + RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +
RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1331
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION | > + RTE_BBDEV_LDPC_LLR_COMPRESSION | > + RTE_BBDEV_LDPC_SOFT_OUT_ENABLE |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +
RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0+ RTE_BBDEV_LDPC_DEC_INTERRUPTS, + .llr_size = 8, + .llr_decimals = 2, + .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_hard_out = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +8
-0+ .num_buffers_soft_out = 0, + } + }, + { + .type = RTE_BBDEV_OP_FFT, + .cap.fft = { + .capability_flags = +
RTE_BBDEV_FFT_WINDOWING|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1349
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_CS_ADJUSTMENT|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1350
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_DFT_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1351
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_IDFT_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1352
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_FFT_FP16_INPUT |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1353
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_FFT_FP16_OUTPUT |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1354
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_POWER_MEAS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1355
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_WINDOWING_BYPASS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1357
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1359
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,Is that a copy/pasta error or is it expected to have LDPC defines in FFT capabilities?
I need to change that, this is not quite correct actually even previously. Probably through other serie though. No one uses this currently.
Quoted 59 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +9
-0+ } + }, + { + .type = RTE_BBDEV_OP_MLDTS, + .cap.fft = { + .capability_flags = + RTE_BBDEV_MLDTS_REP, + .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1370
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,Same question here, that looks suspicious but maybe I'm wrong.
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0+ } + }, +RTE_BBDEV_END_OF_CAPABILITIES_LIST () + }; +static struct rte_bbdev_queue_conf default_queue_conf; default_queue_conf.socket = dev->data->socket_id; default_queue_conf.queue_size = ACC_MAX_QUEUE_DEPTH; @@ -1193,7
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1379
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+1419,10 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
rte_bbdev_driver_info*dev_info)Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1dev_info->default_queue_conf = default_queue_conf; dev_info->cpu_flag_reqs =NULL ; dev_info->min_alignment =1 ; - dev_info->capabilities = vrb1_bbdev_capabilities; +if (d->device_variant ==VRB1_VARIANT ) + dev_info->capabilities = vrb1_bbdev_capabilities; +else + dev_info->capabilities = vrb2_bbdev_capabilities; dev_info->harq_buffer_size =0 ;vrb_check_ir (d);drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = { · line 1472
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1242,6 +1471,9 @@ static struct rte_pci_id pci_id_vrb_pf_map[] = { { RTE_PCI_DEVICE(RTE_VRB1_VENDOR_ID,
RTE_VRB1_PF_DEVICE_ID)drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = {
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0}, + { + RTE_PCI_DEVICE(RTE_VRB2_VENDOR_ID,
RTE_VRB2_PF_DEVICE_ID)drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_vf_map[] = { · line 1483
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ }, {.device_id = 0}, };@@ -1250,6 +1482,9 @@ static struct rte_pci_id pci_id_vrb_vf_map[] = { { RTE_PCI_DEVICE(RTE_VRB1_VENDOR_ID,
RTE_VRB1_VF_DEVICE_ID)drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = {
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0}, + { + RTE_PCI_DEVICE(RTE_VRB2_VENDOR_ID,
RTE_VRB2_VF_DEVICE_ID)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = { · line 1479
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ }, {.device_id = 0}, };I'm stopping the review here for now.
Thanks expecting a v3 this week based on your suggestions.
Quoted 3 lines
Thanks,
Maxime
Re: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variant
Quoted 7 lines · Nicolas
Quoted 5 lines
Quoted 3 lines
+Bind PF UIO driver(s)
+~~~~~~~~~~~~~~~~~~~~~Please document with VFIO instead of
IGB_UIO, which is being deprecated.There are still some deployment with
igb_uio, so keeping for a bit. Then we can remove in all documentations.
igb_uio has been removed 3 years ago and is (barely) maintained. This "deployment" (considering we are talking about new hardware installed probably on a brand new platform, I am a bit surprised to read this) should really switch to in-tree drivers.
On the form of this doc, let me remind that there is a common doc (see _linux_gsg_binding_kernel) and this must be preferred rather than copy/paste those blocks about device binding.
Thanks.
Signature · 1 line
David Marchand
Re: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variant
In reply to Chautru, NicolasQuoted 41 lines · Nicolas
Hi Maxime,
Quoted 39 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, September 27, 2023 6:40 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 6/7] baseband/acc: introduce the new VRB2 variantQuoted 16 lines · Nicolas Chautru
This extends the unified driver to support both the VRB1 and VRB2 implementations of Intel vRAN Boost.
Signed-off-by Nicolas Chautru <[email protected]>--- doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/vrb2.rst | 269 +++++ doc/guides/rel_notes/release_23_11.rst | 3 + drivers/baseband/acc/acc_common.h | 84 +- drivers/baseband/acc/rte_acc100_pmd.c | 4 +- drivers/baseband/acc/rte_vrb_pmd.c | 1442 +++++++++++++++++++++--- drivers/baseband/acc/vrb1_pf_enum.h | 17 +- drivers/baseband/acc/vrb2_pf_enum.h | 124 ++ drivers/baseband/acc/vrb2_vf_enum.h | 121 ++ drivers/baseband/acc/vrb_pmd.h | 161 ++- 10 files changed, 2062 insertions(+), 164 deletions(-)Quoted 3 lines
create mode 100644
doc/guides/bbdevs/vrb2.rstcreate mode 100644drivers/baseband/acc/vrb2_pf_enum.hcreate mode 100644drivers/baseband/acc/vrb2_vf_enum.hAs a general comment, the review process would be easier if the patch was split by features introduced:
- Base init, no capabilities exposed
- Add LDPC capabilities and related code
- ADD FFT capabilities and related code
- MLD-TS ...
Quoted 4 lines
Quoted 2 lines
We had this very discussion last week at the techboard for a Net PMD, and it was a shared opinion across the board.
Yes I realize there is more code that I first thought. Will do in v3.
Thanks, much appreciated!
Quoted 190 lines
Quoted 181 lines
Quoted 19 lines
doc/guides/bbdevs/index.rst +1
-0@@ -15,4 +15,5 @@ Baseband Device Drivers fpga_5gnr_fec acc100 vrb1 + vrb2 la12xxdoc/guides/bbdevs/vrb2.rst new file +3
-0@@ -0,0 +1,269 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2023 Intel Corporation +doc/guides/bbdevs/vrb2.rst line 13
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+.. include:: <isonum.txt> + +Intel\ |reg| vRAN Boost v2 Poll Mode Driver (PMD) +================================================= + +The Intel\ |reg| vRAN Boost integrated accelerator enables +cost-effective 4G and 5G next-generation virtualized Radio Access +Network (vRAN) solutions. +The Intel vRAN Boost v2.0 (VRB2 in the code) is specifically +integrated on the Intel\ |reg| Xeon\ |reg| Granite Rapids-D Process (GNR-D).
doc/guides/bbdevs/vrb2.rst line 23
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +Features +-------- + +Intel vRAN Boost v2.0 includes a 5G Low Density Parity Check (LDPC) +encoder/decoder, rate match/dematch, Hybrid Automatic Repeat Request +(HARQ) with access to DDR memory for buffer management, a 4G Turbo +encoder/decoder, a Fast Fourier Transform (FFT) block providing +DFT/iDFT processing offload for the 5G Sounding Reference Signal +(SRS), a MLD-TS accelerator, a Queue Manager (QMGR), and a DMAsubsystem.
doc/guides/bbdevs/vrb2.rst line 24
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+There is no dedicated on-card memory for HARQ, the coherent memory onthe CPU side is being used.
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ +These hardware blocks provide the following features exposed by the PMD: + +- LDPC Encode in the Downlink (5GNR) +- LDPC Decode in the Uplink (5GNR) +- Turbo Encode in the Downlink (4G) +- Turbo Decode in the Uplink (4G) +- FFT processing +- MLD-TS processingdoc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+- Single Root I/O Virtualization (SR-IOV) with 16 Virtual Functions +(VFs) per Physical Function (PF) +- Maximum of 2048 queues per VF +- Message Signaled Interrupts (MSIs) + +The Intel vRAN Boost v2.0 PMD supports the following bbdev capabilities: + +* For the LDPC encode operation: + - ``RTE_BBDEV_LDPC_CRC_24B_ATTACH``: set to attach CRC24B to CB(s). + - ``RTE_BBDEV_LDPC_RATE_MATCH``: if set then do not do Rate Matchbypass.
doc/guides/bbdevs/vrb2.rst line 44
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_INTERLEAVER_BYPASS``: if set then bypassinterleaver.
doc/guides/bbdevs/vrb2.rst line 45
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_ENC_SCATTER_GATHER``: supports scatter-gatherfor input/output data.
doc/guides/bbdevs/vrb2.rst line 46
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_ENC_CONCATENATION``: concatenate code blockswith bit granularity.
doc/guides/bbdevs/vrb2.rst
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +4
-0+ +* For the LDPC decode operation: + - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK``: check CRC24B from CB(s). + - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP``: drops CRC24B bitsappended while decoding.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ - ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK``: check CRC24A from CB(s). + - ``RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK``: check CRC16 from CB(s). + - ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE``: provides an input forHARQ combining.
doc/guides/bbdevs/vrb2.rst line 54
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE``: provides an inputfor HARQ combining.
doc/guides/bbdevs/vrb2.rst line 55
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE``: disable earlytermination.
doc/guides/bbdevs/vrb2.rst line 56
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER``: supports scatter-gatherfor input/output data.
doc/guides/bbdevs/vrb2.rst line 57
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION``: supportscompression of the HARQ input/output.
doc/guides/bbdevs/vrb2.rst line 58
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_LLR_COMPRESSION``: supports LLR inputcompression.
doc/guides/bbdevs/vrb2.rst line 59
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION``: supportscompression of the HARQ input/output.
doc/guides/bbdevs/vrb2.rst line 61
Quoted 2 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+ - ``RTE_BBDEV_LDPC_SOFT_OUT_ENABLE``: set the APP LLR soft output. + - ``RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS``: set the APP LLR softoutput after rate-matching.
doc/guides/bbdevs/vrb2.rst line 62
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS``: disables thede-interleaver.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ +* For the turbo encode operation: + - ``RTE_BBDEV_TURBO_CRC_24B_ATTACH``: set to attach CRC24B toCB(s).
doc/guides/bbdevs/vrb2.rst line 66
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_RATE_MATCH``: if set then do not do Rate Matchbypass.
doc/guides/bbdevs/vrb2.rst line 67
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_ENC_INTERRUPTS``: set for encoder dequeueinterrupts.
doc/guides/bbdevs/vrb2.rst line 69
Quoted 2 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+ - ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS``: set to bypass RV index. + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``: supports scatter-gather for input/output data.
doc/guides/bbdevs/vrb2.rst
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +4
-0+ +* For the turbo decode operation: + - ``RTE_BBDEV_TURBO_CRC_TYPE_24B``: check CRC24B from CB(s). + - ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE``: perform subblockde-interleave.
doc/guides/bbdevs/vrb2.rst line 74
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_INTERRUPTS``: set for decoder dequeueinterrupts.
doc/guides/bbdevs/vrb2.rst line 75
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN``: set if negative LLR input issupported.
doc/guides/bbdevs/vrb2.rst line 76
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP``: keep CRC24B bitsappended while decoding.
doc/guides/bbdevs/vrb2.rst line 77
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_CRC_24B_DROP``: option to drop the codeblock CRC after decoding.
doc/guides/bbdevs/vrb2.rst line 78
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_EARLY_TERMINATION``: set early terminationfeature.
doc/guides/bbdevs/vrb2.rst line 79
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``: supports scatter-gather for input/output data.
doc/guides/bbdevs/vrb2.rst line 80
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN``: set half iterationgranularity.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ - ``RTE_BBDEV_TURBO_SOFT_OUTPUT``: set the APP LLR soft output. + - ``RTE_BBDEV_TURBO_EQUALIZER``: set the turbo equalizer feature. + - ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE``: set the soft outputsaturation.
doc/guides/bbdevs/vrb2.rst line 84
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH``: set to run an extraodd iteration after CRC match.
doc/guides/bbdevs/vrb2.rst line 85
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT``: set if negative APPLLR output supported.
doc/guides/bbdevs/vrb2.rst line 86
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_TURBO_MAP_DEC``: supports flexible parallel MAPengine decoding.
doc/guides/bbdevs/vrb2.rst
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +4
-0+ +* For the FFT operation: + - ``RTE_BBDEV_FFT_WINDOWING``: flexible windowing capability. + - ``RTE_BBDEV_FFT_CS_ADJUSTMENT``: flexible adjustment of Cyclic Shifttime offset.
doc/guides/bbdevs/vrb2.rst line 91
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_FFT_DFT_BYPASS``: set for bypass the DFT and getdirectly into iDFT input.
doc/guides/bbdevs/vrb2.rst line 92
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_FFT_IDFT_BYPASS``: set for bypass the IDFT and getdirectly the DFT output.
doc/guides/bbdevs/vrb2.rst line 93
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+ - ``RTE_BBDEV_FFT_WINDOWING_BYPASS``: set for bypass time domainwindowing.
doc/guides/bbdevs/vrb2.rst
Quoted 3 lines
doc/guides/bbdevs/vrb2.rst new file +3
-0+ +* For the MLD-TS operation: + - ``RTE_BBDEV_MLDTS_REP``: set to repeat and reuse channel acrossoperations.
doc/guides/bbdevs/vrb2.rst
Quoted 5 lines
doc/guides/bbdevs/vrb2.rst new file +5
-0+ +Installation +------------ + +Section 3 of the DPDK manual provides instructions on installing andcompiling DPDK.
doc/guides/bbdevs/vrb2.rst line 103
Quoted 2 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+ +DPDK requires hugepages to be configured as detailed in section 2 of theDPDK manual.
doc/guides/bbdevs/vrb2.rst line 104
Quoted 1 line
doc/guides/bbdevs/vrb2.rst new file +1
-0+The bbdev test application has been tested with a configuration 40 x 1GBhugepages.
Quoted 20 lines
doc/guides/bbdevs/vrb2.rst new file +20
-0+The hugepage configuration of a server may be examined using: + +.. code-block:: console + + grep Huge* /proc/meminfo + + +Initialization +-------------- + +When the device first powers up, its PCI Physical Functions (PF) can +be listed through these commands for Intel vRAN Boost v2: + +.. code-block:: console + + sudo lspci -vd8086:57c2 + +The physical and virtual functions are compatible with Linux UIO drivers: +``vfio`` and ``igb_uio``. +However, in order to work the 5G/4G FEC device first needs to beQuoted 8 lines
doc/guides/bbdevs/vrb2.rst line 128
Quoted 6 lines
doc/guides/bbdevs/vrb2.rst new file +5
-0+bound to one of these Linux drivers through DPDK. + + +Bind PF UIO driver(s) +~~~~~~~~~~~~~~~~~~~~~Please document with VFIO instead of
IGB_UIO, which is being deprecated.
Quoted 1 line
There are still some deployment with
igb_uio, so keeping for a bit. Then we can remove in all documentations.
This is a patch for upcoming v23.11 relase, not something that has already been deployed.
I've had internal reports of collegues trying to experiment with BBDEV,
and trying to set it up with unsecure IGB UIO instead of VFIO because the DPDK documentation only provided guidance for IGB UIO.
The upstream documentation should document the best practice, which is, AFAICS, VFIO token for your usecase.
But as suggests David, better to just point to "linux drivers" chapter of the documentation, which already explains that and avoid duplication.
Quoted 275 lines
Quoted 275 lines
doc/guides/bbdevs/vrb2.rst line 131
Quoted 4 lines
doc/guides/bbdevs/vrb2.rst new file +2
-0+Install the DPDK igb_uio driver, bind it with the PF PCI device ID +and use ``lspci`` to confirm the PF device is under use by ``igb_uio`` DPDKUIO driver.
Quoted 13 lines
doc/guides/bbdevs/vrb2.rst new file +13
-0+ +The igb_uio driver may be bound to the PF PCI device using one of two +methods for Intel vRAN Boost v2: + +#. PCI functions (physical or virtual, depending on the use case) can +be bound to the UIO driver by repeating this command for every function. + +.. code-block:: console + + cd <dpdk-top-level-directory> + insmod build/kmod/igb_uio.ko + echo "8086 57c2" > /sys/bus/pci/drivers/igb_uio/new_id + lspci -vd8086:57c2doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +#. Another way to bind PF with DPDK UIO driver is by using the +``dpdk-devbind.py`` tool + +.. code-block:: console + + cd <dpdk-top-level-directory> + usertools/dpdk-devbind.py -b igb_uio 0000:f7:00.0 + +where the PCI device ID (example: 0000:f7:00.0) is obtained using ``lspci -vd8086:57c2``.
doc/guides/bbdevs/vrb2.rst
Quoted 11 lines
doc/guides/bbdevs/vrb2.rst new file +11
-0+ +In a similar way the PF may be bound with vfio-pci as any PCIe device. + + +Enable Virtual Functions +~~~~~~~~~~~~~~~~~~~~~~~~ + +Now, it should be visible in the printouts that PCI PF is under +igb_uio control "``Kernel driver in use: igb_uio``" + +To show the number of available VFs on the device, read ``sriov_totalvfs``file.
Quoted 29 lines
doc/guides/bbdevs/vrb2.rst new file +29
-0+ +.. code-block:: console + + cat /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_totalvfs + +where ``0000\:<b>\:<d>.<f>`` is the PCI device ID + +To enable VFs via igb_uio, echo the number of virtual functions +intended to enable to ``max_vfs`` file. + +.. code-block:: console + + echo <num-of-vfs> > + /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/max_vfs + +Afterwards, all VFs must be bound to appropriate UIO drivers as +required, same way it was done with the physical function previously. + +Enabling SR-IOV via VFIO driver is pretty much the same, except that +the file name is different: + +.. code-block:: console + + echo <num-of-vfs> > + /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_numvfs + + +Configure the VFs through PF +~~~~~~~~~~~~~~~~~~~~~~~~~~~~doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +The PCI virtual functions must be configured before working or +getting assigned to VMs/Containers. +The configuration involves allocating the number of hardware queues, +priorities, load balance, bandwidth and other settings necessary for +the device to perform FEC functions. + +This configuration needs to be executed at least once after reboot or +PCI FLR and can be achieved by using the functions +``rte_acc_configure()``, which sets up the parameters defined in thecompatible ``rte_acc_conf`` structure.
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ + +Test Application +---------------- + +The bbdev class is provided with a test application, +``test-bbdev.py`` and range of test data for testing the +functionality of the device, depending on the device's capabilities. +The test application is located under app/test-bbdev folder and hasdoc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+the following options: + +.. code-block:: console + + "-p", "--testapp-path": specifies path to the bbdev test app. + "-e", "--eal-params": EAL arguments which are passed to the test app. + "-t", "--timeout": Timeout in seconds (default=300). + "-c", "--test-cases": Defines test cases to run. Run all if not specified. + "-v", "--test-vector": Test vector path. + "-n", "--num-ops": Number of operations to process on device(default=32).
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ "-b", "--burst-size": Operations enqueue/dequeue burst size (default=32). + "-s", "--snr": SNR in dB used when generating LLRs for bler tests. + "-s", "--iter_max": Number of iterations for LDPC decoder. + "-l", "--num-lcores": Number of lcores to run (default=16). + "-i", "--init-device": Initialise PF device with default values. + + +To execute the test application tool using simple decode or encode +data, type one of the following:doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ +.. code-block:: console + + ./test-bbdev.py -c validation -n 64 -b 1 -v ./ldpc_dec_default.data + ./test-bbdev.py -c validation -n 64 -b 1 -v ./ldpc_enc_default.data + + +The test application ``test-bbdev.py``, supports the ability to +configure the PF device with a default set of values, if the "-i" or +"- -init-device" option is included. The default values are defined in
test_bbdev_perf.c.doc/guides/bbdevs/vrb2.rst
Quoted 10 lines
doc/guides/bbdevs/vrb2.rst new file +10
-0+ + +Test Vectors +~~~~~~~~~~~~ + +In addition to the simple LDPC decoder and LDPC encoder tests, bbdev +also provides a range of additional tests under the test_vectors +folder, which may be useful. +The results of these tests will depend on the device capabilities +which may cause some test cases to be skipped, but no failure should bereported.
doc/guides/bbdevs/vrb2.rst
Quoted 9 lines
doc/guides/bbdevs/vrb2.rst new file +9
-0+ + +Alternate Baseband Device configuration tool +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +On top of the embedded configuration feature supported in test-bbdev +using +"- -init-device" option mentioned above, there is also a tool +available to perform that device configuration using a companionapplication.
Quoted 19 lines
doc/guides/bbdevs/vrb2.rst new file +13
-0+The ``pf_bb_config`` application notably enables then to run +bbdev-test from the VF and not only limited to the PF as captured above. + +See for more details: https://github.com/intel/pf-bb-config + +Specifically for the bbdev Intel vRAN Boost v2 PMD, the command below +can be used (note that ACC200 was used previously to refer to VRB2): + +.. code-block:: console + + pf_bb_config VRB2 -c ./vrb2/vrb2_config_vf_5g.cfg + test-bbdev.py -e="-c 0xff0 -a${VF_PCI_ADDR}" -c validation -n 64 + -b 64 -l 1 -v ./ldpc_dec_default.datadoc/guides/rel_notes/release_23_11.rst +0
-0doc/guides/rel_notes/release_23_11.rst New Features · line 83
Quoted 6 lines
doc/guides/rel_notes/release_23_11.rst +3
-0@@ -78,6 +78,9 @@ New Features * build: Optional libraries can now be selected with the new ``enable_libs`` build option similarly to the existing ``enable_drivers`` build option. +* **Updated Intel vRAN Boost bbdev PMD.** + + Added support for the new Intel vRAN Boost v2 device variant (GNR-D)within the unified driver.
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev,
Quoted 99 lines
doc/guides/rel_notes/release_23_11.rst +0
-0Removed Items -------------drivers/baseband/acc/acc_common.h +4
-0@@ -18,6 +18,7 @@#define ACC_DMA_BLKID_OUT_HARQ 3#define ACC_DMA_BLKID_IN_HARQ 3#define ACC_DMA_BLKID_IN_MLD_R 3 +#define ACC_DMA_BLKID_DEWIN_IN 3/* Values used in filling in decode FCWs */ #define ACC_FCW_TD_VER 1@@ -103,6 +104,9 @@#define ACC_MAX_NUM_QGRPS 32#define ACC_RING_SIZE_GRANULARITY 64#define ACC_MAX_FCW_SIZE 128 +#define ACC_IQ_SIZE 4 + +#define ACC_FCW_FFT_BLEN_3 28/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define ACC_N_ZC_1 66 /* N = 66 Zc for BG 1 */ @@ -132,6 +136,11 @@#define ACC_LIM_21 14 /* 0.21 */ #define ACC_LIM_31 20 /* 0.31 */ #define ACC_MAX_E (128 * 1024 - 2)drivers/baseband/acc/acc_common.h +5
-0+#define ACC_MAX_CS 12 + +#define ACC100_VARIANT 0 +#define VRB1_VARIANT 2 +#define VRB2_VARIANT 3/* Helper macro for logging */ #define rte_acc_log (level, fmt, ...) \ @@ -332,6 +341,37 @@ struct__rte_packed acc_fcw_fft { res:19; };drivers/baseband/acc/acc_common.h +39
-8+/* FFT Frame Control Word. */ +struct __rte_packed acc_fcw_fft_3 { + uint32_t in_frame_size:16, + leading_pad_size:16; + uint32_t out_frame_size:16, + leading_depad_size:16; +uint32_t cs_window_sel; + uint32_t cs_window_sel2:16, + cs_enable_bmap:16; + uint32_t num_antennas:8, + idft_size:8, + dft_size:8, + cs_offset:8; + uint32_t idft_shift:8, + dft_shift:8, + cs_multiplier:16; + uint32_t bypass:2, + fp16_in:1, + fp16_out:1, + exp_adj:4, + power_shift:4, + power_en:1, + enable_dewin:1, + freq_resample_mode:2, + depad_ouput_size:16; +uint16_t cs_theta_0[ACC_MAX_CS ]; +uint32_t cs_theta_d[ACC_MAX_CS ]; +int8_t cs_time_offset[ACC_MAX_CS ]; +}; + +/* MLD-TS Frame Control Word */ struct __rte_packed acc_fcw_mldts { uint32_t fcw_version:4,@@ -473,14 +513,14 @@ union acc_info_ring_data { uint16_t valid: 1; };struct { -uint32_t aq_id_3:6 ; -uint32_t qg_id_3:5 ; -uint32_t vf_id_3:6 ; -uint32_t int_nb_3:6 ; -uint32_t msi_0_3:1 ; -uint32_t vf2pf_3:6 ; -uint32_t loop_3:1 ; -uint32_t valid_3:1 ; +uint32_t aq_id_vrb2:6 ; +uint32_t qg_id_vrb2:5 ; +uint32_t vf_id_vrb2:6 ; +uint32_t int_nb_vrb2:6 ; +uint32_t msi_0_vrb2:1 ; +uint32_t vf2pf_vrb2:6 ; +uint32_t loop_vrb2:1 ; +uint32_t valid_vrb2:1 ; }; } __rte_packed;@@ -765,16 +805,20 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev,struct
acc_device*d,drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
Quoted 5 lines
drivers/baseband/acc/acc_common.h +1
-1*/ static inline uint16_t get_queue_id_from_ring_info (struct rte_bbdev_data *data, -const union acc_info_ring_data ring_data) + const union acc_info_ring_data ring_data, uint16_t
device_variant)
Quoted 4 lines
Quoted 2 lines
The device variant ID should be derived from the data, which stores device private pointer. No need to add an extra parameter.
the device variant comes from directly forom dev-> not from
dev->data.
Ok, then just pass dev as first argument? It is always passed as dev->data currently.
Quoted 15 lines
Quoted 15 lines
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
Quoted 6 lines
drivers/baseband/acc/acc_common.h +2
-0{uint16_t queue_id; +struct acc_queue *acc_q; + uint16_t vf_id = (device_variant == VRB2_VARIANT) ?ring_data.vf_id_vrb2 : ring_data.vf_id;
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, · line 813
Quoted 1 line
drivers/baseband/acc/acc_common.h +1
-0+ uint16_t aq_id = (device_variant == VRB2_VARIANT) ?ring_data.aq_id_vrb2 : ring_data.aq_id;
drivers/baseband/acc/acc_common.h alloc_sw_rings_min_mem(struct rte_bbdev *dev, · line 815
Quoted 2 lines
drivers/baseband/acc/acc_common.h +2
-0+uint16_t qg_id = (device_variant ==VRB2_VARIANT ) ? +ring_data.qg_id_vrb2 : ring_data.qg_id;Wouldn't it be better to have an intermediate representation, and each variant implements a callback to fill it?
Quoted 5 lines
Quoted 3 lines
It will become messy otherwise when other variants will be added.
Something like the existing
queue_offsetcallback would be great.ok fair enough.
Great, thanks.
Quoted 35 lines
Quoted 22 lines
drivers/baseband/acc/acc_common.h get_num_cbs_in_tb_ldpc_enc(struct
Quoted 18 lines
drivers/baseband/acc/acc_common.h +5
-5for (queue_id =0 ; queue_id < data->num_queues; ++queue_id) { -struct acc_queue *acc_q = - data->queues[queue_id].queue_private; -if (acc_q !=NULL && acc_q->aq_id == ring_data.aq_id && - acc_q->qgrp_id == ring_data.qg_id && - acc_q->vf_id == ring_data.vf_id) + acc_q = data->queues[queue_id].queue_private; + +if (acc_q !=NULL && acc_q->aq_id == aq_id && + acc_q->qgrp_id == qg_id && + acc_q->vf_id == vf_id)return queue_id; }@@ -1436,4 +1480,16 @@ get_num_cbs_in_tb_ldpc_enc(struct
rte_bbdev_op_ldpc_enc*ldpc_enc)Quoted 3 lines
drivers/baseband/acc/acc_common.h +0
-0return cbs_in_tb; }Quoted 12 lines
drivers/baseband/acc/acc_common.h get_num_cbs_in_tb_ldpc_enc(struct rte_bbdev_op_ldpc_enc *ldpc_enc) · line 1492
Quoted 9 lines
drivers/baseband/acc/acc_common.h +9
-0+#ifdef RTE_LIBRTE_BBDEV_DEBUG +static inline void +acc_memdump (const char *string,void *buf,uint16_t bytes) { +printf ("%s\n" , string); +uint32_t *data = buf; +uint16_t i; +for (i =0 ; i < bytes /4 ; i++) +printf ("0x%08X\n" , data[i]); +}For consistency and to avoid code dumplication, please use
rte_memdump()directly as you did in ACC100.
Quoted 1 line
I can do for now, it is just that for format is quite poor. Will change.
Thanks, and by the way this is better for consistency as rte_memdump() calls are outputed on stderr while acc_memdump() is on stdout.
Quoted 253 lines
Quoted 253 lines
Quoted 11 lines
drivers/baseband/acc/acc_common.h +2
-0+#endif +#endif /* _ACC_COMMON_H_ */ drivers/baseband/acc/rte_acc100_pmd.c +0
-0drivers/baseband/acc/rte_acc100_pmd.c acc100_pf_interrupt_handler(struct rte_bbdev *dev) · line 296
Quoted 3 lines
drivers/baseband/acc/rte_acc100_pmd.c +0
-0@@ -294,7 +294,7 @@ acc100_pf_interrupt_handler(struct rte_bbdev *dev)case ACC100_PF_INT_DMA_UL5G_DESC_IRQ :case ACC100_PF_INT_DMA_DL5G_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info(
Quoted 6 lines
drivers/baseband/acc/rte_acc100_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data, acc100_dev- device_variant);if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR,"Couldn't find queue:
aq_id:%u,
qg_id: %u,vf_id: %u", @@Quoted 4 lines
-348,7 +348,7 @@
acc100_vf_interrupt_handler(struct rte_bbdev *dev)
*/
ring_data->vf_id= 0; deq_intr_det.queue_id =get_queue_id_from_ring_info(
Quoted 6 lines
drivers/baseband/acc/rte_acc100_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data, acc100_dev-
device_variant);
if (deq_intr_det.queue_id ==UINT16_MAX) {
rte_bbdev_log(ERR,
"Couldn't find queue:aq_id:%u,
qg_id: %u", diff --gitdrivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id,
Quoted 6 lines
a/drivers/baseband/acc/rte_vrb_pmd.cb/drivers/baseband/acc/rte_vrb_pmd.c
indexe82ed55ca7..a787592ec9100644drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -37,6 +37,15 @@ vrb1_queue_offset(bool pf_device, uint8_t vf_id,
uint8_tqgrp_id,uint16_taq_iddrivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, · line 37
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return ((qgrp_id << 7) + (aq_id << 3) +
VRB1_VfQmgrIngressAq);drivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_id
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0} +static inline uint32_t +vrb2_queue_offset (bool pf_device,uint8_t vf_id,uint8_t qgrp_id, +uint16_t aq_id) { +if (pf_device) + return ((vf_id << 14) + (qgrp_id << 9) + (aq_id << 3) +
VRB2_PfQmgrIngressAq);drivers/baseband/acc/rte_vrb_pmd.c vrb1_queue_offset(bool pf_device, uint8_t vf_id, · line 46
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + return ((qgrp_id << 9) + (aq_id << 3) +
VRB2_VfQmgrIngressAq); }Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+enum {UL_4G =0 ,UL_5G ,DL_4G ,DL_5G ,FFT ,MLD ,NUM_ACC }; /* Return the accelerator enum for a Queue Group Index. */ @@ -197,7 +206,7 @@ fetch_acc_config(struct rte_bbdev *dev)struct acc_device *d = dev->data->dev_private; struct rte_acc_conf *acc_conf = &d->acc_conf; uint8_t acc, qg;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1-uint32_t reg_aq, reg_len0, reg_len1, reg0, reg1; +uint32_t reg_aq, reg_len0, reg_len1, reg_len2, reg_len3, reg0, reg1, +reg2, reg3;uint32_t reg_mode, idx;struct rte_acc_queue_topology *q_top =NULL ;int qman_func_id[VRB_NUM_ACCS ] = {ACC_ACCMAP_0 ,
ACC_ACCMAP_1, @@drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 8 lines
-219,32 +228,81 @@
fetch_acc_config(struct rte_bbdev *dev)acc_conf->num_vf_bundles = 1; initQTop(acc_conf);drivers/baseband/acc/rte_vrb_pmd.c +0
-4- reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); - reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); -for (qg =0 ; qg < d->num_qgroups; qg++) { - reg_aq = acc_reg_read(d, d->queue_offset(d->pf_device, 0,qg, 0));
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-3-if (reg_aq &ACC_QUEUE_ENABLE ) { -if (qg <ACC_NUM_QGRPS_PER_WORD ) - idx = (reg0 >> (qg *4 )) &0x7 ; +if (d->device_variant ==VRB1_VARIANT ) { + reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); + reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); +for (qg =0 ; qg < d->num_qgroups; qg++) { + reg_aq = acc_reg_read(d, d->queue_offset(d-
pf_device, 0, qg, 0));drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0+if (reg_aq &ACC_QUEUE_ENABLE ) { +if (qg <ACC_NUM_QGRPS_PER_WORD ) + idx = (reg0 >> (qg *4 )) &0x7 ; +else + idx = (reg1 >> ((qg -
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +13
-0+if (idx <VRB1_NUM_ACCS ) { + acc = qman_func_id[idx]; +updateQtop (acc, qg, acc_conf, d); + } + } + } + +/* Check the depth of the AQs. */ + reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); + reg_len1 =acc_reg_read (d, d->reg_addr->depth_log1_offset); +for (acc =0 ; acc <NUM_ACC ; acc++) { +qtopFromAcc (&q_top, acc, acc_conf); + if (q_top->first_qgroup_index <
ACC_NUM_QGRPS_PER_WORD)drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ q_top->aq_depth_log2 = + (reg_len0 >> (q_top-
first_qgroup_index* 4)) &0xF;
elsedrivers/baseband/acc/rte_vrb_pmd.c +0
-1- idx = (reg1 >> ((qg -
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-3-if (idx <VRB1_NUM_ACCS ) { - acc = qman_func_id[idx]; -updateQtop (acc, qg, acc_conf, d); + q_top->aq_depth_log2 = (reg_len1 >> ((q_top-
first_qgroup_index-
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + }else { + reg0 =acc_reg_read (d, d->reg_addr->qman_group_func); + reg1 =acc_reg_read (d, d->reg_addr->qman_group_func +4 ); + reg2 =acc_reg_read (d, d->reg_addr->qman_group_func +8 ); + reg3 =acc_reg_read (d, d->reg_addr->qman_group_func +12 ); +/* printf("Debug Function %08x %08x %08x %08x\n", reg0, reg1, reg2, reg3);*/
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+for (qg =0 ; qg <VRB2_NUM_QGRPS ; qg++) { + reg_aq = acc_reg_read(d, vrb2_queue_offset(d-
pf_device, 0, qg, 0));drivers/baseband/acc/rte_vrb_pmd.c +2
-0+if (reg_aq &ACC_QUEUE_ENABLE ) { +/* printf("Qg enabled %d %x\n", qg, reg_aq);*/
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+if (qg /ACC_NUM_QGRPS_PER_WORD ==0 ) + idx = (reg0 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (qg / ACC_NUM_QGRPS_PER_WORD ==1)
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ idx = (reg1 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (qg / ACC_NUM_QGRPS_PER_WORD ==2)
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ idx = (reg2 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + idx = (reg3 >> ((qg %
ACC_NUM_QGRPS_PER_WORD) * 4)) &0x7;Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+if (idx <VRB_NUM_ACCS ) { + acc = qman_func_id[idx]; +updateQtop (acc, qg, acc_conf, d); + }drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-7} } - } -/* Check the depth of the AQs. */ - reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); - reg_len1 =acc_reg_read (d, d->reg_addr->depth_log1_offset); -for (acc =0 ; acc <NUM_ACC ; acc++) { -qtopFromAcc (&q_top, acc, acc_conf); - if (q_top->first_qgroup_index <
ACC_NUM_QGRPS_PER_WORD)drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1- q_top->aq_depth_log2 = (reg_len0 >> (q_top-
first_qgroup_index* 4)) &0xF;drivers/baseband/acc/rte_vrb_pmd.c +0
-2-else - q_top->aq_depth_log2 = (reg_len1 >> ((q_top-
first_qgroup_index-drivers/baseband/acc/rte_vrb_pmd.c +0
-1- ACC_NUM_QGRPS_PER_WORD) * 4))&
0xF;drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+/* Check the depth of the AQs. */ + reg_len0 =acc_reg_read (d, d->reg_addr->depth_log0_offset); + reg_len1 = acc_reg_read(d, d->reg_addr->depth_log0_offset +4);
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ reg_len2 = acc_reg_read(d, d->reg_addr->depth_log0_offset +8);
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ reg_len3 = acc_reg_read(d, d->reg_addr->depth_log0_offset +12);
drivers/baseband/acc/rte_vrb_pmd.c fetch_acc_config(struct rte_bbdev *dev)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +for (acc =0 ; acc <NUM_ACC ; acc++) { +qtopFromAcc (&q_top, acc, acc_conf); + if (q_top->first_qgroup_index /
ACC_NUM_QGRPS_PER_WORD== 0)Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ q_top->aq_depth_log2 = (reg_len0 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (q_top->first_qgroup_index /
ACC_NUM_QGRPS_PER_WORD== 1)Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ q_top->aq_depth_log2 = (reg_len1 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ else if (q_top->first_qgroup_index /
ACC_NUM_QGRPS_PER_WORD== 2)Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ q_top->aq_depth_log2 = (reg_len2 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + q_top->aq_depth_log2 = (reg_len3 >> ((q_top-
first_qgroup_index%
+ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 346
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-2+ } }/* Read PF mode. */ @@ -341,18 +399,29 @@ vrb_check_ir(struct acc_device *acc_dev) ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &ACC_INFO_RING_MASK );while (ring_data->valid) { - if ((ring_data->int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( - ring_data->int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 347
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-1- rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-3- ring_data->int_nb, ring_data- detailed_info); -/* Initialize Info Ring entry and move forward. */ - ring_data->val =0 ; +if (acc_dev->device_variant ==VRB1_VARIANT ) { + if ((ring_data->int_nb <
ACC_PF_INT_DMA_DL_DESC_IRQ) || (drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 406
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 407
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 410
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ ring_data->int_nb, ring_data- detailed_info); +/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ ring_data->val =0 ; + } + }else {/* VRB2_VARIANT */ + if ((ring_data->int_nb_vrb2 <
ACC_PF_INT_DMA_DL_DESC_IRQ) || (drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 415
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb_vrb2 >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 416
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ rte_bbdev_log(WARNING, "InfoRing: ITR:%dInfo:0x%x",
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 417
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data->int_nb_vrb2,
ring_data->val);drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 418
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 420
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ ring_data->val =0 ; + }Same as
get_queue_id_from_ring_info().
Having a callback to get the different parameters (int_nb,vf_id, ...) implemented by each variant would avoid duplication like above.
Quoted 4 lines
Quoted 2 lines
It would make it more easier to add new variants, i.e. just implement the callback without needing to patch every function making use of these info.
ok, fair enough.
Thanks!
Quoted 145 lines
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev)
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0} info_ring_head++; ring_data = acc_dev->info_ring + (info_ring_head &Quoted 7 lines
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c vrb_check_ir(struct acc_device *acc_dev) · line 427
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0} } +Remove new line.
ok
Quoted 14 lines
Quoted 14 lines
/* Interrupt handler triggered by dev for handling specific interrupt. */ static void vrb_dev_interrupt_handler(void *cb_arg) @@ -361,16 +430,22 @@ vrb_dev_interrupt_handler(void *cb_arg) struct acc_device *acc_dev = dev->data->dev_private; volatile union acc_info_ring_data *ring_data; struct acc_deq_intr_details deq_intr_det;drivers/baseband/acc/rte_vrb_pmd.c +2
-0+uint16_t vf_id, aq_id, qg_id, int_nb; +bool isVrb1 = (acc_dev->device_variant ==VRB1_VARIANT ); ring_data = acc_dev->info_ring + (acc_dev->info_ring_head &
ACC_INFO_RING_MASK);Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg)
Quoted 4 lines
while (ring_data->valid) {drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ vf_id = isVrb1 ? ring_data->vf_id : ring_data->vf_id_vrb2; + aq_id = isVrb1 ? ring_data->aq_id : ring_data->aq_id_vrb2; + qg_id = isVrb1 ? ring_data->qg_id : ring_data->qg_id_vrb2; > +int_nb = isVrb1 ? ring_data->int_nb : ring_data->int_nb_vrb2;Same comment as above.
ok
Quoted 53 lines
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 4 lines
if (acc_dev->pf_device) { rte_bbdev_log_debug(drivers/baseband/acc/rte_vrb_pmd.c +0
-1- "VRB1 PF Interrupt received, Info Ringdata: 0x%x -> %d",
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- ring_data->val, ring_data->int_nb); + "PF Interrupt received, Info Ring data:0x%x -> %d",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 455
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1+ ring_data->val, int_nb); -switch (ring_data->int_nb) { +switch (int_nb) {case ACC_PF_INT_DMA_DL_DESC_IRQ :case ACC_PF_INT_DMA_UL_DESC_IRQ :case ACC_PF_INT_DMA_FFT_DESC_IRQ :@@ -378,13 +453,11 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_PF_INT_DMA_DL5G_DESC_IRQ :case ACC_PF_INT_DMA_MLD_DESC_IRQ : deq_intr_det.queue_id =get_queue_id_from_ring_info(
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 456
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data,
acc_dev->device_variant);drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 459
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue:
aq_id: %u,qg_id: %u,vf_id: %u",drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 399
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-4- ring_data->aq_id, - ring_data->qg_id, - ring_data->vf_id); + aq_id, qg_id, vf_id);return ; } rte_bbdev_pmd_callback_process(dev,@@ -396,9 +469,9 @@ vrb_dev_interrupt_handler(void *cb_arg) } }else { rte_bbdev_log_debug( - "VRB1 VF Interrupt received, Info Ringdata: 0x%x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 472
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ "VRB VF Interrupt received, Info Ringdata: 0x%x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 481
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ring_data->val); -switch (ring_data->int_nb) { +switch (int_nb) {case ACC_VF_INT_DMA_DL_DESC_IRQ :case ACC_VF_INT_DMA_UL_DESC_IRQ :case ACC_VF_INT_DMA_FFT_DESC_IRQ :@@ -406,14 +479,16 @@ vrb_dev_interrupt_handler(void *cb_arg)case ACC_VF_INT_DMA_DL5G_DESC_IRQ :case ACC_VF_INT_DMA_MLD_DESC_IRQ :/* VFs are not aware of their vf_id - it's set to 0. */
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 482
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- ring_data->vf_id =0 ; + if (acc_dev->device_variant ==
VRB1_VARIANT)drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 485
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ ring_data->vf_id =0 ; + else + ring_data->vf_id_vrb2 = 0;Ditto, you also need a way to set these fields in a generic way.
ok
Quoted 41 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 486
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0deq_intr_det.queue_id =get_queue_id_from_ring_info(
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 487
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- dev->data, *ring_data); + dev->data, *ring_data,
acc_dev->device_variant);drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 490
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0if (deq_intr_det.queue_id ==UINT16_MAX ) { rte_bbdev_log(ERR, "Couldn't find queue:
aq_id: %u,qg_id: %u",drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_interrupt_handler(void *cb_arg) · line 432
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-4- ring_data->aq_id, - ring_data->qg_id); + aq_id, qg_id);return ; } rte_bbdev_pmd_callback_process(dev,@@ -428,8 +503,7 @@ vrb_dev_interrupt_handler(void *cb_arg)/* Initialize Info Ring entry and move forward. */ ring_data->val =0 ; ++acc_dev->info_ring_head; - ring_data = acc_dev->info_ring + - (acc_dev->info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 464
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1+ ring_data = acc_dev->info_ring + (acc_dev->info_ring_head & +ACC_INFO_RING_MASK ); } }@@ -461,7 +535,10 @@ allocate_info_ring(struct rte_bbdev *dev) phys_low = (uint32_t )(info_ring_iova);acc_reg_write (d, d->reg_addr->info_ring_hi, phys_high);acc_reg_write (d, d->reg_addr->info_ring_lo, phys_low); - acc_reg_write(d, d->reg_addr->info_ring_en,
VRB1_REG_IRQ_EN_ALL);drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 539
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+if (d->device_variant ==VRB1_VARIANT ) + acc_reg_write(d, d->reg_addr->info_ring_en,
VRB1_REG_IRQ_EN_ALL);drivers/baseband/acc/rte_vrb_pmd.c allocate_info_ring(struct rte_bbdev *dev) · line 541
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + acc_reg_write(d, d->reg_addr->info_ring_en,
VRB2_REG_IRQ_EN_ALL);
Quoted 7 lines
Quoted 5 lines
My guess is the mask value difference between the two is the VRB2 added MLD-TS related interrupts, is it?
If so, it would be more future proof to configure this based on the device capabilities instead of its variant?
There are some differences in these implementations, best to to keep them separate.
OK.
Quoted 32 lines
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0d->info_ring_head = (acc_reg_read (d, d->reg_addr->info_ring_ptr) &0xFFF ) /sizeof (union acc_info_ring_data );return 0 ;@@ -516,6 +593,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t
num_queues, intsocket_id)Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 596
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0phys_high = (uint32_t )(d->sw_rings_iova >>32 ); phys_low = (uint32_t )(d->sw_rings_iova & ~(ACC_SIZE_64MBYTE -1 )); +Remove new line.
ok
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Read the populated cfg from device registers. */ fetch_acc_config (dev);@@ -540,6 +618,10 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t
num_queues, intsocket_id)Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 623
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0acc_reg_write (d, d->reg_addr->dma_ring_dl4g_lo, phys_low);acc_reg_write (d, d->reg_addr->dma_ring_fft_hi, phys_high);acc_reg_write (d, d->reg_addr->dma_ring_fft_lo, phys_low); +if (d->device_variant ==VRB2_VARIANT ) { +acc_reg_write (d, d->reg_addr->dma_ring_mld_hi, phys_high); +acc_reg_write (d, d->reg_addr->dma_ring_mld_lo, phys_low);Same, wouldn't it be more future-proof to set this based on the capabilities of the device and not its variant?
Quoted 2 lines
Checking capability on the fly would be cumbersome I think. I dont see problem related to next gen extension for this.
Something like this is not possible?
If (has_caps(dev, RTE_BBDEV_OP_MLDTS))
Quoted 70 lines
Thanks
Quoted 68 lines
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ }/* * Configure Ring Size to the max queue ring size * (used for wrapping purpose). drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t · line 636
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-2@@ -549,8 +631,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)/* Configure tail pointer for use when SDONE enabled. */ if (d->tail_ptrs ==NULL ) - d->tail_ptrs = rte_zmalloc_socket( - dev->device->driver->name, + d->tail_ptrs = rte_zmalloc_socket(dev->device->driver->name, VRB_MAX_QGRPS * VRB_MAX_AQS *
sizeof(uint32_t),drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0RTE_CACHE_LINE_SIZE, socket_id);if (d->tail_ptrs == NULL) {drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -574,6 +655,10 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t
num_queues, intsocket_id)drivers/baseband/acc/rte_vrb_pmd.c vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) · line 661
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0acc_reg_write (d, d->reg_addr->tail_ptrs_dl4g_lo, phys_low);acc_reg_write (d, d->reg_addr->tail_ptrs_fft_hi, phys_high);acc_reg_write (d, d->reg_addr->tail_ptrs_fft_lo, phys_low); +if (d->device_variant ==VRB2_VARIANT ) { +acc_reg_write (d, d->reg_addr->tail_ptrs_mld_hi, phys_high); +acc_reg_write (d, d->reg_addr->tail_ptrs_mld_lo, phys_low); + }Ditto.
Quoted 15 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-4ret =allocate_info_ring (dev);if (ret <0 ) {@@ -671,10 +756,17 @@ vrb_intr_enable(struct rte_bbdev *dev)return ret; } -if (acc_dev->pf_device) - max_queues =VRB1_MAX_PF_MSIX ; -else - max_queues =VRB1_MAX_VF_MSIX ; +if (d->device_variant ==VRB1_VARIANT ) { +if (acc_dev->pf_device) + max_queues =VRB1_MAX_PF_MSIX ; +else drivers/baseband/acc/rte_vrb_pmd.c vrb_intr_enable(struct rte_bbdev *dev) · line 772
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ max_queues =VRB1_MAX_VF_MSIX ; + }else { +if (acc_dev->pf_device) + max_queues =VRB2_MAX_PF_MSIX ; +else + max_queues =VRB2_MAX_VF_MSIX ; + }if (rte_intr_efd_enable (dev->intr_handle, max_queues)) { rte_bbdev_log(ERR, "Failed to create fds for %uqueues", @@
Quoted 3 lines
-776,7 +868,10 @@ vrb_find_free_queue_idx(struct
rte_bbdev*dev,
/* Mark the Queue as assigned. */ d->q_assigned_bit_map[group_idx] |= (1ULL <<
aq_idx);drivers/baseband/acc/rte_vrb_pmd.c vrb_find_free_queue_idx(struct rte_bbdev *dev,
Quoted 4 lines
/* Report the AQ Index. */drivers/baseband/acc/rte_vrb_pmd.c +2
-1-return (group_idx <<VRB1_GRP_ID_SHIFT ) + aq_idx; +if (d->device_variant ==VRB1_VARIANT ) + return (group_idx << VRB1_GRP_ID_SHIFT) +
aq_idx;drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+else + return (group_idx << VRB2_GRP_ID_SHIFT) +
aq_idx;
Quoted 6 lines
Quoted 3 lines
This is the same bitmap as in
acc_info_ring_data, isn't it? We could maybe share some code to to the decoding as suggested ealier in this patch.you mean just to add an inline function for the
grp_id_shift(variant)right? fair enough
A per-variant callback like I suggested for acc_info_ring_data decoder, yes.
Quoted 198 lines
Quoted 24 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t
Quoted 7 lines
} } rte_bbdev_log(INFO, "Failed to find free queue on %s, priority %u",drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -819,6 +914,9 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t
queue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t · line 914
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ACC_FCW_LD_BLEN : (conf->op_type ==
RTE_BBDEV_OP_FFT?drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0ACC_FCW_FFT_BLEN : ACC_FCW_MLDTS_BLEN)))); + if ((q->d->device_variant == VRB2_VARIANT) && (conf->op_type ==
RTE_BBDEV_OP_FFT))drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ fcw_len =ACC_FCW_FFT_BLEN_3 ; +for (desc_idx =0 ; desc_idx < d->sw_ring_max_depth; desc_idx++) { desc = q->ring_addr + desc_idx; desc->req.word0 = ACC_DMA_DESC_TYPE; @@ -915,9+1013,16 @@
Quoted 4 lines
vrb_queue_setup(struct
rte_bbdev*dev,uint16_tqueue_id,
}
}Quoted 15 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, · line 1025
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +10
-3- q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; - q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; - q->aq_id = q_idx &0xF ; +if (d->device_variant ==VRB1_VARIANT ) { + q->qgrp_id = (q_idx >>VRB1_GRP_ID_SHIFT ) &0xF ; + q->vf_id = (q_idx >>VRB1_VF_ID_SHIFT ) &0x3F ; + q->aq_id = q_idx &0xF ; + }else { + q->qgrp_id = (q_idx >>VRB2_GRP_ID_SHIFT ) &0x1F ; + q->vf_id = (q_idx >>VRB2_VF_ID_SHIFT ) &0x3F ; + q->aq_id = q_idx &0x3F ; + } +Same remark as before.
yes, still valid
Quoted 156 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct
Quoted 5 lines
q->aq_depth = 0; if (conf->op_type == RTE_BBDEV_OP_TURBO_DEC) q->aq_depth = (1 << d->acc_conf.q_ul_4g.aq_depth_log2);drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1149,6 +1254,127 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
rte_bbdev_driver_info*dev_info)drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +6
-0RTE_BBDEV_END_OF_CAPABILITIES_LIST () }; +static const struct rte_bbdev_op_cap vrb2_bbdev_capabilities[] = { + { + .type =RTE_BBDEV_OP_TURBO_DEC , + .cap.turbo_dec = { + .capability_flags = +
RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1264
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_CRC_TYPE_24B | +RTE_BBDEV_TURBO_DEC_CRC_24B_DROP |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1266
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_EQUALIZER | +
RTE_BBDEV_TURBO_SOFT_OUT_SATURATE|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1267
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_HALF_ITERATION_EVEN|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1268
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1270
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_SOFT_OUTPUT | +
RTE_BBDEV_TURBO_EARLY_TERMINATION|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1271
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_DEC_INTERRUPTS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1272
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1273
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1275
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_MAP_DEC | +RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1276
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_DEC_SCATTER_GATHER,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+ .max_llr_modulus = INT8_MAX, + .num_buffers_src = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_hard_out = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1283
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_soft_out = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + }, + { + .type = RTE_BBDEV_OP_TURBO_ENC, + .cap.turbo_enc = { + .capability_flags = +
RTE_BBDEV_TURBO_CRC_24B_ATTACH|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1291
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_RV_INDEX_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1293
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_TURBO_RATE_MATCH | +
RTE_BBDEV_TURBO_ENC_INTERRUPTS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1294
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_TURBO_ENC_SCATTER_GATHER,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1296
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_src = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1298
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +8
-0+ } + }, + { + .type = RTE_BBDEV_OP_LDPC_ENC, + .cap.ldpc_enc = { + .capability_flags = +RTE_BBDEV_LDPC_RATE_MATCH | +RTE_BBDEV_LDPC_CRC_24B_ATTACH |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1307
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_INTERLEAVER_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1308
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_LDPC_ENC_INTERRUPTS |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1309
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_ENC_SCATTER_GATHER|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1310
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_ENC_CONCATENATION,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1312
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1314
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +11
-0+ } + }, + { + .type = RTE_BBDEV_OP_LDPC_DEC, + .cap.ldpc_dec = { + .capability_flags = +RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | +RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | +RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | +RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK | +RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1326
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1327
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +3
-0+RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS | + RTE_BBDEV_LDPC_DEC_SCATTER_GATHER | +
RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1331
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION | > + RTE_BBDEV_LDPC_LLR_COMPRESSION | > + RTE_BBDEV_LDPC_SOFT_OUT_ENABLE |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ RTE_BBDEV_LDPC_SOFT_OUT_RM_BYPASS | +
RTE_BBDEV_LDPC_SOFT_OUT_DEINTERLEAVER_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0+ RTE_BBDEV_LDPC_DEC_INTERRUPTS, + .llr_size = 8, + .llr_decimals = 2, + .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_hard_out = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +8
-0+ .num_buffers_soft_out = 0, + } + }, + { + .type = RTE_BBDEV_OP_FFT, + .cap.fft = { + .capability_flags = +
RTE_BBDEV_FFT_WINDOWING|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1349
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_CS_ADJUSTMENT|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1350
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_DFT_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1351
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_IDFT_BYPASS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1352
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_FFT_FP16_INPUT |
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1353
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+RTE_BBDEV_FFT_FP16_OUTPUT |drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1354
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_POWER_MEAS|drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1355
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+
RTE_BBDEV_FFT_WINDOWING_BYPASS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1357
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
Quoted 8 lines
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1359
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,Is that a copy/pasta error or is it expected to have LDPC defines in FFT capabilities?
I need to change that, this is not quite correct actually even previously.
Ok, that indeed looks fishy.
Quoted 1 line
Probably through other serie though. No one uses this currently.
Or at the top of the series, so that we can backport it more easily.
Quoted 60 lines
Quoted 60 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) · line 1377
Quoted 11 lines
drivers/baseband/acc/rte_vrb_pmd.c +9
-0+ } + }, + { + .type = RTE_BBDEV_OP_MLDTS, + .cap.fft = { + .capability_flags = + RTE_BBDEV_MLDTS_REP, + .num_buffers_src = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1370
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ .num_buffers_dst = +
RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,Same question here, that looks suspicious but maybe I'm wrong.
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +5
-0+ } + }, +RTE_BBDEV_END_OF_CAPABILITIES_LIST () + }; +static struct rte_bbdev_queue_conf default_queue_conf; default_queue_conf.socket = dev->data->socket_id; default_queue_conf.queue_size = ACC_MAX_QUEUE_DEPTH; @@ -1193,7
drivers/baseband/acc/rte_vrb_pmd.c vrb_dev_info_get(struct rte_bbdev *dev, struct · line 1379
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+1419,10 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
rte_bbdev_driver_info*dev_info)Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-1dev_info->default_queue_conf = default_queue_conf; dev_info->cpu_flag_reqs =NULL ; dev_info->min_alignment =1 ; - dev_info->capabilities = vrb1_bbdev_capabilities; +if (d->device_variant ==VRB1_VARIANT ) + dev_info->capabilities = vrb1_bbdev_capabilities; +else + dev_info->capabilities = vrb2_bbdev_capabilities; dev_info->harq_buffer_size =0 ;vrb_check_ir (d);drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = { · line 1472
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1242,6 +1471,9 @@ static struct rte_pci_id pci_id_vrb_pf_map[] = { { RTE_PCI_DEVICE(RTE_VRB1_VENDOR_ID,
RTE_VRB1_PF_DEVICE_ID)drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = {
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0}, + { + RTE_PCI_DEVICE(RTE_VRB2_VENDOR_ID,
RTE_VRB2_PF_DEVICE_ID)drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_vf_map[] = { · line 1483
Quoted 7 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ }, {.device_id = 0}, };@@ -1250,6 +1482,9 @@ static struct rte_pci_id pci_id_vrb_vf_map[] = { { RTE_PCI_DEVICE(RTE_VRB1_VENDOR_ID,
RTE_VRB1_VF_DEVICE_ID)drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = {
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0}, + { + RTE_PCI_DEVICE(RTE_VRB2_VENDOR_ID,
RTE_VRB2_VF_DEVICE_ID)
Quoted 8 lines
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c static struct rte_pci_id pci_id_vrb_pf_map[] = { · line 1479
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ }, {.device_id = 0}, };I'm stopping the review here for now.
Thanks expecting a v3 this week based on your suggestions.
Great, thanks.
Maxime
Quoted 5 lines
Quoted 4 lines
Thanks,
Maxime
PATCH v2 7/7 baseband/acc: add configure helper for VRB2
In reply to Nicolas ChautruThis allows to configure the VRB2 device using a
companion configuration function within the DPDK
bbdev-test environment.
--- drivers/baseband/acc/acc100_pmd.h | 2 + drivers/baseband/acc/acc_common.h | 7 + drivers/baseband/acc/rte_acc100_pmd.c | 6 +- drivers/baseband/acc/rte_vrb_pmd.c | 322 ++++++++++++++++++++++++++ drivers/baseband/acc/vrb_cfg.h | 16 ++ 5 files changed, 352 insertions(+), 1 deletion(-)
drivers/baseband/acc/acc100_pmd.h +2 -0
@@ -34,6 +34,8 @@#define ACC100_VENDOR_ID (0x8086)#define ACC100_PF_DEVICE_ID (0x0d5c)#define ACC100_VF_DEVICE_ID (0x0d5d) +#define VRB1_PF_DEVICE_ID (0x57C0) +#define VRB2_PF_DEVICE_ID (0x57C2)/* Values used in writing to the registers */ #define ACC100_REG_IRQ_EN_ALL 0x1FF83FF/* Enable all interrupts */
drivers/baseband/acc/acc_common.h +7 -0
@@ -1480,6 +1480,13 @@ get_num_cbs_in_tb_ldpc_enc(struct rte_bbdev_op_ldpc_enc *ldpc_enc)return cbs_in_tb; } +static inline void +acc_reg_fast_write (struct acc_device *d,uint32_t offset,uint32_t value) +{ +void *reg_addr =RTE_PTR_ADD (d->mmio_base, offset); +mmio_write (reg_addr, value); +} +#ifdef RTE_LIBRTE_BBDEV_DEBUG static inline void acc_memdump (const char *string,void *buf,uint16_t bytes)
drivers/baseband/acc/rte_acc100_pmd.c +5 -1
@@ -5187,6 +5187,10 @@ rte_acc_configure(const char *dev_name, struct rte_acc_conf *conf)return acc100_configure (dev_name, conf); else if (pci_dev->id.device_id == ACC101_PF_DEVICE_ID) return acc101_configure(dev_name, conf); - else + else if (pci_dev->id.device_id == VRB1_PF_DEVICE_ID) return vrb1_configure(dev_name, conf); + else if (pci_dev->id.device_id == VRB2_PF_DEVICE_ID) + return vrb2_configure(dev_name, conf); + +return -ENXIO ; }
drivers/baseband/acc/rte_vrb_pmd.c +322 -0
325 lines not on this page · raw message
drivers/baseband/acc/vrb_cfg.h +16 -0
@@ -29,4 +29,20 @@int vrb1_configure (const char *dev_name,struct rte_acc_conf *conf); +/** +* Configure a VRB2 device. +* +* @param dev_name +* The name of the device. This is the short form of PCI BDF, e.g. 00:01.0. +* It can also be retrieved for a bbdev device from the dev_name field in the +* rte_bbdev_info structure returned by rte_bbdev_info_get(). +* @param conf +* Configuration to apply to VRB2 HW. +* +* @return +* Zero on success, negative value on failure. +*/ +int +vrb2_configure (const char *dev_name,struct rte_acc_conf *conf); +#endif /* _VRB_CFG_H_ */
Signature · 1 line
2.34.1