Commit d10eb372 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/bugfix-define-constants' into integration_2023_w30

parents 70926b2c a20bfc96
......@@ -70,7 +70,10 @@
#define NR_NB_RB_MAX (29 + 3) /* NR_maxDRB from NR_asn_constant.hm + 3 SRBs */
#define NGAP_MAX_PDU_SESSION (256) /* As defined in TS 38.413 9.2.1.1 Range Bound for PDU Sessions. */
#define NGAP_MAX_DRBS_PER_UE (32) /* As defined in TS 38.413 9.2.1.1 - maxnoofDRBs */
#define MAX_DRBS_PER_UE (32) /* Maximum number of Data Radio Bearers per UE
* defined for NGAP in TS 38.413 - maxnoofDRBs */
#define MAX_PDUS_PER_UE (8) /* Maximum number of PDU Sessions per UE */
#define NB_RB_MBMS_MAX (29 * 16) /* 29 = LTE_maxSessionPerPMCH + 16 = LTE_maxServiceCount from LTE_asn_constant.h */
......
......@@ -277,7 +277,7 @@ typedef struct pdusession_s {
/* S-GW Tunnel endpoint identifier */
uint32_t gtp_teid;
/* Stores the DRB ID of the DRBs used by this PDU Session */
uint8_t used_drbs[NGAP_MAX_DRBS_PER_UE];
uint8_t used_drbs[MAX_DRBS_PER_UE];
uint32_t gNB_teid_N3;
transport_layer_addr_t gNB_addr_N3;
uint32_t UPF_teid_N3;
......
......@@ -23,7 +23,6 @@
#define _NR_RLC_ENTITY_H_
#include <stdint.h>
#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h"
#include "common/utils/time_stat.h"
......
......@@ -179,7 +179,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
switch (channel_idP) {
case 0: rb = ue->srb0; break;
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... NGAP_MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
case 4 ... MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
......@@ -241,9 +241,9 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) {
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... NGAP_MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
if (rb != NULL) {
......@@ -333,9 +333,9 @@ int nr_rlc_get_available_tx_space(
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) {
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... NGAP_MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
if (rb != NULL) {
......
......@@ -23,6 +23,7 @@
#define _NR_RLC_UE_MANAGER_H_
#include "openair2/COMMON/platform_types.h"
#include "nr_rlc_entity.h"
#include "common/platform_constants.h"
typedef void nr_rlc_ue_manager_t;
......
......@@ -236,8 +236,8 @@ typedef enum {
typedef struct gNB_RRC_UE_s {
uint8_t primaryCC_id;
drb_t established_drbs[NGAP_MAX_DRBS_PER_UE];
uint8_t DRB_active[NGAP_MAX_DRBS_PER_UE];
drb_t established_drbs[MAX_DRBS_PER_UE];
uint8_t DRB_active[MAX_DRBS_PER_UE];
NR_SRB_INFO_TABLE_ENTRY Srb[maxSRBs]; // 3gpp max is 3 SRBs, number 1..3, we waste the entry 0 for code simplicity
NR_MeasConfig_t *measConfig;
......
......@@ -120,7 +120,7 @@ NR_DRB_ToAddModList_t *fill_DRB_configList(gNB_RRC_UE_t *ue)
if (ue->nb_of_pdusessions == 0)
return NULL;
int nb_drb_to_setup = rrc->configuration.drbs;
long drb_priority[NGAP_MAX_DRBS_PER_UE] = {0};
long drb_priority[MAX_DRBS_PER_UE] = {0};
uint8_t drb_id_to_setup_start = 0;
NR_DRB_ToAddModList_t *DRB_configList = CALLOC(sizeof(*DRB_configList), 1);
for (int i = 0; i < ue->nb_of_pdusessions; i++) {
......@@ -399,7 +399,7 @@ static NR_DRB_ToAddModList_t *createDRBlist(gNB_RRC_UE_t *ue, bool reestablish)
NR_DRB_ToAddMod_t *DRB_config = NULL;
NR_DRB_ToAddModList_t *DRB_configList = CALLOC(sizeof(*DRB_configList), 1);
for (int i = 0; i < NGAP_MAX_DRBS_PER_UE; i++) {
for (int i = 0; i < MAX_DRBS_PER_UE; i++) {
if (ue->established_drbs[i].status != DRB_INACTIVE) {
DRB_config = generateDRB_ASN1(&ue->established_drbs[i]);
if (reestablish) {
......@@ -822,13 +822,13 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
// search exist DRB_config
int j;
for (j = 0; i < NGAP_MAX_DRBS_PER_UE; j++) {
for (j = 0; i < MAX_DRBS_PER_UE; j++) {
if (ue_p->established_drbs[j].status != DRB_INACTIVE
&& ue_p->established_drbs[j].cnAssociation.sdap_config.pdusession_id == ue_p->pduSession[i].param.pdusession_id)
break;
}
if (j == NGAP_MAX_DRBS_PER_UE) {
if (j == MAX_DRBS_PER_UE) {
ue_p->pduSession[i].xid = xid;
ue_p->pduSession[i].status = PDU_SESSION_STATUS_FAILED;
ue_p->pduSession[i].cause = NGAP_CAUSE_RADIO_NETWORK;
......
......@@ -52,7 +52,7 @@ void generateDRB(gNB_RRC_UE_t *ue,
est_drb->drb_id = drb_id;
est_drb->reestablishPDCP = -1;
est_drb->recoverPDCP = -1;
for (i = 0; i < NGAP_MAX_DRBS_PER_UE; i++) {
for (i = 0; i < MAX_DRBS_PER_UE; i++) {
if ((est_drb->cnAssociation.sdap_config.pdusession_id == 0
|| est_drb->cnAssociation.sdap_config.pdusession_id == pduSession->param.pdusession_id)
&& est_drb->defaultDRBid == 0) {
......@@ -148,12 +148,12 @@ uint8_t next_available_drb(gNB_RRC_UE_t *ue, rrc_pdu_session_param_t *pdusession
uint8_t drb_id;
if (0 /*!is_gbr*/) { /* Find if Non-GBR DRB exists in the same PDU Session */
for (drb_id = 0; drb_id < NGAP_MAX_DRBS_PER_UE; drb_id++)
for (drb_id = 0; drb_id < MAX_DRBS_PER_UE; drb_id++)
if (pdusession->param.used_drbs[drb_id] == DRB_ACTIVE_NONGBR)
return drb_id + 1;
}
/* GBR Flow or a Non-GBR DRB does not exist in the same PDU Session, find an available DRB */
for (drb_id = 0; drb_id < NGAP_MAX_DRBS_PER_UE; drb_id++)
for (drb_id = 0; drb_id < MAX_DRBS_PER_UE; drb_id++)
if (ue->DRB_active[drb_id] == DRB_INACTIVE)
return drb_id + 1;
/* From this point, we need to handle the case that all DRBs are already used by the UE. */
......
......@@ -27,8 +27,8 @@
#include "NR_DRB-ToAddMod.h"
#include "NR_SRB-ToAddMod.h"
#define MAX_DRBS_PER_UE (32) /* Maximum number of Data Radio Bearers per UE */
#define MAX_PDUS_PER_UE (8) /* Maximum number of PDU Sessions per UE */
#include "common/platform_constants.h"
#define DRB_ACTIVE_NONGBR (2) /* DRB is used for Non-GBR Flows */
#define DRB_ACTIVE (1)
#define DRB_INACTIVE (0)
......
......@@ -518,7 +518,7 @@ bool nr_sdap_delete_ue_entities(ue_id_t ue_id)
}
/* Handle scenario where ue_id matches the head of the list */
while (entityPtr != NULL && entityPtr->ue_id == ue_id && upperBound < NGAP_MAX_DRBS_PER_UE) {
while (entityPtr != NULL && entityPtr->ue_id == ue_id && upperBound < MAX_DRBS_PER_UE) {
sdap_info.sdap_entity_llist = entityPtr->next_entity;
free(entityPtr);
entityPtr = sdap_info.sdap_entity_llist;
......
......@@ -44,7 +44,7 @@
#define SDAP_CTRL_PDU_MAP_DEF_DRB (0)
#define SDAP_CTRL_PDU_MAP_RULE_DRB (1)
#define SDAP_MAX_PDU (9000)
#define SDAP_MAX_NUM_OF_ENTITIES (NGAP_MAX_DRBS_PER_UE * MAX_MOBILES_PER_ENB)
#define SDAP_MAX_NUM_OF_ENTITIES (MAX_DRBS_PER_UE * MAX_MOBILES_PER_ENB)
#define SDAP_MAX_UE_ID (65536)
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment