MCPcopy Create free account
hub / github.com/F-Stack/f-stack / add_bbdev_dev

Function add_bbdev_dev

dpdk/app/test-bbdev/test_bbdev_perf.c:657–943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655}
656
657static int
658add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
659 struct test_bbdev_vector *vector)
660{
661 int ret;
662 unsigned int queue_id;
663 struct rte_bbdev_queue_conf qconf;
664 struct active_device *ad = &active_devs[nb_active_devs];
665 unsigned int nb_queues;
666 enum rte_bbdev_op_type op_type = vector->op_type;
667
668/* Configure fpga lte fec with PF & VF values
669 * if '-i' flag is set and using fpga device
670 */
671#ifdef RTE_BASEBAND_FPGA_LTE_FEC
672 if ((get_init_device() == true) &&
673 (!strcmp(info->drv.driver_name, FPGA_LTE_PF_DRIVER_NAME))) {
674 struct rte_fpga_lte_fec_conf conf;
675 unsigned int i;
676
677 printf("Configure FPGA LTE FEC Driver %s with default values\n",
678 info->drv.driver_name);
679
680 /* clear default configuration before initialization */
681 memset(&conf, 0, sizeof(struct rte_fpga_lte_fec_conf));
682
683 /* Set PF mode :
684 * true if PF is used for data plane
685 * false for VFs
686 */
687 conf.pf_mode_en = true;
688
689 for (i = 0; i < FPGA_LTE_FEC_NUM_VFS; ++i) {
690 /* Number of UL queues per VF (fpga supports 8 VFs) */
691 conf.vf_ul_queues_number[i] = VF_UL_4G_QUEUE_VALUE;
692 /* Number of DL queues per VF (fpga supports 8 VFs) */
693 conf.vf_dl_queues_number[i] = VF_DL_4G_QUEUE_VALUE;
694 }
695
696 /* UL bandwidth. Needed for schedule algorithm */
697 conf.ul_bandwidth = UL_4G_BANDWIDTH;
698 /* DL bandwidth */
699 conf.dl_bandwidth = DL_4G_BANDWIDTH;
700
701 /* UL & DL load Balance Factor to 64 */
702 conf.ul_load_balance = UL_4G_LOAD_BALANCE;
703 conf.dl_load_balance = DL_4G_LOAD_BALANCE;
704
705 /**< FLR timeout value */
706 conf.flr_time_out = FLR_4G_TIMEOUT;
707
708 /* setup FPGA PF with configuration information */
709 ret = rte_fpga_lte_fec_configure(info->dev_name, &conf);
710 TEST_ASSERT_SUCCESS(ret,
711 "Failed to configure 4G FPGA PF for bbdev %s",
712 info->dev_name);
713 }
714#endif

Callers 1

add_active_deviceFunction · 0.85

Calls 15

get_init_deviceFunction · 0.85
strcmpFunction · 0.85
memsetFunction · 0.85
rte_acc_configureFunction · 0.85
rte_bbdev_info_getFunction · 0.85
rte_lcore_countFunction · 0.85
rte_bbdev_setup_queuesFunction · 0.85
rte_bbdev_intr_enableFunction · 0.85

Tested by

no test coverage detected