From 604cfe870943125b16702e4320193b44c10751c7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 5 Feb 2024 17:38:46 +0100 Subject: [PATCH] Request timing every slot This is to align with monolithic/FAPI, where we get slot indications in each slot. In the nFAPI, this is replaced by timing information, such that the VNF ticks automatically, and gets indications from the PNF on early/late messages. The timing information handling is not implemented in the present nFAPI implementation. Instead, we adopt the FAPI behavior and send timing information in every slot, abusing it to be a slot indication. --- nfapi/oai_integration/nfapi_vnf.c | 2 +- nfapi/open-nFAPI/vnf/src/vnf_p7.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c index 17c431fa67..d60391f80c 100644 --- a/nfapi/oai_integration/nfapi_vnf.c +++ b/nfapi/oai_integration/nfapi_vnf.c @@ -1811,7 +1811,7 @@ void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, vnf.p7_vnfs[0].timing_window = 30; vnf.p7_vnfs[0].periodic_timing_enabled = 0; vnf.p7_vnfs[0].aperiodic_timing_enabled = 0; - vnf.p7_vnfs[0].periodic_timing_period = 10; + vnf.p7_vnfs[0].periodic_timing_period = 1; vnf.p7_vnfs[0].config = nfapi_vnf_p7_config_create(); NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() vnf.p7_vnfs[0].config:%p VNF ADDRESS:%s:%d\n", diff --git a/nfapi/open-nFAPI/vnf/src/vnf_p7.c b/nfapi/open-nFAPI/vnf/src/vnf_p7.c index d83a0aae29..8ceba4f62a 100644 --- a/nfapi/open-nFAPI/vnf/src/vnf_p7.c +++ b/nfapi/open-nFAPI/vnf/src/vnf_p7.c @@ -2092,9 +2092,9 @@ void vnf_nr_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7) // Panos: Careful here!!! Modification of the original nfapi-code //if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1) //printf("VNF-PNF delta - %d", vnf_pnf_sfnslot_delta); - if (vnf_pnf_sfnslot_delta != 0) + if (vnf_pnf_sfnslot_delta > 1) // we need to have a small delta, otherwise it would mean we don't advance { - NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SLOT DELTA between PNF and VNF. Delta %d. PNF:%d.%d VNF:%d.%d\n", + NFAPI_TRACE(NFAPI_TRACE_WARN, "%s() LARGE SFN/SLOT DELTA between PNF and VNF. Delta %d slots. PNF:%d.%d VNF:%d.%d\n", __FUNCTION__, vnf_pnf_sfnslot_delta, ind.last_sfn, ind.last_slot, vnf_p7->p7_connections[0].sfn, vnf_p7->p7_connections[0].slot);