Merge remote-tracking branch 'origin/remove-unused-memblock' into integration_2023_w51
This commit is contained in:
@@ -42,36 +42,9 @@ Description Contains global common definitions
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define NAS_UE_ID_FMT "0x%06x"
|
||||
|
||||
/****************************************************************************/
|
||||
/********************* G L O B A L C O N S T A N T S *******************/
|
||||
/****************************************************************************/
|
||||
|
||||
#define RETURNok (0)
|
||||
#define RETURNerror (-1)
|
||||
|
||||
/*
|
||||
* Name of the environment variable which defines the default directory
|
||||
* where the NAS application is executed and where are located files
|
||||
* where non-volatile data are stored
|
||||
*/
|
||||
#define DEFAULT_NAS_PATH "PWD"
|
||||
|
||||
/****************************************************************************/
|
||||
/************************ G L O B A L T Y P E S ************************/
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Standard data type definitions
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
typedef int8_t SByte_t; /* 8 bit signed integer */
|
||||
#include "common/platform_constants.h"
|
||||
typedef uint8_t Byte_t; /* 8 bit unsigned integer */
|
||||
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Common NAS data type definitions
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#define E1AP_BEARER_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_release_cmd
|
||||
#define E1AP_BEARER_CONTEXT_RELEASE_CPLT(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_release_cplt
|
||||
|
||||
typedef f1ap_net_ip_address_t e1ap_net_ip_address_t;
|
||||
typedef net_ip_address_t e1ap_net_ip_address_t;
|
||||
|
||||
typedef struct PLMN_ID_s {
|
||||
int mcc;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "openair2/COMMON/f1ap_messages_types.h"
|
||||
/* To setup F1 at DU */
|
||||
MESSAGE_DEF(F1AP_DU_REGISTER_REQ, MESSAGE_PRIORITY_MED, f1ap_du_register_req_t, f1ap_du_register_req)
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "rlc.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "ngap_messages_types.h"
|
||||
|
||||
@@ -75,12 +74,7 @@
|
||||
#define F1AP_MAX_NO_OF_TNL_ASSOCIATIONS 32
|
||||
#define F1AP_MAX_NO_UE_ID 1024
|
||||
|
||||
typedef struct f1ap_net_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
unsigned ipv6:1;
|
||||
char ipv4_address[16];
|
||||
char ipv6_address[46];
|
||||
} f1ap_net_ip_address_t;
|
||||
typedef net_ip_address_t f1ap_net_ip_address_t;
|
||||
|
||||
typedef struct f1ap_net_config_t {
|
||||
f1ap_net_ip_address_t CU_f1_ip_address;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define __MAC_RRC_PRIMITIVES_H__
|
||||
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "openair2/RRC/LTE/rrc_defs.h"
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#ifndef NGAP_MESSAGES_TYPES_H_
|
||||
#define NGAP_MESSAGES_TYPES_H_
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/ngran_types.h"
|
||||
#include "LTE_asn_constant.h"
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
platform_types.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PLATFORM_TYPES_H__
|
||||
#define __PLATFORM_TYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GENERIC ACCESS STRATUM TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef int32_t sdu_size_t;
|
||||
typedef uint32_t frame_t;
|
||||
typedef int32_t sframe_t;
|
||||
typedef uint32_t sub_frame_t;
|
||||
typedef uint32_t slot_t;
|
||||
typedef uint16_t module_id_t;
|
||||
typedef uint8_t slice_id_t;
|
||||
typedef uint8_t eNB_index_t;
|
||||
typedef uint64_t ue_id_t;
|
||||
typedef int16_t smodule_id_t;
|
||||
typedef long rb_id_t;
|
||||
typedef long srb_id_t;
|
||||
|
||||
typedef bool MBMS_flag_t;
|
||||
#define MBMS_FLAG_NO false
|
||||
#define MBMS_FLAG_YES true
|
||||
|
||||
typedef bool eNB_flag_t;
|
||||
#define ENB_FLAG_NO false
|
||||
#define ENB_FLAG_YES true
|
||||
|
||||
typedef bool gNB_flag_t;
|
||||
#define GNB_FLAG_NO false
|
||||
#define GNB_FLAG_YES true
|
||||
|
||||
typedef bool srb_flag_t;
|
||||
#define SRB_FLAG_NO false
|
||||
#define SRB_FLAG_YES true
|
||||
|
||||
typedef bool sl_discovery_flag_t;
|
||||
#define SL_DISCOVERY_FLAG_NO false
|
||||
#define SL_DISCOVERY_FLAG_YES true
|
||||
|
||||
typedef enum link_direction_e {
|
||||
UNKNOWN_DIR = 0,
|
||||
DIR_UPLINK = 1,
|
||||
DIR_DOWNLINK = 2
|
||||
} link_direction_t;
|
||||
|
||||
typedef enum rb_type_e {
|
||||
UNKNOWN_RADIO_BEARER = 0,
|
||||
SIGNALLING_RADIO_BEARER = 1,
|
||||
RADIO_ACCESS_BEARER = 2
|
||||
} rb_type_t;
|
||||
|
||||
typedef enum {
|
||||
CR_ROUND = 0,
|
||||
CR_SRB12 = 1,
|
||||
CR_HOL = 2,
|
||||
CR_LC = 3,
|
||||
CR_CQI = 4,
|
||||
CR_LCP = 5,
|
||||
CR_NUM = 6
|
||||
} sorting_criterion_t;
|
||||
|
||||
typedef enum {
|
||||
POL_FAIR = 0,
|
||||
POL_GREEDY = 1,
|
||||
POL_NUM = 2
|
||||
} accounting_policy_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
// PHY TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint8_t crc8_t;
|
||||
typedef uint16_t crc16_t;
|
||||
typedef uint32_t crc32_t;
|
||||
typedef unsigned int crc_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// MAC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef sdu_size_t tbs_size_t;
|
||||
typedef sdu_size_t tb_size_t;
|
||||
typedef unsigned int logical_chan_id_t;
|
||||
typedef unsigned int num_tb_t;
|
||||
typedef uint8_t mac_enb_index_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// RLC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef unsigned int mui_t;
|
||||
typedef unsigned int confirm_t;
|
||||
typedef unsigned int rlc_tx_status_t;
|
||||
typedef int16_t rlc_sn_t;
|
||||
typedef uint16_t rlc_usn_t;
|
||||
typedef int32_t rlc_buffer_occupancy_t;
|
||||
typedef signed int rlc_op_status_t;
|
||||
|
||||
#define SDU_CONFIRM_NO false
|
||||
#define SDU_CONFIRM_YES true
|
||||
//-----------------------------------------------------------------------------
|
||||
// PDCP TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint16_t pdcp_sn_t;
|
||||
typedef uint32_t pdcp_hfn_t;
|
||||
typedef int16_t pdcp_hfn_offset_t;
|
||||
|
||||
typedef enum pdcp_transmission_mode_e {
|
||||
PDCP_TRANSMISSION_MODE_UNKNOWN = 0,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL = 1,
|
||||
PDCP_TRANSMISSION_MODE_DATA = 2,
|
||||
PDCP_TRANSMISSION_MODE_TRANSPARENT = 3
|
||||
} pdcp_transmission_mode_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
// IP DRIVER / PDCP TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint16_t tcp_udp_port_t;
|
||||
typedef enum ip_traffic_type_e {
|
||||
TRAFFIC_IPVX_TYPE_UNKNOWN = 0,
|
||||
TRAFFIC_IPV6_TYPE_UNICAST = 1,
|
||||
TRAFFIC_IPV6_TYPE_MULTICAST = 2,
|
||||
TRAFFIC_IPV6_TYPE_UNKNOWN = 3,
|
||||
TRAFFIC_IPV4_TYPE_UNICAST = 5,
|
||||
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
|
||||
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
|
||||
TRAFFIC_PC5S_SIGNALLING = 9,
|
||||
TRAFFIC_PC5S_SESSION_INIT = 10
|
||||
} ip_traffic_type_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// RRC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t mbms_session_id_t;
|
||||
typedef uint16_t mbms_service_id_t;
|
||||
typedef uint16_t rnti_t;
|
||||
typedef uint8_t rrc_enb_index_t;
|
||||
typedef uint8_t mme_code_t;
|
||||
typedef uint32_t m_tmsi_t;
|
||||
|
||||
//Random UE identity length = 40 bits
|
||||
#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF
|
||||
#define NOT_A_RNTI (rnti_t)0
|
||||
#define M_RNTI (rnti_t)0xFFFD
|
||||
#define P_RNTI (rnti_t)0xFFFE
|
||||
#define SI_RNTI (rnti_t)0xFFFF
|
||||
#define CBA_RNTI (rnti_t)0xfff4
|
||||
#define OAI_C_RNTI (rnti_t)0x1234
|
||||
typedef enum config_action_e {
|
||||
CONFIG_ACTION_NULL = 0,
|
||||
CONFIG_ACTION_ADD = 1,
|
||||
CONFIG_ACTION_REMOVE = 2,
|
||||
CONFIG_ACTION_MODIFY = 3,
|
||||
CONFIG_ACTION_SET_SECURITY_MODE = 4,
|
||||
CONFIG_ACTION_MBMS_ADD = 10,
|
||||
CONFIG_ACTION_MBMS_MODIFY = 11
|
||||
} config_action_t;
|
||||
|
||||
/* Maximum size of any message we might send or receive (e.g., via a socket) */
|
||||
#define MAX_MESSAGE_SIZE 8192
|
||||
|
||||
typedef struct nsa_msg_t {
|
||||
uint8_t msg_type;
|
||||
uint8_t msg_buffer[MAX_MESSAGE_SIZE];
|
||||
} nsa_msg_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GTPV1U TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||
typedef uint8_t ebi_t; // eps bearer id
|
||||
typedef uint8_t pdusessionid_t;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// may be ITTI not enabled, but type instance is useful also for OTG,
|
||||
typedef intptr_t instance_t;
|
||||
|
||||
typedef struct protocol_ctxt_s {
|
||||
module_id_t module_id; /*!< \brief Virtualized module identifier */
|
||||
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
||||
instance_t instance; /*!< \brief ITTI or OTG module identifier */
|
||||
ue_id_t rntiMaybeUEid;
|
||||
frame_t frame; /*!< \brief LTE frame number.*/
|
||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||
bool brOption;
|
||||
} protocol_ctxt_t;
|
||||
// warning time hardcoded
|
||||
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
|
||||
|
||||
#define UE_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD + RC.nb_inst
|
||||
#define ENB_MODULE_ID_TO_INSTANCE( mODULE_iD ) mODULE_iD
|
||||
#define UE_INSTANCE_TO_MODULE_ID(iNSTANCE) iNSTANCE - RC.nb_inst
|
||||
#define ENB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE
|
||||
|
||||
//NR
|
||||
#define GNB_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD
|
||||
|
||||
#define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \
|
||||
do { \
|
||||
iNSTANCE = eNB_fLAG == ENB_FLAG_YES ? ENB_MODULE_ID_TO_INSTANCE(mODULE_iD) : UE_MODULE_ID_TO_INSTANCE(mODULE_iD); \
|
||||
} while (0)
|
||||
|
||||
#define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \
|
||||
do { \
|
||||
mODULE_iD = eNB_fLAG == ENB_FLAG_YES ? ENB_INSTANCE_TO_MODULE_ID(iNSTANCE) : UE_INSTANCE_TO_MODULE_ID(iNSTANCE); \
|
||||
} while (0)
|
||||
|
||||
#define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) \
|
||||
INSTANCE_TO_MODULE_ID( (CtXt_h)->instance , (CtXt_h)->module_id , (CtXt_h)->enb_flag )
|
||||
|
||||
|
||||
#define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) \
|
||||
MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag )
|
||||
|
||||
#define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \
|
||||
do { \
|
||||
(Ctxt_Pp)->module_id = mODULE_iD; \
|
||||
(Ctxt_Pp)->enb_flag = eNB_fLAG; \
|
||||
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \
|
||||
(Ctxt_Pp)->frame = fRAME; \
|
||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||
(Ctxt_Pp)->eNB_index = eNB_iNDEX; \
|
||||
(Ctxt_Pp)->brOption = false; /* set a default value */ \
|
||||
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp); \
|
||||
} while (0)
|
||||
|
||||
#define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \
|
||||
do { \
|
||||
(Ctxt_Pp)->instance = iNSTANCE; \
|
||||
(Ctxt_Pp)->enb_flag = eNB_fLAG; \
|
||||
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \
|
||||
(Ctxt_Pp)->frame = fRAME; \
|
||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||
(Ctxt_Pp)->eNB_index = 0; /* set a default value */ \
|
||||
(Ctxt_Pp)->brOption = false; /* set a default value */ \
|
||||
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp); \
|
||||
} while (0)
|
||||
|
||||
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx64 "]"
|
||||
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||
|
||||
#define PROTOCOL_NR_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == GNB_FLAG_YES) ? "gNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||
|
||||
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
||||
|
||||
#define exit_fun(msg) exit_function(__FILE__, __FUNCTION__, __LINE__, "exit_fun", OAI_EXIT_NORMAL)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef RAL_MESSAGES_TYPES_H_
|
||||
#define RAL_MESSAGES_TYPES_H_
|
||||
#include "asn_constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "commonDef.h"
|
||||
/* 802.21 mappings with the RRC protocol :
|
||||
(Research Report RR-12-265 Mapping of IEEE 802.21 MIH primitives to EPS/LTE protocols March 13 th, 2012, Michelle WETTERWALD, Prof. Christian BONNET )
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#ifndef RRC_MESSAGES_TYPES_H_
|
||||
#define RRC_MESSAGES_TYPES_H_
|
||||
|
||||
#include "common/utils/mem/oai_memory.h"
|
||||
#include "as_message.h"
|
||||
#include "rrc_types.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "NR_RACH-ConfigCommon.h"
|
||||
#include "NR_ServingCellConfigCommon.h"
|
||||
#include "NR_ServingCellConfig.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages for RRC logging
|
||||
#if defined(DISABLE_ITTI_XER_PRINT)
|
||||
@@ -418,7 +419,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
|
||||
typedef struct NRDuDlReq_s {
|
||||
rnti_t rnti;
|
||||
mem_block_t * buf;
|
||||
uint8_t *buf;
|
||||
uint64_t srb_id;
|
||||
} NRDuDlReq_t;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "common/platform_types.h"
|
||||
#include "LTE_asn_constant.h"
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
@@ -113,13 +114,6 @@ typedef enum cn_domain_s {
|
||||
CN_DOMAIN_CS = 2
|
||||
} cn_domain_t;
|
||||
|
||||
typedef struct net_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
unsigned ipv6:1;
|
||||
char ipv4_address[16];
|
||||
char ipv6_address[46];
|
||||
} net_ip_address_t;
|
||||
|
||||
typedef uint64_t bitrate_t;
|
||||
|
||||
typedef struct ambr_s {
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
#define ENB_APP_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "common/platform_types.h"
|
||||
|
||||
void *eNB_app_task(void *args_p);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
#include "f1ap_default_values.h"
|
||||
|
||||
#include "conversions.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "sctp_messages_types.h"
|
||||
|
||||
@@ -270,8 +270,8 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id
|
||||
ctxt.rntiMaybeUEid = cu_ue_f1ap_id;
|
||||
ctxt.enb_flag = 1;
|
||||
ctxt.eNB_index = 0;
|
||||
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
|
||||
memcpy((void *)mb->data,(void *)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
|
||||
uint8_t *mb = malloc16(ie->value.choice.RRCContainer.size);
|
||||
memcpy(mb, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
|
||||
LOG_D(F1AP, "Calling pdcp_data_ind for UE RNTI %lx srb_id %lu with size %ld (DCCH) \n", ctxt.rntiMaybeUEid, srb_id, ie->value.choice.RRCContainer.size);
|
||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", mb->data[i]);
|
||||
|
||||
@@ -123,7 +123,6 @@ void *F1AP_CU_task(void *arg) {
|
||||
int result;
|
||||
LOG_I(F1AP, "Starting F1AP at CU\n");
|
||||
// no RLC in CU, initialize mem pool for PDCP
|
||||
pool_buffer_init();
|
||||
itti_mark_task_ready(TASK_CU_F1);
|
||||
eth_params_t *IPaddrs;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include <openair3/ocp-gtpu/gtp_itf.h>
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
|
||||
bool DURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
@@ -51,8 +52,8 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
const uint32_t *destinationL2Id)
|
||||
{
|
||||
// The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
|
||||
mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
|
||||
memcpy(sdu->data, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
uint8_t *sdu = malloc16(sdu_buffer_sizeP);
|
||||
memcpy(sdu, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
du_rlc_data_req(ctxt_pP, srb_flagP, false, rb_idP, muiP, confirmP, sdu_buffer_sizeP, sdu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* @ingroup _mac
|
||||
*/
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
#include "assertions.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include "LAYER2/MAC/defs_NB_IoT.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "openair2/RRC/LTE/defs_NB_IoT.h"
|
||||
/** \addtogroup _mac
|
||||
* @{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
/* IF */
|
||||
#include "NR_IF_Module.h"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
#include <pthread.h>
|
||||
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
|
||||
|
||||
void send_srb0_rrc(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
|
||||
int16_t get_prach_tx_power(module_id_t mod_id) {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* \version
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "uper_decoder.h"
|
||||
|
||||
/* MAC */
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
/* rlc */
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
|
||||
/*NFAPI*/
|
||||
#include "nfapi_nr_interface.h"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
|
||||
//#define SRS_IND_DEBUG
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef MAC_RRC_DL_HANDLER_H
|
||||
#define MAC_RRC_DL_HANDLER_H
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef MAC_RRC_UL_H
|
||||
#define MAC_RRC_UL_H
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
|
||||
typedef void (*f1_setup_request_func_t)(const f1ap_setup_req_t* req);
|
||||
|
||||
@@ -208,7 +208,7 @@ uint64_t get_pdcp_optmask(void) {
|
||||
* If PDCP_UNIT_TEST is set here then data flow between PDCP and RLC is broken
|
||||
* and PDCP has no longer anything to do with RLC. In this case, after it's handed
|
||||
* an SDU it appends PDCP header and returns (by filling in incoming pointer parameters)
|
||||
* this mem_block_t to be dissected for testing purposes. For further details see test
|
||||
* this uint8_t to be dissected for testing purposes. For further details see test
|
||||
* code at targets/TEST/PDCP/test_pdcp.c:test_pdcp_data_req()
|
||||
*/
|
||||
bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
@@ -229,7 +229,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
uint8_t pdcp_tailer_len = 0;
|
||||
uint16_t pdcp_pdu_size = 0;
|
||||
uint16_t current_sn = 0;
|
||||
mem_block_t *pdcp_pdu_p = NULL;
|
||||
uint8_t *pdcp_pdu_p = NULL;
|
||||
rlc_op_status_t rlc_status;
|
||||
bool ret = true;
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
@@ -288,16 +288,14 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
|
||||
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
|
||||
LOG_D(PDCP, " [TM] Asking for a new mem_block of size %d\n",sdu_buffer_sizeP);
|
||||
pdcp_pdu_p = get_free_mem_block(sdu_buffer_sizeP, __func__);
|
||||
pdcp_pdu_p = malloc16(sdu_buffer_sizeP);
|
||||
|
||||
if (pdcp_pdu_p != NULL) {
|
||||
memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
memcpy(pdcp_pdu_p, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
|
||||
if( LOG_DEBUGFLAG(DEBUG_PDCP) ) {
|
||||
rlc_util_print_hex_octets(PDCP,
|
||||
(unsigned char *)&pdcp_pdu_p->data[0],
|
||||
sdu_buffer_sizeP);
|
||||
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %ld \n", srb_flagP, rb_idP);
|
||||
rlc_util_print_hex_octets(PDCP, pdcp_pdu_p, sdu_buffer_sizeP);
|
||||
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %ld \n", srb_flagP, rb_idP);
|
||||
}
|
||||
|
||||
rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP,
|
||||
@@ -326,7 +324,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
/*
|
||||
* Allocate a new block for the new PDU (i.e. PDU header and SDU payload)
|
||||
*/
|
||||
pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
|
||||
pdcp_pdu_p = malloc16(pdcp_pdu_size);
|
||||
|
||||
if (pdcp_pdu_p != NULL) {
|
||||
/*
|
||||
@@ -339,9 +337,9 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
pdu_header.sn = pdcp_get_next_tx_seq_number(pdcp_p);
|
||||
current_sn = pdu_header.sn;
|
||||
memset(&pdu_header.mac_i[0],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
|
||||
memset(&pdcp_pdu_p->data[sdu_buffer_sizeP + pdcp_header_len],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
|
||||
memset(&pdcp_pdu_p[sdu_buffer_sizeP + pdcp_header_len], 0, PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
|
||||
|
||||
if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
|
||||
if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(pdcp_pdu_p, &pdu_header) == false) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
|
||||
|
||||
@@ -360,7 +358,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
pdu_header.sn = pdcp_get_next_tx_seq_number(pdcp_p);
|
||||
current_sn = pdu_header.sn ;
|
||||
|
||||
if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
|
||||
if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(pdcp_pdu_p, &pdu_header) == false) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
|
||||
|
||||
@@ -383,7 +381,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
"There must be a problem with PDCP initialization, ignoring this PDU...\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
|
||||
current_sn);
|
||||
free_mem_block(pdcp_pdu_p, __func__);
|
||||
free(pdcp_pdu_p);
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_req);
|
||||
@@ -397,13 +395,13 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
|
||||
LOG_D(PDCP, "Sequence number %d is assigned to current PDU\n", current_sn);
|
||||
/* Then append data... */
|
||||
memcpy(&pdcp_pdu_p->data[pdcp_header_len], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
memcpy(&pdcp_pdu_p[pdcp_header_len], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
|
||||
//For control plane data that are not integrity protected,
|
||||
// the MAC-I field is still present and should be padded with padding bits set to 0.
|
||||
// NOTE: user-plane data are never integrity protected
|
||||
for (i=0; i<pdcp_tailer_len; i++) {
|
||||
pdcp_pdu_p->data[pdcp_header_len + sdu_buffer_sizeP + i] = 0x00;// pdu_header.mac_i[i];
|
||||
pdcp_pdu_p[pdcp_header_len + sdu_buffer_sizeP + i] = 0x00; // pdu_header.mac_i[i];
|
||||
}
|
||||
|
||||
if ((pdcp_p->security_activated != 0) &&
|
||||
@@ -421,7 +419,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
rb_idP % LTE_maxDRB,
|
||||
pdcp_header_len,
|
||||
current_sn,
|
||||
pdcp_pdu_p->data,
|
||||
pdcp_pdu_p,
|
||||
sdu_buffer_sizeP);
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
@@ -434,8 +432,8 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
/* Print octets of outgoing data in hexadecimal form */
|
||||
LOG_D(PDCP, "Following content with size %d will be sent over RLC (PDCP PDU header is the first two bytes)\n",
|
||||
pdcp_pdu_size);
|
||||
//util_print_hex_octets(PDCP, (unsigned char*)pdcp_pdu_p->data, pdcp_pdu_size);
|
||||
//util_flush_hex_octets(PDCP, (unsigned char*)pdcp_pdu->data, pdcp_pdu_size);
|
||||
// util_print_hex_octets(PDCP, (unsigned char*)pdcp_pdu_p, pdcp_pdu_size);
|
||||
// util_flush_hex_octets(PDCP, (unsigned char*)pdcp_pdu, pdcp_pdu_size);
|
||||
} else {
|
||||
LOG_E(PDCP, "Cannot create a mem_block for a PDU!\n");
|
||||
|
||||
@@ -458,8 +456,13 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
* Ask sublayer to transmit data and check return value
|
||||
* to see if RLC succeeded
|
||||
*/
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size,
|
||||
"[MSG] PDCP DL %s PDU on rb_id %ld\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
LOG_DUMPMSG(PDCP,
|
||||
DEBUG_PDCP,
|
||||
(char *)pdcp_pdu_p,
|
||||
pdcp_pdu_size,
|
||||
"[MSG] PDCP DL %s PDU on rb_id %ld\n",
|
||||
(srb_flagP) ? "CONTROL" : "DATA",
|
||||
rb_idP);
|
||||
|
||||
if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) {
|
||||
LOG_D(PDCP, "pdcp data req on drb %ld, size %d, rnti %lx\n", rb_idP, pdcp_pdu_size, ctxt_pP->rntiMaybeUEid);
|
||||
@@ -563,17 +566,14 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
pdcp_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
mem_block_t *const sdu_buffer_pP,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID
|
||||
)
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
uint8_t *const sdu_buffer_pP,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
pdcp_t *pdcp_p = NULL;
|
||||
@@ -593,8 +593,13 @@ pdcp_data_ind(
|
||||
int pdcp_sn_for_count;
|
||||
int security_ok;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %ld\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
LOG_DUMPMSG(PDCP,
|
||||
DEBUG_PDCP,
|
||||
(char *)sdu_buffer_pP,
|
||||
sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %ld\n",
|
||||
(srb_flagP) ? "CONTROL" : "DATA",
|
||||
rb_idP);
|
||||
|
||||
if (MBMS_flagP) {
|
||||
AssertError(rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u rnti %lx!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||
@@ -630,7 +635,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_CTXT_FMT"Could not get PDCP instance key 0x%"PRIx64"\n",
|
||||
PROTOCOL_CTXT_ARGS(ctxt_pP),
|
||||
key);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return false;
|
||||
}
|
||||
@@ -657,16 +662,16 @@ pdcp_data_ind(
|
||||
if (srb_flagP) { //SRB1/2
|
||||
pdcp_header_len = PDCP_CONTROL_PLANE_DATA_PDU_SN_SIZE;
|
||||
pdcp_tailer_len = PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE;
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_SRB_sn((unsigned char *)sdu_buffer_pP->data);
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_SRB_sn((unsigned char *)sdu_buffer_pP);
|
||||
} else { // DRB
|
||||
pdcp_tailer_len = 0;
|
||||
|
||||
if (pdcp_p->seq_num_size == 7) {
|
||||
pdcp_header_len = PDCP_USER_PLANE_DATA_PDU_SHORT_SN_HEADER_SIZE;
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_short_sn((unsigned char *)sdu_buffer_pP->data);
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_short_sn((unsigned char *)sdu_buffer_pP);
|
||||
} else if (pdcp_p->seq_num_size == 12) {
|
||||
pdcp_header_len = PDCP_USER_PLANE_DATA_PDU_LONG_SN_HEADER_SIZE;
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_long_sn((unsigned char *)sdu_buffer_pP->data);
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_long_sn((unsigned char *)sdu_buffer_pP);
|
||||
} else {
|
||||
//sequence_number = 4095;
|
||||
LOG_E(PDCP,
|
||||
@@ -686,7 +691,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"Incoming (from RLC) SDU is short of size (size:%d)! Ignoring...\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
sdu_buffer_sizeP);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
@@ -718,7 +723,7 @@ pdcp_data_ind(
|
||||
* mechanism all out-of-order packets will be delivered to RRC/IP
|
||||
*/
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -749,8 +754,9 @@ pdcp_data_ind(
|
||||
pdcp_header_len,
|
||||
rx_hfn_for_count,
|
||||
pdcp_sn_for_count,
|
||||
sdu_buffer_pP->data,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len) == 0;
|
||||
sdu_buffer_pP,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len)
|
||||
== 0;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].validate_security);
|
||||
@@ -766,7 +772,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"security not validated for incoming PDCP SRB PDU\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
}
|
||||
@@ -784,10 +790,9 @@ pdcp_data_ind(
|
||||
rrc_data_ind(ctxt_pP,
|
||||
rb_id,
|
||||
sdu_buffer_sizeP - pdcp_header_len - pdcp_tailer_len,
|
||||
(uint8_t *)&sdu_buffer_pP->data[pdcp_header_len]);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
(uint8_t *)&sdu_buffer_pP[pdcp_header_len]);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
// free_mem_block(new_sdu, __func__);
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
} else {
|
||||
@@ -821,7 +826,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"discard PDU, out of\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
} else if (pdcp_p->next_pdcp_rx_sn - sequence_number > reordering_window) {
|
||||
@@ -860,8 +865,9 @@ pdcp_data_ind(
|
||||
pdcp_header_len,
|
||||
rx_hfn_for_count,
|
||||
pdcp_sn_for_count,
|
||||
sdu_buffer_pP->data,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len) == 0;
|
||||
sdu_buffer_pP,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len)
|
||||
== 0;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].validate_security);
|
||||
@@ -877,7 +883,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"security not validated for incoming PDPC DRB RLC/AM PDU\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
}
|
||||
@@ -927,8 +933,9 @@ pdcp_data_ind(
|
||||
pdcp_header_len,
|
||||
rx_hfn_for_count,
|
||||
pdcp_sn_for_count,
|
||||
sdu_buffer_pP->data,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len) == 0;
|
||||
sdu_buffer_pP,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len)
|
||||
== 0;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].validate_security);
|
||||
@@ -944,7 +951,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"security not validated for incoming PDPC DRB RLC/UM PDU\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
}
|
||||
@@ -961,7 +968,7 @@ pdcp_data_ind(
|
||||
|
||||
if (otg_enabled==1) {
|
||||
LOG_D(OTG,"Discarding received packed\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
@@ -990,7 +997,7 @@ pdcp_data_ind(
|
||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||
gtpv1u_tunnel_data_req_t *req=>PV1U_TUNNEL_DATA_REQ(message_p);
|
||||
req->buffer = (uint8_t*)(req+1);
|
||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP->data + payload_offset, sdu_buffer_sizeP - payload_offset);
|
||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP + payload_offset, sdu_buffer_sizeP - payload_offset);
|
||||
req->length = sdu_buffer_sizeP - payload_offset;
|
||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||
req->ue_id = ctxt_pP->rntiMaybeUEid;
|
||||
@@ -1005,16 +1012,16 @@ pdcp_data_ind(
|
||||
#ifdef MBMS_MULTICAST_OUT
|
||||
|
||||
if ((MBMS_flagP != 0) && (mbms_socket != -1)) {
|
||||
// struct iphdr *ip_header = (struct iphdr *)&sdu_buffer_pP->data[payload_offset];
|
||||
// struct udphdr *udp_header = (struct udphdr *)&sdu_buffer_pP->data[payload_offset + sizeof(struct iphdr)];
|
||||
// struct sockaddr_in dest_addr;
|
||||
// dest_addr.sin_family = AF_INET;
|
||||
// dest_addr.sin_port = udp_header->dest;
|
||||
// dest_addr.sin_addr.s_addr = ip_header->daddr;
|
||||
|
||||
// sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr));
|
||||
// //packet_forwarded = true;
|
||||
// struct iphdr *ip_header = (struct iphdr *)&sdu_buffer_pP[payload_offset];
|
||||
// struct udphdr *udp_header = (struct udphdr *)&sdu_buffer_pP[payload_offset + sizeof(struct iphdr)];
|
||||
// struct sockaddr_in dest_addr;
|
||||
// dest_addr.sin_family = AF_INET;
|
||||
// dest_addr.sin_port = udp_header->dest;
|
||||
// dest_addr.sin_addr.s_addr = ip_header->daddr;
|
||||
|
||||
// sendto(mbms_socket, &sdu_buffer_pP[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct
|
||||
// sockaddr*)&dest_addr, sizeof(dest_addr));
|
||||
// //packet_forwarded = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1035,7 +1042,7 @@ pdcp_data_ind(
|
||||
AssertFatal((sdu_buffer_sizeP - payload_offset >= 0), "invalid PDCP SDU size!");
|
||||
|
||||
// Here there is no virtualization possible
|
||||
// set ((pdcp_data_ind_header_t *) new_sdu_p->data)->inst for IP layer here
|
||||
// set ((pdcp_data_ind_header_t *) new_sdu_p)->inst for IP layer here
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
pdcpHead->rb_id = rb_id;
|
||||
|
||||
@@ -1071,9 +1078,7 @@ pdcp_data_ind(
|
||||
LOG_D(PDCP, "inst=%d size=%d\n", pdcpHead->inst, pdcpHead->data_size);
|
||||
}
|
||||
|
||||
memcpy(pdcpHead+1,
|
||||
&sdu_buffer_pP->data[payload_offset],
|
||||
sdu_buffer_sizeP - payload_offset);
|
||||
memcpy(pdcpHead + 1, &sdu_buffer_pP[payload_offset], sdu_buffer_sizeP - payload_offset);
|
||||
if( LOG_DEBUGFLAG(DEBUG_PDCP) )
|
||||
log_dump(PDCP, pdcpHead+1, min(sdu_buffer_sizeP - payload_offset,30) , LOG_DUMP_CHAR,
|
||||
"Printing first bytes of PDCP SDU before adding it to the list: \n");
|
||||
@@ -1083,8 +1088,8 @@ pdcp_data_ind(
|
||||
LOG_D(PDCP, "Following content has been received from RLC (%d,%d)(PDCP header has already been removed):\n",
|
||||
sdu_buffer_sizeP - payload_offset + (int)sizeof(pdcp_data_ind_header_t),
|
||||
sdu_buffer_sizeP - payload_offset);
|
||||
//util_print_hex_octets(PDCP, &new_sdu_p->data[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
//util_flush_hex_octets(PDCP, &new_sdu_p->data[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
// util_print_hex_octets(PDCP, &new_sdu_p[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
// util_flush_hex_octets(PDCP, &new_sdu_p[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
}
|
||||
|
||||
/* Update PDCP statistics */
|
||||
@@ -1103,7 +1108,7 @@ pdcp_data_ind(
|
||||
Pdcp_stats_rx_aiat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+= (pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
|
||||
Pdcp_stats_rx_aiat_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
|
||||
Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=pdcp_enb[ctxt_pP->module_id].sfn;
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "LTE_DRB-ToAddMod.h"
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_SRB-ToAddMod.h"
|
||||
@@ -47,14 +47,25 @@
|
||||
|
||||
#include "openair3/SECU/secu_defs.h"
|
||||
|
||||
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
|
||||
const srb_flag_t, const MBMS_flag_t,
|
||||
const rb_id_t, const mui_t,
|
||||
confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
|
||||
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
confirm_t,
|
||||
sdu_size_t,
|
||||
uint8_t *,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const);
|
||||
|
||||
typedef bool (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
|
||||
const MBMS_flag_t, const rb_id_t, const sdu_size_t,
|
||||
mem_block_t *,const uint32_t *const, const uint32_t *const);
|
||||
typedef bool(pdcp_data_ind_t)(const protocol_ctxt_t *,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
uint8_t *,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const);
|
||||
typedef pdcp_data_ind_t* pdcp_data_ind_func_t;
|
||||
|
||||
#define MAX_NUMBER_NETIF 1 //16
|
||||
@@ -265,19 +276,19 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id);
|
||||
|
||||
/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, bool)
|
||||
* \brief This functions handles data transfer indications coming from RLC
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] Shows if rb is SRB
|
||||
* \param[in] Tells if MBMS traffic
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
|
||||
* \return TRUE on success, false otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, uint8_t*, bool)
|
||||
* \brief This functions handles data transfer indications coming from RLC
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] Shows if rb is SRB
|
||||
* \param[in] Tells if MBMS traffic
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
|
||||
* \return TRUE on success, false otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
pdcp_data_ind_t pdcp_data_ind;
|
||||
|
||||
/*! \fn void rrc_pdcp_config_req(const protocol_ctxt_t* const ,uint32_t,rb_id_t,uint8_t)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "pdcp.h"
|
||||
#include "pdcp_primitives.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define PDCP_UTIL_H
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "../../COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
/*
|
||||
|
||||
+27
-60
@@ -35,12 +35,12 @@
|
||||
#ifndef __RLC_H__
|
||||
# define __RLC_H__
|
||||
|
||||
# include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
# include "hashtable.h"
|
||||
# include "LTE_asn_constant.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
# include "mem_block.h"
|
||||
#include "intertask_interface.h"
|
||||
//# include "PHY/defs.h"
|
||||
# include "LTE_RLC-Config.h"
|
||||
# include "LTE_DRB-ToAddMod.h"
|
||||
@@ -71,26 +71,6 @@ typedef enum rlc_confirm_e {
|
||||
RLC_SDU_CONFIRM_YES = 1,
|
||||
} rlc_confirm_t;
|
||||
|
||||
typedef enum rlc_mode_e {
|
||||
RLC_MODE_NONE = 0,
|
||||
RLC_MODE_AM = 1,
|
||||
RLC_MODE_UM = 2,
|
||||
RLC_MODE_TM = 4
|
||||
} rlc_mode_t;
|
||||
|
||||
/*! \struct mac_rlc_status_resp_t
|
||||
* \brief Primitive exchanged between RLC and MAC informing about the buffer occupancy of the RLC protocol instance.
|
||||
*/
|
||||
typedef struct {
|
||||
rlc_buffer_occupancy_t bytes_in_buffer; /*!< \brief Bytes buffered in RLC protocol instance. */
|
||||
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
|
||||
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
|
||||
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
|
||||
bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
|
||||
} mac_rlc_status_resp_t;
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// PRIVATE INTERNALS OF RLC
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -284,39 +264,35 @@ void rlc_util_print_hex_octets(
|
||||
* \param[in] muiP Message Unit identifier.
|
||||
* \param[in] confirmP Boolean, is confirmation requested.
|
||||
* \param[in] sdu_sizeP Size of SDU in bytes.
|
||||
* \param[in] sduP SDU.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rlc_data_req (
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const confirm_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t *const,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const
|
||||
);
|
||||
* \param[in] sduP SDU.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const confirm_t,
|
||||
const sdu_size_t,
|
||||
uint8_t *const,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const);
|
||||
|
||||
/*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
|
||||
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] sdu_sizeP Size of SDU in bytes.
|
||||
* \param[in] sduP SDU.
|
||||
*/
|
||||
void rlc_data_ind(
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t *const);
|
||||
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] sdu_sizeP Size of SDU in bytes.
|
||||
* \param[in] sduP SDU.
|
||||
*/
|
||||
void rlc_data_ind(const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
uint8_t *const);
|
||||
|
||||
/*! \fn void rlc_data_conf (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const mui_t muiP, const rlc_tx_status_t statusP)
|
||||
* \brief Interface with higher layers, confirm to upper layer the transmission status for a SDU stamped with a MUI, scheduled for transmission.
|
||||
@@ -435,18 +411,9 @@ rlc_op_status_t rlc_stat_req (
|
||||
unsigned int *const stat_timer_status_prohibit_timed_out);
|
||||
|
||||
/*! \fn int rlc_module_init(int enb_flag)
|
||||
* \brief RAZ the memory of the RLC layer, initialize the memory pool manager (mem_block_t structures mainly used in RLC module).
|
||||
*/
|
||||
* \brief RAZ the memory of the RLC layer, initialize the memory pool manager (uint8_t structures mainly used in RLC module).
|
||||
*/
|
||||
int rlc_module_init(int enb_flag);
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP);
|
||||
/** @} */
|
||||
|
||||
#define RLC_FG_COLOR_BLACK "\e[0;30m"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "NR_DRB-ToAddModList.h"
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "openair2/COMMON/e1ap_messages_types.h"
|
||||
#include "openair3/ocp-gtpu/gtp_itf.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#ifndef _NR_PDCP_H_
|
||||
#define _NR_PDCP_H_
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "nr_pdcp_sdu.h"
|
||||
#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "NR_RLC-Config.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_proto.h"
|
||||
#include "common/utils/mem/oai_memory.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/* from OAI */
|
||||
@@ -111,7 +112,7 @@ typedef struct {
|
||||
mui_t muiP;
|
||||
confirm_t confirmP;
|
||||
sdu_size_t sdu_sizeP;
|
||||
mem_block_t *sdu_pP;
|
||||
uint8_t *sdu_pP;
|
||||
} rlc_data_req_queue_item;
|
||||
|
||||
#define RLC_DATA_REQ_QUEUE_SIZE 10000
|
||||
@@ -173,13 +174,13 @@ static void init_nr_rlc_data_req_queue(void)
|
||||
}
|
||||
|
||||
static void enqueue_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP)
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP)
|
||||
{
|
||||
int i;
|
||||
int logged = 0;
|
||||
@@ -210,13 +211,13 @@ static void enqueue_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
}
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP)
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP)
|
||||
{
|
||||
enqueue_rlc_data_req(ctxt_pP,
|
||||
srb_flagP,
|
||||
@@ -241,7 +242,7 @@ typedef struct {
|
||||
MBMS_flag_t MBMS_flagP;
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t sdu_buffer_size;
|
||||
mem_block_t *sdu_buffer;
|
||||
uint8_t *sdu_buffer;
|
||||
} pdcp_data_ind_queue_item;
|
||||
|
||||
#define PDCP_DATA_IND_QUEUE_SIZE 10000
|
||||
@@ -256,13 +257,12 @@ typedef struct {
|
||||
|
||||
static pdcp_data_ind_queue pq;
|
||||
|
||||
static void do_pdcp_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer)
|
||||
static void do_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
uint8_t *const sdu_buffer)
|
||||
{
|
||||
nr_pdcp_ue_t *ue;
|
||||
nr_pdcp_entity_t *rb;
|
||||
@@ -285,14 +285,14 @@ static void do_pdcp_data_ind(
|
||||
rb = nr_pdcp_get_rb(ue, rb_id, srb_flagP);
|
||||
|
||||
if (rb != NULL) {
|
||||
rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size);
|
||||
rb->recv_pdu(rb, (char *)sdu_buffer, sdu_buffer_size);
|
||||
} else {
|
||||
LOG_E(PDCP, "pdcp_data_ind: no RB found (rb_id %ld, srb_flag %d)\n", rb_id, srb_flagP);
|
||||
}
|
||||
|
||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||
|
||||
free_mem_block(sdu_buffer, __FUNCTION__);
|
||||
free(sdu_buffer);
|
||||
}
|
||||
|
||||
static void *pdcp_data_ind_thread(void *_)
|
||||
@@ -337,13 +337,12 @@ static void init_nr_pdcp_data_ind_queue(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void enqueue_pdcp_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer)
|
||||
static void enqueue_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
uint8_t *const sdu_buffer)
|
||||
{
|
||||
int i;
|
||||
int logged = 0;
|
||||
@@ -371,12 +370,12 @@ static void enqueue_pdcp_data_ind(
|
||||
if (pthread_mutex_unlock(&pq.m) != 0) abort();
|
||||
}
|
||||
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer,
|
||||
uint8_t *const sdu_buffer,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID)
|
||||
{
|
||||
@@ -670,8 +669,8 @@ static void deliver_pdu_drb_ue(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
|
||||
DevAssert(deliver_pdu_data == NULL);
|
||||
protocol_ctxt_t ctxt = { .enb_flag = 0, .rntiMaybeUEid = ue_id };
|
||||
|
||||
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
|
||||
memcpy(memblock->data, buf, size);
|
||||
uint8_t *memblock = malloc16(size);
|
||||
memcpy(memblock, buf, size);
|
||||
LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d UE %ld/%04lx\n", __func__, rb_id, size, ctxt.rntiMaybeUEid, ctxt.rntiMaybeUEid);
|
||||
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock);
|
||||
}
|
||||
@@ -702,8 +701,8 @@ static void deliver_pdu_drb_gnb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id
|
||||
extern instance_t CUuniqInstance;
|
||||
itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
|
||||
} else {
|
||||
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
|
||||
memcpy(memblock->data, buf, size);
|
||||
uint8_t *memblock = malloc16(size);
|
||||
memcpy(memblock, buf, size);
|
||||
LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d\n", __func__, rb_id, size);
|
||||
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock);
|
||||
}
|
||||
@@ -760,8 +759,8 @@ void deliver_pdu_srb_rlc(void *deliver_pdu_data, ue_id_t ue_id, int srb_id,
|
||||
char *buf, int size, int sdu_id)
|
||||
{
|
||||
protocol_ctxt_t ctxt = { .enb_flag = 1, .rntiMaybeUEid = ue_id };
|
||||
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
|
||||
memcpy(memblock->data, buf, size);
|
||||
uint8_t *memblock = malloc16(size);
|
||||
memcpy(memblock, buf, size);
|
||||
enqueue_rlc_data_req(&ctxt, 1, MBMS_FLAG_NO, srb_id, sdu_id, 0, size, memblock);
|
||||
}
|
||||
|
||||
@@ -1244,12 +1243,12 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
const uint32_t *const destinationL2Id) {
|
||||
//Force instance id to 0, OAI incoherent instance management
|
||||
ctxt_pP->instance=0;
|
||||
mem_block_t *memblock = get_free_mem_block(sdu_buffer_size, __func__);
|
||||
uint8_t *memblock = malloc16(sdu_buffer_size);
|
||||
if (memblock == NULL) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: malloc16 failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
memcpy(memblock->data,sdu_buffer, sdu_buffer_size);
|
||||
memcpy(memblock, sdu_buffer, sdu_buffer_size);
|
||||
int ret=pdcp_data_ind(ctxt_pP,srb_flagP, false, rb_id, sdu_buffer_size, memblock, NULL, NULL);
|
||||
if (!ret) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
@@ -29,20 +29,20 @@ void nr_pdcp_layer_init(bool uses_e1);
|
||||
uint64_t nr_pdcp_module_init(uint64_t _pdcp_optmask, int id);
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP);
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP);
|
||||
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer,
|
||||
uint8_t *const sdu_buffer,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "nr_pdcp_entity.h"
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
typedef void nr_pdcp_ue_manager_t;
|
||||
|
||||
|
||||
@@ -293,7 +293,6 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
@@ -301,7 +300,7 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP,
|
||||
uint8_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id)
|
||||
{
|
||||
@@ -331,14 +330,14 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
if (rb != NULL) {
|
||||
rb->set_time(rb, nr_rlc_current_time);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP->data, sdu_sizeP, muiP);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP, sdu_sizeP, muiP);
|
||||
} else {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal: SDU sent to unknown RB\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
|
||||
nr_rlc_manager_unlock(nr_rlc_ue_manager);
|
||||
|
||||
free_mem_block(sdu_pP, __func__);
|
||||
free(sdu_pP);
|
||||
|
||||
return RLC_OP_STATUS_OK;
|
||||
}
|
||||
@@ -402,7 +401,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
|
||||
int is_srb;
|
||||
int rb_id;
|
||||
protocol_ctxt_t ctx;
|
||||
mem_block_t *memblock;
|
||||
uint8_t *memblock;
|
||||
int i;
|
||||
int is_enb;
|
||||
|
||||
@@ -500,12 +499,12 @@ rb_found:
|
||||
}
|
||||
|
||||
/* UE or monolithic gNB */
|
||||
memblock = get_free_mem_block(size, __func__);
|
||||
memblock = malloc16(size);
|
||||
if (memblock == NULL) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: malloc16 failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
memcpy(memblock->data, buf, size);
|
||||
memcpy(memblock, buf, size);
|
||||
LOG_D(PDCP, "Calling PDCP layer from RLC in %s\n", __FUNCTION__);
|
||||
if (!pdcp_data_ind(&ctx, is_srb, 0, rb_id, size, memblock, NULL, NULL)) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef _NR_RLC_UE_MANAGER_H_
|
||||
#define _NR_RLC_UE_MANAGER_H_
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "nr_rlc_entity.h"
|
||||
#include "common/platform_constants.h"
|
||||
|
||||
|
||||
@@ -265,18 +265,16 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
)
|
||||
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id)
|
||||
{
|
||||
int rnti = ctxt_pP->rntiMaybeUEid;
|
||||
rlc_ue_t *ue;
|
||||
@@ -312,7 +310,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
if (rb != NULL) {
|
||||
rb->set_time(rb, rlc_current_time);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP->data, sdu_sizeP, muiP);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP, sdu_sizeP, muiP);
|
||||
} else {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal: SDU sent to unknown RB\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
@@ -320,7 +318,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
|
||||
free_mem_block(sdu_pP, __func__);
|
||||
free(sdu_pP);
|
||||
|
||||
return RLC_OP_STATUS_OK;
|
||||
}
|
||||
@@ -359,7 +357,7 @@ static void deliver_sdu(void *_ue, rlc_entity_t *entity, char *buf, int size)
|
||||
int is_srb;
|
||||
int rb_id;
|
||||
protocol_ctxt_t ctx;
|
||||
mem_block_t *memblock;
|
||||
uint8_t *memblock;
|
||||
int i;
|
||||
int is_enb;
|
||||
int is_mbms;
|
||||
@@ -413,13 +411,13 @@ rb_found:
|
||||
T_INT(0 /*ctxt_pP->module_id*/),
|
||||
T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
|
||||
}
|
||||
|
||||
memblock = get_free_mem_block(size, __func__);
|
||||
|
||||
memblock = malloc16(size);
|
||||
if (memblock == NULL) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: malloc16 failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
memcpy(memblock->data, buf, size);
|
||||
memcpy(memblock, buf, size);
|
||||
if (!get_pdcp_data_ind_func()(&ctx, is_srb, is_mbms, rb_id, size, memblock, NULL, NULL)) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed (is_srb %d rb_id %d rnti %d)\n",
|
||||
__FILE__, __LINE__, __FUNCTION__,
|
||||
@@ -1010,24 +1008,6 @@ void rlc_tick(int frame, int subframe)
|
||||
}
|
||||
}
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP){
|
||||
rlc_data_req (ctxt_pP,
|
||||
srb_flagP,
|
||||
MBMS_flagP,
|
||||
rb_idP,
|
||||
muiP,
|
||||
confirmP,
|
||||
sdu_sizeP,
|
||||
sdu_pP, NULL, NULL);
|
||||
}
|
||||
|
||||
/* HACK to be removed: nr_rlc_get_available_tx_space is needed by
|
||||
* openair3/ocp-gtpu/gtp_itf.cpp which is compiled in lte-softmodem
|
||||
* so let's put a dummy nr_rlc_get_available_tx_space here
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define M2AP_TIMERS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
typedef struct {
|
||||
/* incremented every TTI (every millisecond when in realtime).
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
#define MCE_APP_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "common/platform_types.h"
|
||||
|
||||
void *MCE_app_task(void *args_p);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#define IP2PDCP_FIFO 22
|
||||
|
||||
#include "constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "sap.h"
|
||||
|
||||
struct cx_entity {
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "constant.h"
|
||||
#include "sap.h"
|
||||
#include "rrc_nas_primitives.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
struct rb_entity {
|
||||
nasRadioBearerId_t rab_id;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <net/ndisc.h>
|
||||
|
||||
#include "constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "sap.h"
|
||||
|
||||
typedef struct ue_ip_priv_s {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "nfapi_nr_interface.h"
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#define MAX_NUM_DL_PDU 100
|
||||
#define MAX_NUM_UL_PDU 100
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#ifndef __NR_IF_MODULE_H__
|
||||
#define __NR_IF_MODULE_H__
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include <semaphore.h>
|
||||
#include "fapi_nr_ue_interface.h"
|
||||
#include "openair2/PHY_INTERFACE/queue_t.h"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef __NR_CHAN_MODEL_H__
|
||||
#define __NR_CHAN_MODEL_H__
|
||||
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
#include <nfapi_nr_interface_scf.h>
|
||||
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
|
||||
@@ -36,11 +36,10 @@
|
||||
#include <sched.h>
|
||||
//#include "openair1/PHY/LTE_TRANSPORT/transport_eNB.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include <common/utils/threadPool/thread-pool.h>
|
||||
#include <radio/COMMON/common_lib.h>
|
||||
|
||||
|
||||
#define MAX_NUM_DL_PDU 100
|
||||
#define MAX_NUM_UL_PDU 100
|
||||
#define MAX_NUM_HI_DCI0_PDU 100
|
||||
@@ -53,37 +52,37 @@
|
||||
#define MAX_NUM_RACH_IND 100
|
||||
#define MAX_NUM_SRS_IND 100
|
||||
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
int CC_id;
|
||||
/// frame
|
||||
frame_t frame;
|
||||
/// subframe
|
||||
sub_frame_t subframe;
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
int CC_id;
|
||||
/// frame
|
||||
frame_t frame;
|
||||
/// subframe
|
||||
sub_frame_t subframe;
|
||||
|
||||
/// harq indication list
|
||||
nfapi_harq_indication_t harq_ind;
|
||||
/// harq indication list
|
||||
nfapi_harq_indication_t harq_ind;
|
||||
|
||||
/// crc indication list
|
||||
nfapi_crc_indication_t crc_ind;
|
||||
/// crc indication list
|
||||
nfapi_crc_indication_t crc_ind;
|
||||
|
||||
/// SR indication list
|
||||
nfapi_sr_indication_t sr_ind;
|
||||
/// SR indication list
|
||||
nfapi_sr_indication_t sr_ind;
|
||||
|
||||
/// CQI indication list
|
||||
nfapi_cqi_indication_t cqi_ind;
|
||||
/// CQI indication list
|
||||
nfapi_cqi_indication_t cqi_ind;
|
||||
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
/// SRS indication list
|
||||
nfapi_srs_indication_body_t srs_ind;
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
/// SRS indication list
|
||||
nfapi_srs_indication_body_t srs_ind;
|
||||
|
||||
/// RX indication
|
||||
nfapi_rx_indication_t rx_ind;
|
||||
/// RX indication
|
||||
nfapi_rx_indication_t rx_ind;
|
||||
|
||||
} UL_IND_t;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
//#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include "LTE_PhysicalConfigDedicated-NB-r13.h"
|
||||
//#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
//#include "openair1/SCHED/IF_Module_L1_primitives_NB_IoT.h"
|
||||
|
||||
//#define SCH_PAYLOAD_SIZE_MAX 4096
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define __OPENAIR_RRC_L2_INTERFACE_H__
|
||||
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
int8_t
|
||||
mac_rrc_data_req(
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* \email: raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "collection/tree.h"
|
||||
#include "rrc_types_NB_IoT.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/openairinterface5g_limits.h"
|
||||
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "rrc_extern.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "COMMON/openair_defs.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "NR_UE-NR-Capability.h"
|
||||
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "openair2/RRC/common.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "LTE_HandoverCommand.h"
|
||||
#include "rlc.h"
|
||||
#include "rrc_eNB_UE_context.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "LTE_SL-CommConfig-r12.h"
|
||||
#include "LTE_PeriodicBSR-Timer-r12.h"
|
||||
#include "LTE_RetxBSR-Timer-r12.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define __RRC_ENB_UE_CONTEXT_H__
|
||||
|
||||
#include "collection/tree.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
|
||||
int rrc_eNB_compare_ue_rnti_id(
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
struct e1ap_bearer_setup_req_s;
|
||||
struct e1ap_bearer_setup_resp_s;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef MAC_RRC_DL_H
|
||||
#define MAC_RRC_DL_H
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
|
||||
typedef void (*f1_setup_response_func_t)(sctp_assoc_t assoc_id, const f1ap_setup_resp_t *resp);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "nr_rrc_extern.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "COMMON/openair_defs.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "common/ngran_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "mac_rrc_dl.h"
|
||||
#include "cucp_cuup_if.h"
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#include "uper_encoder.h"
|
||||
#include "uper_decoder.h"
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define __RRC_GNB_UE_CONTEXT_H__
|
||||
|
||||
#include "collection/tree.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "nr_rrc_defs.h"
|
||||
|
||||
int rrc_gNB_compare_ue_rnti_id(rrc_gNB_ue_context_t* c1_pP, rrc_gNB_ue_context_t* c2_pP);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "commonDef.h"
|
||||
#include "common/platform_constants.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef _NR_SDAP_GNB_H_
|
||||
#define _NR_SDAP_GNB_H_
|
||||
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "nr_sdap_entity.h"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
|
||||
#include "NR_RadioBearerConfig.h"
|
||||
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
mem_block.h - description
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __MEM_BLOCK_H__
|
||||
# define __MEM_BLOCK_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "common/platform_constants.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef struct mem_block_t {
|
||||
struct mem_block_t *next;
|
||||
struct mem_block_t *previous;
|
||||
size_t size;
|
||||
unsigned char pool_id;
|
||||
unsigned char *data;
|
||||
} mem_block_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void *pool_buffer_init (void);
|
||||
void *pool_buffer_clean (void *arg);
|
||||
void free_mem_block (mem_block_t * leP, const char* caller);
|
||||
mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);
|
||||
mem_block_t *get_free_copy_mem_block (void);
|
||||
mem_block_t *get_free_copy_mem_block_up (void);
|
||||
mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);
|
||||
void display_mem_load (void);
|
||||
#define LIST_NAME_MAX_CHAR 32
|
||||
|
||||
typedef struct {
|
||||
struct mem_block_t *head;
|
||||
struct mem_block_t *tail;
|
||||
int nb_elements;
|
||||
char name[LIST_NAME_MAX_CHAR];
|
||||
} list2_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef struct {
|
||||
struct mem_block_t *head;
|
||||
struct mem_block_t *tail;
|
||||
int nb_elements;
|
||||
char name[LIST_NAME_MAX_CHAR];
|
||||
} list_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
#define X2AP_TIMERS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
typedef struct {
|
||||
/* incremented every TTI (every millisecond when in realtime).
|
||||
|
||||
Reference in New Issue
Block a user