Merge remote-tracking branch 'origin/e1ap-issue-878' into integration_2025_w04 (!3171)

- Refactor SCTP Association Response Handling
  - Unified function for both CU-CP and CU-UP handling
  - CU-CP: Notifies RRC of E1 connection loss with CU-UP
  - CU-UP: Initiates a new SCTP association request to regain E1 connection
  - this fix will prevent issue #878 from happening

- Send list of PDU Session Resources to Failed Setup in the (PDU Session
  Resource/Initial Context) Setup Response
  - depending on different failure scenarios
  - e.g. (#878) when No CU-UP is associated and still the CU-CP receives a PDU
    Session Setup Request
  - add relevant functions to handle NGAP Setup Response messages with failed
    list of items
  - this is an extra failure handling to make #878 is handled if it ever happens
    again

- NGAP Cause Refactoring
  - Refactor struct for NGAP cause group and value
  - Add extended radio network cause enumeration values
  - Refactor redundant code into a new NGAP cause encoding function

- Minor logging, function descriptions improvements

Closes #878
This commit is contained in:
Jaroslava Fiedlerova
2025-01-23 17:50:55 +01:00
24 changed files with 345 additions and 282 deletions
-1
View File
@@ -69,7 +69,6 @@ MESSAGE_DEF(NGAP_UE_CONTEXT_RELEASE_COMPLETE, MESSAGE_PRIORITY_MED, ngap_ue_rele
MESSAGE_DEF(NGAP_UE_CTXT_MODIFICATION_RESP , MESSAGE_PRIORITY_MED, ngap_ue_ctxt_modification_resp_t , ngap_ue_ctxt_modification_resp)
MESSAGE_DEF(NGAP_UE_CTXT_MODIFICATION_FAIL , MESSAGE_PRIORITY_MED, ngap_ue_ctxt_modification_fail_t , ngap_ue_ctxt_modification_fail)
MESSAGE_DEF(NGAP_PDUSESSION_SETUP_RESP , MESSAGE_PRIORITY_MED, ngap_pdusession_setup_resp_t , ngap_pdusession_setup_resp)
MESSAGE_DEF(NGAP_PDUSESSION_SETUP_REQUEST_FAIL , MESSAGE_PRIORITY_MED, ngap_pdusession_setup_req_fail_t , ngap_pdusession_setup_request_fail)
MESSAGE_DEF(NGAP_PDUSESSION_MODIFY_RESP , MESSAGE_PRIORITY_MED, ngap_pdusession_modify_resp_t , ngap_pdusession_modify_resp)
MESSAGE_DEF(NGAP_PDUSESSION_RELEASE_RESPONSE , MESSAGE_PRIORITY_MED, ngap_pdusession_release_resp_t , ngap_pdusession_release_resp)
MESSAGE_DEF(NGAP_PATH_SWITCH_REQ , MESSAGE_PRIORITY_MED, ngap_path_switch_req_t , ngap_path_switch_req)
+21 -19
View File
@@ -51,7 +51,6 @@
#define NGAP_UE_CTXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_ue_ctxt_modification_resp
#define NGAP_UE_CTXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_ue_ctxt_modification_fail
#define NGAP_PDUSESSION_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_resp
#define NGAP_PDUSESSION_SETUP_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_request_fail
#define NGAP_PDUSESSION_MODIFY_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_modify_resp
#define NGAP_PATH_SWITCH_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req
#define NGAP_PATH_SWITCH_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req_ack
@@ -336,19 +335,21 @@ typedef struct pdusession_modify_s {
qos_flow_tobe_modified_t qos[QOSFLOW_MAX_VALUE];
} pdusession_modify_t;
typedef enum ngap_Cause_e {
NGAP_CAUSE_NOTHING, /* No components present */
/* Cause (9.3.1.2 of 3GPP TS 38.413) */
typedef enum ngap_cause_group_e {
NGAP_CAUSE_NOTHING, /* No components present */
NGAP_CAUSE_RADIO_NETWORK,
NGAP_CAUSE_TRANSPORT,
NGAP_CAUSE_NAS,
NGAP_CAUSE_PROTOCOL,
NGAP_CAUSE_MISC,
NGAP_Cause_PR_choice_ExtensionS,
//Evilish manual duplicate of asn.1 grammar
//because it is human work, whereas it can be generated by machine
//and because humans manual copy creates bugs
//and we create multiple names for the same thing, that is a source of confusion
} ngap_Cause_t;
} ngap_cause_group_t;
/* Cause (9.3.1.2 of 3GPP TS 38.413) */
typedef struct ngap_cause_s {
ngap_cause_group_t type;
uint8_t value;
} ngap_cause_t;
typedef enum ngap_Cause_radio_network_e {
NGAP_CAUSE_RADIO_NETWORK_UNSPECIFIED,
@@ -378,7 +379,7 @@ typedef enum ngap_Cause_radio_network_e {
NGAP_CAUSE_RADIO_NETWORK_FAILURE_IN_RADIO_INTERFACE_PROCEDURE,
NGAP_CAUSE_RADIO_NETWORK_INTERACTION_WITH_OTHER_PROCEDURE,
NGAP_CAUSE_RADIO_NETWORK_UNKNOWN_PDU_SESSION_ID,
NGAP_CAUSE_RADIO_NETWORK_UNKOWN_QOS_FLOW_ID,
NGAP_CAUSE_RADIO_NETWORK_UNKNOWN_QOS_FLOW_ID,
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_PDU_SESSION_ID_INSTANCES,
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_QOS_FLOW_ID_INSTANCES,
NGAP_CAUSE_RADIO_NETWORK_ENCRYPTION_AND_OR_INTEGRITY_PROTECTION_ALGORITHMS_NOT_SUPPORTED,
@@ -398,8 +399,12 @@ typedef enum ngap_Cause_radio_network_e {
NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_CN_DETECTED_MOBILITY,
NGAP_CAUSE_RADIO_NETWORK_N26_INTERFACE_NOT_AVAILABLE,
NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_PRE_EMPTION,
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_LOCATION_REPORTING_REFERENCE_ID_INSTANCES
} ngap_Cause_radio_network_t;
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_LOCATION_REPORTING_REFERENCE_ID_INSTANCES,
NGAP_CAUSE_RADIO_NETWORK_RSN_NOT_AVAILABLE_FOR_THE_UP,
NGAP_CAUSE_RADIO_NETWORK_NPN_ACCESS_DENIED,
NGAP_CAUSE_RADIO_NETWORK_CAG_ONLY_ACCESS_DENIED,
NGAP_CAUSE_RADIO_NETWORK_INSUFFICIENT_UE_CAPABILITIES
} ngap_cause_radio_network_t;
/**
* NGAP protocol cause values as per 9.3.1.2 `Cause` section in 3GPP TS 38.413.
@@ -418,8 +423,7 @@ typedef struct pdusession_failed_s {
/* Unique pdusession_id for the UE. */
uint8_t pdusession_id;
/* Cause of the failure */
ngap_Cause_t cause;
uint8_t cause_value;
ngap_cause_t cause;
} pdusession_failed_t;
typedef enum ngap_ue_ctxt_modification_present_s {
@@ -557,9 +561,8 @@ typedef struct ngap_initial_context_setup_fail_s {
uint64_t amf_ue_ngap_id;
ngap_Cause_t cause;
long cause_value;
} ngap_initial_context_setup_fail_t, ngap_ue_ctxt_modification_fail_t, ngap_pdusession_setup_req_fail_t;
ngap_cause_t cause;
} ngap_initial_context_setup_fail_t, ngap_ue_ctxt_modification_fail_t;
typedef struct ngap_nas_non_delivery_ind_s {
uint32_t gNB_ue_ngap_id;
@@ -803,8 +806,7 @@ typedef struct ngap_ue_release_req_s {
uint8_t nb_of_pdusessions;
/* list of pdusession resource by RRC layers */
pdusession_release_t pdusessions[NGAP_MAX_PDUSESSION];
ngap_Cause_t cause;
long cause_value;
ngap_cause_t cause;
} ngap_ue_release_req_t, ngap_ue_release_resp_t;
typedef struct ngap_pdusession_modify_req_s {
+17 -6
View File
@@ -36,11 +36,22 @@
#define SCTP_INIT_MSG_MULTI_CNF(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_msg_multi_cnf
#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association
enum sctp_state_e {
SCTP_STATE_CLOSED,
SCTP_STATE_SHUTDOWN,
SCTP_STATE_ESTABLISHED,
SCTP_STATE_UNREACHABLE
#define SCTP_STATES \
ITEM(SCTP_STATE_CLOSED) \
ITEM(SCTP_STATE_SHUTDOWN) \
ITEM(SCTP_STATE_ESTABLISHED) \
ITEM(SCTP_STATE_UNREACHABLE)
typedef enum {
#define ITEM(state) state,
SCTP_STATES
#undef ITEM
} sctp_state_e;
static const char *sctp_state_s[] __attribute__((unused)) = {
#define ITEM(state) #state,
SCTP_STATES
#undef ITEM
};
typedef struct sctp_new_association_req_s {
@@ -112,7 +123,7 @@ typedef struct sctp_new_association_resp_s {
uint16_t in_streams;
/* State of the association at SCTP level */
enum sctp_state_e sctp_state;
sctp_state_e sctp_state;
} sctp_new_association_resp_t;
typedef struct sctp_data_ind_s {