From 705f04f58e448ea8526d68bf3cf55450c14d17d5 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 2 Sep 2025 15:00:18 +0000 Subject: [PATCH 1/3] feat(ldpc_aal): Do not initialize EAL if it is already initialized When FHI 7.2 is enabled, the EAL initialization is done by the FHI and the attempt to init EAL by ldpc_aal will fail. In that case, it is not necessary neither to provide a DPDK core list for BBDEV. This commit offers to skip EAL initialization if it is already initialized in order to allow dropping the useless DPDK cores argument in that case. The change relies on `rte_dev_probe` to detect if EAL was already initialized. --- .../nrLDPC_coding_aal/nrLDPC_coding_aal.c | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.c index 815ec9ce26..31ca0b387b 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.c @@ -1079,7 +1079,6 @@ int32_t nrLDPC_coding_init() "could not find mandatory --nrLDPC_coding_aal.dpdk_dev. If you used --nrLDPC_coding_t2.*, please rename all options to " "--nrLDPC_coding_aal.*\n"); AssertFatal(dpdk_dev != NULL, "nrLDPC_coding_aal.dpdk_dev was not provided"); - AssertFatal(dpdk_core_list != NULL, "nrLDPC_coding_aal.dpdk_core_list was not provided"); char dpdk_dev_full[32]; if (normalize_dpdk_dev(dpdk_dev, dpdk_dev_full, sizeof(dpdk_dev_full)) != 0) { @@ -1087,20 +1086,30 @@ int32_t nrLDPC_coding_init() return -1; } - int argc = 7; - char *argv[11] = {"bbdev", "-l", dpdk_core_list, "-a", dpdk_dev_full, "--file-prefix", dpdk_file_prefix, "--", "--", "--", "--"}; - if (vfio_vf_token != NULL) { - argc += 2; - argv[7] = "--vfio-vf-token"; - argv[8] = vfio_vf_token; - } - ret = rte_eal_init(argc, argv); - if (ret < 0) { - LOG_W(NR_PHY, "EAL initialization failed, probing DPDK device %s\n", dpdk_dev_full); - if (rte_dev_probe(dpdk_dev_full) != 0) { - LOG_E(NR_PHY, "bbdev %s not found\n", dpdk_dev_full); + // Detect if EAL was initialized by probing the device + LOG_I(NR_PHY, "Probing DPDK device %s to know if EAL is initialized. This may generate EAL error messages\n", dpdk_dev_full); + if (rte_dev_probe(dpdk_dev_full) != 0) { + LOG_I(NR_PHY, "Probing DPDK device %s failed, initializing EAL before continuing\n", dpdk_dev_full); + // EAL was not initialized yet + // We initialize EAL + AssertFatal(dpdk_core_list != NULL, "nrLDPC_coding_aal.dpdk_core_list was not provided"); + + int argc = 7; + char *argv[11] = + {"bbdev", "-l", dpdk_core_list, "-a", dpdk_dev_full, "--file-prefix", dpdk_file_prefix, "--", "--", "--", "--"}; + if (vfio_vf_token != NULL) { + argc += 2; + argv[7] = "--vfio-vf-token"; + argv[8] = vfio_vf_token; + } + ret = rte_eal_init(argc, argv); + if (ret < 0) { + LOG_E(NR_PHY, "EAL initialization failed\n"); return (-1); } + } else { + // EAL was already initialized + LOG_I(NR_PHY, "Probing DPDK device %s succeeded, skipping EAL initialization\n", dpdk_dev_full); } uint16_t nb_bbdevs = rte_bbdev_count(); AssertFatal(nb_bbdevs > 0, "no bbdev found"); From 6647af41168621bebb2c59c47bbf5c030b29e62f Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 2 Sep 2025 15:40:33 +0000 Subject: [PATCH 2/3] fix(ldpc_aal): Update documentation Update the documentation to reflect that the DPDK core list is not anymore necessary when using FHI 7.2. --- doc/LDPC_OFFLOAD_SETUP.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/LDPC_OFFLOAD_SETUP.md b/doc/LDPC_OFFLOAD_SETUP.md index cabac2cf39..c792d916e7 100644 --- a/doc/LDPC_OFFLOAD_SETUP.md +++ b/doc/LDPC_OFFLOAD_SETUP.md @@ -284,6 +284,10 @@ sudo ./nr_dlsim -n300 -s30 -R 106 -e 27 --loader.ldpc.shlibversion _aal --nrLDPC ### Running OAI gNB with USRP B210/FHI72 +When running the gNB **with FHI 7.2**, it is not necessary to provide the `--nrLDPC_coding_aal.dpdk_core_list` argument +since the core list specified for FHI 7.2 will be used for DPDK. +If it is provided, the AAL core list wil be ignored. + Example command: ```bash cd ~/openairinterface5g @@ -294,12 +298,6 @@ sudo ./nr-softmodem -O ~/gnb.conf --loader.ldpc.shlibversion _aal --nrLDPC_codin # Known Issue(s) -## BBDEV CPU Usage - -When running the E2E setup (this applies to both USRP and FHI72), BBDEV may not be using the list of CPU cores as specified by `nrLDPC_coding_aal.dpdk_core_list` accordingly. -This is an issue under investigation, and subject for future fixes. -In the meantime, we recommend allocating idle, and isolated CPU cores in the configuration for BBDEV. - ## Potential Low Throughput The current implementation has been tested to work in an end-to-end setup and is functional. From 79c113373625f55d8bd01fa0728e49b085d4619f Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 2 Sep 2025 15:49:19 +0000 Subject: [PATCH 3/3] fix(ldpc_aal): Documentation The tuning of the BLER is necessary for Intel ACC, not for the T2. --- doc/LDPC_OFFLOAD_SETUP.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/LDPC_OFFLOAD_SETUP.md b/doc/LDPC_OFFLOAD_SETUP.md index c792d916e7..c7473fffe2 100644 --- a/doc/LDPC_OFFLOAD_SETUP.md +++ b/doc/LDPC_OFFLOAD_SETUP.md @@ -301,10 +301,12 @@ sudo ./nr-softmodem -O ~/gnb.conf --loader.ldpc.shlibversion _aal --nrLDPC_codin ## Potential Low Throughput The current implementation has been tested to work in an end-to-end setup and is functional. -However, there are still opportunities for optimization, particularly in LDPC decoding performance, which is an area of ongoing improvement. +However, depending on the accelerator in use, +there are still opportunities for optimization, particularly in LDPC decoding performance, which is an area of ongoing improvement. As such, downlink/uplink throughput may be suboptimal with the default configurations, but enhancements are actively being explored. -To achieve better E2E performance with the current implementation, we recommend the following adjustments: +For example, to achieve better E2E performance with the current implementation with Intel ACC 100 and 200 (vRAN Boost), +we recommend the following adjustments: 1. Increasing the number of LDPC decoding iterations of the L1, e.g., `max_ldpc_iterations` to 200. 2. Increasing the BLER targets of the MAC scheduler.