Commit ac3db89e authored by Bing-Kai Hong's avatar Bing-Kai Hong

Remove the dummy value in DU, and store the payload data in DU

parent 7732b49a
...@@ -66,6 +66,12 @@ typedef struct f1ap_setup_req_s { ...@@ -66,6 +66,12 @@ typedef struct f1ap_setup_req_s {
// Midhaul networking parameters // Midhaul networking parameters
/* Connexion id used between SCTP/F1AP */
uint16_t cnx_id;
/* SCTP association id */
int32_t assoc_id;
/* The eNB IP address to bind */ /* The eNB IP address to bind */
f1ap_net_ip_address_t CU_f1_ip_address; f1ap_net_ip_address_t CU_f1_ip_address;
f1ap_net_ip_address_t DU_f1_ip_address; f1ap_net_ip_address_t DU_f1_ip_address;
...@@ -91,20 +97,20 @@ typedef struct f1ap_setup_req_s { ...@@ -91,20 +97,20 @@ typedef struct f1ap_setup_req_s {
/* Mobile Country Codes /* Mobile Country Codes
* Mobile Network Codes * Mobile Network Codes
*/ */
uint16_t mcc[F1AP_MAX_NB_CELLS]; uint16_t mcc[F1AP_MAX_NB_CELLS];//[6];
uint16_t mnc[F1AP_MAX_NB_CELLS]; uint16_t mnc[F1AP_MAX_NB_CELLS];//[6];
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS]; uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];//[6];
// NR Physical Cell Ids // NR Physical Cell Ids
uint16_t nr_pci[F1AP_MAX_NB_CELLS]; uint16_t nr_pci[F1AP_MAX_NB_CELLS];
// NR Cell Ids // NR Cell Ids
uint8_t nr_cellid[F1AP_MAX_NB_CELLS]; uint8_t nr_cellid[F1AP_MAX_NB_CELLS];
// Number of slide support items (max 16, could be increased to as much as 1024) // Number of slide support items (max 16, could be increased to as much as 1024)
uint16_t num_ssi[F1AP_MAX_NB_CELLS]; uint16_t num_ssi[F1AP_MAX_NB_CELLS];//[6];
uint8_t sst[F1AP_MAX_NB_CELLS][16]; uint8_t sst[F1AP_MAX_NB_CELLS];//[16][6];
uint8_t sd[F1AP_MAX_NB_CELLS][16]; uint8_t sd[F1AP_MAX_NB_CELLS];//[16][6];
// tdd_flag = 0 means FDD, 1 means TDD // fdd_flag = 1 means FDD, 0 means TDD
int tdd_flag; int fdd_flag;
union { union {
struct { struct {
......
...@@ -2432,10 +2432,12 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2432,10 +2432,12 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
F1AP_SETUP_REQ (msg_p).nr_pci[k] = rrc->carrier[0].physCellId; F1AP_SETUP_REQ (msg_p).nr_pci[k] = rrc->carrier[0].physCellId;
F1AP_SETUP_REQ (msg_p).nr_cellid[k] = 0; F1AP_SETUP_REQ (msg_p).nr_cellid[k] = 0;
F1AP_SETUP_REQ (msg_p).num_ssi[k] = 0; F1AP_SETUP_REQ (msg_p).num_ssi[k] = 0;
if (rrc->carrier[0].sib1->tdd_Config) { if (rrc->carrier[0].sib1->tdd_Config) {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k); LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k);
F1AP_SETUP_REQ (msg_p).tdd_flag = 1; F1AP_SETUP_REQ (msg_p).fdd_flag = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator, F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq); rrc->carrier[0].dl_CarrierFreq);
// For LTE use scs field to carry prefix type and number of antennas // For LTE use scs field to carry prefix type and number of antennas
...@@ -2449,8 +2451,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2449,8 +2451,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
} }
else { else {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k); LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k);
F1AP_SETUP_REQ (msg_p).tdd_flag = 0; F1AP_SETUP_REQ (msg_p).fdd_flag = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator, F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq); rrc->carrier[0].dl_CarrierFreq);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_arfcn = F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn; F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_arfcn = F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn;
......
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#include "common/ran_context.h" #include "common/ran_context.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
static f1ap_setup_resp_t *f1ap_cu_data;
/* This structure describes association of a DU to a CU */ /* This structure describes association of a DU to a CU */
typedef struct f1ap_info { typedef struct f1ap_info {
...@@ -166,6 +168,14 @@ void *F1AP_CU_task(void *arg) { ...@@ -166,6 +168,14 @@ void *F1AP_CU_task(void *arg) {
CU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); CU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind);
break; break;
// case F1AP_SETUP_RESPONSE: // This is from RRC
// CU_send_F1_SETUP_RESPONSE(instance, *f1ap_setup_ind, &(F1AP_SETUP_RESP) f1ap_setup_resp)
// break;
// case F1AP_SETUP_FAILURE: // This is from RRC
// CU_send_F1_SETUP_FAILURE(instance, *f1ap_setup_ind, &(F1AP_SETUP_FAILURE) f1ap_setup_failure)
// break;
case TERMINATE_MESSAGE: case TERMINATE_MESSAGE:
LOG_W(CU_F1AP, " *** Exiting CU_F1AP thread\n"); LOG_W(CU_F1AP, " *** Exiting CU_F1AP thread\n");
itti_exit_task(); itti_exit_task();
...@@ -211,6 +221,11 @@ void CU_handle_F1_SETUP_REQUEST(F1AP_F1SetupRequest_t *message_p) { ...@@ -211,6 +221,11 @@ void CU_handle_F1_SETUP_REQUEST(F1AP_F1SetupRequest_t *message_p) {
/* handle */ /* handle */
// fill f1ap_setup_req_t
// send ITTI F1AP_SETUP_REQ to RRC
// return
// send successful callback // send successful callback
//CU_send_F1_SETUP_RESPONSE(); //CU_send_F1_SETUP_RESPONSE();
// or failure callback // or failure callback
...@@ -218,7 +233,7 @@ void CU_handle_F1_SETUP_REQUEST(F1AP_F1SetupRequest_t *message_p) { ...@@ -218,7 +233,7 @@ void CU_handle_F1_SETUP_REQUEST(F1AP_F1SetupRequest_t *message_p) {
} }
void CU_send_F1_SETUP_RESPONSE(instance_t instance, sctp_new_association_ind_t *f1ap_setup_ind) { void CU_send_F1_SETUP_RESPONSE(instance_t instance, sctp_new_association_ind_t *f1ap_setup_ind, f1ap_setup_resp_t *f1ap_setup_resp) {
//void CU_send_F1_SETUP_RESPONSE(F1AP_F1SetupResponse_t *F1SetupResponse) { //void CU_send_F1_SETUP_RESPONSE(F1AP_F1SetupResponse_t *F1SetupResponse) {
//AssertFatal(1==0,"Not implemented yet\n"); //AssertFatal(1==0,"Not implemented yet\n");
......
...@@ -19,45 +19,9 @@ ...@@ -19,45 +19,9 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include <stdint.h>
#include "queue.h"
#include "tree.h"
#include "sctp_eNB_defs.h"
#ifndef CU_F1AP_DEFS_H_ #ifndef CU_F1AP_DEFS_H_
#define CU_F1AP_DEFS_H_ #define CU_F1AP_DEFS_H_
struct cu_f1ap_instance_s;
typedef struct du_f1ap_instance_s {
/* Next f1ap du association.
* Only used for virtual mode.
*/
/* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */
instance_t instance;
// F1_Setup_Req payload
uint32_t gNB_CU_id;
char *gNB_CU_name;
/* Unique eNB_id to identify the eNB within EPC.
* In our case the eNB is a macro eNB so the id will be 20 bits long.
* For Home eNB id, this field should be 28 bits long.
*/
uint32_t eNB_id;
/* Tracking area code */
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
} cu_f1ap_instance_t;
#endif /* CU_F1AP_DEFS_H_ */ #endif /* CU_F1AP_DEFS_H_ */
This diff is collapsed.
...@@ -19,45 +19,8 @@ ...@@ -19,45 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include <stdint.h>
#include "queue.h"
#include "tree.h"
#include "sctp_eNB_defs.h"
#ifndef DU_F1AP_DEFS_H_ #ifndef DU_F1AP_DEFS_H_
#define DU_F1AP_DEFS_H_ #define DU_F1AP_DEFS_H_
struct du_f1ap_instance_s;
typedef struct du_f1ap_instance_s {
/* Next f1ap du association.
* Only used for virtual mode.
*/
/* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */
instance_t instance;
// F1_Setup_Req payload
uint32_t gNB_DU_id;
char *gNB_DU_name;
/* Unique eNB_id to identify the eNB within EPC.
* In our case the eNB is a macro eNB so the id will be 20 bits long.
* For Home eNB id, this field should be 28 bits long.
*/
uint32_t eNB_id;
/* Tracking area code */
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
} du_f1ap_instance_t;
#endif /* DU_F1AP_DEFS_H_ */ #endif /* DU_F1AP_DEFS_H_ */
...@@ -19,45 +19,9 @@ ...@@ -19,45 +19,9 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include <stdint.h>
#include "queue.h"
#include "tree.h"
#include "sctp_eNB_defs.h"
#ifndef DU_F1AP_DEFS_H_ #ifndef DU_F1AP_DEFS_H_
#define DU_F1AP_DEFS_H_ #define DU_F1AP_DEFS_H_
struct du_f1ap_instance_s;
typedef struct du_f1ap_instance_s {
/* Next f1ap du association.
* Only used for virtual mode.
*/
/* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */
instance_t instance;
// F1_Setup_Req payload
uint32_t gNB_DU_id;
char *gNB_DU_name;
/* Unique eNB_id to identify the eNB within EPC.
* In our case the eNB is a macro eNB so the id will be 20 bits long.
* For Home eNB id, this field should be 28 bits long.
*/
uint32_t eNB_id;
/* Tracking area code */
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
} du_f1ap_instance_t;
#endif /* DU_F1AP_DEFS_H_ */ #endif /* DU_F1AP_DEFS_H_ */
...@@ -86,7 +86,7 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length) ...@@ -86,7 +86,7 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length)
DevAssert(buffer != NULL); DevAssert(buffer != NULL);
DevAssert(length != NULL); DevAssert(length != NULL);
//xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu); xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer); encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer);
if (encoded < 0) { if (encoded < 0) {
......
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