Merge remote-tracking branch 'origin/fapi-stop-exchange' into integration_2025_w48 (!3561)
Implementation of STOP exchange This implements the STOP.request/indication for all 3 transport mechanisms, the VNF will send the STOP.request to the PNF, indicating it will disconnect, and await a STOP.indication from the PNF The WLS VNF is reworked to be able to start before the PNF, by calling call rte_eal_init and rte_dev_probe to determine if dpdk has been initialized properly, before calling rte_eal_init in the intended process when it is appropriate to do so
This commit is contained in:
@@ -36,4 +36,5 @@ bool pnf_nr_send_p5_message(pnf_t *pnf, nfapi_nr_p4_p5_message_header_t *msg, ui
|
||||
bool pnf_nr_send_p7_message(pnf_p7_t* pnf_p7, nfapi_nr_p7_message_header_t* header, uint32_t msg_len);
|
||||
void *pnf_start_p5_thread(void *ptr);
|
||||
void *pnf_nr_p7_thread_start(void *ptr);
|
||||
void socket_nfapi_nr_pnf_stop();
|
||||
#endif // SOCKET_PNF_H
|
||||
|
||||
@@ -31,4 +31,5 @@ bool vnf_nr_send_p5_msg(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_head
|
||||
bool vnf_nr_send_p7_msg(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t* header);
|
||||
void vnf_start_p5_thread(void* ptr);
|
||||
void* vnf_nr_start_p7_thread(void* ptr);
|
||||
void socket_nfapi_send_stop_request(vnf_t *vnf);
|
||||
#endif // SOCKET_VNF_H
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
*/
|
||||
#include "socket_pnf.h"
|
||||
#include "nfapi.h"
|
||||
static nfapi_pnf_config_t *config;
|
||||
void socket_nfapi_nr_pnf_stop()
|
||||
{
|
||||
AssertFatal(config->nr_stop_req, "STOP.request Handler should be set!");
|
||||
nfapi_nr_stop_request_scf_t req = {0};
|
||||
req.header.phy_id = 0;
|
||||
req.header.message_id = NFAPI_NR_PHY_MSG_TYPE_PNF_STOP_REQUEST;
|
||||
config->nr_stop_req(config, 0, &req);
|
||||
}
|
||||
|
||||
bool pnf_nr_send_p5_message(pnf_t *pnf, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len)
|
||||
{
|
||||
@@ -148,7 +157,7 @@ bool pnf_nr_send_p7_message(pnf_p7_t *pnf_p7, nfapi_nr_p7_message_header_t *head
|
||||
void *pnf_start_p5_thread(void *ptr)
|
||||
{
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] IN PNF NFAPI start thread %s\n", __FUNCTION__);
|
||||
nfapi_pnf_config_t *config = (nfapi_pnf_config_t *)ptr;
|
||||
config = (nfapi_pnf_config_t *)ptr;
|
||||
struct sched_param sp;
|
||||
sp.sched_priority = 20;
|
||||
pthread_setschedparam(pthread_self(), SCHED_FIFO, &sp);
|
||||
|
||||
@@ -20,9 +20,26 @@
|
||||
*/
|
||||
#include "socket_vnf.h"
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "nfapi.h"
|
||||
#include "nfapi_vnf.h"
|
||||
#include <common/platform_constants.h>
|
||||
#include "nfapi/oai_integration/vendor_ext.h" //TODO: Remove this include when removing the Aerial transport stuff
|
||||
|
||||
|
||||
void socket_stop_nfapi_p5_p7()
|
||||
{
|
||||
get_p7_vnf()->terminate = 1;
|
||||
get_config()->pnf_disconnect_indication = NULL;
|
||||
}
|
||||
|
||||
void socket_nfapi_send_stop_request(vnf_t *vnf)
|
||||
{
|
||||
nfapi_nr_stop_request_scf_t req = {.header.message_id = NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST, .header.phy_id = 0};
|
||||
nfapi_nr_vnf_stop_req(&vnf->_public, 0, &req);
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "Sent NFAPI STOP.request\n");
|
||||
}
|
||||
|
||||
static bool send_p5_msg(vnf_t *vnf, nfapi_vnf_pnf_info_t *pnf, const void *msg, int len, uint8_t stream)
|
||||
{
|
||||
int result = socket_send_p5_msg(vnf->sctp, pnf->p5_sock, &pnf->p5_pnf_sockaddr, msg, len, stream);
|
||||
@@ -279,7 +296,6 @@ static int nfapi_nr_vnf_p5_start(nfapi_vnf_config_t *config)
|
||||
// Verify that config is not null
|
||||
if (config == 0)
|
||||
return -1;
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s()\n", __FUNCTION__);
|
||||
|
||||
int p5ListenSock, p5Sock;
|
||||
@@ -293,7 +309,7 @@ static int nfapi_nr_vnf_p5_start(nfapi_vnf_config_t *config)
|
||||
struct sctp_initmsg initMsg = {0};
|
||||
int noDelay;
|
||||
|
||||
vnf_t *vnf = (vnf_t *)(config);
|
||||
vnf_t *vnf = (vnf_t *)(get_config());
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "Starting P5 VNF connection on port %u\n", config->vnf_p5_port);
|
||||
|
||||
@@ -747,8 +763,8 @@ static int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t *config)
|
||||
return -1;
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s()\n", __FUNCTION__);
|
||||
|
||||
vnf_p7_t *vnf_p7 = (vnf_p7_t *)config;
|
||||
vnf_p7_t *vnf_p7 = get_p7_vnf();
|
||||
vnf_p7 = (vnf_p7_t *)config;
|
||||
|
||||
// Create p7 receive udp port
|
||||
// todo : this needs updating for Ipv6
|
||||
|
||||
Reference in New Issue
Block a user