Hardcode (noS1) PDU session ID to 10
Defacto, the PDU session ID for noS1 modes is already hardcoded, as
starting the nr-softmodem with --noS1 --default-pdu-id 1 leads to
Assertion (entity != ((void *)0)) failed!
In start_sdap_tun_gnb_first_ue_default_pdu_session() openair2/SDAP/nr_sdap/nr_sdap.c:163
Further, the --default-pdu-id parameter will be deactivated in a later
commit, and we cannot rely on it. Therefore:
- hardcode noS1 PDU ID (also used in --do-ra/--phy-test modes) to 10 and
use in gNB&UE
- pass the PDU session ID used in SDAP entity initialization down to
start_sdap_tun_gnb_first_ue_default_pdu_session() to always use the
correct one
This commit is contained in:
@@ -100,5 +100,8 @@
|
|||||||
// SDAP
|
// SDAP
|
||||||
#define MAX_QOS_FLOWS 64
|
#define MAX_QOS_FLOWS 64
|
||||||
|
|
||||||
|
// SDAP/5G NAS NOS1
|
||||||
|
#define DEFAULT_NOS1_PDU_ID 10
|
||||||
|
|
||||||
#define SPEED_OF_LIGHT 299792458 // in m/s
|
#define SPEED_OF_LIGHT 299792458 // in m/s
|
||||||
#endif /* __PLATFORM_CONSTANTS_H__ */
|
#endif /* __PLATFORM_CONSTANTS_H__ */
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, x2ap_ENDC_sgnb_addition_req_t *m, sctp_
|
|||||||
byte_array_t cgci = {0};
|
byte_array_t cgci = {0};
|
||||||
if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1) {
|
if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1) {
|
||||||
DevAssert(m == NULL);
|
DevAssert(m == NULL);
|
||||||
UE->rb_config = get_default_rbconfig(10 /* EPS bearer ID */, 1 /* drb ID */, NR_CipheringAlgorithm_nea0, NR_SecurityConfig__keyToUse_master, &rrc->pdcp_config);
|
UE->rb_config = get_default_rbconfig(DEFAULT_NOS1_PDU_ID, 1 /* drb ID */, NR_CipheringAlgorithm_nea0, NR_SecurityConfig__keyToUse_master, &rrc->pdcp_config);
|
||||||
int len = cg_config_info_from_ue_cap_file(sizeof tmp, tmp);
|
int len = cg_config_info_from_ue_cap_file(sizeof tmp, tmp);
|
||||||
DevAssert(len > 0);
|
DevAssert(len > 0);
|
||||||
cgci = create_byte_array(len, tmp);
|
cgci = create_byte_array(len, tmp);
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ static void *sdap_tun_read_thread(void *arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id)
|
void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id, int pdu_session_id)
|
||||||
{
|
{
|
||||||
nr_sdap_entity_t *entity = nr_sdap_get_entity(ue_id, get_softmodem_params()->default_pdu_session_id);
|
nr_sdap_entity_t *entity = nr_sdap_get_entity(ue_id, pdu_session_id);
|
||||||
DevAssert(entity != NULL);
|
DevAssert(entity != NULL);
|
||||||
DevAssert(entity->is_gnb);
|
DevAssert(entity->is_gnb);
|
||||||
char *ifprefix = get_softmodem_params()->nsa ? "oaitun_gnb" : "oaitun_enb";
|
char *ifprefix = get_softmodem_params()->nsa ? "oaitun_gnb" : "oaitun_enb";
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ void sdap_data_ind(int pdcp_entity,
|
|||||||
char *buf,
|
char *buf,
|
||||||
int size);
|
int size);
|
||||||
|
|
||||||
void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id);
|
void start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id_t ue_id, int pdu_session_id);
|
||||||
void create_ue_ip_if(const char *ipv4, const char *ipv6, int ue_id, int pdu_session_id);
|
void create_ue_ip_if(const char *ipv4, const char *ipv6, int ue_id, int pdu_session_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ static void nr_sdap_add_entity(const int is_gnb, const ue_id_t ue_id, const sdap
|
|||||||
if (IS_SOFTMODEM_NOS1 && is_gnb) {
|
if (IS_SOFTMODEM_NOS1 && is_gnb) {
|
||||||
// In NOS1 mode, terminate SDAP for the first UE on the gNB. This allows injecting/receiving
|
// In NOS1 mode, terminate SDAP for the first UE on the gNB. This allows injecting/receiving
|
||||||
// PDCP SDUs to/from the TUN interface.
|
// PDCP SDUs to/from the TUN interface.
|
||||||
start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id);
|
start_sdap_tun_gnb_first_ue_default_pdu_session(ue_id, sdap_entity->pdusession_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2160,7 +2160,7 @@ void *nas_nrue(void *args_p)
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NAS_INIT_NOS1_IF: {
|
case NAS_INIT_NOS1_IF: {
|
||||||
const int pdu_session_id = get_softmodem_params()->default_pdu_session_id;
|
const int pdu_session_id = DEFAULT_NOS1_PDU_ID;
|
||||||
const char *ip = "10.0.1.2";
|
const char *ip = "10.0.1.2";
|
||||||
const int qfi = 7;
|
const int qfi = 7;
|
||||||
create_ue_ip_if(ip, NULL, nas->UE_id, pdu_session_id);
|
create_ue_ip_if(ip, NULL, nas->UE_id, pdu_session_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user