Commit 7a22573f authored by laurent's avatar laurent Committed by Sakthivel Velumani

fix compile issues, simplify gtp send function

parent 0209011a
......@@ -74,6 +74,11 @@ uint16_t n_rnti = 0x1234;
openair0_config_t openair0_cfg[MAX_CARDS];
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
nfapi_mode_t nfapi_mod;
nfapi_mode_t nfapi_getmode(void) {
return nfapi_mod;
}
void nfapi_setmode(nfapi_mode_t nfapi_mode) { nfapi_mod=nfapi_mode; }
nrUE_params_t nrUE_params={0};
......
......@@ -61,7 +61,7 @@
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "NR_RRCReconfiguration.h"
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
......@@ -101,25 +101,9 @@ nfapi_ue_release_request_body_t release_rntis;
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t DUuniqInstance=0;
instance_t CUuniqInstance=0;
teid_t newGtpuCreateTunnel(instance_t instance,
rnti_t rnti,
int incoming_bearer_id,
int outgoing_bearer_id,
teid_t outgoing_teid,
int qfi,
transport_layer_addr_t remoteAddr,
int port,
gtpCallback callBack,
gtpCallbackSDAP callBackSDAP) {
return 0;
}
int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
return 0;
}
// dummy functions
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const int CC_id,
......@@ -159,15 +143,6 @@ rrc_data_ind(
{
}
int
gtpv1u_create_s1u_tunnel(
const instance_t instanceP,
const gtpv1u_enb_create_tunnel_req_t *const create_tunnel_req_pP,
gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP
) {
return 0;
}
int
rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t *const ctxt_pP,
......@@ -177,32 +152,6 @@ rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
return 0;
}
int
gtpv1u_create_ngu_tunnel(
const instance_t instanceP,
const gtpv1u_gnb_create_tunnel_req_t * const create_tunnel_req_pP,
gtpv1u_gnb_create_tunnel_resp_t * const create_tunnel_resp_pP){
return 0;
}
int
gtpv1u_update_ngu_tunnel(
const instance_t instanceP,
const gtpv1u_gnb_create_tunnel_req_t *const create_tunnel_req_pP,
const rnti_t prior_rnti
){
return 0;
}
int gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
return 0;
}
int gtpv1u_delete_ngu_tunnel( const instance_t instance,
gtpv1u_gnb_delete_tunnel_req_t *req) {
return 0;
}
int
nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t *const ctxt_pP,
......@@ -254,18 +203,6 @@ void processSlotTX(void *arg) {}
nr_bler_struct nr_bler_data[NR_NUM_MCS];
//nFAPI P7 dummy functions to avoid linking errors
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); }
// needed for some functions
openair0_config_t openair0_cfg[MAX_CARDS];
void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSize, uint8_t *mcsIndex,int8_t *ptrs_arg);
......
......@@ -17,27 +17,6 @@ int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0);
int32_t get_uldl_offset(int nr_bandP) { return(0); }
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);}
nfapi_mode_t nfapi_mod;
nfapi_mode_t nfapi_getmode(void) {
return nfapi_mod;
}
void nfapi_setmode(nfapi_mode_t nfapi_mode) {}
int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) { return(0); }
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind,
fapi_nr_rx_indication_t *rx_ind,
UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue,
uint8_t gNB_id,
void *phy_data) {}
void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
uint8_t pdu_type,
uint8_t gNB_id,
PHY_VARS_NR_UE *ue,
NR_UE_DLSCH_t *dlsch0,
NR_UE_DLSCH_t *dlsch1,
uint16_t n_pdus,
UE_nr_rxtx_proc_t *proc,
void *typeSpecific ) {}
......@@ -63,7 +63,6 @@ void fill_scc_sim(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_R
void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap);
void prepare_scc(NR_ServingCellConfigCommon_t *scc);
void prepare_scd(NR_ServingCellConfig_t *scd);
ngap_gNB_config_t ngap_config;
uint32_t ngap_generate_gNB_id(void) {return 0;}
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;}
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;}
......
......@@ -59,7 +59,6 @@ RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
//uint8_t nfapi_mode = 0;
uint16_t NB_UE_INST = 1;
// needed for some functions
......@@ -67,6 +66,11 @@ openair0_config_t openair0_cfg[MAX_CARDS];
uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1};
nfapi_mode_t nfapi_mod;
nfapi_mode_t nfapi_getmode(void) {
return nfapi_mod;
}
uint64_t get_softmodem_optmask(void) {return 0;}
static softmodem_params_t softmodem_params;
softmodem_params_t *get_softmodem_params(void) {
......
......@@ -93,22 +93,6 @@ int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0);
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t DUuniqInstance=0;
instance_t CUuniqInstance=0;
teid_t newGtpuCreateTunnel(instance_t instance,
rnti_t rnti,
int incoming_bearer_id,
int outgoing_bearer_id,
teid_t outgoing_teid,
int qfi,
transport_layer_addr_t remoteAddr,
int port,
gtpCallback callBack,
gtpCallbackSDAP callBackSDAP) {
return 0;
}
int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
return 0;
}
void
rrc_data_ind(
......@@ -120,15 +104,6 @@ rrc_data_ind(
{
}
int
gtpv1u_create_s1u_tunnel(
const instance_t instanceP,
const gtpv1u_enb_create_tunnel_req_t *const create_tunnel_req_pP,
gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP
) {
return 0;
}
int
rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t *const ctxt_pP,
......@@ -138,32 +113,6 @@ rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
return 0;
}
int
gtpv1u_create_ngu_tunnel(
const instance_t instanceP,
const gtpv1u_gnb_create_tunnel_req_t * const create_tunnel_req_pP,
gtpv1u_gnb_create_tunnel_resp_t * const create_tunnel_resp_pP){
return 0;
}
int
gtpv1u_update_ngu_tunnel(
const instance_t instanceP,
const gtpv1u_gnb_create_tunnel_req_t *const create_tunnel_req_pP,
const rnti_t prior_rnti
){
return 0;
}
int gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
return 0;
}
int gtpv1u_delete_ngu_tunnel( const instance_t instance,
gtpv1u_gnb_delete_tunnel_req_t *req) {
return 0;
}
int
nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t *const ctxt_pP,
......
......@@ -67,6 +67,12 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}};
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
nfapi_mode_t nfapi_mod;
nfapi_mode_t nfapi_getmode(void) {
return nfapi_mod;
}
void nfapi_setmode(nfapi_mode_t nfapi_mode) { nfapi_mod=nfapi_mode; }
nrUE_params_t nrUE_params={0};
......
......@@ -73,6 +73,13 @@ PHY_VARS_NR_UE *PHY_vars_UE_g[1][1] = { { NULL } };
uint16_t n_rnti = 0x1234;
openair0_config_t openair0_cfg[MAX_CARDS];
nfapi_mode_t nfapi_mod;
nfapi_mode_t nfapi_getmode(void) {
return nfapi_mod;
}
void nfapi_setmode(nfapi_mode_t nfapi_mode) { nfapi_mod=nfapi_mode; }
int nr_postDecode_sim(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
ldpcDecode_t *rdata = (ldpcDecode_t*) NotifiedFifoData(req);
NR_UL_gNB_HARQ_t *ulsch_harq = rdata->ulsch_harq;
......
......@@ -97,22 +97,6 @@ nfapi_ue_release_request_body_t release_rntis;
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t DUuniqInstance=0;
instance_t CUuniqInstance=0;
teid_t newGtpuCreateTunnel(instance_t instance,
rnti_t rnti,
int incoming_bearer_id,
int outgoing_bearer_id,
teid_t outgoing_teid,
int qfi,
transport_layer_addr_t remoteAddr,
int port,
gtpCallback callBack,
gtpCallbackSDAP callBackSDAP) {
return 0;
}
int newGtpuDeleteAllTunnels(instance_t instance, rnti_t rnti) {
return 0;
}
extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration
......@@ -149,25 +133,6 @@ rrc_data_ind(
{
}
int
gtpv1u_create_s1u_tunnel(
const instance_t instanceP,
const gtpv1u_enb_create_tunnel_req_t *const create_tunnel_req_pP,
gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP
) {
return 0;
}
int gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) {
return 0;
}
int gtpv1u_delete_ngu_tunnel( const instance_t instance,
gtpv1u_gnb_delete_tunnel_req_t *req) {
return 0;
}
int
rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t *const ctxt_pP,
......@@ -177,22 +142,6 @@ rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
return 0;
}
int
gtpv1u_create_ngu_tunnel(
const instance_t instanceP,
const gtpv1u_gnb_create_tunnel_req_t * const create_tunnel_req_pP,
gtpv1u_gnb_create_tunnel_resp_t * const create_tunnel_resp_pP){
return 0;
}
int
gtpv1u_update_ngu_tunnel(
const instance_t instanceP,
const gtpv1u_gnb_create_tunnel_req_t *const create_tunnel_req_pP,
const rnti_t prior_rnti
){
return 0;
}
int
nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
......
......@@ -41,9 +41,6 @@
#define E1AP_BEARER_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_setup_req
#define E1AP_BEARER_CONTEXT_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_setup_resp
#define E1AP_PORT_NUMBER 25
#define E1AP_SCTP_PPID 64
typedef f1ap_net_ip_address_t e1ap_net_ip_address_t;
typedef struct PLMN_ID_s {
......
......@@ -23,7 +23,7 @@
#ifndef E1AP_COMMON_H_
#define E1AP_COMMON_H_
#include "openair2/E1AP/e1ap_default_values.h"
#include "openair2/COMMON/e1ap_messages_types.h"
int e1ap_decode_pdu(E1AP_E1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length);
......
......@@ -8,7 +8,7 @@
extern "C" {
#endif
typedef bool (*gtpCallback)(protocol_ctxt_t *ctxt_pP,
typedef bool (*gtpCallback)(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
......@@ -19,7 +19,7 @@ typedef bool (*gtpCallback)(protocol_ctxt_t *ctxt_pP,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id);
typedef bool (*gtpCallbackSDAP)(protocol_ctxt_t *ctxt_pP,
typedef bool (*gtpCallbackSDAP)(protocol_ctxt_t *ctxt_pP,
const ue_id_t ue_id,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
......@@ -34,32 +34,31 @@ typedef bool (*gtpCallbackSDAP)(protocol_ctxt_t *ctxt_pP,
const bool rqi,
const int pdusession_id);
typedef struct openAddr_s {
typedef struct openAddr_s {
char originHost[HOST_NAME_MAX];
char originService[HOST_NAME_MAX];
char destinationHost[HOST_NAME_MAX];
char destinationService[HOST_NAME_MAX];
instance_t originInstance;
} openAddr_t;
} openAddr_t;
typedef struct extensionHeader_s{
typedef struct extensionHeader_s{
uint8_t buffer[500];
uint8_t length;
}extensionHeader_t;
}extensionHeader_t;
// the init function create a gtp instance and return the gtp instance id
// the parameter originInstance will be sent back in each message from gtp to the creator
void gtpv1uReceiver(int h);
void gtpv1uProcessTimeout(int handle,void *arg);
int gtpv1u_create_s1u_tunnel(const instance_t instance, const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req,
// the init function create a gtp instance and return the gtp instance id
// the parameter originInstance will be sent back in each message from gtp to the creator
void gtpv1uReceiver(int h);
void gtpv1uProcessTimeout(int handle,void *arg);
int gtpv1u_create_s1u_tunnel(const instance_t instance, const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req,
gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp);
int gtpv1u_update_s1u_tunnel(const instance_t instanceP,
int gtpv1u_update_s1u_tunnel(const instance_t instanceP,
const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req_pP,
const rnti_t prior_rnti
);
int gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
int gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
int gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP);
int gtpv1u_create_x2u_tunnel(const instance_t instanceP,
const gtpv1u_enb_create_x2u_tunnel_req_t *const create_tunnel_req_pP,
......@@ -81,8 +80,8 @@ int gtpv1u_delete_s1u_tunnel( const instance_t instance, const gtpv1u_enb_delete
const ue_id_t prior_rnti
);
// New API
teid_t newGtpuCreateTunnel(instance_t instance,
// New API
teid_t newGtpuCreateTunnel(instance_t instance,
ue_id_t ue_id,
int incoming_bearer_id,
int outgoing_rb_id,
......@@ -92,29 +91,29 @@ teid_t newGtpuCreateTunnel(instance_t instance,
int port,
gtpCallback callBack,
gtpCallbackSDAP callBackSDAP);
void GtpuUpdateTunnelOutgoingTeid(instance_t instance, rnti_t rnti, ebi_t bearer_id, teid_t newOutgoingTeid);
int newGtpuDeleteAllTunnels(instance_t instance, ue_id_t ue_id);
int newGtpuDeleteTunnels(instance_t instance, ue_id_t ue_id, int nbTunnels, pdusessionid_t *pdusession_id);
instance_t gtpv1Init(openAddr_t context);
void *gtpv1uTask(void *args);
void GtpuUpdateTunnelOutgoingTeid(instance_t instance, ue_id_t ue_id, ebi_t bearer_id, teid_t newOutgoingTeid);
int newGtpuDeleteAllTunnels(instance_t instance, ue_id_t ue_id);
int newGtpuDeleteTunnels(instance_t instance, ue_id_t ue_id, int nbTunnels, pdusessionid_t *pdusession_id);
instance_t gtpv1Init(openAddr_t context);
void *gtpv1uTask(void *args);
// Legacy to fix
typedef struct gtpv1u_data_s {
/* RB tree of UEs */
hash_table_t *ue_mapping;
} gtpv1u_data_t;
#define GTPV1U_BEARER_OFFSET 3
#define GTPV1U_BEARER_OFFSET 3
#define GTPV1U_MAX_BEARERS_ID (max_val_LTE_DRB_Identity - GTPV1U_BEARER_OFFSET)
typedef enum {
typedef enum {
BEARER_DOWN = 0,
BEARER_IN_CONFIG,
BEARER_UP,
BEARER_DL_HANDOVER,
BEARER_UL_HANDOVER,
BEARER_MAX,
} bearer_state_t;
} bearer_state_t;
typedef struct fixMe_gtpv1u_bearer_s {
typedef struct fixMe_gtpv1u_bearer_s {
/* TEID used in dl and ul */
teid_t teid_eNB; ///< eNB TEID
uintptr_t teid_eNB_stack_session; ///< eNB TEID
......@@ -127,9 +126,9 @@ typedef struct fixMe_gtpv1u_bearer_s {
tcp_udp_port_t port;
//NwGtpv1uStackSessionHandleT stack_session;
bearer_state_t state;
} fixMe_gtpv1u_bearer_t;
} fixMe_gtpv1u_bearer_t;
typedef struct gtpv1u_ue_data_s {
typedef struct gtpv1u_ue_data_s {
/* UE identifier for oaisim stack */
rnti_t ue_id;
......@@ -143,7 +142,7 @@ typedef struct gtpv1u_ue_data_s {
fixMe_gtpv1u_bearer_t bearers[GTPV1U_MAX_BEARERS_ID];
//RB_ENTRY(gtpv1u_ue_data_s) gtpv1u_ue_node;
} gtpv1u_ue_data_t;
} gtpv1u_ue_data_t;
#ifdef __cplusplus
}
......
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