Merge remote-tracking branch 'origin/fapi-wls-integration' into integration_2025_w29 (!3346)

Add WLS as a transport option for VNF/PNF, refactor existing options

This MR adds a new transport mechanism for the VNF and PNF split, using
the Intel WLS library, which makes use of DPDK and shared memory to
transport messages. This transport mechanism is what is used to
interface with Radisys ODU, while also working with OAI VNF/PNF.

The VNF and PNF have been refactored so that the transport-specific
functions are isolated from the rest of the logic, and as such,
interchangeable by means of function pointers.

The same change is done for the packing/unpacking procedures, allowing
to switch between FAPI and nFAPI encoding.

This MR also reduces the amount of duplicated code, by refactoring the
VNF with Aerial, which now only has the transport-relevant functions, as
well as the ones that are unique to it ( for example, the unpacking
procedures where a secondary data buffer is used for the message
payloads )

Additionally a new callback is added to the VNF to process
ERROR.indication messages, which currently only indicates which message
originated the error, and which error occurred.
This commit is contained in:
Robert Schmidt
2025-07-15 15:44:02 +02:00
88 changed files with 4871 additions and 3525 deletions
+4 -6
View File
@@ -78,9 +78,7 @@
#include "uper_encoder.h"
#include "utils.h"
#include "x2ap_messages_types.h"
#ifdef ENABLE_AERIAL
#include "nfapi/oai_integration/aerial/fapi_vnf_p5.h"
#endif
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
@@ -1759,15 +1757,15 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
RC.nrmac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
RC.nrmac[j]->eth_params_s.transp_preference = ETH_UDP_MODE;
configure_nr_nfapi_vnf(
RC.nrmac[j]->eth_params_s.my_addr, RC.nrmac[j]->eth_params_s.my_portc, RC.nrmac[j]->eth_params_s.remote_addr, RC.nrmac[j]->eth_params_s.remote_portd, RC.nrmac[j]->eth_params_s.my_portd);
configure_nr_nfapi_vnf(RC.nrmac[j]->eth_params_s);
} else if(strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "aerial") == 0){
#ifdef ENABLE_AERIAL
RC.nrmac[j]->nvipc_params_s.nvipc_shm_prefix =
strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_SHM_PREFIX].strptr));
RC.nrmac[j]->nvipc_params_s.nvipc_poll_core = *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_POLL_CORE].i8ptr);
LOG_I(GNB_APP, "Configuring VNF for Aerial connection with prefix %s\n", RC.nrmac[j]->eth_params_s.local_if_name);
aerial_configure_nr_fapi_vnf();
configure_nr_nfapi_vnf(RC.nrmac[j]->eth_params_s);
#endif
} else { // other midhaul
AssertFatal(1 == 0, "MACRLC %d: %s unknown southbound midhaul\n", j, *(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr));
+20 -24
View File
@@ -853,12 +853,11 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
{
nfapi_nr_dl_tti_request_t *dl_tti_request = malloc16(sizeof(*dl_tti_request));
if (nfapi_nr_p7_message_unpack(buffer, len, dl_tti_request,
sizeof(*dl_tti_request), NULL) < 0)
{
LOG_E(NR_PHY, "Message dl_tti_request failed to unpack\n");
break;
}
const bool result = nfapi_nr_p7_message_unpack(buffer, len, dl_tti_request, sizeof(*dl_tti_request), NULL);
if (!result) {
LOG_E(NR_PHY, "Message dl_tti_request failed to unpack\n");
break;
}
LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST message in sfn/slot %d %d. \n",
dl_tti_request->SFN, dl_tti_request->Slot);
@@ -877,12 +876,11 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
{
nfapi_nr_tx_data_request_t *tx_data_request = malloc16(sizeof(*tx_data_request));
if (nfapi_nr_p7_message_unpack(buffer, len, tx_data_request,
sizeof(*tx_data_request), NULL) < 0)
{
LOG_E(NR_PHY, "Message tx_data_request failed to unpack\n");
break;
}
const bool result = nfapi_nr_p7_message_unpack(buffer, len, tx_data_request, sizeof(*tx_data_request), NULL);
if (!result) {
LOG_E(NR_PHY, "Message tx_data_request failed to unpack\n");
break;
}
LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST message in SFN/slot %d %d. \n",
tx_data_request->SFN, tx_data_request->Slot);
if (!put_queue(&nr_tx_req_queue, tx_data_request))
@@ -897,12 +895,11 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
{
nfapi_nr_ul_dci_request_t *ul_dci_request = malloc16(sizeof(*ul_dci_request));
if (nfapi_nr_p7_message_unpack(buffer, len, ul_dci_request,
sizeof(*ul_dci_request), NULL) < 0)
{
LOG_E(NR_PHY, "Message ul_dci_request failed to unpack\n");
break;
}
const bool result = nfapi_nr_p7_message_unpack(buffer, len, ul_dci_request, sizeof(*ul_dci_request), NULL);
if (!result) {
LOG_E(NR_PHY, "Message ul_dci_request failed to unpack\n");
break;
}
LOG_D(NR_PHY, "Received an NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST message in SFN/slot %d %d. \n",
ul_dci_request->SFN, ul_dci_request->Slot);
if (!put_queue(&nr_ul_dci_req_queue, ul_dci_request))
@@ -917,12 +914,11 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
{
nfapi_nr_ul_tti_request_t *ul_tti_request = malloc16(sizeof(*ul_tti_request));
if (nfapi_nr_p7_message_unpack(buffer, len, ul_tti_request,
sizeof(*ul_tti_request), NULL) < 0)
{
LOG_E(NR_PHY, "Message ul_tti_request failed to unpack\n");
break;
}
const bool result = nfapi_nr_p7_message_unpack(buffer, len, ul_tti_request, sizeof(*ul_tti_request), NULL);
if (!result) {
LOG_E(NR_PHY, "Message ul_tti_request failed to unpack\n");
break;
}
/* We are filtering UL_TTI_REQs below. We only care about UL_TTI_REQs that
will trigger sending a ul_harq (CRC/RX pair). This UL_TTI_REQ will have
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE. If we have not yet completed the CBRA/
+5 -9
View File
@@ -6582,15 +6582,11 @@ void process_nr_nsa_msg(nsa_msg_t *msg, int msg_len)
}
nfapi_nr_dl_tti_request_t dl_tti_request;
int unpack_len = nfapi_nr_p7_message_unpack((void *)msg_buffer,
msg_len,
&dl_tti_request,
sizeof(nfapi_nr_dl_tti_request_t),
NULL);
if (unpack_len < 0)
{
LOG_E(RRC, "%s: SSB PDU unpack failed \n", __FUNCTION__);
break;
const bool result =
nfapi_nr_p7_message_unpack((void *)msg_buffer, msg_len, &dl_tti_request, sizeof(nfapi_nr_dl_tti_request_t), NULL);
if (!result) {
LOG_E(RRC, "%s: SSB PDU unpack failed \n", __FUNCTION__);
break;
}
int num_pdus = dl_tti_request.dl_tti_request_body.nPDUs;
if (num_pdus <= 0)