From c978d1664f7fe03a5d0ebb3c1d7d0fad38dd5a27 Mon Sep 17 00:00:00 2001 From: Xin Zhe Khooi Date: Mon, 19 Jan 2026 08:59:46 +0000 Subject: [PATCH] nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode PROBLEM: In PNF mode, L1 is started from nfapi_pnf.c without verifying RU readiness. The only gate is config_sync_var, but nr_softmodem.c sets this before the RU (e.g., FHI-72) is actually started. As a result, START_REQUEST can trigger L1 init while the RU is not yet ready -- this is an issue when using FHI72 with DPDK BBDEV, where a pre-mature L1 init will crash the entire program as DPDK BBDEV depends on xRAN's DPDK EAL. FIX: Perform RU readiness checks before setting config_sync_var in NFAPI PNF mode. This aligns PNF behavior with other modes and prevents L1 from starting before the RU is operational. --- executables/nr-softmodem.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 8a57b21af1..e632180782 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -637,8 +637,8 @@ int main( int argc, char **argv ) { } - config_sync_var=0; - + if (NFAPI_MODE != NFAPI_MODE_PNF) + config_sync_var = 0; #ifdef E2_AGENT @@ -662,6 +662,11 @@ int main( int argc, char **argv ) { if (RC.nb_RU > 0) start_NR_RU(); + if (NFAPI_MODE == NFAPI_MODE_PNF) { + wait_RUs(); + config_sync_var = 0; + } + #ifdef ENABLE_AERIAL gNB_MAC_INST *nrmac = RC.nrmac[0]; nvIPC_Init(nrmac->nvipc_params_s);