make distinct names for structs and tyepdefs

This commit is contained in:
Laurent THOMAS
2026-02-27 16:53:58 +01:00
parent 46b7670672
commit d6858d01a0
38 changed files with 264 additions and 346 deletions
+1 -1
View File
@@ -29,7 +29,7 @@
#define SHUTDOWN_ACTOR(ptr) shutdown_actor((Actor_t *)ptr);
typedef struct Actor_t {
typedef struct {
notifiedFIFO_t fifo;
bool terminate;
pthread_t thread;
+1 -1
View File
@@ -93,7 +93,7 @@ TEST(DISABLED_actor, thread_safety_with_core_affinity)
// Thread safety can be ensured through data separation, here using C inheritance-like
// model
typedef struct TestActor_t {
typedef struct {
Actor_t actor;
int count;
} TestActor_t;
+1 -1
View File
@@ -27,7 +27,7 @@
typedef void (*callback_t)(void*);
/// @brief This thread barrier allows modifying the maximum joins after it is initialized
typedef struct dynamic_barrier_t {
typedef struct {
pthread_mutex_t barrier_lock;
int completed_jobs;
int max_joins;
+4 -7
View File
@@ -20,20 +20,17 @@
#include "nfapi_pnf_interface.h"
typedef struct pnf_s {
nfapi_pnf_config_t _public;
struct pnf_t {
nfapi_pnf_config_t _public;
int p5_sock;
int p5_sock;
uint8_t tx_message_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
uint8_t sctp;
uint8_t terminate;
};
} pnf_t;
int pnf_connect(pnf_t *pnf);
int pnf_message_pump(pnf_t *pnf);
+4 -6
View File
@@ -80,12 +80,10 @@ typedef struct {
} pnf_p7_rx_reassembly_queue_t;
typedef struct pnf_p7_s {
nfapi_pnf_p7_config_t _public;
struct pnf_p7_t {
nfapi_pnf_p7_config_t _public;
//private data
//private data
int p7_sock;
uint8_t terminate;
@@ -138,7 +136,7 @@ struct pnf_p7_t {
pnf_p7_stats_t stats;
pnf_p7_nr_stats_t nr_stats;
};
} pnf_p7_t;
int pnf_p7_message_pump(pnf_p7_t* pnf_p7);
int pnf_nr_p7_message_pump(pnf_p7_t* pnf_p7);
@@ -31,8 +31,8 @@ extern "C" {
#include <sys/types.h>
#include "openair1/PHY/defs_gNB.h"
typedef struct pnf_t pnf_t;
typedef struct pnf_p7_t pnf_p7_t;
typedef struct pnf_s pnf_t;
typedef struct pnf_p7_s pnf_p7_t;
/*! This enum is used to describe the states of the pnf
*/
+5 -8
View File
@@ -20,19 +20,16 @@
#include "nfapi_vnf_interface.h"
struct vnf_t
{
typedef struct vnf_s {
nfapi_vnf_config_t _public;
nfapi_vnf_config_t _public;
uint8_t terminate;
uint8_t terminate;
uint8_t sctp;
uint8_t tx_message_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
uint16_t next_phy_id;
};
uint16_t next_phy_id;
} vnf_t;
int vnf_pack_and_send_p5_message(vnf_t* vnf, uint16_t p5_idx, nfapi_p4_p5_message_header_t* msg, uint16_t msg_len);
+5 -6
View File
@@ -107,11 +107,10 @@ typedef struct nfapi_vnf_p7_connection_info {
} nfapi_vnf_p7_connection_info_t;
struct vnf_p7_t{
typedef struct vnf_p7_s {
nfapi_vnf_p7_config_t _public;
nfapi_vnf_p7_config_t _public;
// private data
// private data
uint8_t terminate;
nfapi_vnf_p7_connection_info_t* p7_connections;
int socket;
@@ -119,8 +118,8 @@ struct vnf_p7_t{
uint32_t slot_start_time_hr;
uint8_t* rx_message_buffer; // would this be better put in the p7 conenction info?
uint16_t rx_message_buffer_size;
};
} vnf_p7_t;
uint32_t vnf_get_current_time_hr(void);
@@ -30,9 +30,8 @@
extern "C" {
#endif
typedef struct vnf_t vnf_t;
typedef struct vnf_p7_t vnf_p7_t;
typedef struct vnf_s vnf_t;
typedef struct vnf_p7_s vnf_p7_t;
/*! The nfapi VNF phy configuration information
*/
+4 -4
View File
@@ -45,7 +45,7 @@
#define MAX_BANDS_PER_RRU 4
#define MAX_RRU_CONFIG_SIZE 1024
typedef struct NR_DL_FRAME_PARMS_s NR_DL_FRAME_PARMS;
typedef enum {
normal_txrx=0,
@@ -176,7 +176,7 @@ typedef struct {
int slot;
const c16_t *rxdata;
c16_t *rxdataF;
const struct NR_DL_FRAME_PARMS *fp;
const NR_DL_FRAME_PARMS *fp;
int32_t sample_offet;
task_ans_t *ans;
} feprx_cmd_t;
@@ -491,8 +491,8 @@ typedef struct RU_t_s {
/// FAPI confiuration
nfapi_nr_config_request_scf_t config;
/// Frame parameters
struct LTE_DL_FRAME_PARMS *frame_parms;
struct NR_DL_FRAME_PARMS *nr_frame_parms;
struct LTE_DL_FRAME_PARMS_s *frame_parms;
struct NR_DL_FRAME_PARMS_s *nr_frame_parms;
///timing offset used in TDD
int N_TA_offset;
/// SF extension used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)
+1 -2
View File
@@ -598,8 +598,7 @@ typedef struct {
int non_mbsfn_SubframeConfig;
} NonMBSFN_config_t;
typedef struct LTE_DL_FRAME_PARMS {
typedef struct LTE_DL_FRAME_PARMS_s {
/// Number of resource blocks (RB) in DL
uint8_t N_RB_DL;
/// Number of resource blocks (RB) in UL
+2 -4
View File
@@ -156,9 +156,7 @@ typedef struct {
} prach_list_t;
void init_prach_list(prach_list_t *);
typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS;
struct NR_DL_FRAME_PARMS {
typedef struct NR_DL_FRAME_PARMS_s {
/// frequency range
frequency_range_t freq_range;
// /// Placeholder to replace overlapping fields below
@@ -269,7 +267,7 @@ struct NR_DL_FRAME_PARMS {
uint16_t tdd_slot_config;
uint8_t tdd_period;
bool print_ue_help_cmdline_log;
};
} NR_DL_FRAME_PARMS;
// PRS config structures
typedef struct {
+2 -5
View File
@@ -4,11 +4,8 @@
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_common.h"
typedef struct pnf_t pnf_t;
typedef struct pnf_p7_t pnf_p7_t;
typedef struct vnf_t vnf_t;
typedef struct vnf_p7_t vnf_p7_t;
#include "nfapi/open-nFAPI/vnf/inc/vnf.h"
#include "nfapi/open-nFAPI/pnf/inc/pnf.h"
int l1_north_init_gNB(void){return 0;}
int slot_ahead = 6;
+1 -1
View File
@@ -35,7 +35,7 @@
#include "sched_nr.h"
#include "PHY/MODULATION/modulation_common.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "openair1/PHY/defs_nr_common.h"
#include "common/utils/LOG/log.h"
#include "common/utils/system.h"
+3 -3
View File
@@ -199,7 +199,7 @@ typedef struct {
typedef nssai_t e1ap_nssai_t;
typedef struct e1ap_net_config_t {
typedef struct {
net_ip_address_t CUUP_e1_ip_address;
net_ip_address_t CUCP_e1_ip_address;
uint16_t remotePortF1U;
@@ -230,7 +230,7 @@ typedef struct e1ap_cucp_setup_req_s {
uint64_t transac_id;
} e1ap_cucp_setup_req_t;
typedef struct e1ap_register_req_t {
typedef struct {
e1ap_setup_req_t setup_req;
e1ap_net_config_t net_config;
uint32_t gnb_id; // unused in CU-UP, but might be necessary for some functionality, e.g., E2 agent
@@ -658,7 +658,7 @@ typedef struct e1ap_bearer_modif_resp_s {
} e1ap_bearer_modif_resp_t;
/* E1AP Connection Loss indication */
typedef struct e1ap_lost_connection_t {
typedef struct {
int dummy;
} e1ap_lost_connection_t;
+37 -37
View File
@@ -84,7 +84,7 @@
/* 9.3.1.42 of 3GPP TS 38.473 - gNB-CU System Information */
#define F1AP_MAX_NO_SIB_TYPES 32
typedef struct f1ap_net_config_t {
typedef struct f1ap_net_config_s {
char *CU_f1_ip_address;
char *DU_f1c_ip_address;
char *DU_f1u_ip_address;
@@ -97,31 +97,31 @@ typedef struct f1ap_cp_tnl_s {
uint16_t port;
} f1ap_cp_tnl_t;
typedef enum f1ap_mode_t { F1AP_MODE_TDD = 0, F1AP_MODE_FDD = 1 } f1ap_mode_t;
typedef enum f1ap_mode_e { F1AP_MODE_TDD = 0, F1AP_MODE_FDD = 1 } f1ap_mode_t;
typedef struct f1ap_nr_frequency_info_t {
typedef struct f1ap_nr_frequency_info_s {
uint32_t arfcn;
int band;
} f1ap_nr_frequency_info_t;
typedef struct f1ap_transmission_bandwidth_t {
typedef struct f1ap_transmission_bandwidth_s {
uint8_t scs;
uint16_t nrb;
} f1ap_transmission_bandwidth_t;
typedef struct f1ap_fdd_info_t {
typedef struct f1ap_fdd_info_s {
f1ap_nr_frequency_info_t ul_freqinfo;
f1ap_nr_frequency_info_t dl_freqinfo;
f1ap_transmission_bandwidth_t ul_tbw;
f1ap_transmission_bandwidth_t dl_tbw;
} f1ap_fdd_info_t;
typedef struct f1ap_tdd_info_t {
typedef struct f1ap_tdd_info_s {
f1ap_nr_frequency_info_t freqinfo;
f1ap_transmission_bandwidth_t tbw;
} f1ap_tdd_info_t;
typedef struct f1ap_served_cell_info_t {
typedef struct f1ap_served_cell_info_s {
// NR CGI (Mandatory)
plmn_id_t plmn;
uint64_t nr_cellid; // NR Global Cell Id
@@ -143,7 +143,7 @@ typedef struct f1ap_served_cell_info_t {
int measurement_timing_config_len;
} f1ap_served_cell_info_t;
typedef struct f1ap_gnb_du_system_info_t {
typedef struct f1ap_gnb_du_system_info_s {
// MIB message (Mandatory)
uint8_t *mib;
int mib_length;
@@ -171,12 +171,12 @@ typedef struct f1ap_setup_req_s {
} *cell;
} f1ap_setup_req_t;
typedef struct f1ap_du_register_req_t {
typedef struct f1ap_du_register_req_s {
f1ap_setup_req_t setup_req;
f1ap_net_config_t net_config;
} f1ap_du_register_req_t;
typedef struct f1ap_sib_msg_t {
typedef struct f1ap_sib_msg_s {
/// RRC container with system information owned by gNB-CU
uint8_t *SI_container;
int SI_container_length;
@@ -260,7 +260,7 @@ typedef struct f1ap_gnb_cu_configuration_update_failure_s {
uint16_t criticality_diagnostics;
} f1ap_gnb_cu_configuration_update_failure_t;
typedef struct f1ap_cell_status_t {
typedef struct f1ap_cell_status_s {
// NR CGI
plmn_id_t plmn;
uint64_t nr_cellid; // NR Global Cell Id
@@ -372,7 +372,7 @@ typedef enum preemption_vulnerability_e {
PREEMPTABLE,
} preemption_vulnerability_t;
typedef enum f1ap_rlc_mode_t { F1AP_RLC_MODE_AM, F1AP_RLC_MODE_UM_BIDIR, F1AP_RLC_UM_UNI_UL, F1AP_RLC_UM_UNI_DL } f1ap_rlc_mode_t;
typedef enum f1ap_rlc_mode_e { F1AP_RLC_MODE_AM, F1AP_RLC_MODE_UM_BIDIR, F1AP_RLC_UM_UNI_UL, F1AP_RLC_UM_UNI_DL } f1ap_rlc_mode_t;
typedef struct f1ap_cu_to_du_rrc_info_s {
byte_array_t *cg_configinfo;
@@ -382,7 +382,7 @@ typedef struct f1ap_cu_to_du_rrc_info_s {
byte_array_t *ho_prep_info;
} f1ap_cu_to_du_rrc_info_t;
typedef struct f1ap_du_to_cu_rrc_info_t {
typedef struct f1ap_du_to_cu_rrc_info_s {
byte_array_t cell_group_config;
byte_array_t *meas_gap_config;
} f1ap_du_to_cu_rrc_info_t;
@@ -412,28 +412,28 @@ typedef enum lower_layer_status_e {
LOWER_LAYERS_RESUME,
} lower_layer_status_t;
typedef struct f1ap_srb_to_setup_t {
typedef struct f1ap_srb_to_setup_s {
int id;
} f1ap_srb_to_setup_t;
typedef struct f1ap_srb_setup_t {
typedef struct f1ap_srb_setup_s {
int id;
int lcid;
} f1ap_srb_setup_t;
/// 9.3.1.52 Packet Error Rate
typedef struct f1ap_per_t {
typedef struct f1ap_per_s {
uint8_t scalar;
uint8_t exponent;
} f1ap_per_t;
// 9.3.1.49 Non-Dynamic 5QI Descriptor
typedef struct f1ap_nondynamic_5qi_t {
typedef struct f1ap_nondynamic_5qi_s {
int fiveQI;
} f1ap_nondynamic_5qi_t;
// 9.3.1.47 Dynamic 5QI Descriptor
typedef struct f1ap_dynamic_5qi_t {
typedef struct f1ap_dynamic_5qi_s {
int prio; /// QoS Priority Level
int pdb; /// Packet Delay Budget
f1ap_per_t per; /// Packet Error Rate
@@ -441,14 +441,14 @@ typedef struct f1ap_dynamic_5qi_t {
int *avg_win; /// Averaging Window
} f1ap_dynamic_5qi_t;
typedef struct f1ap_arp_t {
typedef struct f1ap_arp_s {
uint16_t prio;
preemption_capability_t preempt_cap;
preemption_vulnerability_t preempt_vuln;
} f1ap_arp_t;
// 9.3.1.45 QoS Flow Level QoS Parameters
typedef struct f1ap_qos_flow_param_t {
typedef struct f1ap_qos_flow_param_s {
fiveQI_t qos_type;
union {
f1ap_nondynamic_5qi_t nondyn;
@@ -458,13 +458,13 @@ typedef struct f1ap_qos_flow_param_t {
} f1ap_qos_flow_param_t;
// in 9.2.2.1 Flows Mapped to DRB Item
typedef struct f1ap_drb_flows_mapped_t {
typedef struct f1ap_drb_flows_mapped_s {
int qfi;
f1ap_qos_flow_param_t param;
} f1ap_drb_flows_mapped_t;
/// in 9.2.2.1 DRB Info in UE Context Setup Request
typedef struct f1ap_drb_info_nr_t {
typedef struct f1ap_drb_info_nr_s {
f1ap_qos_flow_param_t drb_qos;
nssai_t nssai;
int flows_len;
@@ -473,7 +473,7 @@ typedef struct f1ap_drb_info_nr_t {
typedef enum { F1AP_PDCP_SN_12B, F1AP_PDCP_SN_18B } f1ap_pdcp_sn_len_t;
/// in 9.2.2.1 DRB to Be Setup Item IEs
typedef struct f1ap_drb_to_setup_t {
typedef struct f1ap_drb_to_setup_s {
int id;
enum { F1AP_QOS_CHOICE_EUTRAN, F1AP_QOS_CHOICE_NR } qos_choice;
union {
@@ -487,14 +487,14 @@ typedef struct f1ap_drb_to_setup_t {
f1ap_pdcp_sn_len_t *ul_pdcp_sn_len;
} f1ap_drb_to_setup_t;
typedef struct f1ap_drb_setup_t {
typedef struct f1ap_drb_setup_s {
int id;
int *lcid;
int up_dl_tnl_len;
f1ap_up_tnl_t up_dl_tnl[2];
} f1ap_drb_setup_t;
typedef struct f1ap_drb_to_release_t {
typedef struct f1ap_drb_to_release_s {
int id;
} f1ap_drb_to_release_t;
@@ -534,7 +534,7 @@ typedef struct f1ap_ue_context_setup_resp_s {
f1ap_srb_setup_t *srbs;
} f1ap_ue_context_setup_resp_t;
typedef struct f1ap_ue_context_mod_req_t {
typedef struct f1ap_ue_context_mod_req_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
@@ -565,7 +565,7 @@ typedef struct f1ap_ue_context_mod_req_t {
lower_layer_status_t *status;
} f1ap_ue_context_mod_req_t;
typedef struct f1ap_ue_context_mod_resp {
typedef struct f1ap_ue_context_mod_resp_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
@@ -586,7 +586,7 @@ typedef enum F1ap_Cause_e {
F1AP_CAUSE_MISC,
} f1ap_Cause_t;
typedef struct f1ap_ue_context_modif_required_t {
typedef struct f1ap_ue_context_modif_required_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
du_to_cu_rrc_information_t *du_to_cu_rrc_information;
@@ -594,28 +594,28 @@ typedef struct f1ap_ue_context_modif_required_t {
long cause_value;
} f1ap_ue_context_modif_required_t;
typedef struct f1ap_ue_context_modif_confirm_t {
typedef struct f1ap_ue_context_modif_confirm_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
uint8_t *rrc_container;
int rrc_container_length;
} f1ap_ue_context_modif_confirm_t;
typedef struct f1ap_ue_context_modif_refuse_t {
typedef struct f1ap_ue_context_modif_refuse_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
f1ap_Cause_t cause;
long cause_value;
} f1ap_ue_context_modif_refuse_t;
typedef struct f1ap_ue_context_rel_req_t {
typedef struct f1ap_ue_context_rel_req_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
f1ap_Cause_t cause;
long cause_value;
} f1ap_ue_context_rel_req_t;
typedef struct f1ap_ue_context_rel_cmd_t {
typedef struct f1ap_ue_context_rel_cmd_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
f1ap_Cause_t cause;
@@ -627,7 +627,7 @@ typedef struct f1ap_ue_context_rel_cmd_t {
uint32_t *old_gNB_DU_ue_id; // if after reestablishment request
} f1ap_ue_context_rel_cmd_t;
typedef struct f1ap_ue_context_rel_cplt_t {
typedef struct f1ap_ue_context_rel_cplt_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
} f1ap_ue_context_rel_cplt_t;
@@ -694,7 +694,7 @@ typedef struct {
f1ap_paging_cell_item_t *cells;
} f1ap_paging_t;
typedef struct f1ap_lost_connection_t {
typedef struct f1ap_lost_connection_s {
int dummy;
} f1ap_lost_connection_t;
@@ -703,12 +703,12 @@ typedef enum F1AP_ResetType_e {
F1AP_RESET_PART_OF_F1_INTERFACE
} f1ap_ResetType_t;
typedef struct f1ap_ue_to_reset_t {
typedef struct f1ap_ue_to_reset_s {
uint32_t *gNB_CU_ue_id;
uint32_t *gNB_DU_ue_id;
} f1ap_ue_to_reset_t;
typedef struct f1ap_reset_t {
typedef struct f1ap_reset_s {
uint64_t transaction_id;
f1ap_Cause_t cause;
long cause_value;
@@ -717,7 +717,7 @@ typedef struct f1ap_reset_t {
f1ap_ue_to_reset_t *ue_to_reset; // array of num_ue_to_reset elements
} f1ap_reset_t;
typedef struct f1ap_reset_ack_t {
typedef struct f1ap_reset_ack_s {
uint64_t transaction_id;
int num_ue_to_reset;
f1ap_ue_to_reset_t *ue_to_reset; // array of num_ue_to_reset elements
+2 -2
View File
@@ -21,9 +21,9 @@
#ifndef F1AP_DU_TASK_H_
#define F1AP_DU_TASK_H_
#include "openair2/COMMON/f1ap_messages_types.h"
struct f1ap_net_config_t;
void du_task_send_sctp_association_req(instance_t instance, struct f1ap_net_config_t *du_inst);
void du_task_send_sctp_association_req(instance_t instance, f1ap_net_config_t *du_inst);
void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp);
void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind);
void *F1AP_DU_task(void *arg);
+4 -8
View File
@@ -83,14 +83,10 @@
} while (0)
bool eq_f1ap_plmn(const plmn_id_t *a, const plmn_id_t *b);
struct f1ap_served_cell_info_t;
bool eq_f1ap_cell_info(const struct f1ap_served_cell_info_t *a, const struct f1ap_served_cell_info_t *b);
struct f1ap_gnb_du_system_info_t;
bool eq_f1ap_sys_info(const struct f1ap_gnb_du_system_info_t *a, const struct f1ap_gnb_du_system_info_t *b);
struct f1ap_nr_frequency_info_t;
bool eq_f1ap_freq_info(const struct f1ap_nr_frequency_info_t *a, const struct f1ap_nr_frequency_info_t *b);
struct f1ap_transmission_bandwidth_t;
bool eq_f1ap_tx_bandwidth(const struct f1ap_transmission_bandwidth_t *a, const struct f1ap_transmission_bandwidth_t *b);
bool eq_f1ap_cell_info(const f1ap_served_cell_info_t *a, const f1ap_served_cell_info_t *b);
bool eq_f1ap_sys_info(const f1ap_gnb_du_system_info_t *a, const f1ap_gnb_du_system_info_t *b);
bool eq_f1ap_freq_info(const f1ap_nr_frequency_info_t *a, const f1ap_nr_frequency_info_t *b);
bool eq_f1ap_tx_bandwidth(const f1ap_transmission_bandwidth_t *a, const f1ap_transmission_bandwidth_t *b);
struct OCTET_STRING;
uint8_t *cp_octet_string(const struct OCTET_STRING *os, int *len);
+2 -2
View File
@@ -184,7 +184,7 @@ typedef enum {
SSB_SINR,
} nr_config_report_type_t;
typedef struct nr_mac_config_t {
typedef struct nr_mac_config_s {
nr_pdsch_AntennaPorts_t pdsch_AntennaPorts;
int pusch_AntennaPorts;
int minRXTXTIME;
@@ -855,7 +855,7 @@ typedef struct gNB_MAC_INST_s gNB_MAC_INST;
typedef void (*nr_pp_impl_dl)(gNB_MAC_INST *nr_mac, post_process_pdsch_t *pp_pdsch);
typedef void (*nr_pp_impl_ul)(gNB_MAC_INST *nr_mac, post_process_pusch_t *pp_pusch);
typedef struct f1_config_t {
typedef struct {
f1ap_setup_req_t *setup_req;
f1ap_setup_resp_t *setup_resp;
uint32_t gnb_id; // associated gNB's ID, not used in DU itself
+1 -6
View File
@@ -38,13 +38,8 @@ struct NR_MeasurementTimingConfiguration;
struct NR_PDSCH_TimeDomainResourceAllocationList;
// forward declaration of MAC configuration parameters, definition is included in C file
struct nr_mac_config_t;
typedef struct nr_mac_config_t nr_mac_config_t;
struct nr_mac_timers;
typedef struct nr_mac_config_s nr_mac_config_t;
typedef struct nr_mac_timers nr_mac_timers_t;
struct measgap_config;
typedef struct measgap_config measgap_config_t;
void nr_rrc_config_dl_tda(struct NR_PDSCH_TimeDomainResourceAllocationList *pdsch_TimeDomainAllocationList,
+8 -8
View File
@@ -303,7 +303,7 @@ static int nr_pdcp_entity_process_sdu(nr_pdcp_entity_t *entity,
return header_size + size + integrity_size;
}
static bool nr_pdcp_entity_check_integrity(struct nr_pdcp_entity_t *entity,
static bool nr_pdcp_entity_check_integrity(nr_pdcp_entity_t *entity,
const uint8_t *buffer,
int buffer_size,
const nr_pdcp_integrity_data_t *msg_integrity)
@@ -329,8 +329,7 @@ static bool nr_pdcp_entity_check_integrity(struct nr_pdcp_entity_t *entity,
}
/* may be called several times, take care to clean previous settings */
static void nr_pdcp_entity_set_security(struct nr_pdcp_entity_t *entity,
const nr_pdcp_entity_security_keys_and_algos_t *parameters)
static void nr_pdcp_entity_set_security(nr_pdcp_entity_t *entity, const nr_pdcp_entity_security_keys_and_algos_t *parameters)
{
if (parameters->integrity_algorithm != -1) {
entity->security_keys_and_algos.integrity_algorithm = parameters->integrity_algorithm;
@@ -453,7 +452,7 @@ static void check_t_reordering(nr_pdcp_entity_t *entity)
}
}
static void nr_pdcp_entity_set_time(struct nr_pdcp_entity_t *entity, uint64_t now)
static void nr_pdcp_entity_set_time(nr_pdcp_entity_t *entity, uint64_t now)
{
entity->t_current = now;
@@ -697,12 +696,13 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
int pdusession_id,
bool has_sdap_rx,
bool has_sdap_tx,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_pdcp_entity_t *entity,
char *buf, int size,
void (*deliver_sdu)(void *deliver_sdu_data,
nr_pdcp_entity_t *entity,
char *buf,
int size,
const nr_pdcp_integrity_data_t *msg_integrity),
void *deliver_sdu_data,
void (*deliver_pdu)(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
char *buf, int size, int sdu_id),
void (*deliver_pdu)(void *deliver_pdu_data, ue_id_t ue_id, int rb_id, char *buf, int size, int sdu_id),
void *deliver_pdu_data,
int sn_size,
int t_reordering,
+26 -25
View File
@@ -92,36 +92,36 @@ typedef struct {
uint8_t mode; /* 0: PDCP AM, 1: PDCP UM, 2: PDCP TM */
} nr_pdcp_statistics_t;
typedef struct nr_pdcp_entity_t {
typedef struct nr_pdcp_entity_s {
nr_pdcp_entity_type_t type;
/* functions provided by the PDCP module */
void (*recv_pdu)(struct nr_pdcp_entity_t *entity, char *buffer, int size);
int (*process_sdu)(struct nr_pdcp_entity_t *entity, char *buffer, int size,
int sdu_id, char *pdu_buffer, int pdu_max_size);
void (*delete_entity)(struct nr_pdcp_entity_t *entity);
void (*release_entity)(struct nr_pdcp_entity_t *entity);
void (*suspend_entity)(struct nr_pdcp_entity_t *entity);
void (*reestablish_entity)(struct nr_pdcp_entity_t *entity,
const nr_pdcp_entity_security_keys_and_algos_t *parameters);
void (*get_stats)(struct nr_pdcp_entity_t *entity, nr_pdcp_statistics_t *out);
void (*recv_pdu)(struct nr_pdcp_entity_s *entity, char *buffer, int size);
int (*process_sdu)(struct nr_pdcp_entity_s *entity, char *buffer, int size, int sdu_id, char *pdu_buffer, int pdu_max_size);
void (*delete_entity)(struct nr_pdcp_entity_s *entity);
void (*release_entity)(struct nr_pdcp_entity_s *entity);
void (*suspend_entity)(struct nr_pdcp_entity_s *entity);
void (*reestablish_entity)(struct nr_pdcp_entity_s *entity, const nr_pdcp_entity_security_keys_and_algos_t *parameters);
void (*get_stats)(struct nr_pdcp_entity_s *entity, nr_pdcp_statistics_t *out);
/* set_security: pass -1 to parameters->integrity_algorithm / parameters->ciphering_algorithm
* to keep the corresponding current algorithm and key
*/
void (*set_security)(struct nr_pdcp_entity_t *entity,
const nr_pdcp_entity_security_keys_and_algos_t *parameters);
void (*set_security)(struct nr_pdcp_entity_s *entity, const nr_pdcp_entity_security_keys_and_algos_t *parameters);
/* check_integrity is used by RRC */
bool (*check_integrity)(struct nr_pdcp_entity_t *entity,
const uint8_t *buffer, int buffer_length,
bool (*check_integrity)(struct nr_pdcp_entity_s *entity,
const uint8_t *buffer,
int buffer_length,
const nr_pdcp_integrity_data_t *msg_integrity);
void (*set_time)(struct nr_pdcp_entity_t *entity, uint64_t now);
void (*set_time)(struct nr_pdcp_entity_s *entity, uint64_t now);
/* callbacks provided to the PDCP module */
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_pdcp_entity_t *entity,
char *buf, int size,
void (*deliver_sdu)(void *deliver_sdu_data,
struct nr_pdcp_entity_s *entity,
char *buf,
int size,
const nr_pdcp_integrity_data_t *msg_integrity);
void *deliver_sdu_data;
void (*deliver_pdu)(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
@@ -186,10 +186,10 @@ typedef struct nr_pdcp_entity_t {
bool entity_suspended;
/* PDCP Count API */
nr_pdcp_count_t (*get_pdcp_count_dl)(struct nr_pdcp_entity_t *entity);
nr_pdcp_count_t (*get_pdcp_count_ul)(struct nr_pdcp_entity_t *entity);
void (*set_pdcp_count_dl)(struct nr_pdcp_entity_t *entity, nr_pdcp_count_t count, int sn_size);
void (*set_pdcp_count_ul)(struct nr_pdcp_entity_t *entity, nr_pdcp_count_t count, int sn_size);
nr_pdcp_count_t (*get_pdcp_count_dl)(struct nr_pdcp_entity_s *entity);
nr_pdcp_count_t (*get_pdcp_count_ul)(struct nr_pdcp_entity_s *entity);
void (*set_pdcp_count_dl)(struct nr_pdcp_entity_s *entity, nr_pdcp_count_t count, int sn_size);
void (*set_pdcp_count_ul)(struct nr_pdcp_entity_s *entity, nr_pdcp_count_t count, int sn_size);
} nr_pdcp_entity_t;
@@ -200,12 +200,13 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
int pdusession_id,
bool has_sdap_rx,
bool has_sdap_tx,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_pdcp_entity_t *entity,
char *buf, int size,
void (*deliver_sdu)(void *deliver_sdu_data,
struct nr_pdcp_entity_s *entity,
char *buf,
int size,
const nr_pdcp_integrity_data_t *msg_integrity),
void *deliver_sdu_data,
void (*deliver_pdu)(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
char *buf, int size, int sdu_id),
void (*deliver_pdu)(void *deliver_pdu_data, ue_id_t ue_id, int rb_id, char *buf, int size, int sdu_id),
void *deliver_pdu_data,
int sn_size,
int t_reordering,
+26 -33
View File
@@ -71,26 +71,23 @@ static void nr_rlc_entity_get_stats(
out->txsdu_avg_time_to_tx = 0;
}
nr_rlc_entity_t *new_nr_rlc_entity_am(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
struct nr_rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data,
struct nr_rlc_entity_t *entity),
void *max_retx_reached_data,
int t_poll_retransmit,
int t_reassembly,
int t_status_prohibit,
int poll_pdu,
int poll_byte,
int max_retx_threshold,
int sn_field_length)
nr_rlc_entity_t *new_nr_rlc_entity_am(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
nr_rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data, nr_rlc_entity_t *entity),
void *max_retx_reached_data,
int t_poll_retransmit,
int t_reassembly,
int t_status_prohibit,
int poll_pdu,
int poll_byte,
int max_retx_threshold,
int sn_field_length)
{
nr_rlc_entity_am_t *ret;
@@ -150,14 +147,12 @@ nr_rlc_entity_t *new_nr_rlc_entity_am(
return (nr_rlc_entity_t *)ret;
}
nr_rlc_entity_t *new_nr_rlc_entity_um(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
int t_reassembly,
int sn_field_length)
nr_rlc_entity_t *new_nr_rlc_entity_um(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
int t_reassembly,
int sn_field_length)
{
nr_rlc_entity_um_t *ret;
@@ -203,11 +198,9 @@ nr_rlc_entity_t *new_nr_rlc_entity_um(
return (nr_rlc_entity_t *)ret;
}
nr_rlc_entity_t *new_nr_rlc_entity_tm(
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data)
nr_rlc_entity_t *new_nr_rlc_entity_tm(int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data)
{
nr_rlc_entity_tm_t *ret;
+41 -54
View File
@@ -97,41 +97,35 @@ typedef struct {
int retx_size;
} nr_rlc_entity_buffer_status_t;
typedef struct nr_rlc_entity_t {
typedef struct nr_rlc_entity_s {
/* functions provided by the RLC module */
void (*recv_pdu)(struct nr_rlc_entity_t *entity, char *buffer, int size);
nr_rlc_entity_buffer_status_t (*buffer_status)(
struct nr_rlc_entity_t *entity, int maxsize);
int (*generate_pdu)(struct nr_rlc_entity_t *entity, char *buffer, int size);
void (*recv_pdu)(struct nr_rlc_entity_s *entity, char *buffer, int size);
nr_rlc_entity_buffer_status_t (*buffer_status)(struct nr_rlc_entity_s *entity, int maxsize);
int (*generate_pdu)(struct nr_rlc_entity_s *entity, char *buffer, int size);
void (*recv_sdu)(struct nr_rlc_entity_t *entity, char *buffer, int size,
int sdu_id);
void (*recv_sdu)(struct nr_rlc_entity_s *entity, char *buffer, int size, int sdu_id);
void (*set_time)(struct nr_rlc_entity_t *entity, uint64_t now);
void (*set_time)(struct nr_rlc_entity_s *entity, uint64_t now);
void (*discard_sdu)(struct nr_rlc_entity_t *entity, int sdu_id);
void (*discard_sdu)(struct nr_rlc_entity_s *entity, int sdu_id);
void (*reestablishment)(struct nr_rlc_entity_t *entity);
void (*reestablishment)(struct nr_rlc_entity_s *entity);
void (*delete_entity)(struct nr_rlc_entity_t *entity);
void (*delete_entity)(struct nr_rlc_entity_s *entity);
int (*available_tx_space)(struct nr_rlc_entity_t *entity);
int (*tx_list_occupancy)(struct nr_rlc_entity_t *entity);
int (*available_tx_space)(struct nr_rlc_entity_s *entity);
int (*tx_list_occupancy)(struct nr_rlc_entity_s *entity);
void (*get_stats)(struct nr_rlc_entity_t *entity, nr_rlc_statistics_t *out);
void (*get_stats)(struct nr_rlc_entity_s *entity, nr_rlc_statistics_t *out);
/* callbacks provided to the RLC module */
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size);
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_s *entity, char *buf, int size);
void *deliver_sdu_data;
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
struct nr_rlc_entity_t *entity,
int sdu_id);
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data, struct nr_rlc_entity_s *entity, int sdu_id);
void *sdu_successful_delivery_data;
void (*max_retx_reached)(void *max_retx_reached_data,
struct nr_rlc_entity_t *entity);
void (*max_retx_reached)(void *max_retx_reached_data, struct nr_rlc_entity_s *entity);
void *max_retx_reached_data;
/* buffer status computation */
nr_rlc_entity_buffer_status_t bstatus;
@@ -141,41 +135,34 @@ typedef struct nr_rlc_entity_t {
int avg_time_is_on;
} nr_rlc_entity_t;
nr_rlc_entity_t *new_nr_rlc_entity_am(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
struct nr_rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data,
struct nr_rlc_entity_t *entity),
void *max_retx_reached_data,
int t_poll_retransmit,
int t_reassembly,
int t_status_prohibit,
int poll_pdu,
int poll_byte,
int max_retx_threshold,
int sn_field_length);
nr_rlc_entity_t *new_nr_rlc_entity_am(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
nr_rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data, nr_rlc_entity_t *entity),
void *max_retx_reached_data,
int t_poll_retransmit,
int t_reassembly,
int t_status_prohibit,
int poll_pdu,
int poll_byte,
int max_retx_threshold,
int sn_field_length);
nr_rlc_entity_t *new_nr_rlc_entity_um(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
int t_reassembly,
int sn_field_length);
nr_rlc_entity_t *new_nr_rlc_entity_um(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
int t_reassembly,
int sn_field_length);
nr_rlc_entity_t *new_nr_rlc_entity_tm(
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data);
nr_rlc_entity_t *new_nr_rlc_entity_tm(int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data);
void nr_rlc_entity_um_reconfigure(nr_rlc_entity_t *_entity, int t_reassembly, int *sn_field_length);
+1 -2
View File
@@ -875,8 +875,7 @@ struct srb0_data {
void (*send_initial_ul_rrc_message)(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data);
};
void deliver_sdu_srb0(void *deliver_sdu_data, struct nr_rlc_entity_t *entity,
char *buf, int size)
void deliver_sdu_srb0(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size)
{
struct srb0_data *s0 = (struct srb0_data *)deliver_sdu_data;
s0->send_initial_ul_rrc_message(s0->ue_id, (unsigned char *)buf, size, s0->data);
@@ -28,13 +28,13 @@ extern configmodule_interface_t *uniqCfg;
}
#include <iostream>
void deliver_sdu(void *deliver_sdu_data, struct nr_rlc_entity_t *entity, char *buf, int size)
void deliver_sdu(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size)
{
}
void sdu_successful_delivery(void *sdu_successful_delivery_data, struct nr_rlc_entity_t *entity, int sdu_id)
void sdu_successful_delivery(void *sdu_successful_delivery_data, nr_rlc_entity_t *entity, int sdu_id)
{
}
void max_retx_reached(void *max_retx_reached_data, struct nr_rlc_entity_t *entity)
void max_retx_reached(void *max_retx_reached_data, nr_rlc_entity_t *entity)
{
}
+6 -18
View File
@@ -107,9 +107,7 @@ int test[] = {
#include TEST
};
void deliver_sdu_gnb_am(void *deliver_sdu_data,
struct nr_rlc_entity_t *_entity,
char *buf, int size)
void deliver_sdu_gnb_am(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size)
{
nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity;
printf("TEST: GNB: %"PRIu64": deliver SDU size %d [",
@@ -118,9 +116,7 @@ void deliver_sdu_gnb_am(void *deliver_sdu_data,
printf("]\n");
}
void deliver_sdu_gnb_um(void *deliver_sdu_data,
struct nr_rlc_entity_t *_entity,
char *buf, int size)
void deliver_sdu_gnb_um(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size)
{
nr_rlc_entity_um_t *entity = (nr_rlc_entity_um_t *)_entity;
printf("TEST: GNB: %"PRIu64": deliver SDU size %d [",
@@ -129,9 +125,7 @@ void deliver_sdu_gnb_um(void *deliver_sdu_data,
printf("]\n");
}
void deliver_sdu_gnb_tm(void *deliver_sdu_data,
struct nr_rlc_entity_t *_entity,
char *buf, int size)
void deliver_sdu_gnb_tm(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size)
{
nr_rlc_entity_tm_t *entity = (nr_rlc_entity_tm_t *)_entity;
printf("TEST: GNB: %"PRIu64": deliver SDU size %d [",
@@ -157,9 +151,7 @@ void max_retx_reached_gnb(void *max_retx_reached_data,
exit(1);
}
void deliver_sdu_ue_am(void *deliver_sdu_data,
struct nr_rlc_entity_t *_entity,
char *buf, int size)
void deliver_sdu_ue_am(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size)
{
nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity;
printf("TEST: UE: %"PRIu64": deliver SDU size %d [",
@@ -168,9 +160,7 @@ void deliver_sdu_ue_am(void *deliver_sdu_data,
printf("]\n");
}
void deliver_sdu_ue_um(void *deliver_sdu_data,
struct nr_rlc_entity_t *_entity,
char *buf, int size)
void deliver_sdu_ue_um(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size)
{
nr_rlc_entity_um_t *entity = (nr_rlc_entity_um_t *)_entity;
printf("TEST: UE: %"PRIu64": deliver SDU size %d [",
@@ -179,9 +169,7 @@ void deliver_sdu_ue_um(void *deliver_sdu_data,
printf("]\n");
}
void deliver_sdu_ue_tm(void *deliver_sdu_data,
struct nr_rlc_entity_t *_entity,
char *buf, int size)
void deliver_sdu_ue_tm(void *deliver_sdu_data, nr_rlc_entity_t *_entity, char *buf, int size)
{
nr_rlc_entity_tm_t *entity = (nr_rlc_entity_tm_t *)_entity;
printf("TEST: UE: %"PRIu64": deliver SDU size %d [",
@@ -31,7 +31,7 @@ extern configmodule_interface_t *uniqCfg;
int sdu_delivered_count = 0;
int sdu_acked_count = 0;
void deliver_sdu(void *deliver_sdu_data, struct nr_rlc_entity_t *entity, char *buf, int size)
void deliver_sdu(void *deliver_sdu_data, nr_rlc_entity_t *entity, char *buf, int size)
{
sdu_delivered_count++;
char payload[300];
@@ -40,13 +40,13 @@ void deliver_sdu(void *deliver_sdu_data, struct nr_rlc_entity_t *entity, char *b
std::cout << "Delivered sdu: " << payload << std::endl;
}
void sdu_successful_delivery(void *sdu_successful_delivery_data, struct nr_rlc_entity_t *entity, int sdu_id)
void sdu_successful_delivery(void *sdu_successful_delivery_data, nr_rlc_entity_t *entity, int sdu_id)
{
sdu_acked_count++;
std::cout << "SDU " << sdu_id << " acked" << std::endl;
}
void max_retx_reached(void *max_retx_reached_data, struct nr_rlc_entity_t *entity)
void max_retx_reached(void *max_retx_reached_data, nr_rlc_entity_t *entity)
{
}
+22 -27
View File
@@ -28,25 +28,22 @@
#include "LOG/log.h"
rlc_entity_t *new_rlc_entity_am(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
struct rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data,
struct rlc_entity_t *entity),
void *max_retx_reached_data,
int t_reordering,
int t_status_prohibit,
int t_poll_retransmit,
int poll_pdu,
int poll_byte,
int max_retx_threshold)
rlc_entity_t *new_rlc_entity_am(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data, rlc_entity_t *entity),
void *max_retx_reached_data,
int t_reordering,
int t_status_prohibit,
int t_poll_retransmit,
int poll_pdu,
int poll_byte,
int max_retx_threshold)
{
rlc_entity_am_t *ret;
@@ -91,14 +88,12 @@ rlc_entity_t *new_rlc_entity_am(
return (rlc_entity_t *)ret;
}
rlc_entity_t *new_rlc_entity_um(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
int t_reordering,
int sn_field_length)
rlc_entity_t *new_rlc_entity_um(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
int t_reordering,
int sn_field_length)
{
rlc_entity_um_t *ret;
+34 -45
View File
@@ -32,66 +32,55 @@ typedef struct {
int retx_size;
} rlc_entity_buffer_status_t;
typedef struct rlc_entity_t {
typedef struct rlc_entity_s {
/* functions provided by the RLC module */
void (*recv_pdu)(struct rlc_entity_t *entity, char *buffer, int size);
rlc_entity_buffer_status_t (*buffer_status)(
struct rlc_entity_t *entity, int maxsize);
int (*generate_pdu)(struct rlc_entity_t *entity, char *buffer, int size);
void (*recv_pdu)(struct rlc_entity_s *entity, char *buffer, int size);
rlc_entity_buffer_status_t (*buffer_status)(struct rlc_entity_s *entity, int maxsize);
int (*generate_pdu)(struct rlc_entity_s *entity, char *buffer, int size);
void (*recv_sdu)(struct rlc_entity_t *entity, char *buffer, int size,
int sdu_id);
void (*recv_sdu)(struct rlc_entity_s *entity, char *buffer, int size, int sdu_id);
void (*set_time)(struct rlc_entity_t *entity, uint64_t now);
void (*set_time)(struct rlc_entity_s *entity, uint64_t now);
void (*discard_sdu)(struct rlc_entity_t *entity, int sdu_id);
void (*discard_sdu)(struct rlc_entity_s *entity, int sdu_id);
void (*reestablishment)(struct rlc_entity_t *entity);
void (*reestablishment)(struct rlc_entity_s *entity);
void (*delete)(struct rlc_entity_t *entity);
void (*delete)(struct rlc_entity_s *entity);
/* callbacks provided to the RLC module */
void (*deliver_sdu)(void *deliver_sdu_data, struct rlc_entity_t *entity,
char *buf, int size);
void (*deliver_sdu)(void *deliver_sdu_data, struct rlc_entity_s *entity, char *buf, int size);
void *deliver_sdu_data;
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
struct rlc_entity_t *entity,
int sdu_id);
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data, struct rlc_entity_s *entity, int sdu_id);
void *sdu_successful_delivery_data;
void (*max_retx_reached)(void *max_retx_reached_data,
struct rlc_entity_t *entity);
void (*max_retx_reached)(void *max_retx_reached_data, struct rlc_entity_s *entity);
void *max_retx_reached_data;
} rlc_entity_t;
rlc_entity_t *new_rlc_entity_am(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
struct rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data,
struct rlc_entity_t *entity),
void *max_retx_reached_data,
int t_reordering,
int t_status_prohibit,
int t_poll_retransmit,
int poll_pdu,
int poll_byte,
int max_retx_threshold);
rlc_entity_t *new_rlc_entity_am(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
void (*sdu_successful_delivery)(void *sdu_successful_delivery_data,
rlc_entity_t *entity,
int sdu_id),
void *sdu_successful_delivery_data,
void (*max_retx_reached)(void *max_retx_reached_data, rlc_entity_t *entity),
void *max_retx_reached_data,
int t_reordering,
int t_status_prohibit,
int t_poll_retransmit,
int poll_pdu,
int poll_byte,
int max_retx_threshold);
rlc_entity_t *new_rlc_entity_um(
int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, struct rlc_entity_t *entity,
char *buf, int size),
void *deliver_sdu_data,
int t_reordering,
int sn_field_length);
rlc_entity_t *new_rlc_entity_um(int rx_maxsize,
int tx_maxsize,
void (*deliver_sdu)(void *deliver_sdu_data, rlc_entity_t *entity, char *buf, int size),
void *deliver_sdu_data,
int t_reordering,
int sn_field_length);
#endif /* _RLC_ENTITY_H_ */
@@ -25,7 +25,7 @@
nr_bler_struct nr_bler_data[NR_NUM_MCS];
slot_rnti_mcs_s slot_rnti_mcs[NUM_NFAPI_SLOT];
slot_rnti_mcs_t slot_rnti_mcs[NUM_NFAPI_SLOT];
void read_channel_param(const nfapi_nr_dl_tti_pdsch_pdu_rel15_t * pdu, int slot, int index)
{
if (pdu == NULL)
@@ -44,13 +44,6 @@ typedef struct {
uint8_t area_code;
} nr_channel_status;
typedef struct nr_phy_channel_params_t {
uint16_t sfn_slot;
uint16_t message_id;
uint16_t nb_of_csi;
nr_channel_status csi[NR_NUM_LAYER];
} nr_phy_channel_params_t;
typedef struct {
uint8_t slot;
uint16_t rnti[MAX_NR_CHAN_PARAMS];
@@ -61,7 +54,7 @@ typedef struct {
bool drop_flag[MAX_NR_CHAN_PARAMS];
bool latest;
uint8_t area_code;
} slot_rnti_mcs_s;
} slot_rnti_mcs_t;
typedef struct {
uint16_t length;
+2 -3
View File
@@ -130,9 +130,8 @@ static int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_
static int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index, const uint8_t rsrq, const uint8_t rsrp );
typedef struct rrc_dcch_data_copy_t
{
LTE_DL_DCCH_Message_t *dl_dcch_msg;
typedef struct {
LTE_DL_DCCH_Message_t *dl_dcch_msg;
} rrc_dcch_data_copy_t;
static void rrc_ue_process_ueCapabilityEnquiry(const protocol_ctxt_t *const ctxt_pP,
+1 -1
View File
@@ -207,7 +207,7 @@ static bool rrc_delay_transaction(instance_t instance, MessageDef *msg_p)
return false; /* not delayed */
}
typedef struct deliver_ue_ctxt_release_data_t {
typedef struct {
gNB_RRC_INST *rrc;
f1ap_ue_context_rel_cmd_t *release_cmd;
sctp_assoc_t assoc_id;
+2 -2
View File
@@ -53,12 +53,12 @@
#include "utils.h"
#include "xer_encoder.h"
static int get_dl_band(const struct f1ap_served_cell_info_t *cell_info)
static int get_dl_band(const f1ap_served_cell_info_t *cell_info)
{
return cell_info->mode == F1AP_MODE_TDD ? cell_info->tdd.freqinfo.band : cell_info->fdd.dl_freqinfo.band;
}
static int get_ssb_scs(const struct f1ap_served_cell_info_t *cell_info)
static int get_ssb_scs(const f1ap_served_cell_info_t *cell_info)
{
return cell_info->mode == F1AP_MODE_TDD ? cell_info->tdd.tbw.scs : cell_info->fdd.dl_tbw.scs;
}
+2 -2
View File
@@ -37,8 +37,8 @@ struct f1ap_served_cell_info_t;
#include "f1ap_messages_types.h"
#include "ngap_messages_types.h"
void rrc_gNB_process_f1_setup_req(struct f1ap_setup_req_s *req, sctp_assoc_t assoc_id);
void rrc_CU_process_f1_lost_connection(struct gNB_RRC_INST_s *rrc, struct f1ap_lost_connection_t *lc, sctp_assoc_t assoc_id);
void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id);
void rrc_CU_process_f1_lost_connection(struct gNB_RRC_INST_s *rrc, f1ap_lost_connection_t *lc, sctp_assoc_t assoc_id);
void rrc_gNB_process_f1_du_configuration_update(struct f1ap_gnb_du_configuration_update_s *conf_up, sctp_assoc_t assoc_id);
struct nr_rrc_du_container_t *get_du_for_ue(struct gNB_RRC_INST_s *rrc, uint32_t ue_id);
+1 -1
View File
@@ -163,7 +163,7 @@ static void nr_initiate_handover(const gNB_RRC_INST *rrc,
rrc_f1_ue_context_setup_for_target_du(rrc, ue, target_cell, ho_prep_info);
}
typedef struct deliver_ue_ctxt_modification_data_t {
typedef struct {
gNB_RRC_INST *rrc;
f1ap_ue_context_mod_req_t *modification_req;
sctp_assoc_t assoc_id;
-1
View File
@@ -28,7 +28,6 @@
/* forward declarations */
typedef struct gNB_RRC_INST_s gNB_RRC_INST;
typedef struct gNB_RRC_UE_s gNB_RRC_UE_t;
typedef struct nr_rrc_cell_container_t nr_rrc_cell_container_t;
typedef struct NR_CellGroupConfig NR_CellGroupConfig_t;