Commit 2cb6fd08 authored by Xin Zhe Khooi's avatar Xin Zhe Khooi Committed by Robert Schmidt

Stubs for F1 Reset

parent f0f0cf80
......@@ -23,6 +23,10 @@
/* To setup F1 at DU */
MESSAGE_DEF(F1AP_DU_REGISTER_REQ, MESSAGE_PRIORITY_MED, f1ap_du_register_req_t, f1ap_du_register_req)
/* RESET */
MESSAGE_DEF(F1AP_RESET, MESSAGE_PRIORITY_MED, f1ap_reset_t, f1ap_reset)
MESSAGE_DEF(F1AP_RESET_ACK, MESSAGE_PRIORITY_MED, f1ap_reset_ack_t, f1ap_reset_ack)
/* eNB_DU application layer -> F1AP messages or CU F1AP -> RRC*/
MESSAGE_DEF(F1AP_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_setup_req_t , f1ap_setup_req)
MESSAGE_DEF(F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE , MESSAGE_PRIORITY_MED, f1ap_gnb_cu_configuration_update_acknowledge_t , f1ap_gnb_cu_configuration_update_acknowledge)
......
......@@ -34,6 +34,9 @@
#define F1AP_DU_REGISTER_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_du_register_req
#define F1AP_RESET(mSGpTR) (mSGpTR)->ittiMsg.f1ap_reset
#define F1AP_RESET_ACK(mSGpTR) (mSGpTR)->ittiMsg.f1ap_reset_ack
#define F1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_req
#define F1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp
#define F1AP_GNB_CU_CONFIGURATION_UPDATE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update
......@@ -78,6 +81,8 @@
#define F1AP_MAX_NO_OF_TNL_ASSOCIATIONS 32
#define F1AP_MAX_NO_UE_ID 1024
#define F1AP_MAX_NO_OF_INDIVIDUAL_CONNECTIONS_TO_RESET 65536
typedef net_ip_address_t f1ap_net_ip_address_t;
typedef struct f1ap_net_config_t {
......@@ -534,4 +539,29 @@ typedef struct f1ap_lost_connection_t {
int dummy;
} f1ap_lost_connection_t;
typedef enum F1AP_ResetType_e {
F1AP_RESET_ALL,
F1AP_RESET_PART_OF_F1_INTERFACE
} f1ap_ResetType_t;
typedef struct f1ap_reset_t {
uint64_t transaction_id;
f1ap_Cause_t cause;
long cause_value;
f1ap_ResetType_t reset_type;
struct {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
} ue_to_reset[F1AP_MAX_NO_OF_INDIVIDUAL_CONNECTIONS_TO_RESET];
} f1ap_reset_t;
typedef struct f1ap_reset_ack_t {
uint64_t transaction_id;
struct {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
} ue_to_reset[F1AP_MAX_NO_OF_INDIVIDUAL_CONNECTIONS_TO_RESET];
uint16_t criticality_diagnostics;
} f1ap_reset_ack_t;
#endif /* F1AP_MESSAGES_TYPES_H_ */
......@@ -35,12 +35,12 @@
#include "f1ap_itti_messaging.h"
#include "f1ap_cu_interface_management.h"
int CU_send_RESET(sctp_assoc_t assoc_id, F1AP_Reset_t *Reset)
int CU_send_RESET(sctp_assoc_t assoc_id, const f1ap_reset_t *reset)
{
AssertFatal(1==0,"Not implemented yet\n");
}
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
{
AssertFatal(1==0,"Not implemented yet\n");
}
......@@ -50,7 +50,7 @@ int CU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream,
AssertFatal(1==0,"Not implemented yet\n");
}
int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, F1AP_ResetAcknowledge_t *ResetAcknowledge)
int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack)
{
AssertFatal(1==0,"Not implemented yet\n");
}
......
......@@ -36,10 +36,10 @@
/*
* Reset
*/
int CU_send_RESET(sctp_assoc_t assoc_id, F1AP_Reset_t *Reset);
int CU_handle_RESET_ACKKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_send_RESET(sctp_assoc_t assoc_id, const f1ap_reset_t *reset);
int CU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, F1AP_ResetAcknowledge_t *ResetAcknowledge);
int CU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack);
/*
* Error Indication
......
......@@ -160,6 +160,10 @@ void *F1AP_CU_task(void *arg) {
&received_msg->ittiMsg.sctp_data_ind);
break;
case F1AP_RESET_ACK:
CU_send_RESET_ACKNOWLEDGE(assoc_id, &F1AP_RESET_ACK(received_msg));
break;
case F1AP_SETUP_RESP: // from rrc
CU_send_F1_SETUP_RESPONSE(assoc_id,
&F1AP_SETUP_RESP(received_msg));
......
......@@ -55,11 +55,12 @@ int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream,
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_send_RESET_ACKKNOWLEDGE(sctp_assoc_t assoc_id, F1AP_ResetAcknowledge_t *ResetAcknowledge) {
int DU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack)
{
AssertFatal(1==0,"Not implemented yet\n");
}
int DU_send_RESET(sctp_assoc_t assoc_id, F1AP_Reset_t *Reset)
int DU_send_RESET(sctp_assoc_t assoc_id, const f1ap_reset_t *reset)
{
AssertFatal(1==0,"Not implemented yet\n");
}
......
......@@ -37,8 +37,8 @@
* Reset
*/
int DU_handle_RESET(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
int DU_send_RESET_ACKKNOWLEDGE(sctp_assoc_t assoc_id, F1AP_ResetAcknowledge_t *ResetAcknowledge);
int DU_send_RESET(sctp_assoc_t assoc_id, F1AP_Reset_t *Reset);
int DU_send_RESET_ACKNOWLEDGE(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack);
int DU_send_RESET(sctp_assoc_t assoc_id, const f1ap_reset_t *reset);
int DU_handle_RESET_ACKNOWLEDGE(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
/*
......
......@@ -134,6 +134,10 @@ void *F1AP_DU_task(void *arg) {
DUuniqInstance = gtpInst;
} break;
case F1AP_RESET_ACK:
DU_send_RESET_ACKNOWLEDGE(assoc_id, &F1AP_RESET_ACK(msg));
break;
case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE:
DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(assoc_id,
&F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(msg));
......
......@@ -42,7 +42,10 @@
/* Handlers matrix. Only f1 related procedure present here */
static const f1ap_message_processing_t f1ap_messages_processing[][3] = {
{0, 0, 0}, /* Reset */
// TODO: How to handle RESET if CU/DU has their respective handlers?
// We need to check node type and call the right handler.
{DU_handle_RESET, CU_handle_RESET_ACKNOWLEDGE, 0}, /* Reset */
// {CU_handle_RESET, DU_handle_RESET_ACKNOWLEDGE, 0}, /* Reset */
{CU_handle_F1_SETUP_REQUEST, DU_handle_F1_SETUP_RESPONSE, DU_handle_F1_SETUP_FAILURE}, /* F1Setup */
{0, 0, 0}, /* ErrorIndication */
{CU_handle_gNB_DU_CONFIGURATION_UPDATE, 0, 0}, /* gNBDUConfigurationUpdate */
......
......@@ -95,6 +95,18 @@ static bool check_plmn_identity(const f1ap_plmn_t *check_plmn, const f1ap_plmn_t
return plmn->mcc == check_plmn->mcc && plmn->mnc_digit_length == check_plmn->mnc_digit_length && plmn->mnc == check_plmn->mnc;
}
void f1_reset_cu_initiated(const f1ap_reset_t *reset)
{
(void) reset;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
void f1_reset_acknowledge_du_initiated(const f1ap_reset_ack_t *ack)
{
(void) ack;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
void f1_setup_response(const f1ap_setup_resp_t *resp)
{
LOG_I(MAC, "received F1 Setup Response from CU %s\n", resp->gNB_CU_name);
......
......@@ -26,6 +26,8 @@
#include "f1ap_messages_types.h"
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
void f1_reset_cu_initiated(const f1ap_reset_t *reset);
void f1_reset_acknowledge_du_initiated(const f1ap_reset_ack_t *ack);
void f1_setup_response(const f1ap_setup_resp_t *resp);
void f1_setup_failure(const f1ap_setup_failure_t *failure);
void gnb_du_configuration_update_acknowledge(const f1ap_gnb_du_configuration_update_acknowledge_t *ack);
......
......@@ -25,6 +25,9 @@
#include "common/platform_types.h"
#include "f1ap_messages_types.h"
typedef void (*f1_reset_du_initiated_func_t)(const f1ap_reset_t *reset);
typedef void (*f1_reset_acknowledge_cu_initiated_func_t)(const f1ap_reset_ack_t *ack);
typedef void (*f1_setup_request_func_t)(const f1ap_setup_req_t* req);
typedef void (*gnb_du_configuration_update_t)(const f1ap_gnb_du_configuration_update_t *upd);
......
......@@ -24,6 +24,18 @@
#include "mac_rrc_ul.h"
static void f1_reset_du_initiated_direct(const f1ap_reset_t *reset)
{
(void) reset;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_reset_acknowledge_cu_initiated_direct(const f1ap_reset_ack_t *ack)
{
(void) ack;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_setup_request_direct(const f1ap_setup_req_t *req)
{
MessageDef *msg = itti_alloc_new_message(TASK_MAC_GNB, 0, F1AP_SETUP_REQ);
......@@ -284,6 +296,8 @@ static void initial_ul_rrc_message_transfer_direct(module_id_t module_id, const
void mac_rrc_ul_direct_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
{
mac_rrc->f1_reset = f1_reset_du_initiated_direct;
mac_rrc->f1_reset_acknowledge = f1_reset_acknowledge_cu_initiated_direct;
mac_rrc->f1_setup_request = f1_setup_request_direct;
mac_rrc->gnb_du_configuration_update = gnb_du_configuration_update_direct;
mac_rrc->ue_context_setup_response = ue_context_setup_response_direct;
......
......@@ -53,6 +53,17 @@ static f1ap_net_config_t read_DU_IP_config(const eth_params_t* f1_params, const
return nc;
}
static void f1_reset_du_initiated_f1ap(const f1ap_reset_t *reset)
{
(void) reset;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_reset_acknowledge_cu_initiated_f1ap(const f1ap_reset_ack_t *ack)
{
(void) ack;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_setup_request_f1ap(const f1ap_setup_req_t *req)
{
......@@ -275,6 +286,8 @@ static void initial_ul_rrc_message_transfer_f1ap(module_id_t module_id, const f1
void mac_rrc_ul_f1ap_init(struct nr_mac_rrc_ul_if_s *mac_rrc)
{
mac_rrc->f1_reset = f1_reset_du_initiated_f1ap;
mac_rrc->f1_reset_acknowledge = f1_reset_acknowledge_cu_initiated_f1ap;
mac_rrc->f1_setup_request = f1_setup_request_f1ap;
mac_rrc->gnb_du_configuration_update = gnb_du_configuration_update_f1ap;
mac_rrc->ue_context_setup_response = ue_context_setup_response_f1ap;
......
......@@ -690,6 +690,8 @@ typedef struct NR_bler_options {
} NR_bler_options_t;
typedef struct nr_mac_rrc_ul_if_s {
f1_reset_du_initiated_func_t f1_reset;
f1_reset_acknowledge_cu_initiated_func_t f1_reset_acknowledge;
f1_setup_request_func_t f1_setup_request;
gnb_du_configuration_update_t gnb_du_configuration_update;
ue_context_setup_response_func_t ue_context_setup_response;
......
......@@ -25,6 +25,9 @@
#include "common/platform_types.h"
#include "f1ap_messages_types.h"
typedef void (*f1_reset_cu_initiated_func_t)(sctp_assoc_t assoc_id, const f1ap_reset_t *reset);
typedef void (*f1_reset_acknowledge_du_initiated_func_t)(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack);
typedef void (*f1_setup_response_func_t)(sctp_assoc_t assoc_id, const f1ap_setup_resp_t *resp);
typedef void (*f1_setup_failure_func_t)(sctp_assoc_t assoc_id, const f1ap_setup_failure_t *fail);
typedef void (*gnb_du_configuration_update_ack_func_t)(sctp_assoc_t assoc_id,
......
......@@ -24,6 +24,18 @@
#include "mac_rrc_dl.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
static void f1_reset_cu_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset_t *reset)
{
(void)reset;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_reset_acknowledge_du_initiated_direct(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack)
{
(void)ack;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_setup_response_direct(sctp_assoc_t assoc_id, const f1ap_setup_resp_t *resp)
{
AssertFatal(assoc_id == -1, "illegal assoc_id %d\n", assoc_id);
......@@ -80,6 +92,8 @@ static void dl_rrc_message_transfer_direct(sctp_assoc_t assoc_id, const f1ap_dl_
void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc)
{
mac_rrc->f1_reset = f1_reset_cu_initiated_direct;
mac_rrc->f1_reset_acknowledge = f1_reset_acknowledge_du_initiated_direct;
mac_rrc->f1_setup_response = f1_setup_response_direct;
mac_rrc->f1_setup_failure = f1_setup_failure_direct;
mac_rrc->gnb_du_configuration_update_acknowledge = gnb_du_configuration_update_ack_direct;
......
......@@ -24,6 +24,18 @@
#include "mac_rrc_dl.h"
#include "nr_rrc_defs.h"
static void f1_reset_cu_initiated_f1ap(sctp_assoc_t assoc_id, const f1ap_reset_t *reset)
{
(void)reset;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_reset_acknowledge_du_initiated_f1ap(sctp_assoc_t assoc_id, const f1ap_reset_ack_t *ack)
{
(void)ack;
AssertFatal(false, "%s() not implemented yet\n", __func__);
}
static void f1_setup_response_f1ap(sctp_assoc_t assoc_id, const f1ap_setup_resp_t *resp)
{
MessageDef *msg = itti_alloc_new_message(TASK_RRC_GNB, 0, F1AP_SETUP_RESP);
......@@ -215,6 +227,8 @@ static void dl_rrc_message_transfer_f1ap(sctp_assoc_t assoc_id, const f1ap_dl_rr
void mac_rrc_dl_f1ap_init(nr_mac_rrc_dl_if_t *mac_rrc)
{
mac_rrc->f1_reset = f1_reset_cu_initiated_f1ap;
mac_rrc->f1_reset_acknowledge = f1_reset_acknowledge_du_initiated_f1ap;
mac_rrc->f1_setup_response = f1_setup_response_f1ap;
mac_rrc->f1_setup_failure = f1_setup_failure_f1ap;
mac_rrc->gnb_du_configuration_update_acknowledge = gnb_du_configuration_update_ack_f1ap;
......
......@@ -398,6 +398,8 @@ typedef struct neighbour_cell_configuration_s {
} neighbour_cell_configuration_t;
typedef struct nr_mac_rrc_dl_if_s {
f1_reset_cu_initiated_func_t f1_reset;
f1_reset_acknowledge_du_initiated_func_t f1_reset_acknowledge;
f1_setup_response_func_t f1_setup_response;
f1_setup_failure_func_t f1_setup_failure;
gnb_du_configuration_update_ack_func_t gnb_du_configuration_update_acknowledge;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment