As in deba3ae066 ("Reset CU-UP E1 UE contexts after E1 Setup
Response"), the CU-CP should reset the E1 UE contexts after E1 Setup
Response. 38.463 sec. 8.2.3 says
> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.
In the case of CU-CP, this is a bit more complicated. More precisely, we
need to wait for the CU-UP to be available again before informing the DU
about the loss (implemented via an F1 Reset message), because otherwise,
the UE might reconnect immediately, before the CU-UP is online again.
Hence, on connection loss, we mark affected UEs (by setting their E1
association ID to 0); as long as the CU-UP does not connect, nothing
will happen (but UEs don't have user plane). Upon CU-UP connecting
again, we request release of the UEs via NGAP (similarly to what is done
if the DU goes offline, see invalidate_du_connections()), free the UE
contexts locally, and send an F1 Reset message to the DU, because
38.473 sec 8.2.1.2.1 says
> a failure at the gNB-CU [...] has resulted in the loss of some or
> all transaction reference information [...] a RESET message shall be
> sent to the gNB-DU.
The core should accept and send an NGAP release command message; since
no UE contexts are to be found (already deleted), the CU-CP will just
send a release complete (together with some warnings).
It might be possible to more gracefully handle the situation (e.g., as
described in 38.401 section 8.9.5 "Change of gNB-CU-UP"), but
- we lack the PDCP SN exchange
- the current procedure has the advantage of being equivalent to
"restart of the entire gNB", with less downtown.
66 lines
3.1 KiB
C
66 lines
3.1 KiB
C
/*
|
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
|
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.openairinterface.org/?page_id=698
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*-------------------------------------------------------------------------------
|
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
* contact@openairinterface.org
|
|
*/
|
|
|
|
#ifndef RRC_GNB_DU_H_
|
|
#define RRC_GNB_DU_H_
|
|
|
|
#include <netinet/in.h>
|
|
#include <netinet/sctp.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
struct f1ap_setup_req_s;
|
|
struct f1ap_lost_connection_t;
|
|
struct gNB_RRC_INST_s;
|
|
struct nr_rrc_du_container_t;
|
|
struct f1ap_gnb_du_configuration_update_s;
|
|
struct f1ap_served_cell_info_t;
|
|
|
|
void rrc_gNB_process_f1_setup_req(struct f1ap_setup_req_s *req, sctp_assoc_t assoc_id);
|
|
void rrc_CU_process_f1_lost_connection(struct gNB_RRC_INST_s *rrc, struct f1ap_lost_connection_t *lc, sctp_assoc_t assoc_id);
|
|
void rrc_gNB_process_f1_du_configuration_update(struct f1ap_gnb_du_configuration_update_s *conf_up, sctp_assoc_t assoc_id);
|
|
|
|
struct nr_rrc_du_container_t *get_du_for_ue(struct gNB_RRC_INST_s *rrc, uint32_t ue_id);
|
|
struct nr_rrc_du_container_t *get_du_by_assoc_id(struct gNB_RRC_INST_s *rrc, sctp_assoc_t assoc_id);
|
|
const struct f1ap_served_cell_info_t *get_cell_information_by_phycellId(int phyCellId);
|
|
struct nr_rrc_du_container_t *get_du_by_cell_id(struct gNB_RRC_INST_s *rrc, uint64_t cell_id);
|
|
|
|
void dump_du_info(const struct gNB_RRC_INST_s *rrc, FILE *f);
|
|
|
|
int get_dl_band(const struct f1ap_served_cell_info_t *cell_info);
|
|
int get_ssb_scs(const struct f1ap_served_cell_info_t *cell_info);
|
|
int get_ssb_arfcn(const struct nr_rrc_du_container_t *du);
|
|
|
|
struct nr_rrc_du_container_t *find_target_du(struct gNB_RRC_INST_s *rrc, sctp_assoc_t source_assoc_id);
|
|
|
|
// the assoc_id might be 0 (if the DU goes offline). Below helper macro to
|
|
// print an error and return from the function in that case
|
|
#define RETURN_IF_INVALID_ASSOC_ID(assoc_id) \
|
|
{ \
|
|
if (assoc_id == 0) { \
|
|
LOG_E(NR_RRC, "cannot send data: invalid assoc_id 0, DU offline\n"); \
|
|
return; \
|
|
} \
|
|
}
|
|
|
|
void trigger_f1_reset(struct gNB_RRC_INST_s *rrc, sctp_assoc_t du_assoc_id);
|
|
|
|
#endif /* RRC_GNB_DU_H_ */
|