E1AP: rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
A DRB To Modify Item contains a Flow Mapping Information, which overrides previous mapping information. For consistency, rename the count member to reflect a QoS Flow modification, since it is not limited to setup only. - Rename DRB flow mapping counters to `numQosFlowsMod` for a DRB To Modify List - Adjust encode/decode/equality + E1AP tests
This commit is contained in:
@@ -404,8 +404,8 @@ typedef struct DRB_nGRAN_to_modify_s {
|
||||
// DL UP Transport Layer Information (O) (clause 9.3.1.13, 9.3.2.1)
|
||||
int numDlUpParam;
|
||||
up_params_t DlUpParamList[E1AP_MAX_NUM_UP_PARAM];
|
||||
// QoS Flows Information To Modify (O) (clause 9.3.1.25, 9.3.1.26)
|
||||
int numQosFlow2Setup;
|
||||
// Flow Mapping Information (O) (clause 9.3.1.25, 9.3.1.26)
|
||||
int numQosFlowsMod;
|
||||
qos_flow_to_setup_t qosFlows[E1AP_MAX_NUM_QOS_FLOWS];
|
||||
} DRB_nGRAN_to_mod_t;
|
||||
|
||||
|
||||
@@ -1459,7 +1459,7 @@ static E1AP_PDU_Session_Resource_To_Modify_Item_t e1_encode_pdu_session_to_mod_i
|
||||
}
|
||||
}
|
||||
// QoS Flows to setup (O)
|
||||
for (const qos_flow_to_setup_t *k = j->qosFlows; k < j->qosFlows + j->numQosFlow2Setup; k++) {
|
||||
for (const qos_flow_to_setup_t *k = j->qosFlows; k < j->qosFlows + j->numQosFlowsMod; k++) {
|
||||
asn1cCalloc(drb2Mod->flow_Mapping_Information, flow_Mapping_Information);
|
||||
asn1cSequenceAdd(flow_Mapping_Information->list, E1AP_QoS_Flow_QoS_Parameter_Item_t, ie1_2);
|
||||
*ie1_2 = e1_encode_qos_flow_to_setup(k);
|
||||
@@ -1748,7 +1748,7 @@ static bool e1_decode_pdu_session_to_mod_item(pdu_session_to_mod_t *out, const E
|
||||
// QoS Flows Information To Be Setup (O)
|
||||
if (drb2Mod->flow_Mapping_Information) {
|
||||
E1AP_QoS_Flow_QoS_Parameter_List_t *qos2SetupList = drb2Mod->flow_Mapping_Information;
|
||||
drb->numQosFlow2Setup = qos2SetupList->list.count;
|
||||
drb->numQosFlowsMod = qos2SetupList->list.count;
|
||||
for (int k = 0; k < qos2SetupList->list.count; k++) {
|
||||
CHECK_E1AP_DEC(e1_decode_qos_flow_to_setup(drb->qosFlows + k, qos2SetupList->list.array[k]));
|
||||
}
|
||||
@@ -1992,8 +1992,8 @@ static bool eq_security_ind(security_indication_t *a, security_indication_t *b)
|
||||
static bool eq_drb_to_mod(const DRB_nGRAN_to_mod_t *a, const DRB_nGRAN_to_mod_t *b)
|
||||
{
|
||||
_E1_EQ_CHECK_LONG(a->id, b->id);
|
||||
_E1_EQ_CHECK_INT(a->numQosFlow2Setup, b->numQosFlow2Setup);
|
||||
for (int i = 0; i < a->numQosFlow2Setup; i++) {
|
||||
_E1_EQ_CHECK_INT(a->numQosFlowsMod, b->numQosFlowsMod);
|
||||
for (int i = 0; i < a->numQosFlowsMod; i++) {
|
||||
if (!eq_qos_flow(&a->qosFlows[i], &b->qosFlows[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ static void test_bearer_context_modification_request(void)
|
||||
.pdcp_config = malloc_or_fail(sizeof(*drb_to_mod.pdcp_config)),
|
||||
.pdcp_sn_status_requested = true,
|
||||
.pdcp_status = malloc_or_fail(sizeof(*drb_to_mod.pdcp_status)),
|
||||
.numQosFlow2Setup = 1,
|
||||
.numQosFlowsMod = 1,
|
||||
.qosFlows[0] = dummy_qos_flows,
|
||||
};
|
||||
*drb_to_mod.pdcp_config = dummy_pdcp_config;
|
||||
|
||||
Reference in New Issue
Block a user