Store F1-U downlink TL and TEID
- info coming from UE context setup/modification response messages in RRC
This commit is contained in:
@@ -276,12 +276,14 @@ typedef struct pdusession_s {
|
|||||||
/* The transport layer address for the IP packets */
|
/* The transport layer address for the IP packets */
|
||||||
pdu_session_type_t pdu_session_type;
|
pdu_session_type_t pdu_session_type;
|
||||||
transport_layer_addr_t upf_addr;
|
transport_layer_addr_t upf_addr;
|
||||||
/* S-GW Tunnel endpoint identifier */
|
/* Outgoing (UL) NG-U Tunnel Endpoint Identifier (S-GW/UPF) */
|
||||||
uint32_t gtp_teid;
|
uint32_t gtp_teid;
|
||||||
/* Stores the DRB ID of the DRBs used by this PDU Session */
|
/* Stores the DRB ID of the DRBs used by this PDU Session */
|
||||||
uint8_t used_drbs[MAX_DRBS_PER_UE];
|
uint8_t used_drbs[MAX_DRBS_PER_UE];
|
||||||
|
/* Incoming (DL) NG-U Tunnel Endpoint Identifier (S-GW/UPF) */
|
||||||
uint32_t gNB_teid_N3;
|
uint32_t gNB_teid_N3;
|
||||||
transport_layer_addr_t gNB_addr_N3;
|
transport_layer_addr_t gNB_addr_N3;
|
||||||
|
/* Incoming (DL) NG-U Tunnel Endpoint Identifier (S-GW/UPF) */
|
||||||
uint32_t UPF_teid_N3;
|
uint32_t UPF_teid_N3;
|
||||||
transport_layer_addr_t UPF_addr_N3;
|
transport_layer_addr_t UPF_addr_N3;
|
||||||
nssai_t nssai;
|
nssai_t nssai;
|
||||||
@@ -306,7 +308,7 @@ typedef struct pdusession_setup_s {
|
|||||||
uint8_t pdu_session_type;
|
uint8_t pdu_session_type;
|
||||||
transport_layer_addr_t gNB_addr;
|
transport_layer_addr_t gNB_addr;
|
||||||
|
|
||||||
/* UPF Tunnel endpoint identifier */
|
/* Incoming NG-U Tunnel Endpoint Identifier (S-GW/UPF) */
|
||||||
uint32_t gtp_teid;
|
uint32_t gtp_teid;
|
||||||
|
|
||||||
/* qos flow list number */
|
/* qos flow list number */
|
||||||
|
|||||||
@@ -189,6 +189,16 @@ typedef struct pdu_session_param_s {
|
|||||||
uint8_t cause_value;
|
uint8_t cause_value;
|
||||||
} rrc_pdu_session_param_t;
|
} rrc_pdu_session_param_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief F1-U tunnel configuration
|
||||||
|
*/
|
||||||
|
typedef struct f1u_tunnel_s {
|
||||||
|
/* Downlink F1-U Tunnel Endpoint Identifier (CU-UP/DU) */
|
||||||
|
uint32_t cuup_teid_f1u;
|
||||||
|
/* DL F1-U Transport Layer */
|
||||||
|
transport_layer_addr_t cuup_addr_f1u;
|
||||||
|
} f1u_tunnel_t;
|
||||||
|
|
||||||
typedef struct drb_s {
|
typedef struct drb_s {
|
||||||
int status;
|
int status;
|
||||||
int defaultDRBid;
|
int defaultDRBid;
|
||||||
@@ -221,6 +231,8 @@ typedef struct drb_s {
|
|||||||
int cipheringDisabled;
|
int cipheringDisabled;
|
||||||
} ext1;
|
} ext1;
|
||||||
} pdcp_config;
|
} pdcp_config;
|
||||||
|
// F1-U
|
||||||
|
f1u_tunnel_t f1u_tunnel_config;
|
||||||
} drb_t;
|
} drb_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -1761,6 +1761,16 @@ static void fill_e1_bearer_modif(DRB_nGRAN_to_setup_t *drb_e1, const f1ap_drb_to
|
|||||||
drb_e1->DlUpParamList[0].teId = drb_f1->up_dl_tnl[0].teid;
|
drb_e1->DlUpParamList[0].teId = drb_f1->up_dl_tnl[0].teid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Store F1-U DL TL and TEID in RRC
|
||||||
|
*/
|
||||||
|
static void f1u_gtp_update(f1u_tunnel_t *f1u, const f1ap_drb_to_be_setup_t *drb_f1)
|
||||||
|
{
|
||||||
|
f1u->cuup_teid_f1u = drb_f1->up_dl_tnl[0].teid;
|
||||||
|
memcpy(&f1u->cuup_addr_f1u.buffer, &drb_f1->up_dl_tnl[0].tl_address, sizeof(uint8_t) * 4);
|
||||||
|
f1u->cuup_addr_f1u.length = sizeof(in_addr_t);
|
||||||
|
}
|
||||||
|
|
||||||
/* \brief use list of DRBs and send the corresponding bearer update message via
|
/* \brief use list of DRBs and send the corresponding bearer update message via
|
||||||
* E1 to the CU of this UE */
|
* E1 to the CU of this UE */
|
||||||
static void e1_send_bearer_updates(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, f1ap_drb_to_be_setup_t *drbs)
|
static void e1_send_bearer_updates(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, f1ap_drb_to_be_setup_t *drbs)
|
||||||
@@ -1782,6 +1792,8 @@ static void e1_send_bearer_updates(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, f
|
|||||||
DevAssert(pdu_e1 != NULL);
|
DevAssert(pdu_e1 != NULL);
|
||||||
pdu_e1->sessionId = pdu_ue->param.pdusession_id;
|
pdu_e1->sessionId = pdu_ue->param.pdusession_id;
|
||||||
DRB_nGRAN_to_setup_t *drb_e1 = &pdu_e1->DRBnGRanModList[pdu_e1->numDRB2Modify];
|
DRB_nGRAN_to_setup_t *drb_e1 = &pdu_e1->DRBnGRanModList[pdu_e1->numDRB2Modify];
|
||||||
|
f1u_gtp_update(&UE->established_drbs[drb_f1->drb_id].f1u_tunnel_config, drb_f1);
|
||||||
|
/* Fill E1 bearer context modification */
|
||||||
fill_e1_bearer_modif(drb_e1, drb_f1);
|
fill_e1_bearer_modif(drb_e1, drb_f1);
|
||||||
pdu_e1->numDRB2Modify += 1;
|
pdu_e1->numDRB2Modify += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user