Merge remote-tracking branch 'origin/issue_947' into integration_2025_w17 (!3380)
Issue 947 and compilation improvements This MR started with a small commit (03c7f151) to close #947. Little did I know that I would be taken in a long journey through OAI compilation hell.
This commit is contained in:
@@ -406,15 +406,4 @@ uint8_t sl_determine_sci_1a_len(uint16_t *num_subchannels,
|
||||
int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int nr_slot, uint8_t frame_duplex_type);
|
||||
|
||||
void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind, NR_UE_MAC_INST_t *mac);
|
||||
|
||||
void nr_mac_rrc_sl_mib_ind(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const frame_t frame,
|
||||
const int slot,
|
||||
const channel_t channel,
|
||||
uint8_t *pduP,
|
||||
const sdu_size_t pdu_len,
|
||||
const uint16_t rx_slss_id);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -141,7 +141,7 @@ NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst)
|
||||
ue_init_config_request(mac, get_slots_per_frame_from_scs(get_softmodem_params()->numerology));
|
||||
}
|
||||
|
||||
int rc = nr_rlc_module_init(0);
|
||||
int rc = nr_rlc_module_init(NR_RLC_OP_MODE_UE);
|
||||
AssertFatal(rc == 0, "Could not initialize RLC layer\n");
|
||||
|
||||
for (int j = 0; j < nb_inst; j++) {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
/* MAC */
|
||||
#include "nr_mac_gNB.h"
|
||||
#include "NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/COMMON/mac_messages_types.h"
|
||||
|
||||
/* Utils */
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
|
||||
#include "common/utils/alg/find.h"
|
||||
|
||||
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
|
||||
#define NR_RRC_SETUP_DELAY_MS 10
|
||||
#define NR_RRC_RECONFIGURATION_DELAY_MS 10
|
||||
#define NR_RRC_BWP_SWITCHING_DELAY_MS 6
|
||||
|
||||
// #define DEBUG_DCI
|
||||
// CQI TABLES (10 times the value in 214 to adequately compare with R)
|
||||
// Table 1 (38.214 5.2.2.1-2)
|
||||
|
||||
@@ -306,7 +306,9 @@ void mac_top_init_gNB(ngran_node_t node_type,
|
||||
mac_rrc_init(RC.nrmac[i], node_type);
|
||||
}//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
|
||||
|
||||
AssertFatal(nr_rlc_module_init(1) == 0,"Could not initialize RLC layer\n");
|
||||
nr_rlc_op_mode_t mode = NODE_IS_MONOLITHIC(node_type) ? NR_RLC_OP_MODE_MONO_GNB : NR_RLC_OP_MODE_SPLIT_GNB;
|
||||
int success = nr_rlc_module_init(mode);
|
||||
AssertFatal(success == 0,"Could not initialize RLC layer\n");
|
||||
|
||||
// These should be out of here later
|
||||
if (get_softmodem_params()->usim_test == 0 ) nr_pdcp_layer_init();
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "nr_pdcp_sdu.h"
|
||||
#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h"
|
||||
#include "openair3/SECU/secu_defs.h"
|
||||
|
||||
/* PDCP Formats according to clause 6.2 of 3GPP TS 38.323 */
|
||||
@@ -41,6 +39,8 @@
|
||||
#define LONG_PDCP_HEADER_SIZE 3
|
||||
/* MAC-I size (unit: byte) */
|
||||
#define PDCP_INTEGRITY_SIZE 4
|
||||
/* K keys have 128 bits length */
|
||||
#define NR_K_KEY_SIZE 16
|
||||
|
||||
typedef enum {
|
||||
NR_PDCP_DRB_AM,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define _NR_PDCP_UE_MANAGER_H_
|
||||
|
||||
#include "nr_pdcp_entity.h"
|
||||
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
typedef void nr_pdcp_ue_manager_t;
|
||||
|
||||
@@ -320,7 +320,7 @@ int nr_rlc_get_available_tx_space(const int ue_id, const logical_chan_id_t chann
|
||||
return ret;
|
||||
}
|
||||
|
||||
int nr_rlc_module_init(int gnb_flag)
|
||||
int nr_rlc_module_init(nr_rlc_op_mode_t mode)
|
||||
{
|
||||
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static int inited = 0;
|
||||
@@ -328,6 +328,7 @@ int nr_rlc_module_init(int gnb_flag)
|
||||
|
||||
if (pthread_mutex_lock(&lock)) abort();
|
||||
|
||||
bool gnb_flag = mode != NR_RLC_OP_MODE_UE;
|
||||
if (gnb_flag == 1 && inited) {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal, inited already 1\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
@@ -343,7 +344,7 @@ int nr_rlc_module_init(int gnb_flag)
|
||||
if (gnb_flag == 0)
|
||||
inited_ue = 1;
|
||||
|
||||
nr_rlc_ue_manager = new_nr_rlc_ue_manager(gnb_flag);
|
||||
nr_rlc_ue_manager = new_nr_rlc_ue_manager(mode);
|
||||
|
||||
if (pthread_mutex_unlock(&lock)) abort();
|
||||
|
||||
@@ -409,17 +410,14 @@ rb_found:
|
||||
T_INT(0 /*ctxt_pP->module_id*/),
|
||||
T_INT(ue->ue_id), T_INT(rb_id), T_INT(size));
|
||||
|
||||
const ngran_node_t type = RC.nrrrc[0 /*ctxt_pP->module_id*/]->node_type;
|
||||
AssertFatal(!NODE_IS_CU(type),
|
||||
"Can't be CU, bad node type %d\n", type);
|
||||
|
||||
// if (NODE_IS_DU(type) && is_srb == 0) {
|
||||
// LOG_D(RLC, "call proto_agent_send_pdcp_data_ind() \n");
|
||||
// proto_agent_send_pdcp_data_ind(&ctx, is_srb, 0, rb_id, size, memblock);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (NODE_IS_DU(type)) {
|
||||
bool rlc_split = nr_rlc_manager_rlc_is_split(nr_rlc_ue_manager);
|
||||
if (rlc_split) {
|
||||
if(is_srb) {
|
||||
MessageDef *msg;
|
||||
msg = itti_alloc_new_message(TASK_RLC_ENB, 0, F1AP_UL_RRC_MESSAGE);
|
||||
|
||||
@@ -34,14 +34,13 @@
|
||||
#include "NR_LogicalChannelIdentity.h"
|
||||
#include "NR_RadioBearerConfig.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_proto.h"
|
||||
#include "nr_rlc_ue_manager.h"
|
||||
|
||||
|
||||
struct NR_RLC_Config;
|
||||
struct NR_LogicalChannelConfig;
|
||||
|
||||
int nr_rlc_module_init(int gnb_flag);
|
||||
int nr_rlc_module_init(nr_rlc_op_mode_t mode);
|
||||
void nr_mac_rlc_data_ind(const module_id_t module_idP,
|
||||
const uint16_t ue_id,
|
||||
const bool gnb_flagP,
|
||||
|
||||
@@ -31,10 +31,10 @@ typedef struct {
|
||||
pthread_mutex_t lock;
|
||||
nr_rlc_ue_t **ue_list;
|
||||
int ue_count;
|
||||
int gnb_flag;
|
||||
nr_rlc_op_mode_t mode;
|
||||
} nr_rlc_ue_manager_internal_t;
|
||||
|
||||
nr_rlc_ue_manager_t *new_nr_rlc_ue_manager(int gnb_flag)
|
||||
nr_rlc_ue_manager_t *new_nr_rlc_ue_manager(nr_rlc_op_mode_t mode)
|
||||
{
|
||||
nr_rlc_ue_manager_internal_t *ret;
|
||||
|
||||
@@ -45,15 +45,21 @@ nr_rlc_ue_manager_t *new_nr_rlc_ue_manager(int gnb_flag)
|
||||
}
|
||||
|
||||
if (pthread_mutex_init(&ret->lock, NULL)) abort();
|
||||
ret->gnb_flag = gnb_flag;
|
||||
ret->mode = mode;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool nr_rlc_manager_rlc_is_split(nr_rlc_ue_manager_t *_m)
|
||||
{
|
||||
nr_rlc_ue_manager_internal_t *m = _m;
|
||||
return m->mode == NR_RLC_OP_MODE_SPLIT_GNB;
|
||||
}
|
||||
|
||||
int nr_rlc_manager_get_gnb_flag(nr_rlc_ue_manager_t *_m)
|
||||
{
|
||||
nr_rlc_ue_manager_internal_t *m = _m;
|
||||
return m->gnb_flag;
|
||||
return m->mode != NR_RLC_OP_MODE_UE;
|
||||
}
|
||||
|
||||
void nr_rlc_manager_lock(nr_rlc_ue_manager_t *_m)
|
||||
|
||||
@@ -24,11 +24,18 @@
|
||||
#include "common/platform_types.h"
|
||||
#include "nr_rlc_entity.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/ngran_types.h"
|
||||
|
||||
typedef void nr_rlc_ue_manager_t;
|
||||
|
||||
typedef enum nr_rlc_rb_type { NR_RLC_NONE = 0, NR_RLC_SRB = 1, NR_RLC_DRB = 2 } nr_rlc_rb_type;
|
||||
|
||||
typedef enum {
|
||||
NR_RLC_OP_MODE_SPLIT_GNB,
|
||||
NR_RLC_OP_MODE_MONO_GNB,
|
||||
NR_RLC_OP_MODE_UE,
|
||||
} nr_rlc_op_mode_t;
|
||||
|
||||
typedef struct nr_rlc_rb_t {
|
||||
nr_rlc_rb_type type;
|
||||
union {
|
||||
@@ -52,8 +59,9 @@ typedef struct nr_rlc_ue_t {
|
||||
/* manager functions */
|
||||
/***********************************************************************/
|
||||
|
||||
nr_rlc_ue_manager_t *new_nr_rlc_ue_manager(int gnb_flag);
|
||||
nr_rlc_ue_manager_t *new_nr_rlc_ue_manager(nr_rlc_op_mode_t mode);
|
||||
|
||||
bool nr_rlc_manager_rlc_is_split(nr_rlc_ue_manager_t *_m);
|
||||
int nr_rlc_manager_get_gnb_flag(nr_rlc_ue_manager_t *m);
|
||||
|
||||
void nr_rlc_manager_lock(nr_rlc_ue_manager_t *m);
|
||||
|
||||
Reference in New Issue
Block a user