X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fbaseband%2Ffpga_5gnr_fec%2Frte_fpga_5gnr_fec.c;h=6485cc824a81dce81e8ee64ce47e85f912392fe4;hb=f99316271ceaefd1d632f1664101eeeb26218f4a;hp=930718cd47a7043d11907c15f62da95a268eb140;hpb=9c99878aa1b16de26fcce82c112b401766dd910e;p=dpdk.git diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c index 930718cd47..6485cc824a 100644 --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c @@ -24,9 +24,9 @@ #include "rte_pmd_fpga_5gnr_fec.h" #ifdef RTE_LIBRTE_BBDEV_DEBUG -RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, DEBUG); +RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, DEBUG); #else -RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, NOTICE); +RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, NOTICE); #endif #ifdef RTE_LIBRTE_BBDEV_DEBUG @@ -950,14 +950,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op, desc->num_null = op->ldpc_enc.n_filler; /* Set inbound data buffer address */ desc->in_addr_hi = (uint32_t)( - rte_pktmbuf_mtophys_offset(input, in_offset) >> 32); + rte_pktmbuf_iova_offset(input, in_offset) >> 32); desc->in_addr_lw = (uint32_t)( - rte_pktmbuf_mtophys_offset(input, in_offset)); + rte_pktmbuf_iova_offset(input, in_offset)); desc->out_addr_hi = (uint32_t)( - rte_pktmbuf_mtophys_offset(output, out_offset) >> 32); + rte_pktmbuf_iova_offset(output, out_offset) >> 32); desc->out_addr_lw = (uint32_t)( - rte_pktmbuf_mtophys_offset(output, out_offset)); + rte_pktmbuf_iova_offset(output, out_offset)); /* Save software context needed for dequeue */ desc->op_addr = op; /* Set total number of CBs in an op */ @@ -998,9 +998,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, desc->error = 0; /* Set inbound data buffer address */ desc->in_addr_hi = (uint32_t)( - rte_pktmbuf_mtophys_offset(input, in_offset) >> 32); + rte_pktmbuf_iova_offset(input, in_offset) >> 32); desc->in_addr_lw = (uint32_t)( - rte_pktmbuf_mtophys_offset(input, in_offset)); + rte_pktmbuf_iova_offset(input, in_offset)); desc->rm_e = op->ldpc_dec.cb_params.e; desc->harq_input_length = harq_in_length; desc->et_dis = !check_bit(op->ldpc_dec.op_flags, @@ -1021,9 +1021,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, desc->max_iter = op->ldpc_dec.iter_max; desc->qm_idx = op->ldpc_dec.q_m / 2; desc->out_addr_hi = (uint32_t)( - rte_pktmbuf_mtophys_offset(output, out_offset) >> 32); + rte_pktmbuf_iova_offset(output, out_offset) >> 32); desc->out_addr_lw = (uint32_t)( - rte_pktmbuf_mtophys_offset(output, out_offset)); + rte_pktmbuf_iova_offset(output, out_offset)); /* Save software context needed for dequeue */ desc->op_addr = op; /* Set total number of CBs in an op */ @@ -1068,14 +1068,14 @@ validate_enc_op(struct rte_bbdev_enc_op *op __rte_unused) ldpc_enc->basegraph); return -1; } - if (ldpc_enc->code_block_mode > 1) { + if (ldpc_enc->code_block_mode > RTE_BBDEV_CODE_BLOCK) { rte_bbdev_log(ERR, "code_block_mode (%u) is out of range 0:Tb 1:CB", ldpc_enc->code_block_mode); return -1; } - if (ldpc_enc->code_block_mode == 0) { + if (ldpc_enc->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) { tb = &ldpc_enc->tb_params; if (tb->c == 0) { rte_bbdev_log(ERR, @@ -1161,14 +1161,14 @@ validate_dec_op(struct rte_bbdev_dec_op *op __rte_unused) return -1; } - if (ldpc_dec->code_block_mode > 1) { + if (ldpc_dec->code_block_mode > RTE_BBDEV_CODE_BLOCK) { rte_bbdev_log(ERR, "code_block_mode (%u) is out of range 0 <= value <= 1", ldpc_dec->code_block_mode); return -1; } - if (ldpc_dec->code_block_mode == 0) { + if (ldpc_dec->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) { tb = &ldpc_dec->tb_params; if (tb->c < 1) { rte_bbdev_log(ERR, @@ -1370,7 +1370,7 @@ enqueue_ldpc_enc_one_op_cb(struct fpga_queue *q, struct rte_bbdev_enc_op *op, if (enc->op_flags & RTE_BBDEV_LDPC_CRC_24B_ATTACH) crc24_bits = 24; - if (enc->code_block_mode == 0) { + if (enc->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) { /* For Transport Block mode */ /* FIXME */ c = enc->tb_params.c; @@ -1839,7 +1839,7 @@ fpga_5gnr_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv) rte_bbdev_log_debug( "Init device %s [%s] @ virtaddr %p phyaddr %#"PRIx64, - dev->device->driver->name, dev->data->name, + drv->driver.name, dev->data->name, (void *)pci_dev->mem_resource[0].addr, pci_dev->mem_resource[0].phys_addr); } @@ -1895,7 +1895,7 @@ fpga_5gnr_fec_probe(struct rte_pci_driver *pci_drv, ((uint16_t)(version_id >> 16)), ((uint16_t)version_id)); #ifdef RTE_LIBRTE_BBDEV_DEBUG - if (!strcmp(bbdev->device->driver->name, + if (!strcmp(pci_drv->driver.name, RTE_STR(FPGA_5GNR_FEC_PF_DRIVER_NAME))) print_static_reg_debug_info(d->mmio_base); #endif @@ -1944,10 +1944,10 @@ fpga_5gnr_fec_remove(struct rte_pci_device *pci_dev) } static inline void -set_default_fpga_conf(struct fpga_5gnr_fec_conf *def_conf) +set_default_fpga_conf(struct rte_fpga_5gnr_fec_conf *def_conf) { /* clear default configuration before initialization */ - memset(def_conf, 0, sizeof(struct fpga_5gnr_fec_conf)); + memset(def_conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); /* Set pf mode to true */ def_conf->pf_mode_en = true; @@ -1962,15 +1962,15 @@ set_default_fpga_conf(struct fpga_5gnr_fec_conf *def_conf) /* Initial configuration of FPGA 5GNR FEC device */ int -fpga_5gnr_fec_configure(const char *dev_name, - const struct fpga_5gnr_fec_conf *conf) +rte_fpga_5gnr_fec_configure(const char *dev_name, + const struct rte_fpga_5gnr_fec_conf *conf) { uint32_t payload_32, address; uint16_t payload_16; uint8_t payload_8; uint16_t q_id, vf_id, total_q_id, total_ul_q_id, total_dl_q_id; struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name); - struct fpga_5gnr_fec_conf def_conf; + struct rte_fpga_5gnr_fec_conf def_conf; if (bbdev == NULL) { rte_bbdev_log(ERR,