Commit c0878940 authored by Melissa's avatar Melissa

Merge branch 'episys/david/multi_ue_sa' into 'episys/master-nsa'

Updated for multiple UEs CBRA procedure.

See merge request aburger/openairinterface5g!86
parents 069957cc c547b291
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="medium";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="full";
};
uicc0 = {
imsi = "208950000000031";
key = "0c0a34601d4f07677303652c0462535b";
opc= "63bfa50ee6523365ff14c1f45f88737d";
dnn= "oai";
nssai_sst=222;
nssai_sd=123;
}
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "ens3";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
local_n_portc = 50600;
remote_n_portc = 50601;
local_n_portd = 50610;
remote_n_portd = 50611;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
}
);
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="medium";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="full";
};
uicc0 = {
imsi = "208950000000032";
key = "0c0a34601d4f07677303652c0462535b";
opc= "63bfa50ee6523365ff14c1f45f88737d";
dnn= "oai";
nssai_sst=222;
nssai_sd=123;
}
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "ens3";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
local_n_portc = 50600;
remote_n_portc = 50601;
local_n_portd = 50610;
remote_n_portd = 50611;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
}
);
......@@ -458,7 +458,7 @@ int main( int argc, char **argv ) {
init_NR_UE(1,rrc_config_path);
int mode_offset = get_softmodem_params()->nsa ? NUMBER_OF_UE_MAX : 0;
int mode_offset = get_softmodem_params()->nsa ? NUMBER_OF_UE_MAX : 1;
uint16_t node_number = get_softmodem_params()->node_number;
ue_id_g = (node_number == 0) ? 0 : node_number - 2;
AssertFatal(ue_id_g >= 0, "UE id is expected to be nonnegative.\n");
......
......@@ -851,7 +851,7 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
frame,
slot,
&UE_info->list,
2,
MAX_MOBILES_PER_GNB,
n_rb_sched,
rballoc_mask);
}
......
......@@ -278,6 +278,12 @@ static bool is_my_dci(NR_UE_MAC_INST_t *mac, nfapi_nr_dl_dci_pdu_t *received_pdu
{
if (received_pdu->RNTI != mac->crnti && mac->ra.ra_state == RA_SUCCEEDED)
return false;
if (received_pdu->RNTI != mac->ra.t_crnti && mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION)
return false;
if (received_pdu->RNTI != 0x10b && mac->ra.ra_state == WAIT_RAR)
return false;
if (received_pdu->RNTI != 0xFFFF && mac->ra.ra_state <= GENERATE_PREAMBLE)
return false;
}
return true;
}
......@@ -294,11 +300,7 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
int pdu_idx = 0;
int num_pdus = dl_tti_request->dl_tti_request_body.nPDUs;
if (num_pdus <= 0)
{
LOG_E(NR_PHY, "%s: dl_tti_request number of PDUS <= 0\n", __FUNCTION__);
abort();
}
AssertFatal(num_pdus >= 0, "Invalid dl_tti_request number of PDUS\n");
for (int i = 0; i < num_pdus; i++)
{
......@@ -316,10 +318,13 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
uint16_t num_dcis = pdu_list->pdcch_pdu.pdcch_pdu_rel15.numDlDci;
if (num_dcis > 0)
{
dl_info->dci_ind = CALLOC(1, sizeof(fapi_nr_dci_indication_t));
if (!dl_info->dci_ind)
{
dl_info->dci_ind = CALLOC(1, sizeof(fapi_nr_dci_indication_t));
}
dl_info->dci_ind->SFN = dl_tti_request->SFN;
dl_info->dci_ind->slot = dl_tti_request->Slot;
AssertFatal(num_dcis < sizeof(dl_info->dci_ind->dci_list) / sizeof(dl_info->dci_ind->dci_list[0]),
AssertFatal(num_dcis <= sizeof(dl_info->dci_ind->dci_list) / sizeof(dl_info->dci_ind->dci_list[0]),
"The number of DCIs is greater than dci_list");
for (int j = 0; j < num_dcis; j++)
{
......@@ -360,7 +365,10 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
will be freed after handling. This is why the PDU index will
always be zero for the RX_IND becasue we should not have more than
one MIB. */
dl_info->rx_ind = CALLOC(1, sizeof(*dl_info->rx_ind));
if (!dl_info->rx_ind)
{
dl_info->rx_ind = CALLOC(1, sizeof(*dl_info->rx_ind));
}
fapi_nr_rx_indication_t *rx_ind = dl_info->rx_ind;
rx_ind->sfn = dl_tti_request->SFN;
rx_ind->slot = dl_tti_request->Slot;
......@@ -408,13 +416,12 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
{
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
int num_pdus = tx_data_request->Number_of_PDUs;
if (num_pdus <= 0)
AssertFatal(num_pdus >= 0, "Invalid tx_data_request number of PDUS\n");
if (!dl_info->rx_ind)
{
LOG_E(NR_PHY, "%s: tx_data_request number of PDUS <= 0\n", __FUNCTION__);
abort();
dl_info->rx_ind = CALLOC(1, sizeof(fapi_nr_rx_indication_t));
}
dl_info->rx_ind = CALLOC(1, sizeof(fapi_nr_rx_indication_t));
AssertFatal(dl_info->rx_ind != NULL, "%s: Out of memory in calloc", __FUNCTION__);
fapi_nr_rx_indication_t *rx_ind = dl_info->rx_ind;
rx_ind->sfn = tx_data_request->SFN;
......@@ -459,11 +466,7 @@ static void copy_ul_dci_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
int pdu_idx = 0;
int num_pdus = ul_dci_req->numPdus;
if (num_pdus <= 0)
{
LOG_E(NR_PHY, "%s: ul_dci_request number of PDUS <= 0\n", __FUNCTION__);
abort();
}
AssertFatal(num_pdus >= 0, "Invalid ul_dci_request number of PDUS\n");
for (int i = 0; i < num_pdus; i++)
{
......@@ -475,7 +478,10 @@ static void copy_ul_dci_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
uint16_t num_dci = pdu_list->pdcch_pdu.pdcch_pdu_rel15.numDlDci;
if (num_dci > 0)
{
dl_info->dci_ind = CALLOC(1, sizeof(fapi_nr_dci_indication_t));
if (!dl_info->dci_ind)
{
dl_info->dci_ind = CALLOC(1, sizeof(fapi_nr_dci_indication_t));
}
AssertFatal(dl_info->dci_ind != NULL, "%s: Out of memory in calloc", __FUNCTION__);
dl_info->dci_ind->SFN = ul_dci_req->SFN;
dl_info->dci_ind->slot = ul_dci_req->Slot;
......@@ -550,11 +556,7 @@ static void copy_ul_tti_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
{
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
int num_pdus = ul_tti_req->n_pdus;
if (num_pdus <= 0)
{
LOG_E(NR_PHY, "%s: ul_tti_request number of PDUS <= 0\n", __FUNCTION__);
abort();
}
AssertFatal(num_pdus >= 0, "Invalid ul_tti_request number of PDUS\n");
AssertFatal(num_pdus <= sizeof(ul_tti_req->pdus_list) / sizeof(ul_tti_req->pdus_list[0]),
"Too many pdus %d in ul_tti_req\n", num_pdus);
......
......@@ -1053,7 +1053,7 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
uint8_t nb_pdusessions_tosetup = NGAP_PDUSESSION_SETUP_REQ(msg_p).nb_pdusessions_tosetup;
pdu_sessions_done = 0;
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, 0);
for (int i = 0; i < NR_NB_RB_MAX - 3; i++) {
if(ue_context_p->ue_context.pduSession[i].status >= PDU_SESSION_STATUS_DONE)
continue;
......
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