diff --git a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml index 4c92d9b937..3b991bafe3 100644 --- a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml +++ b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml @@ -44,7 +44,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer nr_ulsim 100 - -n100 -s30 -m5 -r106 -R106 -o -P + -n100 -s30 -m5 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -60,7 +60,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer nr_ulsim 150 - -n100 -s30 -m15 -r106 -R106 -o -P + -n100 -s30 -m15 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -76,7 +76,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer nr_ulsim 250 - -n100 -s30 -m25 -r106 -R106 -o -P + -n100 -s30 -m25 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -92,7 +92,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer nr_ulsim 150 - -n100 -s30 -m5 -r273 -R273 -o -P + -n100 -s30 -m5 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -108,7 +108,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer nr_ulsim 350 - -n100 -s30 -m15 -r273 -R273 -o -P + -n100 -s30 -m15 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -124,7 +124,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer nr_ulsim 550 - -n100 -s30 -m25 -r273 -R273 -o -P + -n100 -s30 -m25 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -140,7 +140,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers nr_ulsim 250 - -n100 -s30 -m5 -r273 -R273 -o -W2 -z2 -y2 -P + -n100 -s30 -m5 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -156,7 +156,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers nr_ulsim 650 - -n100 -s30 -m15 -r273 -R273 -o -W2 -z2 -y2 -P + -n100 -s30 -m15 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -172,7 +172,7 @@ Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers nr_ulsim 1100 - -n100 -s30 -m25 -r273 -R273 -o -W2 -z2 -y2 -P + -n100 -s30 -m25 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 diff --git a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml index 7f29a7d38a..debf1aebf1 100644 --- a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml +++ b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml @@ -44,7 +44,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer nr_dlsim 100 - -n100 -s30 -e5 -b106 -R106 -c -P + -n100 -s30 -e5 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 @@ -60,7 +60,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer nr_dlsim 100 - -n100 -s30 -e15 -b106 -R106 -c -P + -n100 -s30 -e15 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 @@ -76,7 +76,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer nr_dlsim 200 - -n100 -s30 -e25 -b106 -R106 -c -P + -n100 -s30 -e25 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 @@ -92,7 +92,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer nr_dlsim 150 - -n100 -s30 -e5 -b273 -R273 -c -P + -n100 -s30 -e5 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 @@ -108,7 +108,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer nr_dlsim 250 - -n100 -s30 -e15 -b273 -R273 -c -P + -n100 -s30 -e15 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 @@ -124,7 +124,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer nr_dlsim 400 - -n100 -s30 -e25 -b273 -R273 -c -P + -n100 -s30 -e25 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 @@ -140,7 +140,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers nr_dlsim 200 - -n100 -s30 -e5 -b273 -R273 -c -x2 -z2 -y2 -P + -n100 -s30 -e5 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -156,7 +156,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers nr_dlsim 500 - -n100 -s30 -e15 -b273 -R273 -c -x2 -z2 -y2 -P + -n100 -s30 -e15 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -172,7 +172,7 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers nr_dlsim 800 - -n100 -s30 -e25 -b273 -R273 -c -x2 -z2 -y2 -P + -n100 -s30 -e25 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c index cefba00693..77a1209709 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c @@ -771,7 +771,7 @@ int start_pmd_dec(struct active_device *ad, rte_atomic16_set(&op_params->sync, SYNC_WAIT); /* Master core is set at first entry */ t_params[0].dev_id = ad->dev_id; - t_params[0].lcore_id = 15; + t_params[0].lcore_id = rte_lcore_id(); t_params[0].op_params = op_params; t_params[0].queue_id = ad->dec_queue; t_params[0].iter_count = 0; @@ -815,7 +815,7 @@ int32_t start_pmd_enc(struct active_device *ad, struct thread_params *t_params = rte_zmalloc(NULL, num_lcores * sizeof(struct thread_params), RTE_CACHE_LINE_SIZE); rte_atomic16_set(&op_params->sync, SYNC_WAIT); t_params[0].dev_id = ad->dev_id; - t_params[0].lcore_id = 14; + t_params[0].lcore_id = rte_lcore_id() + 1; t_params[0].op_params = op_params; t_params[0].queue_id = ad->enc_queue; t_params[0].iter_count = 0; @@ -852,8 +852,17 @@ int32_t LDPCinit() int dev_id = 0; struct rte_bbdev_info info; struct active_device *ad = active_devs; - char *dpdk_dev = "d8:00.0"; //PCI address of the card - char *argv_re[] = {"bbdev", "-a", dpdk_dev, "-l", "14-15", "--file-prefix=b6", "--"}; + char *dpdk_dev = NULL; // PCI address of the card + char *dpdk_core_list = NULL; // cores used by DPDK for T2 + char *dpdk_file_prefix = NULL; + paramdef_t LoaderParams[] = { + {"dpdk_dev", NULL, 0, .strptr = &dpdk_dev, .defstrval = NULL, TYPE_STRING, 0, NULL}, + {"dpdk_core_list", NULL, 0, .strptr = &dpdk_core_list, .defstrval = "11-12", TYPE_STRING, 0, NULL}, + {"dpdk_file_prefix", NULL, 0, .strptr = &dpdk_file_prefix, .defstrval = "b6", TYPE_STRING, 0, NULL} + }; + config_get(config_get_if(), LoaderParams, sizeofArray(LoaderParams), "ldpc_offload"); + AssertFatal(dpdk_dev != NULL, "ldpc_offload.dpdk_dev was not provided"); + char *argv_re[] = {"bbdev", "-a", dpdk_dev, "-l", dpdk_core_list, "--file-prefix", dpdk_file_prefix, "--"}; // EAL initialization, if already initialized (init in xran lib) try to probe DPDK device ret = rte_eal_init(sizeofArray(argv_re), argv_re); if (ret < 0) {