F1AP: RLC mode: introduce separate type
The currently used type does not cover all possibilities. While we don't encode&decode them, it might still be good to be able to express it, so introduce the new type. Co-authored-by: Guido Casati <hello@guidocasati.com>
This commit is contained in:
committed by
Guido Casati
co-authored by
Guido Casati
parent
da6b1a4be4
commit
ea28b9bb5b
@@ -406,6 +406,7 @@ typedef struct f1ap_drb_information_s {
|
||||
uint8_t flows_to_be_setup_length;
|
||||
} f1ap_drb_information_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 struct f1ap_drb_to_be_setup_s {
|
||||
long drb_id;
|
||||
f1ap_up_tnl_t up_ul_tnl[2];
|
||||
@@ -413,7 +414,7 @@ typedef struct f1ap_drb_to_be_setup_s {
|
||||
f1ap_up_tnl_t up_dl_tnl[2];
|
||||
uint8_t up_dl_tnl_length;
|
||||
f1ap_drb_information_t drb_info;
|
||||
rlc_mode_t rlc_mode;
|
||||
f1ap_rlc_mode_t rlc_mode;
|
||||
nssai_t nssai;
|
||||
} f1ap_drb_to_be_setup_t;
|
||||
|
||||
|
||||
@@ -483,12 +483,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_context_setu
|
||||
/* 12.1.4 rLCMode */
|
||||
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
|
||||
switch (f1ap_ue_context_setup_req->drbs_to_be_setup[i].rlc_mode) {
|
||||
case RLC_MODE_AM:
|
||||
case F1AP_RLC_MODE_AM:
|
||||
drbs_toBeSetup_item->rLCMode = F1AP_RLCMode_rlc_am;
|
||||
break;
|
||||
|
||||
default:
|
||||
case F1AP_RLC_MODE_UM_BIDIR:
|
||||
drbs_toBeSetup_item->rLCMode = F1AP_RLCMode_rlc_um_bidirectional;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "modes other than AM/UM-Bidir not supported\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* OPTIONAL */
|
||||
@@ -1218,12 +1221,15 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_conte
|
||||
/* 12.1.4 rLCMode */
|
||||
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
|
||||
switch (f1ap_ue_context_modification_req->drbs_to_be_setup[i].rlc_mode) {
|
||||
case RLC_MODE_AM:
|
||||
case F1AP_RLC_MODE_AM:
|
||||
drbs_toBeSetupMod_item->rLCMode = F1AP_RLCMode_rlc_am;
|
||||
break;
|
||||
|
||||
default:
|
||||
case F1AP_RLC_MODE_UM_BIDIR:
|
||||
drbs_toBeSetupMod_item->rLCMode = F1AP_RLCMode_rlc_um_bidirectional;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "modes other than AM/UM-Bidir not supported\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* OPTIONAL */
|
||||
|
||||
@@ -209,11 +209,14 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_i
|
||||
|
||||
switch (drbs_tobesetup_item_p->rLCMode) {
|
||||
case F1AP_RLCMode_rlc_am:
|
||||
drb_p->rlc_mode = RLC_MODE_AM;
|
||||
drb_p->rlc_mode = F1AP_RLC_MODE_AM;
|
||||
break;
|
||||
case F1AP_RLCMode_rlc_um_bidirectional:
|
||||
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
|
||||
break;
|
||||
|
||||
default:
|
||||
drb_p->rlc_mode = RLC_MODE_TM;
|
||||
LOG_W(F1AP, "unsupported RLC Mode %ld received: setting UM bidir\n", drbs_tobesetup_item_p->rLCMode);
|
||||
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -930,13 +933,16 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t
|
||||
drb_p->up_ul_tnl[0].port = getCxt(instance)->net_config.CUport;
|
||||
|
||||
switch (drbs_tobesetupmod_item_p->rLCMode) {
|
||||
case F1AP_RLCMode_rlc_am:
|
||||
drb_p->rlc_mode = RLC_MODE_AM;
|
||||
break;
|
||||
|
||||
default:
|
||||
drb_p->rlc_mode = RLC_MODE_TM;
|
||||
break;
|
||||
case F1AP_RLCMode_rlc_am:
|
||||
drb_p->rlc_mode = F1AP_RLC_MODE_AM;
|
||||
break;
|
||||
case F1AP_RLCMode_rlc_um_bidirectional:
|
||||
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
|
||||
break;
|
||||
default:
|
||||
LOG_W(F1AP, "unsupported RLC Mode %ld received: setting UM bidir\n", drbs_tobesetupmod_item_p->rLCMode);
|
||||
drb_p->rlc_mode = F1AP_RLC_MODE_UM_BIDIR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (drbs_tobesetupmod_item_p->qoSInformation.present == F1AP_QoSInformation_PR_eUTRANQoS) {
|
||||
|
||||
@@ -244,7 +244,7 @@ static int handle_ue_context_srbs_setup(NR_UE_info_t *UE,
|
||||
|
||||
static NR_RLC_BearerConfig_t *get_bearerconfig_from_drb(const f1ap_drb_to_be_setup_t *drb)
|
||||
{
|
||||
const NR_RLC_Config_PR rlc_conf = drb->rlc_mode == RLC_MODE_UM ? NR_RLC_Config_PR_um_Bi_Directional : NR_RLC_Config_PR_am;
|
||||
const NR_RLC_Config_PR rlc_conf = drb->rlc_mode == F1AP_RLC_MODE_AM ? NR_RLC_Config_PR_am : NR_RLC_Config_PR_um_Bi_Directional;
|
||||
long priority = 13; // hardcoded for the moment
|
||||
return get_DRB_RLC_BearerConfig(get_lcid_from_drbid(drb->drb_id), drb->drb_id, rlc_conf, priority);
|
||||
}
|
||||
|
||||
@@ -2189,7 +2189,7 @@ static int fill_drb_to_be_setup_from_e1_resp(const gNB_RRC_INST *rrc,
|
||||
const DRB_nGRAN_setup_t *drb_config = &pduSession[p].DRBnGRanList[i];
|
||||
f1ap_drb_to_be_setup_t *drb = &drbs[nb_drb];
|
||||
drb->drb_id = pduSession[p].DRBnGRanList[i].id;
|
||||
drb->rlc_mode = rrc->configuration.um_on_default_drb ? RLC_MODE_UM : RLC_MODE_AM;
|
||||
drb->rlc_mode = rrc->configuration.um_on_default_drb ? F1AP_RLC_MODE_UM_BIDIR : F1AP_RLC_MODE_AM;
|
||||
drb->up_ul_tnl[0].tl_address = drb_config->UpParamList[0].tlAddress;
|
||||
drb->up_ul_tnl[0].port = rrc->eth_params_s.my_portd;
|
||||
drb->up_ul_tnl[0].teid = drb_config->UpParamList[0].teId;
|
||||
|
||||
Reference in New Issue
Block a user